S12.8_A7.js (888B)
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 Appearing of "break" within eval statement that is nested in an 7 IterationStatement yields SyntaxError 8 es5id: 12.8_A7 9 description: Using eval "eval("break LABEL1")" 10 ---*/ 11 12 var x=0,y=0; 13 14 ////////////////////////////////////////////////////////////////////////////// 15 //CHECK#1 16 try{ 17 LABEL1 : do { 18 x++; 19 eval("break LABEL1"); 20 y++; 21 } while(0); 22 throw new Test262Error('#1: eval("break LABEL1") does not lead to throwing exception'); 23 } catch(e){ 24 if(!(e instanceof SyntaxError)){ 25 throw new Test262Error("1.1: Appearing of break within eval statement inside of IterationStatement yields SyntaxError"); 26 } 27 } 28 // 29 ////////////////////////////////////////////////////////////////////////////// 30 31 reportCompare(0, 0);