Debian Codegraph @

rhino/testsrc/tests/ecma/Statements/12.6.1-1.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 gTestfile = '12.6.1-1.js';
7
8 /**
9 File Name: 12.6.1-1.js
10 ECMA Section: The while statement
11 Description:
12
13
14 Author: [email protected]
15 Date: 12 november 1997
16 */
17
18 var SECTION = "12.6.1-1";
19 var VERSION = "ECMA_1";
20 startTest();
21 var TITLE = "The While statement";
22 writeHeaderToLog( SECTION + " "+ TITLE);
23
24
25 new TestCase( SECTION,
26 "var MYVAR = 0; while( MYVAR++ < 100) { if ( MYVAR < 100 ) break; } MYVAR ",
27 1,
28 eval("var MYVAR = 0; while( MYVAR++ < 100) { if ( MYVAR < 100 ) break; } MYVAR "));
29
30 new TestCase( SECTION,
31 "var MYVAR = 0; while( MYVAR++ < 100) { if ( MYVAR < 100 ) continue; else break; } MYVAR ",
32 100,
33 eval("var MYVAR = 0; while( MYVAR++ < 100) { if ( MYVAR < 100 ) continue; else break; } MYVAR "));
34
35 new TestCase( SECTION,
36 "function MYFUN( arg1 ) { while ( arg1++ < 100 ) { if ( arg1 < 100 ) return arg1; } }; MYFUN(1)",
37 2,
38 eval("function MYFUN( arg1 ) { while ( arg1++ < 100 ) { if ( arg1 < 100 ) return arg1; } }; MYFUN(1)"));
39
40 test();
41