Debian Codegraph @

js/src/tests/test262/language/statements/for/S12.6.3_A12_T1.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 If (Evaluate Statement).type is "break" and (Evaluate Statement).target
7 is in the current label set, (normal, (Evaluate Statement), empty) is
8 returned while evaluating a loop
9 es5id: 12.6.3_A12_T1
10 description: Breaking a loop with "break"
11 ---*/
12
13 var __str, index;
14 __str=""
15
16 for(index=0; index<10; index+=1) {
17 if (index>5)break;
18 __str+=index;
19 }
20
21 if (__str!=="012345") {
22 throw new Test262Error('#1:__str === "012345". Actual: __str ==='+__str );
23 }
24
25 reportCompare(0, 0);