S12.6.2_A2.js (1003B)
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 While evaluating The production IterationStatement: "while ( Expression ) 7 Statement", Expression is evaluated first 8 es5id: 12.6.2_A2 9 description: Evaluating Statement with error Expression 10 ---*/ 11 12 try { 13 while ((function(){throw 1})()) __in__while = "reached"; 14 throw new Test262Error('#1: \'while ((function(){throw 1})()) __in__while = "reached"\' lead to throwing exception'); 15 } catch (e) { 16 if (e !== 1) { 17 throw new Test262Error('#1: Exception === 1. Actual: Exception ==='+e); 18 } 19 } 20 21 ////////////////////////////////////////////////////////////////////////////// 22 //CHECK#1 23 if (typeof __in__while !== "undefined") { 24 throw new Test262Error('#1.1: typeof __in__while === "undefined". Actual: typeof __in__while ==='+typeof __in__while); 25 } 26 // 27 ////////////////////////////////////////////////////////////////////////////// 28 29 reportCompare(0, 0);