js/src/tests/test262/ch12/12.2/S12.2_A5.js

branch
TOR_BUG_3246
changeset 6
8bccb770b82d
equal deleted inserted replaced
-1:000000000000 0:fe8b12e0e1bc
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /**
5 * VariableDeclaration within Eval statement is initialized as the program reaches the eval statement
6 *
7 * @path ch12/12.2/S12.2_A5.js
8 * @description Executing eval("var x")
9 */
10
11 //////////////////////////////////////////////////////////////////////////////
12 //CHECK#1
13 try{
14 x=x;
15 $ERROR('#1: "x=x" lead to throwing exception');
16 }catch(e){
17 $PRINT(e.message);
18 };
19 //
20 //////////////////////////////////////////////////////////////////////////////
21
22 eval("var x");
23
24 //////////////////////////////////////////////////////////////////////////////
25 //CHECK#2
26 try{
27 x=x;
28 }catch(e){
29 $ERROR('#2: VariableDeclaration inside Eval statement is initialized when program reaches the eval statement '+e.message);
30 };
31 //
32 //////////////////////////////////////////////////////////////////////////////
33

mercurial