]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/ecma_2/Statements/dowhile-004.js
2 * File Name: dowhile-004
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 * Author: christine@netscape.com
10 * Date: 11 August 1998
12 var SECTION
= "dowhile-004";
13 var VERSION
= "ECMA_2";
14 var TITLE
= "do...while with a labeled continue statement";
17 writeHeaderToLog( SECTION
+ " "+ TITLE
);
20 var testcases
= new Array();
29 function DoWhile( limit
, expect
) {
32 result2
= "failed: broke out of labeled statement unexpectedly";
37 if ( ! (i
< limit
) ) {
39 result1
= "fail: evaluated statement after a labeled break";
46 testcases
[tc
++] = new TestCase(
48 "do while ( " + i
+" < " + limit
+" )",
52 testcases
[tc
++] = new TestCase(
54 "breaking out of a do... while loop",
59 testcases
[tc
++] = new TestCase(
61 "breaking out of a labeled do...while loop",