Debian Codegraph @

js/src/tests/test262/language/statements/break/S12.8_A3.js

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