* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / Microsoft.JScript / Test / Mozilla / ecma_2 / Statements / dowhile-006.js
index c85304c5dcc8e8ccf4037c3f3d7afb1aec197ac9..2c2709c04f757db938f3e262cf9102fe7bce7830 100644 (file)
@@ -1,84 +1,84 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\r
-/**\r
- *  File Name:          dowhile-006\r
- *  ECMA Section:\r
- *  Description:        do...while statements\r
- *\r
- *  A general do...while test.\r
- *\r
- *  Author:             christine@netscape.com\r
- *  Date:               26 August 1998\r
- */\r
-var SECTION = "dowhile-006";\r
-var VERSION = "ECMA_2";\r
-var TITLE   = "do...while";\r
-\r
-startTest();\r
-writeHeaderToLog( SECTION + " "+ TITLE);\r
-\r
-DoWhile( new DoWhileObject( false, false, 10 ) );\r
-DoWhile( new DoWhileObject( true, false, 2 ) );\r
-DoWhile( new DoWhileObject( false, true, 3 ) );\r
-DoWhile( new DoWhileObject( true, true, 4 ) );\r
-\r
-test();\r
-\r
-function looping( object ) {\r
-  object.iterations--;\r
-\r
-  if ( object.iterations <= 0 ) {\r
-    return false;\r
-  } else {\r
-    return true;\r
-  }\r
-}\r
-function DoWhileObject( breakOut, breakIn, iterations, loops ) {\r
-  this.iterations = iterations;\r
-  this.loops = loops;\r
-  this.breakOut = breakOut;\r
-  this.breakIn  = breakIn;\r
-  this.looping  = looping;\r
-}\r
-function DoWhile( object ) {\r
-  var result1 = false;\r
-  var result2 = false;\r
-\r
-outie: {\r
-innie: {\r
-  do {\r
-    if ( object.breakOut )\r
-      break outie;\r
-\r
-    if ( object.breakIn )\r
-      break innie;\r
-\r
-  } while ( looping(object) );\r
-\r
-  //  statements should be executed if:\r
-  //  do...while exits normally\r
-  //  do...while exits abruptly with no label\r
-\r
-  result1 = true;\r
-\r
-}\r
-\r
-//  statements should be executed if:\r
-//  do...while breaks out with label "innie"\r
-//  do...while exits normally\r
-//  do...while does not break out with "outie"\r
-\r
-result2 = true;\r
-  }\r
-\r
-  new TestCase(\r
-    SECTION,\r
-    "hit code after loop in inner loop",\r
-    ( object.breakIn || object.breakOut ) ? false : true ,\r
-    result1 );\r
-\r
-  new TestCase(\r
-    SECTION,\r
-    "hit code after loop in outer loop",\r
-    ( object.breakOut ) ? false : true,\r
-    result2 );\r
-}\r
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/**
+ *  File Name:          dowhile-006
+ *  ECMA Section:
+ *  Description:        do...while statements
+ *
+ *  A general do...while test.
+ *
+ *  Author:             christine@netscape.com
+ *  Date:               26 August 1998
+ */
+var SECTION = "dowhile-006";
+var VERSION = "ECMA_2";
+var TITLE   = "do...while";
+
+startTest();
+writeHeaderToLog( SECTION + " "+ TITLE);
+
+DoWhile( new DoWhileObject( false, false, 10 ) );
+DoWhile( new DoWhileObject( true, false, 2 ) );
+DoWhile( new DoWhileObject( false, true, 3 ) );
+DoWhile( new DoWhileObject( true, true, 4 ) );
+
+test();
+
+function looping( object ) {
+  object.iterations--;
+
+  if ( object.iterations <= 0 ) {
+    return false;
+  } else {
+    return true;
+  }
+}
+function DoWhileObject( breakOut, breakIn, iterations, loops ) {
+  this.iterations = iterations;
+  this.loops = loops;
+  this.breakOut = breakOut;
+  this.breakIn  = breakIn;
+  this.looping  = looping;
+}
+function DoWhile( object ) {
+  var result1 = false;
+  var result2 = false;
+
+outie: {
+innie: {
+  do {
+    if ( object.breakOut )
+      break outie;
+
+    if ( object.breakIn )
+      break innie;
+
+  } while ( looping(object) );
+
+  //  statements should be executed if:
+  //  do...while exits normally
+  //  do...while exits abruptly with no label
+
+  result1 = true;
+
+}
+
+//  statements should be executed if:
+//  do...while breaks out with label "innie"
+//  do...while exits normally
+//  do...while does not break out with "outie"
+
+result2 = true;
+  }
+
+  new TestCase(
+    SECTION,
+    "hit code after loop in inner loop",
+    ( object.breakIn || object.breakOut ) ? false : true ,
+    result1 );
+
+  new TestCase(
+    SECTION,
+    "hit code after loop in outer loop",
+    ( object.breakOut ) ? false : true,
+    result2 );
+}