]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/ecma_2/Statements/dowhile-005.js
2 * File Name: dowhile-005
4 * Description: do...while statements
6 * Test a labeled do...while. Break out of the loop with no label
7 * should break out of the loop, but not out of the label.
9 * Currently causes an infinite loop in the monkey. Uncomment the
10 * print statement below and it works OK.
12 * Author: christine@netscape.com
13 * Date: 26 August 1998
15 var SECTION
= "dowhile-005";
16 var VERSION
= "ECMA_2";
17 var TITLE
= "do...while with a labeled continue statement";
18 var BUGNUMBER
= "316293";
21 writeHeaderToLog( SECTION
+ " "+ TITLE
);
24 var testcases
= new Array();
31 function NestedLabel() {
34 result2
= "fail: did not hit code after inner loop";
42 result1
= "fail: did break out of inner label";
47 } while ( i
++ < 100 );
51 result3
= "fail: did not break out of outer label";
53 testcases
[tc
++] = new TestCase(
55 "number of loop iterations",
59 testcases
[tc
++] = new TestCase(
61 "break out of inner loop",
65 testcases
[tc
++] = new TestCase(
67 "break out of outer loop",