diff options
author | David Fugate <dfugate@microsoft.com> | 2011-10-03 12:20:26 -0700 |
---|---|---|
committer | David Fugate <dfugate@microsoft.com> | 2011-10-03 12:20:26 -0700 |
commit | 69a1080bb68f1b28abd72e33b730f790bbb69aae (patch) | |
tree | 7cceccd22522fa9ceacd8f8b0ab510567f5c7c27 /test/suite/ch10/10.4/S10.4_A1.1_T1.js | |
parent | 6c9436f9775c83ad2ac18dfdab36d2a3aceff24e (diff) |
Renamed Sputnik directories.
Diffstat (limited to 'test/suite/ch10/10.4/S10.4_A1.1_T1.js')
-rw-r--r-- | test/suite/ch10/10.4/S10.4_A1.1_T1.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/suite/ch10/10.4/S10.4_A1.1_T1.js b/test/suite/ch10/10.4/S10.4_A1.1_T1.js new file mode 100644 index 000000000..87768c693 --- /dev/null +++ b/test/suite/ch10/10.4/S10.4_A1.1_T1.js @@ -0,0 +1,31 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Every function call enters a new execution context + * + * @path 10_Execution_Contexts/10.4_Establishing_An_Execution_Context/S10.2_A1.1_T1.js + * @description Sequence of function calls + */ + +var y; + +function f(){ + var x; + + if(x === undefined) { + x = 0; + } else { + x = 1; + } + + return x; +} + +y = f(); +y = f(); + +if(!(y === 0)){ + $ERROR("#1: Sequenced function calls shares execution context"); +} + |