|
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 * When "break" is evaluated, (break, empty, empty) is returned |
|
6 * |
|
7 * @path ch12/12.8/S12.8_A3.js |
|
8 * @description Using "break" without Identifier within labeled loop |
|
9 */ |
|
10 |
|
11 LABEL_OUT : var x=0, y=0; |
|
12 |
|
13 LABEL_DO_LOOP : do { |
|
14 LABEL_IN : x=2; |
|
15 break ; |
|
16 LABEL_IN_2 : var y=2; |
|
17 |
|
18 function IN_DO_FUNC(){} |
|
19 } while(0); |
|
20 |
|
21 LABEL_ANOTHER_LOOP : do { |
|
22 ; |
|
23 } while(0); |
|
24 |
|
25 function OUT_FUNC(){} |
|
26 |
|
27 ////////////////////////////////////////////////////////////////////////////// |
|
28 //CHECK#1 |
|
29 if ((x!==2)&&(y!==0)) { |
|
30 $ERROR('#1: x === 2 and y === 0. Actual: x ==='+x+' and y ==='+y); |
|
31 } |
|
32 // |
|
33 ////////////////////////////////////////////////////////////////////////////// |
|
34 |