2 * File Name: dowhile-007
4 * Description: do...while statements
6 * A general do...while test.
8 * Author: christine@netscape.com
11 var SECTION = "dowhile-007";
12 var VERSION = "ECMA_2";
13 var TITLE = "do...while";
16 writeHeaderToLog( SECTION + " "+ TITLE);
19 var testcases = new Array();
21 DoWhile( new DoWhileObject( false, false, false, false ));
22 DoWhile( new DoWhileObject( true, false, false, false ));
23 DoWhile( new DoWhileObject( true, true, false, false ));
24 DoWhile( new DoWhileObject( true, true, true, false ));
25 DoWhile( new DoWhileObject( true, true, true, true ));
26 DoWhile( new DoWhileObject( false, false, false, true ));
27 DoWhile( new DoWhileObject( false, false, true, true ));
28 DoWhile( new DoWhileObject( false, true, true, true ));
29 DoWhile( new DoWhileObject( false, false, true, false ));
33 function DoWhileObject( out1, out2, out3, in1 ) {
34 this.breakOutOne = out1;
35 this.breakOutTwo = out2;
36 this.breakOutThree = out3;
39 function DoWhile( object ) {
47 if ( object.breakOutOne ) {
54 if ( object.breakOutTwo ) {
59 if ( object.breakIn ) {
65 if ( object.breakOutThree ) {
71 testcases[tc++] = new TestCase(
74 (object.breakOutOne) ? false : true,
77 testcases[tc++] = new TestCase(
80 (object.breakOutOne||object.breakOutTwo) ? false : true,
83 testcases[tc++] = new TestCase(
86 (object.breakOutOne||object.breakOutTwo||object.breakIn) ? false : true,
89 testcases[tc++] = new TestCase(
92 (object.breakOutOne||object.breakOutTwo||object.breakOutThree) ? false: true,