js/src/tests/test262/ch12/12.8/S12.8_A7.js

branch
TOR_BUG_3246
changeset 6
8bccb770b82d
equal deleted inserted replaced
-1:000000000000 0:a407ac4e15a6
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 * Appearing of "break" within eval statement that is nested in an IterationStatement yields SyntaxError
6 *
7 * @path ch12/12.8/S12.8_A7.js
8 * @description Using eval "eval("break LABEL1")"
9 */
10
11 var x=0,y=0;
12
13 //////////////////////////////////////////////////////////////////////////////
14 //CHECK#1
15 try{
16 LABEL1 : do {
17 x++;
18 eval("break LABEL1");
19 y++;
20 } while(0);
21 $ERROR('#1: eval("break LABEL1") does not lead to throwing exception');
22 } catch(e){
23 if(!(e instanceof SyntaxError)){
24 $ERROR("1.1: Appearing of break within eval statement inside of IterationStatement yields SyntaxError");
25 }
26 }
27 //
28 //////////////////////////////////////////////////////////////////////////////
29

mercurial