S12.6.1_A2.js (922B)
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 "do Statement while ( Expression )", Statement is 7 evaluated first and only after it is done Expression is checked 8 es5id: 12.6.1_A2 9 description: Evaluating Statement with error Expression 10 ---*/ 11 12 var __in__do; 13 14 try { 15 do __in__do = "reached"; while (abbracadabra); 16 throw new Test262Error('#1: \'do __in__do = "reached"; while (abbracadabra)\' lead to throwing exception'); 17 } catch (e) { 18 if (e instanceof Test262Error) throw e; 19 } 20 21 ////////////////////////////////////////////////////////////////////////////// 22 //CHECK#1 23 if (__in__do !== "reached") { 24 throw new Test262Error('#1.1: __in__do === "reached". Actual: __in__do ==='+ __in__do ); 25 } 26 // 27 ////////////////////////////////////////////////////////////////////////////// 28 29 reportCompare(0, 0);