S12.6.2_A4_T3.js (1045B)
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 "break" within a "while" Statement is allowed and performed as described 7 in 12.8 8 es5id: 12.6.2_A4_T3 9 description: "\"break\" and VariableDeclaration within a \"while\" Statement" 10 ---*/ 11 12 do_out : while(1===1) { 13 if (__in__do__before__break) break; 14 var __in__do__before__break="once"; 15 do_in : while (1) { 16 var __in__do__IN__before__break="in"; 17 break do_out; 18 var __in__do__IN__after__break="the"; 19 } ; 20 var __in__do__after__break="lifetime"; 21 } ; 22 23 ////////////////////////////////////////////////////////////////////////////// 24 //CHECK#1 25 if (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&!__in__do__after__break)) { 26 throw new Test262Error('#1: Break inside do-while is allowed as its described at standard'); 27 } 28 // 29 ////////////////////////////////////////////////////////////////////////////// 30 31 reportCompare(0, 0);