Debian Codegraph @

js/src/tests/test262/language/statements/while/S12.6.2_A4_T4.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: |
6 "break" within a "while" Statement is allowed and performed as described
7 in 12.8
8 es5id: 12.6.2_A4_T4
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="can't";
15 do_in : while (1) {
16 var __in__do__IN__before__break="get";
17 break;
18 var __in__do__IN__after__break="no";
19 } ;
20 var __in__do__after__break="Satisfaction";
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);