S12.4_A2_T1.js (1152B)
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 info: | 6 The production ExpressionStatement : [lookahead \notin {{, function}] Expression; is evaluated as follows: 7 1. Evaluate Expression. 8 2. Call GetValue(Result(1)). 9 3. Return (normal, Result(2), empty) 10 es5id: 12.4_A2_T1 11 description: Checking by using eval "(eval("x+1+x==1"))" 12 ---*/ 13 14 var x, __evaluated; 15 16 x=1; 17 18 __evaluated = eval("x+1+x==1"); 19 20 ////////////////////////////////////////////////////////////////////////////// 21 //CHECK#1 22 if (__evaluated !== false) { 23 throw new Test262Error('#1: __evaluated === false. Actual: __evaluated ==='+ __evaluated ); 24 } 25 // 26 ////////////////////////////////////////////////////////////////////////////// 27 28 __evaluated = eval("1+1+1==1"); 29 30 ////////////////////////////////////////////////////////////////////////////// 31 //CHECK#2 32 if (__evaluated !== false) { 33 throw new Test262Error('#2: __evaluated === false. Actual: __evaluated ==='+ __evaluated ); 34 } 35 // 36 ////////////////////////////////////////////////////////////////////////////// 37 38 reportCompare(0, 0);