Quellcode durchsuchen

Begin test suite cleanup (#6444)

* Tidy up some Boolean and Math tests

* Remove unnecessary Conversion test baslines

* Remove more baselines

* Prohibit tests with blank outputs
Richard vor 5 Jahren
Ursprung
Commit
5ea00a1e1b
97 geänderte Dateien mit 758 neuen und 1615 gelöschten Zeilen
  1. 0 132
      test/Boolean/Equals.baseline
  2. 0 15
      test/Boolean/Equals.js
  3. 154 0
      test/Boolean/basics.js
  4. 0 68
      test/Boolean/property_and_index_of_boolean.js
  5. 1 25
      test/Boolean/rlexe.xml
  6. 0 4
      test/Boolean/simple1.baseline
  7. 0 12
      test/Boolean/simple1.js
  8. 0 112
      test/Boolean/simple2.baseline
  9. 0 51
      test/Boolean/simple2.js
  10. 0 1
      test/Boolean/wrappedobj.baseline
  11. 0 20
      test/Boolean/wrappedobj.js
  12. 0 1
      test/Conversions/ToInt32.baseline
  13. 0 1
      test/Conversions/ToUInt32.baseline
  14. 2 1
      test/Conversions/bug1.js
  15. 0 3
      test/Conversions/rlexe.xml
  16. 2 1
      test/Conversions/toint32.js
  17. 0 26
      test/Conversions/toint32_2.3.baseline
  18. 7 3
      test/Conversions/toint32_2.js
  19. 2 1
      test/Conversions/touint32.js
  20. 0 20
      test/Function/apply.baseline
  21. 26 22
      test/Function/apply.js
  22. 0 5
      test/Function/applyArgs.baseline
  23. 16 9
      test/Function/applyArgs.js
  24. 0 65
      test/Function/arguments.es5.baseline
  25. 4 7
      test/Function/arguments.es5.js
  26. 1 3
      test/Function/rlexe.xml
  27. 0 1
      test/Math/abs.baseline
  28. 0 43
      test/Math/abs.js
  29. 0 1
      test/Math/acos.baseline
  30. 0 39
      test/Math/acos.js
  31. 0 1
      test/Math/asin.baseline
  32. 0 40
      test/Math/asin.js
  33. 0 1
      test/Math/atan.baseline
  34. 0 35
      test/Math/atan.js
  35. 0 1
      test/Math/atan2.baseline
  36. 0 69
      test/Math/atan2.js
  37. 494 0
      test/Math/basics.js
  38. 0 5
      test/Math/ceilfloor.baseline
  39. 0 101
      test/Math/ceilfloor.js
  40. 0 9
      test/Math/constants.baseline
  41. 0 15
      test/Math/constants.js
  42. 0 1
      test/Math/cos.baseline
  43. 0 38
      test/Math/cos.js
  44. 0 1
      test/Math/exp.baseline
  45. 0 36
      test/Math/exp.js
  46. 0 1
      test/Math/log.baseline
  47. 0 37
      test/Math/log.js
  48. 0 1
      test/Math/pow.baseline
  49. 0 102
      test/Math/pow.js
  50. 4 88
      test/Math/rlexe.xml
  51. 0 144
      test/Math/round.js
  52. 0 1
      test/Math/sin.baseline
  53. 0 39
      test/Math/sin.js
  54. 0 1
      test/Math/sqrt.baseline
  55. 0 36
      test/Math/sqrt.js
  56. 0 1
      test/Math/tan.baseline
  57. 0 37
      test/Math/tan.js
  58. 0 1
      test/TaggedIntegers/addition.baseline
  59. 2 1
      test/TaggedIntegers/addition.js
  60. 0 1
      test/TaggedIntegers/and.baseline
  61. 2 1
      test/TaggedIntegers/and.js
  62. 0 1
      test/TaggedIntegers/arrays.baseline
  63. 1 2
      test/TaggedIntegers/arrays.js
  64. 0 1
      test/TaggedIntegers/comparison.baseline
  65. 1 1
      test/TaggedIntegers/comparison.js
  66. 0 1
      test/TaggedIntegers/divide.baseline
  67. 2 1
      test/TaggedIntegers/divide.js
  68. 0 1
      test/TaggedIntegers/modulus.baseline
  69. 2 1
      test/TaggedIntegers/modulus.js
  70. 0 1
      test/TaggedIntegers/multiplication.baseline
  71. 2 1
      test/TaggedIntegers/multiplication.js
  72. 0 1
      test/TaggedIntegers/negate.baseline
  73. 2 1
      test/TaggedIntegers/negate.js
  74. 0 1
      test/TaggedIntegers/not.baseline
  75. 2 1
      test/TaggedIntegers/not.js
  76. 0 1
      test/TaggedIntegers/not_1.baseline
  77. 1 1
      test/TaggedIntegers/not_1.js
  78. 0 1
      test/TaggedIntegers/or.baseline
  79. 2 1
      test/TaggedIntegers/or.js
  80. 0 1
      test/TaggedIntegers/predecrement.baseline
  81. 2 1
      test/TaggedIntegers/predecrement.js
  82. 0 1
      test/TaggedIntegers/preincrement.baseline
  83. 2 1
      test/TaggedIntegers/preincrement.js
  84. 0 38
      test/TaggedIntegers/rlexe.xml
  85. 0 1
      test/TaggedIntegers/shift_constants.baseline
  86. 1 1
      test/TaggedIntegers/shift_constants.js
  87. 0 1
      test/TaggedIntegers/signedshiftleft.baseline
  88. 2 1
      test/TaggedIntegers/signedshiftleft.js
  89. 0 1
      test/TaggedIntegers/signedshiftright.baseline
  90. 2 1
      test/TaggedIntegers/signedshiftright.js
  91. 0 1
      test/TaggedIntegers/subtraction.baseline
  92. 2 1
      test/TaggedIntegers/subtraction.js
  93. 0 1
      test/TaggedIntegers/unsignedshiftright.baseline
  94. 2 1
      test/TaggedIntegers/unsignedshiftright.js
  95. 0 1
      test/TaggedIntegers/xor.baseline
  96. 2 1
      test/TaggedIntegers/xor.js
  97. 11 5
      test/runtests.py

+ 0 - 132
test/Boolean/Equals.baseline

@@ -1,132 +0,0 @@
-true == true: true
-true == false: false
-true == true: true
-true == false: false
-true == -1: false
-true == 0: false
-true == 1: true
-true == 2: false
-true == 1: true
-true == 1.1: false
-true == 0: false
-true == 0: false
-true == 0: false
-true == null: false
-true == undefined: false
-true == [object Object]: false
-true == : false
-true == abc: false
-true == -1: false
-true == 0: false
-true == 1: true
-true == 2: false
-true == true: false
-true == false: false
-true == t: false
-true == f: false
-true == True: false
-true == False: false
-true ==  1.00 : true
-true ==  1. : true
-true ==  +1.0 : true
-true == 0: false
-true == 1: true
-false == true: false
-false == false: true
-false == true: false
-false == false: true
-false == -1: false
-false == 0: true
-false == 1: false
-false == 2: false
-false == 1: false
-false == 1.1: false
-false == 0: true
-false == 0: true
-false == 0: true
-false == null: false
-false == undefined: false
-false == [object Object]: false
-false == : true
-false == abc: false
-false == -1: false
-false == 0: true
-false == 1: false
-false == 2: false
-false == true: false
-false == false: false
-false == t: false
-false == f: false
-false == True: false
-false == False: false
-false ==  1.00 : false
-false ==  1. : false
-false ==  +1.0 : false
-false == 0: true
-false == 1: false
-true == true: true
-true == false: false
-true == true: false
-true == false: false
-true == -1: false
-true == 0: false
-true == 1: true
-true == 2: false
-true == 1: true
-true == 1.1: false
-true == 0: false
-true == 0: false
-true == 0: false
-true == null: false
-true == undefined: false
-true == [object Object]: false
-true == : false
-true == abc: false
-true == -1: false
-true == 0: false
-true == 1: true
-true == 2: false
-true == true: false
-true == false: false
-true == t: false
-true == f: false
-true == True: false
-true == False: false
-true ==  1.00 : true
-true ==  1. : true
-true ==  +1.0 : true
-true == 0: false
-true == 1: false
-false == true: false
-false == false: true
-false == true: false
-false == false: false
-false == -1: false
-false == 0: true
-false == 1: false
-false == 2: false
-false == 1: false
-false == 1.1: false
-false == 0: true
-false == 0: true
-false == 0: true
-false == null: false
-false == undefined: false
-false == [object Object]: false
-false == : true
-false == abc: false
-false == -1: false
-false == 0: true
-false == 1: false
-false == 2: false
-false == true: false
-false == false: false
-false == t: false
-false == f: false
-false == True: false
-false == False: false
-false ==  1.00 : false
-false ==  1. : false
-false ==  +1.0 : false
-false == 0: false
-false == 1: false

+ 0 - 15
test/Boolean/Equals.js

@@ -1,15 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-var a = [true, false, new Boolean(true), new Boolean(false)];
-var b = [true, false, new Boolean(true), new Boolean(false), -1, 0, 1, 2, 1.0, 1.1, 0.0, +0, -0, null, undefined, new Object(), "", "abc", "-1", "0", "1", "2", "true", "false", "t", "f", "True", "False", " 1.00 ", " 1. ", " +1.0 ", new Number(0), new Number(1)];
-
-for (var i = 0; i < a.length; i++)
-{
-    for (var j = 0; j < b.length; j++)
-    {
-        WScript.Echo(a[i] + " == " + b[j] + ": " + (a[i] == b[j]));
-    }
-}

+ 154 - 0
test/Boolean/basics.js

@@ -0,0 +1,154 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js");
+
+const tests = [
+    {
+        name : "Simple",
+        body() {
+            var f = false;
+            var t = true;
+            assert.isTrue(!f, "!f should be true");
+            assert.isTrue(!!!f, "!!!f should be true");
+            assert.isTrue(t, "t should be true");
+            assert.isTrue(!!t, "!!t should be true");   
+        }
+    },
+    {
+        name : "Equals",
+        body() {
+            var a = [true, false, new Boolean(true), new Boolean(false)];
+            var b = [true, false, new Boolean(true), new Boolean(false), -1, 0, 1, 2, 1.0, 1.1, 0.0, +0, -0, 
+                null, undefined, new Object(), "", "abc", "-1", "0", "1", "2", "true", "false", "t", "f",
+                "True", "False", " 1.00 ", " 1. ", " +1.0 ", new Number(0), new Number(1)];
+
+            var results = [true, false, true, false, false, false, true, false, true, false,
+                false, false, false, false, false, false, false, false, false, false, true,
+                false, false, false, false, false, false, false, true, true, true, false,
+                true, false, true, false, true, false, true, false, false, false, false,
+                true, true, true, false, false, false, true, false, false, true, false,
+                false, false, false, false, false, false, false, false, false, false, true,
+                false, true, false, false, false, false, false, true, false, true, false,
+                false, false, false, false, false, false, false, false, false, false, true,
+                false, false, false, false, false, false, false, true, true, true, false,
+                false, false, true, false, false, false, true, false, false, false, false,
+                true, true, true, false, false, false, true, false, false, true, false,
+                false, false, false, false, false, false, false, false, false, false, false,
+                false];
+
+            for (var i = 0, k = 0; i < a.length; i++)
+            {
+                for (var j = 0; j < b.length; j++, k++)
+                {
+                    assert.areEqual(a[i] == b[j], results[k], `${a[i]} == ${b[j]} should evaluate to ${results[k]}`);
+                }
+            }
+        }
+    },
+    {
+        name : "Wrapped Object",
+        body() {
+            var f = new Boolean(false);
+            assert.isTrue(f == false, "new Boolean(false) should == false");
+            assert.isTrue(f !== false, "new Boolean(false) should !== false");
+            assert.isTrue(!f == false, "!(new Boolean(false)) should == false");
+        }
+    },
+    {
+        name : "Boolean values generated with ! outside of a conditional",
+        body() {
+            var q = new Object();
+            var tests = [-0.5, -1, 1, 2, 3, new Object(), q, [4,5,6], "blah", 'c', true];
+
+            for (var x in tests) {
+                assert.isFalse(!tests[x], `!${tests[x]} should evaluate to false`);
+            }
+            assert.isTrue(!0 && !false, "!0 && !false should evaluate to true");
+        }
+    },
+    {
+        name : "Value producing comparisons",
+        body() {
+            var lhs = [1, 2, 2, -1, 1, 0, 0,   0x70000000, 0];
+            var rhs = [2, 1, 2, 2, -2, 0, 0.1, 0,          0x70000000];
+            var results = [
+                [true, true, false, false, false, true, false, true],
+                [false, false, true, true, false, true, false, true],
+                [false, true, false, true, true, false, true, false],
+                [true, true, false, false, false, true, false, true],
+                [false, false, true, true, false, true, false, true],
+                [false, true, false, true, true, false, true, false],
+                [true, true, false, false, false, true, false, true],
+                [false, false, true, true, false, true, false, true],
+                [true, true, false, false, false, true, false, true]
+            ];
+            for (var i = 0; i < 9; ++i)
+            {
+                assert.areEqual(lhs[i] < rhs[i],   results[i][0], `Expected ${lhs[i]} < ${rhs[i]} to equal ${results[i][0]}`);
+                assert.areEqual(lhs[i] <= rhs[i],  results[i][1], `Expected ${lhs[i]} <= ${rhs[i]} to equal ${results[i][1]}`);
+                assert.areEqual(lhs[i] > rhs[i],   results[i][2], `Expected ${lhs[i]} > ${rhs[i]} to equal ${results[i][2]}`);
+                assert.areEqual(lhs[i] >= rhs[i],  results[i][3], `Expected ${lhs[i]} >= ${rhs[i]} to equal ${results[i][3]}`);
+                assert.areEqual(lhs[i] == rhs[i],  results[i][4], `Expected ${lhs[i]} == ${rhs[i]} to equal ${results[i][4]}`);
+                assert.areEqual(lhs[i] != rhs[i],  results[i][5], `Expected ${lhs[i]} != ${rhs[i]} to equal ${results[i][5]}`);
+                assert.areEqual(lhs[i] === rhs[i], results[i][6], `Expected ${lhs[i]} === ${rhs[i]} to equal ${results[i][6]}`);
+                assert.areEqual(lhs[i] !== rhs[i], results[i][7], `Expected ${lhs[i]} !== ${rhs[i]} to equal ${results[i][7]}`);
+            }
+        }
+    },
+    {
+        name: "Assignment to a property on a boolean without a setter in sloppy mode should be ignored",
+        body: function ()
+        {
+            var flag = true;
+            flag.a = 12;
+            assert.areEqual(undefined, flag.a);
+        }
+    },
+    {
+        name: "Assignment to a property on a boolean without a setter in strict mode should throw an error",
+        body: function ()
+        {
+            var flag = true;
+            assert.throws(function() { "use strict"; flag.a = 1; }, TypeError, "Assigning to a property of a number should throw a TypeError.", "Assignment to read-only properties is not allowed in strict mode");
+        }
+    },
+    {
+        name: "Assignment to a property on a boolean without a setter in sloppy mode should be ignored",
+        body: function ()
+        {
+            var flag = true;
+            flag['a'] = 12;
+            assert.areEqual(undefined, flag.a);
+        }
+    },
+    {
+        name: "Assignment to a property on a boolean without a setter in strict mode should throw an error",
+        body: function ()
+        {
+            var flag = true;
+            assert.throws(function() { "use strict"; flag['a'] = 1; }, TypeError, "Assigning to a property of a number should throw a TypeError.", "Assignment to read-only properties is not allowed in strict mode");
+        }
+    },
+    {
+        name: "Assignment to an index on a boolean without a setter in sloppy mode should be ignored",
+        body: function ()
+        {
+            var flag = true;
+            flag[66] = 12;
+            assert.areEqual(undefined, flag.a);
+        }
+    },
+    {
+        name: "Assignment to an index on a boolean without a setter in strict mode should throw an error",
+        body: function ()
+        {
+            var flag = true;
+            assert.throws(function() { "use strict"; flag[66] = 1; }, TypeError, "Assigning to a property of a number should throw a TypeError.", "Assignment to read-only properties is not allowed in strict mode");
+        }
+    }
+];
+
+testRunner.runTests(tests, { verbose: WScript.Arguments[0] != "summary" });

+ 0 - 68
test/Boolean/property_and_index_of_boolean.js

@@ -1,68 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-// Number tests
-
-if (this.WScript && this.WScript.LoadScriptFile)
-{ // Check for running in ch
-    this.WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js");
-}
-
-var tests = 
-[
-    {
-        name: "Assignment to a property on a boolean without a setter in sloppy mode should be ignored",
-        body: function ()
-        {
-            var flag = true;
-            flag.a = 12;
-            assert.areEqual(undefined, flag.a);
-        }
-    },
-    {
-        name: "Assignment to a property on a boolean without a setter in strict mode should throw an error",
-        body: function ()
-        {
-            var flag = true;
-            assert.throws(function() { "use strict"; flag.a = 1; }, TypeError, "Assigning to a property of a number should throw a TypeError.", "Assignment to read-only properties is not allowed in strict mode");
-        }
-    },
-    {
-        name: "Assignment to a property on a boolean without a setter in sloppy mode should be ignored",
-        body: function ()
-        {
-            var flag = true;
-            flag['a'] = 12;
-            assert.areEqual(undefined, flag.a);
-        }
-    },
-    {
-        name: "Assignment to a property on a boolean without a setter in strict mode should throw an error",
-        body: function ()
-        {
-            var flag = true;
-            assert.throws(function() { "use strict"; flag['a'] = 1; }, TypeError, "Assigning to a property of a number should throw a TypeError.", "Assignment to read-only properties is not allowed in strict mode");
-        }
-    },
-    {
-        name: "Assignment to an index on a boolean without a setter in sloppy mode should be ignored",
-        body: function ()
-        {
-            var flag = true;
-            flag[66] = 12;
-            assert.areEqual(undefined, flag.a);
-        }
-    },
-    {
-        name: "Assignment to an index on a boolean without a setter in strict mode should throw an error",
-        body: function ()
-        {
-            var flag = true;
-            assert.throws(function() { "use strict"; flag[66] = 1; }, TypeError, "Assigning to a property of a number should throw a TypeError.", "Assignment to read-only properties is not allowed in strict mode");
-        }
-    },
-];
-
-testRunner.runTests(tests, { verbose: WScript.Arguments[0] != "summary" });

+ 1 - 25
test/Boolean/rlexe.xml

@@ -2,31 +2,7 @@
 <regress-exe>
   <test>
     <default>
-      <files>simple1.js</files>
-      <baseline>simple1.baseline</baseline>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>simple2.js</files>
-      <baseline>simple2.baseline</baseline>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>wrappedobj.js</files>
-      <baseline>wrappedobj.baseline</baseline>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>Equals.js</files>
-      <baseline>Equals.baseline</baseline>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>property_and_index_of_boolean.js</files>
+      <files>basics.js</files>
       <compile-flags>-args summary -endargs</compile-flags>
     </default>
   </test>

+ 0 - 4
test/Boolean/simple1.baseline

@@ -1,4 +0,0 @@
-test 1
-test 2
-test 3
-test 4

+ 0 - 12
test/Boolean/simple1.js

@@ -1,12 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-var f = false;
-var t = true;
-
-if(!f)      WScript.Echo("test 1");
-if(!!!f)    WScript.Echo("test 2");
-if(t)       WScript.Echo("test 3");
-if(!!t)     WScript.Echo("test 4");

+ 0 - 112
test/Boolean/simple2.baseline

@@ -1,112 +0,0 @@
-ok: -0.5
-ok: -1
-ok: 1
-ok: 2
-ok: 3
-ok: [object Object]
-ok: [object Object]
-ok: 4,5,6
-ok: blah
-ok: c
-ok: true
-done
-Testing value producing compares
-
-a = 1  b = 2
-
- a < b =  true
- a <= b =  true
- a > b =  false
- a >= b =  false
- a == b =  false
- a != b =  true
- a === b =  false
- a !== b =  true
-
-a = 2  b = 1
-
- a < b =  false
- a <= b =  false
- a > b =  true
- a >= b =  true
- a == b =  false
- a != b =  true
- a === b =  false
- a !== b =  true
-
-a = 2  b = 2
-
- a < b =  false
- a <= b =  true
- a > b =  false
- a >= b =  true
- a == b =  true
- a != b =  false
- a === b =  true
- a !== b =  false
-
-a = -1  b = 2
-
- a < b =  true
- a <= b =  true
- a > b =  false
- a >= b =  false
- a == b =  false
- a != b =  true
- a === b =  false
- a !== b =  true
-
-a = 1  b = -2
-
- a < b =  false
- a <= b =  false
- a > b =  true
- a >= b =  true
- a == b =  false
- a != b =  true
- a === b =  false
- a !== b =  true
-
-a = 0  b = 0
-
- a < b =  false
- a <= b =  true
- a > b =  false
- a >= b =  true
- a == b =  true
- a != b =  false
- a === b =  true
- a !== b =  false
-
-a = 0  b = 0.1
-
- a < b =  true
- a <= b =  true
- a > b =  false
- a >= b =  false
- a == b =  false
- a != b =  true
- a === b =  false
- a !== b =  true
-
-a = 1879048192  b = 0
-
- a < b =  false
- a <= b =  false
- a > b =  true
- a >= b =  true
- a == b =  false
- a != b =  true
- a === b =  false
- a !== b =  true
-
-a = 0  b = 1879048192
-
- a < b =  true
- a <= b =  true
- a > b =  false
- a >= b =  false
- a == b =  false
- a != b =  true
- a === b =  false
- a !== b =  true

+ 0 - 51
test/Boolean/simple2.js

@@ -1,51 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-// Boolean values generated with ! outside of a conditional.
-
-var q = new Object();
-var tests = [-0.5, -1, 1, 2, 3, new Object(), q, [4,5,6], "blah", 'c', true];
-
-for(var x in tests)
-{
-    var tmp = !tests[x];
-    if(tmp)
-    {
-        WScript.Echo("failed on !" + tests[x]);
-    }
-    else
-    {
-        WScript.Echo("ok: " + tests[x]);
-    }
-}
-var tmp = !0 && !false;
-if(tmp)
-{
-    WScript.Echo("done");
-}
-
-WScript.Echo("Testing value producing compares");
-function foo(a,b)
-{
-    WScript.Echo("\na = "+a+"  b = "+b+"\n");
-    WScript.Echo(" a < b = ", a < b);
-    WScript.Echo(" a <= b = ", a <= b);
-    WScript.Echo(" a > b = ", a > b);
-    WScript.Echo(" a >= b = ", a >= b);
-    WScript.Echo(" a == b = ", a == b);
-    WScript.Echo(" a != b = ", a != b);
-    WScript.Echo(" a === b = ", a === b);
-    WScript.Echo(" a !== b = ", a !== b);
-}
-
-foo(1,2);
-foo(2,1);
-foo(2,2);
-foo(-1,2);
-foo(1,-2);
-foo(0,0);
-foo(0,0.1);
-foo(0x70000000, 0);
-foo(0, 0x70000000);

+ 0 - 1
test/Boolean/wrappedobj.baseline

@@ -1 +0,0 @@
-done

+ 0 - 20
test/Boolean/wrappedobj.js

@@ -1,20 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-function check(cond, test)
-{
-    if(!cond)
-    {
-        WScript.Echo("Failed test: " + test);
-    }
-}
-
-var f = new Boolean(false);
-
-check( (f==false), "f equals false");
-check( (f!==false), "f strict-not-equals false");
-check( (!f==false), "!f equals false");
-
-WScript.Echo("done");

+ 0 - 1
test/Conversions/ToInt32.baseline

@@ -1 +0,0 @@
-done

+ 0 - 1
test/Conversions/ToUInt32.baseline

@@ -1 +0,0 @@
-done

+ 2 - 1
test/Conversions/bug1.js

@@ -15,4 +15,5 @@ for (var i = 0; i < 3; i++) {
         }
     })();
 }
-WScript.Echo('pass');
+
+print('pass');

+ 0 - 3
test/Conversions/rlexe.xml

@@ -3,19 +3,16 @@
   <test>
     <default>
       <files>toint32.js</files>
-      <baseline>ToInt32.baseline</baseline>
     </default>
   </test>
   <test>
     <default>
       <files>toint32_2.js</files>
-      <baseline>toint32_2.3.baseline</baseline>
     </default>
   </test>
   <test>
     <default>
       <files>touint32.js</files>
-      <baseline>ToUInt32.baseline</baseline>
     </default>
   </test>
   <test>

+ 2 - 1
test/Conversions/toint32.js

@@ -4525,4 +4525,5 @@ test4();
 test5();
 test6();
 test7();
-WScript.Echo("done");
+
+print("pass");

+ 0 - 26
test/Conversions/toint32_2.3.baseline

@@ -1,26 +0,0 @@
-PASS:0 0
-PASS:-0.0 0
-PASS:0.1 0
-PASS:-0.1 0
-PASS:1.1 1
-PASS:-1.1 -1
-PASS:4294967295.5 -1
-PASS:-4294967295.5 1
-PASS:4294967296 0
-PASS:-4294967296 0
-PASS:4294967297.1 1
-PASS:-4294967297.1 -1
-PASS:2147483647 2147483647
-PASS:2147483648 -2147483648
-PASS:-Infinity 0
-PASS:Infinity 0
-PASS:NaN 0
-PASS:4611686014132421600 1024
-PASS:9223372036854775000 -1024
-PASS:-9223372036854775000 1024
-PASS:9223372036854776000 0
-PASS:9223372036854777000 2048
-PASS:9223372036854777000 2048
-PASS:-9223372036854776000 0
-PASS:-9223372036854777000 -2048
-PASS:-9223372036854777000 -2048

+ 7 - 3
test/Conversions/toint32_2.js

@@ -3,7 +3,7 @@
 // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
 //-------------------------------------------------------------------------------------------------------
 
-function isnegativezero(x, str)
+function isnegativezero(x)
 {
     // this is a quick way to check if a number is -0
     return !(x != 0 || 1/x >= 0)
@@ -12,8 +12,10 @@ function isnegativezero(x, str)
 function test(value, expected)
 {
     var result = value | 0;     // ToInt32
-    WScript.Echo((result === expected && isnegativezero(result) === isnegativezero(expected)? "PASS:" : "FAIL: ") +
-        (isnegativezero(value)? "-0.0" : value) + " " + (isnegativezero(result)? "-0.0" : result));
+    if (!(result === expected && isnegativezero(result) === isnegativezero(expected)))
+    {
+        throw new Error(`toInt32 failed on ${value}`);
+    }
 }
 var negZero = -0.0;
 
@@ -49,3 +51,5 @@ test(9223372036854778000, 2048);
 test(-9223372036854776000, 0);
 test(-9223372036854777000, -2048);
 test(-9223372036854778000, -2048);
+
+print("pass");

+ 2 - 1
test/Conversions/touint32.js

@@ -4525,4 +4525,5 @@ test4();
 test5();
 test6();
 test7();
-WScript.Echo("done");
+
+print("pass");

+ 0 - 20
test/Function/apply.baseline

@@ -1,20 +0,0 @@
-x1 : hello
-x1 : hello
-x1 : hello
-x1 : 0
-o.x1 : hello
-x2 : undefined
-x2 : undefined
-x2 : undefined
-x2 : 0
-o.x2 : undefined
-x2 : world
-x2 : world
-x2 : 0
-o.x2 : world
-after apply
-undefined
-undefined
-after apply
-undefined
-undefined

+ 26 - 22
test/Function/apply.js

@@ -3,7 +3,11 @@
 // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
 //-------------------------------------------------------------------------------------------------------
 
-function write(v) { WScript.Echo(v + ""); }
+function check(value, expected) {
+    if (value !== expected) {
+        throw new Error("Test failed");
+    }
+}
 
 function f1() 
 {
@@ -11,22 +15,22 @@ function f1()
 }
 
 f1.apply();
-write("x1 : " + x1);
+check(x1, "hello");
 
 x1 = 0;
 f1.apply(null);
-write("x1 : " + x1);
+check(x1, "hello");
 
 x1 = 0;
 f1.apply(undefined);
-write("x1 : " + x1);
+check(x1, "hello");
 
 var o = new Object();
 
 x1 = 0;
 f1.apply(o);
-write("x1 : " + x1);
-write("o.x1 : " + o.x1);
+check(x1, 0);
+check(o.x1, "hello");
 
 function f2(a)
 {
@@ -35,39 +39,38 @@ function f2(a)
 
 x2 = 0;
 f2.apply();
-write("x2 : " + x2);
+check(x2, undefined);
 
 x2 = 0;
 f2.apply(null);
-write("x2 : " + x2);
+check(x2, undefined);
 
 x2 = 0;
 f2.apply(undefined);
-write("x2 : " + x2);
+check(x2, undefined);
 
 x2 = 0;
 f2.apply(o);
-write("x2 : " + x2);
-write("o.x2 : " + o.x2);
+check(x2, 0);
+check(o.x2, undefined);
 
 x2 = 0;
 f2.apply(null, ["world"]);
-write("x2 : " + x2);
+check(x2, "world");
 
 x2 = 0;
 f2.apply(undefined, ["world"]);
-write("x2 : " + x2);
+check(x2, "world");
 
 x2 = 0;
 f2.apply(o, ["world"]);
-write("x2 : " + x2);
-write("o.x2 : " + o.x2);
+check(x2, 0);
+check(o.x2, "world");
 
 
 function blah()
 {
     this.construct.apply(this, arguments);
-    write("after apply");
     return new Object();
 }
 
@@ -80,8 +83,7 @@ function blah2()
     catch (e)
     {
     }
-    
-    write("after apply");
+
     return new Object();
 }
 
@@ -97,13 +99,13 @@ blah2.prototype.construct = function(x, y)
 }
 
 var o = new blah(1, 2);
-write(o.a);
-write(o.b);
+check(o.a, undefined);
+check(o.b, undefined);
 
 o = new blah2(1, 2);
 
-write(o.a);
-write(o.b);
+check(o.a, undefined);
+check(o.b, undefined);
 
 function f() {}
 
@@ -111,3 +113,5 @@ f.apply({},{});
 f.apply({},{length:null});
 f.apply({},{length:undefined});
 f.apply({},{length:0.5});
+
+print("pass");

+ 0 - 5
test/Function/applyArgs.baseline

@@ -1,5 +0,0 @@
-passed
-passed
-passed
-zap
-mama

+ 16 - 9
test/Function/applyArgs.js

@@ -3,12 +3,12 @@
 // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
 //-------------------------------------------------------------------------------------------------------
 
-function write(v) { WScript.Echo(v + ""); }
+var res = []
 
 function test1() 
 {
     [].push.apply(this, arguments);
-    write("passed");
+    res.push(1);
 }
 
 test1();
@@ -16,7 +16,7 @@ test1();
 function test2() 
 {
     ({}).toString.apply(this, arguments);
-    write("passed");
+    res.push(2);
 }
 
 test2();
@@ -28,13 +28,12 @@ function test3()
     function test3_inner() {
         (count3 == 1 ? args : arguments).callee.apply(this, arguments);
     }
-    
+
     if (++count3 == 1)
     {
         return test3_inner();
     }
-    
-    write("passed");
+    res.push(3);
 }
 
 test3();
@@ -43,12 +42,20 @@ function test4()
 {
     return function() {
     try {
-        throw 'zap';
+        throw 4;
     } catch(ex) {
-        WScript.Echo(ex);
+        res.push(4);
         var f = arguments[0]; 
     }
     f.apply(this, arguments);
     }
 }
-test4()(function(){ WScript.Echo('mama'); });
+test4()(function(){ res.push(5); });
+
+for (var i = 0; i < 5; ++i) {
+    if (res[i] !== i + 1) {
+        throw "fail";
+    }
+}
+
+print("pass");

+ 0 - 65
test/Function/arguments.es5.baseline

@@ -1,65 +0,0 @@
-*** Running test #1 (test01): formal arg: simple: verify connection: named vs indexed arg
-PASSED
-*** Running test #2 (test02): formal arg: defineProperty, check property descriptor
-PASSED
-*** Running test #3 (test03): formal arg: defineProperty, set writable to false, verify writability and lost connection. WOOB 1128023
-PASSED
-*** Running test #4 (test04): formal arg: defineProperty, set writable to false AND set value, verify that value changed in both named and indexed arg and that the item was disconnected
-PASSED
-*** Running test #5 (test05): formal arg: defineProperty w/o cause of disconnect, verify still connected to named arg
-PASSED
-*** Running test #6 (test06): formal arg: defineProperty, disconnect arg[0], verify that arg[1] is still connected
-PASSED
-*** Running test #7 (test07): formal arg: defineProperty: convert to accessor property
-PASSED
-*** Running test #8 (test08): formal arg: defineProperty: convert to accessor, then to data property, verify value and that connection is lost
-PASSED
-*** Running test #9 (test09): formal arg: defineProperty: force convert to ES5 version but keep connected, check enumeration
-PASSED
-*** Running test #10 (test10): formal arg: defineProperty: set non-enumerable/non-writable/delete, check enumeration
-PASSED
-*** Running test #11 (test11): passed/undeclared arg: verify there is no correlation with Object.prototype indexed data properties. WOOB 1143896
-PASSED
-*** Running test #12 (test12): formal arg: verify there is no correlation with Object.prototype indexed properties
-PASSED
-*** Running test #13 (test13): passed/undeclared arg: verify there is no correlation with Object.prototype indexed accessor properties. WOOB 1144602
-PASSED
-*** Running test #14 (test14): formal arg: verify there is no correlation with Object.prototype indexed accessor properties
-PASSED
-*** Running test #15 (test15): formal arg: delete, make sure it's deleted
-PASSED
-*** Running test #16 (test16): formal arg: delete, add, check named arg is not changed
-PASSED
-*** Running test #17 (test17): formal arg: delete, then defineProperty with attributes for data property, check the value
-PASSED
-*** Running test #18 (test18): formal arg: delete, then defineProperty with attributes for accessor property, check the enumeration
-PASSED
-*** Running test #19 (test19): formal arg, es5 heap arguments: delete, add, check enumerable/order
-PASSED
-*** Running test #20 (test20): formal arg, es5 heap arguments: delete, add, keep another arg in objectArray and use one non-formal, check enumerable/order
-PASSED
-*** Running test #21 (test21): formal arg: defineProperty, set enumerable to false, check getOwnPropertyNames
-PASSED
-*** Running test #22 (test22_1): arguments (non-ES5 version): call Object.preventExtensions, try add new property by defineProperty and direct set
-PASSED
-*** Running test #23 (test22_2): arguments (ES5 version): call Object.preventExtensions, try add new property by defineProperty and direct set
-PASSED
-*** Running test #24 (test23_1): arguments (non-ES5 version): call Object.preventExtensions, make sure we can still modify atttibutes on formals without changing the value
-PASSED
-*** Running test #25 (test23_2): arguments (ES5 version): call Object.preventExtensions, make sure we can still modify atttibutes on formals without changing the value
-PASSED
-*** Running test #26 (test24_1): arguments (non-ES5 version): call Object.seal, verify descriptor on formal
-PASSED
-*** Running test #27 (test24_2): arguments (ES5 version): call Object.seal, verify descriptor on formal
-PASSED
-*** Running test #28 (test25_1): arguments (non-ES5 version): call Object.freeze, verify descriptor on formal
-PASSED
-*** Running test #29 (test25_2): arguments (ES5 version): call Object.freeze, verify descriptor on formal
-PASSED
-*** Running test #30 (test26): formal arg: delete, preventExtensions, enumerate, make sure the item is deleted
-PASSED
-*** Running test #31 (test27): formal arg: convert to ES5 version, change value and set writable to false
-PASSED
-*** Running test #32 (test28): formal arg: convert to ES5 version, enumerate when number of actual params is less than number of formals
-PASSED
-Summary of tests: total executed: 32; passed: 32; failed: 0

+ 4 - 7
test/Function/arguments.es5.js

@@ -3,9 +3,7 @@
 // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
 //-------------------------------------------------------------------------------------------------------
 
-if (typeof(WScript) != "undefined") {
-  WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js");
-}
+WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js");
 
 var tests = {
   // Note: each test has name (string) and body (function) properties.
@@ -639,8 +637,7 @@ var tests = {
         value.toString() + ",undefined"; // IE9 compat mode -- Win8 558490.
       assert.areEqual(expected, accumulator, "Wrong accumulated value");
     }
-  },
-
-} // tests.
+  }
+}
 
-testRunner.runTests(tests);
+testRunner.runTests(tests, { verbose: WScript.Arguments[0] != "summary" });

+ 1 - 3
test/Function/rlexe.xml

@@ -9,7 +9,6 @@
   <test>
     <default>
       <files>apply.js</files>
-      <baseline>apply.baseline</baseline>
     </default>
   </test>
   <test>
@@ -21,7 +20,6 @@
   <test>
     <default>
       <files>applyArgs.js</files>
-      <baseline>applyArgs.baseline</baseline>
     </default>
   </test>
   <test>
@@ -56,7 +54,7 @@
   <test>
     <default>
       <files>arguments.es5.js</files>
-      <baseline>arguments.es5.baseline</baseline>
+      <compile-flags>-args summary -endargs</compile-flags>
     </default>
   </test>
   <test>

+ 0 - 1
test/Math/abs.baseline

@@ -1 +0,0 @@
-done

+ 0 - 43
test/Math/abs.js

@@ -1,43 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-// interesting floating point limits
-checkNaN(NaN);
-check(+0, +0);
-check(+0, -0);
-check(+Infinity, +Infinity);
-check(+Infinity, -Infinity);
-
-check(3.14, -3.14);
-check(3.14, 3.14);
-check(5, -5);
-check(5, 5);
-
-check(2147483647, 2147483647);  /* INT_MAX */
-check(2147483648, -2147483648); /* INT_MIN */
-
-if(!isNaN(Math.abs()))
-{
-    WScript.Echo("error: Math.abs() is not NaN");
-}
-
-WScript.Echo("done");
-
-function check(result, n) {
-    var rs = Math.abs(n);
-    if (rs != result) {
-        WScript.Echo("abs(" + n + ") != " + result);
-        WScript.Echo(" wrong result is abs(" + n + ") = " + rs);
-    }
-}
-
-function checkNaN(x) {
-    var rs = Math.abs(x);
-    if (!isNaN(rs)) {
-        WScript.Echo("abs(" + x + ") !=  NaN");
-        WScript.Echo(" wrong result is abs(" + x + ") = " + rs);
-    }
-
-}

+ 0 - 1
test/Math/acos.baseline

@@ -1 +0,0 @@
-done

+ 0 - 39
test/Math/acos.js

@@ -1,39 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-// interesting floating point limits
-checkNaN(NaN);
-checkNaN(5.1);
-checkNaN(-2);
-
-check(+0, 1);
-check((Math.PI) / 2, 0);
-check((Math.PI) / 3, 0.5);
-checkNaN(+Infinity);
-checkNaN(-Infinity);
-
-
-if(!isNaN(Math.acos()))
-{
-    WScript.Echo("error: Math.acos() is not NaN");
-}
-
-WScript.Echo("done");
-
-function check(result, n) {
-    var rs = Math.acos(n);
-    if (Math.abs(rs - result) > 0.00000000001) {
-        WScript.Echo("acos(" + n + ") != " + result);
-        WScript.Echo(" wrong result is acos(" + n + ") = " + rs);
-    }
-}
-function checkNaN(x) {
-    var rs = Math.acos(x);
-    if (!isNaN(rs)) {
-        WScript.Echo("acos(" + x + ") !=  NaN");
-        WScript.Echo(" wrong result is acos(" + x + ") = " + rs);
-    }
-
-}

+ 0 - 1
test/Math/asin.baseline

@@ -1 +0,0 @@
-done

+ 0 - 40
test/Math/asin.js

@@ -1,40 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-// interesting floating point limits
-checkNaN(NaN);
-checkNaN(5.1);
-checkNaN(-2);
-
-check(+0, +0);
-check(-0, -0.0);
-check((Math.PI) / 2, 1);
-check((Math.PI) / 6, 0.5);
-checkNaN(+Infinity);
-checkNaN(-Infinity);
-
-
-if(!isNaN(Math.asin()))
-{
-    WScript.Echo("error: Math.asin() is not NaN");
-}
-
-WScript.Echo("done");
-
-function check(result, n) {
-    var rs = Math.asin(n);
-    if (Math.abs(rs - result) > 0.00000000001) {
-        WScript.Echo("asin(" + n + ") != " + result);
-        WScript.Echo(" wrong result is asin(" + n + ") = " + rs);
-    }
-}
-
-function checkNaN(x) {
-    var rs = Math.asin(x);
-    if (!isNaN(rs)) {
-        WScript.Echo("asin(" + x + ") !=  NaN");
-        WScript.Echo(" wrong result is asin(" + x + ") = " + rs);
-    }
-}

+ 0 - 1
test/Math/atan.baseline

@@ -1 +0,0 @@
-done

+ 0 - 35
test/Math/atan.js

@@ -1,35 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-// interesting floating point limits
-checkNaN(NaN);
-check(+0, +0);
-check(-0, -0.0);
-check((Math.PI) / 2, +Infinity);
-check(-(Math.PI) / 2, -Infinity);
-check((Math.PI) / 4, 1);
-
-
-if(!isNaN(Math.atan()))
-{
-    WScript.Echo("error: Math.atan() is not NaN");
-}
-
-WScript.Echo("done");
-
-function check(result, n) {
-    var res = Math.atan(n);
-    if (Math.abs(res - result) > 0.00000000001) {
-        WScript.Echo("atan(" + n + ") != " + result);
-        WScript.Echo(" wrong result is atan(" + n + ") = " + res);
-    }
-}
-function checkNaN(x) {
-    var rs = Math.atan(x);
-    if (!isNaN(rs)) {
-        WScript.Echo("atan(" + x + ") !=  NaN");
-        WScript.Echo(" wrong result is atan(" + x + ") = " + rs);
-    }
-}

+ 0 - 1
test/Math/atan2.baseline

@@ -1 +0,0 @@
-done

+ 0 - 69
test/Math/atan2.js

@@ -1,69 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-// interesting floating point limits
-
-checkNaN(NaN, NaN);
-checkNaN(2, NaN);
-checkNaN(NaN, -3);
-
-check((Math.PI) / 2, 3, +0);
-check((Math.PI) / 2, 3, -0);
-
-check(0, 0, 3);
-check(0, 0, 0);
-check(Math.PI, 0, -0);
-check(Math.PI, 0, -2);
-
-check(-0, -0, 3);
-check(-0, -0, 0);
-check(-Math.PI, -0, -0);
-check(-Math.PI, -0, -2);
-
-check(-(Math.PI) / 2, -3, +0);
-check(-(Math.PI) / 2, -3, -0);
-
-check(0, 3, +Infinity);
-check((Math.PI), 3, -Infinity);
-check((-Math.PI), -3, -Infinity);
-
-check(-0, -3, +Infinity);
-
-check((Math.PI)/2, +Infinity, 3);
-check(-(Math.PI) / 2, -Infinity, 3);
-check((Math.PI) / 2, +Infinity, -3);
-check(-(Math.PI) / 2, -Infinity, -3);
-
-check(Math.PI / 4, +Infinity, +Infinity);
-check(3 * Math.PI / 4, +Infinity, -Infinity);
-check(-Math.PI / 4, -Infinity, +Infinity);
-check(-3 * Math.PI / 4, -Infinity, -Infinity);
-
-check((Math.PI) / 4, 5, 5.0);
-
-if(!isNaN(Math.atan2()))
-{
-    WScript.Echo("error: Math.atan2() is not NaN");
-}
-
-WScript.Echo("done");
-
-function check(result, y, x) {
-    var res = Math.atan2(y, x);
-    if (Math.abs(res - result) > 0.00000000001) {
-        WScript.Echo("atan2(" + y + " , " + x + ") != " + result);
-        WScript.Echo(" the wrong result is atan2(" + y + " , " + x + ") = " + res);
-    }
-}
-
-function checkNaN(y, x) {
-    var rs = Math.atan2(y, x);
-    if (!isNaN(rs)) {
-        WScript.Echo("atan2(" + y + " , " + x + ") !=  NaN");
-        WScript.Echo(" wrong result is atan2(" + y + " , " + x + ") = " + rs);
-    }
-
-
-}

+ 494 - 0
test/Math/basics.js

@@ -0,0 +1,494 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js");
+
+
+function checkNaN(value, message) {
+    assert.isTrue(isNaN(value), message);
+}
+
+function checkNegZero(value, message) {
+    assert.strictEqual(1/value, -Infinity, message);
+}
+
+function checkPlusZero(value, message) {
+    assert.strictEqual(1/value, +Infinity, message);
+}
+
+function checkClose(value, target, message) {
+    assert.isTrue(Math.abs(value - target) < 0.000000001, message)
+}
+
+const tests = [
+    {
+        name: "Constants",
+        body() {
+            assert.areEqual(Math.E      , 2.718281828459045, "Maths constant with wrong value");
+            assert.areEqual(Math.PI     , 3.141592653589793, "Maths constant with wrong value");
+            assert.areEqual(Math.LN10   , 2.302585092994046, "Maths constant with wrong value");
+            assert.areEqual(Math.LN2    , 0.6931471805599453, "Maths constant with wrong value");
+            assert.areEqual(Math.LOG2E  , 1.4426950408889633, "Maths constant with wrong value");
+            assert.areEqual(Math.LOG10E , 0.4342944819032518, "Maths constant with wrong value");
+            assert.areEqual(Math.SQRT1_2, 0.7071067811865476, "Maths constant with wrong value");
+            assert.areEqual(Math.SQRT2  , 1.4142135623730951, "Maths constant with wrong value");
+        }
+    },
+    {
+        name : "Math.abs",
+        body() {
+            checkNaN(Math.abs(NaN), "Math.abs(NaN) should equal NaN");
+            checkNaN(Math.abs(), "Math.abs() should equal NaN");
+            checkPlusZero(Math.abs(-0), "Math.abs should convert -0 to 0");
+            checkPlusZero(Math.abs(+0), "Math.abs should convert -0 to 0");
+
+            var input = [+Infinity, -Infinity, -3.14, 3.14, -5, 5, 2147483647 /*INT_MAX*/, -2147483648 /* INT_MIN */];
+            var expected = [+Infinity, +Infinity, 3.14, 3.14, 5, 5, 2147483647, 2147483648];
+            for (var i in input) {
+                assert.isFalse(Math.abs(input[i]) !== expected[i], `Math.abs(${input[i]}) should equal ${expected[i]}`);
+            }
+        }
+    },
+    {
+        name : "Math.sqrt",
+        body() {
+            checkNaN(Math.sqrt(NaN), "Math.sqrt(NaN) should equal NaN");
+            checkNaN(Math.sqrt(), "Math.sqrt() should equal NaN");
+            checkNaN(Math.sqrt(-Infinity), "Math.sqrt(-Infinity) should equal NaN");
+            checkNaN(Math.sqrt(-0.1), "Math.sqrt(-0.1) should equal NaN");
+            checkPlusZero(Math.sqrt(+0), "Math.sqrt(+0) should be +0");
+            checkNegZero(Math.sqrt(-0.0), "Math.sqrt(-0) should be -0");
+
+            assert.strictEqual(Math.sqrt(+Infinity), +Infinity, "Math.sqrt(+Infinity) should equal +Infinity")
+            assert.strictEqual(Math.sqrt(25), 5, "Math.sqrt(25) should equal 5")
+        }
+    },
+    {
+        name : "Math.cos",
+        body() {
+            checkNaN(Math.cos(), "Math.cos() should be NaN");
+            checkNaN(Math.cos(NaN), "Math.cos(NaN) should be NaN");
+            // infinity
+            checkNaN(Math.cos(+Infinity), "Math.cos(+Infinity) should be NaN");
+            checkNaN(Math.cos(-Infinity), "Math.cos(-Infinity) should be NaN");
+
+            assert.strictEqual(Math.cos(+0), 1, "Math.cos(+0) should be 1");
+            assert.strictEqual(Math.cos(-0.0), 1, "Math.cos(-0.0) should be 1");
+            checkClose(Math.cos((Math.PI) / 2), 0, "Math.cos((Math.PI) / 2) should be 0");
+            checkClose(Math.cos((Math.PI) / 3), 0.5, "Math.cos((Math.PI) / 3) should be 0.5");
+        }
+    },
+    {
+        name : "Math.acos",
+        body() {
+            checkNaN(Math.acos(), "Math.acos() should be NaN");
+            checkNaN(Math.acos(NaN), "Math.acos(NaN) should be NaN");
+            // interesting floating point limits
+            checkNaN(Math.acos(5.1), "Math.acos(5.1) should be NaN"); 
+            checkNaN(Math.acos(-2), "Math.acos(-2) should be NaN");
+            // infinity
+            checkNaN(Math.acos(+Infinity), "Math.acos(+Infinity) should be NaN");
+            checkNaN(Math.acos(-Infinity), "Math.acos(-Infinity) should be NaN");
+
+            assert.strictEqual(Math.acos(1), 0, "Math.acos(1) should be 0");
+            assert.strictEqual(Math.acos(0), (Math.PI) / 2, "Math.acos(0) should be (Math.PI) / 2");
+            checkClose(Math.acos(0.5), (Math.PI) / 3, "Math.acos(0.5) should be (Math.PI) / 3");
+        }
+    },
+    {
+        name : "Math.sin",
+        body() {
+            checkNaN(Math.sin(), "Math.sin() should be NaN");
+            checkNaN(Math.sin(NaN), "Math.sin(NaN) should be NaN");
+            // infinity
+            checkNaN(Math.sin(+Infinity), "Math.sin(+Infinity) should be NaN");
+            checkNaN(Math.sin(-Infinity), "Math.sin(-Infinity) should be NaN");            
+            // +0 and -0
+            checkPlusZero(Math.sin(+0.0), "Math.sin(+0.0) should be +0");
+            checkNegZero(Math.sin(-0.0), "Math.sin(-0.0) should be -0");
+
+            assert.strictEqual(Math.sin(Math.PI / 2), 1, "Math.sin(Math.PI / 2) should be 1");
+            checkClose(Math.sin(Math.PI / 6), 0.5, "Math.sin(Math.PI / 6) should be 0.5");
+        }
+    },
+    {
+        name : "Math.asin",
+        body() {
+            checkNaN(Math.asin(), "Math.asin() should be NaN");
+            checkNaN(Math.asin(NaN), "Math.asin(NaN) should be NaN");
+            // interesting floating point limits
+            checkNaN(Math.asin(5.1), "Math.asin(5.1) should be NaN"); 
+            checkNaN(Math.asin(-2), "Math.asin(-2) should be NaN");
+            // infinity
+            checkNaN(Math.asin(+Infinity), "Math.asin(+Infinity) should be NaN");
+            checkNaN(Math.asin(-Infinity), "Math.asin(-Infinity) should be NaN");
+
+            assert.strictEqual(Math.asin(1), (Math.PI) / 2, "Math.asin(1) should be (Math.PI) / 2");
+            checkClose(Math.asin(0.5), (Math.PI) / 6, "Math.asin(0.5) should be (Math.PI) / 6");
+
+            checkPlusZero(Math.asin(+0), "Math.asin(+0) should be +0");
+            checkNegZero(Math.asin(-0.0), "Math.asin(-0.0) should be -0");
+        }
+    },
+    {
+        name : "Math.atan",
+        body() {
+            checkNaN(Math.atan(), "Math.atan() should be NaN");
+            checkNaN(Math.atan(NaN), "Math.atan(NaN) should be NaN");
+
+            assert.strictEqual(Math.atan(+Infinity), (Math.PI) / 2, "Math.atan(+Infinity) should be (Math.PI) / 2");
+            assert.strictEqual(Math.atan(-Infinity), -(Math.PI) / 2, "Math.atan(-Infinity) should be -(Math.PI) / 2");
+            assert.strictEqual(Math.atan(1), (Math.PI) / 4, "Math.atan(1) should be (Math.PI) / 4");
+
+            checkPlusZero(Math.atan(+0), "Math.atan(+0) should be +0");
+            checkNegZero(Math.atan(-0.0), "Math.atan(-0.0) should be -0");
+        }
+    },
+    {
+        name : "Math.tan",
+        body() {
+            checkNaN(Math.tan(), "Math.tan() should be NaN");
+            checkNaN(Math.tan(NaN), "Math.tan(NaN) should be NaN");
+            // infinity
+            checkNaN(Math.tan(+Infinity), "Math.tan(+Infinity) should be NaN");
+            checkNaN(Math.tan(-Infinity), "Math.tan(-Infinity) should be NaN");
+            // +0 and -0
+            checkPlusZero(Math.tan(+0), "Math.tan(+0) should be +0");
+            checkNegZero(Math.tan(-0.0), "Math.tan(-0.0) should be -0");
+
+            checkClose(Math.tan(Math.PI / 4), 1, "Math.tan(Math.PI / 4) should be 1");
+        }
+    },
+    {
+        name : "Math.exp",
+        body() {
+            checkNaN(Math.exp(), "Math.exp() should be NaN");
+            checkNaN(Math.exp(NaN), "Math.exp(NaN) should be NaN");
+
+            assert.strictEqual(Math.exp(+0), 1, "Math.exp(1) should be 1");
+            assert.strictEqual(Math.exp(-0.0), 1, "Math.exp(-0.0) should be 1");
+            assert.strictEqual(Math.exp(+Infinity), +Infinity, "Math.exp(+Infinity) should be +Infinity");
+            assert.strictEqual(Math.exp(-Infinity), 0, "Math.exp(-Infinity) should be 0");
+            checkClose(Math.exp(3), Math.E * Math.E * Math.E, "Math.exp(3) should be Math.E * Math.E * Math.E");
+        }
+    },
+    {
+        name : "Math.log",
+        body() {
+            checkNaN(Math.log(), "Math.log() should be NaN");
+            checkNaN(Math.log(NaN), "Math.log(NaN) should be NaN");
+
+            assert.strictEqual(Math.log(+0), -Infinity, "Math.log(+0) should be -Infinity");
+            assert.strictEqual(Math.log(-0.0), -Infinity, "Math.log(-0.0) should be -Infinity");
+            assert.strictEqual(Math.log(1), 0, "Math.log(1) should be 0");
+            assert.strictEqual(Math.log(+Infinity), +Infinity, "Math.log(+Infinity) should be +Infinity");
+            assert.strictEqual(Math.log(Math.E*Math.E*Math.E), 3, "Math.log(Math.E*Math.E*Math.E) should be 3");
+        }
+    },
+    {
+        name : "Math.pow",
+        body() {
+            function checkNaNPow(x, y) {
+                checkNaN(Math.pow(x, y), `Math.pow(${x}, ${y}) should be NaN`);
+            }
+            function check(result, x, y) {
+                var pow = Math.pow(x, y);
+                if (result !== 0) {
+                    if (pow !== result) {
+                        checkClose(pow, result, `Math.pow(${x}, ${y}) should equal ${result}`);
+                    }
+                } else if (1 / result === +Infinity) {
+                    checkPlusZero(pow, `Math.pow(${x}, ${y}) should equal +0`);
+                } else {
+                    checkNegZero(pow, `Math.pow(${x}, ${y}) should equal -0`);
+                }
+            }
+
+            checkNaN(Math.pow(), "Math.pow() should be NaN");
+            checkNaNPow(NaN, NaN);
+            checkNaNPow(Infinity, NaN);
+            checkNaNPow(-Infinity, NaN);
+            checkNaNPow(0, NaN);
+            checkNaNPow(-0, NaN);
+            checkNaNPow(3, NaN);
+            checkNaNPow(-3, NaN);
+
+            check(1, NaN, 0);
+            check(1, Infinity, 0);
+            check(1, -Infinity, 0);
+            check(1, 0, 0);
+            check(1, -0, 0);
+            check(1, 3, 0);
+            check(1, -3, 0);
+
+            check(1, NaN, -0);
+            check(1, Infinity, -0);
+            check(1, -Infinity, -0);
+            check(1, 0, -0);
+            check(1, -0, -0);
+            check(1, 3, -0);
+            check(1, -3, -0);
+
+            checkNaNPow(NaN, 3);
+            checkNaNPow(NaN, Infinity);
+            checkNaNPow(NaN, -Infinity);
+
+            check(Infinity, +1.1, Infinity);
+            check(Infinity, -1.1, Infinity);
+
+            check(0, +1.1, -Infinity);
+            check(0, -1.1, -Infinity);
+
+            checkNaNPow(+1, Infinity);
+            checkNaNPow(-1, Infinity);
+
+            checkNaNPow(+1, -Infinity);
+            checkNaNPow(-1, -Infinity);
+
+            check(0, +0.9, Infinity);
+            check(0, -0.9, Infinity);
+
+            check(Infinity, +0.9, -Infinity);
+            check(Infinity, -0.9, -Infinity);
+
+            check(Infinity, Infinity, 0.1);
+            check(+0, Infinity, -0.1);
+
+            check(-Infinity, -Infinity, 3);
+            check(+Infinity, -Infinity, 4);
+
+            check(-0, -Infinity, -3);
+            check(+0, -Infinity, -4);
+
+            check(0, 0, 0.1);
+
+            check(+Infinity, +0, -3);
+            check(+Infinity, +0, -0.1);
+            check(+Infinity, -0, -1.1);
+
+            check(-0.0, -0, +3);
+            check(+0.0, -0, +4);
+            check(-Infinity, -0, -3);
+            check(+Infinity, -0, -4);
+
+            checkNaNPow(-3, 3.3);
+
+            check(25, 5, 2);
+
+            check(25, -5, 2);
+            check(1/25, -5, -2);
+        }
+    },
+    {
+        name : "Math.atan2",
+        body() {
+            checkNaN(Math.atan2(), "Math.atan2() should be NaN");
+            checkNaN(Math.atan2(NaN, NaN), "Math.atan2(NaN, NaN) should be NaN");
+            checkNaN(Math.atan2(2, NaN), "Math.atan2(2, NaN) should be NaN");
+            checkNaN(Math.atan2(NaN, -3), "Math.atan2(NaN, -3) should be NaN");
+
+            function checkATan2(result, a, b) {
+                assert.strictEqual(Math.atan2(a, b), result, `Math.atan2(${a}, ${b}) should equal ${result}`);
+            }
+
+            checkATan2((Math.PI) / 2, 3, +0);
+            checkATan2((Math.PI) / 2, 3, -0);
+
+            checkPlusZero(Math.atan2(0, 3),"Math.atan2(0, 3) should equal +0");
+            checkPlusZero(Math.atan2(0, 0),"Math.atan2(0, 0) should equal +0");
+            checkATan2(Math.PI, 0, -0);
+            checkATan2(Math.PI, 0, -2);
+
+            checkNegZero(Math.atan2(-0, 3),"Math.atan2(-0, 3) should equal -0");
+            checkNegZero(Math.atan2(-0, 0),"Math.atan2(-0, 0) should equal -0");
+
+            checkATan2(-Math.PI, -0, -0);
+            checkATan2(-Math.PI, -0, -2);
+
+            checkATan2(-(Math.PI) / 2, -3, +0);
+            checkATan2(-(Math.PI) / 2, -3, -0);
+
+            checkPlusZero(Math.atan2(3, +Infinity),"Math.atan2(3, +Infinity) should equal +0");
+            checkATan2((Math.PI), 3, -Infinity);
+            checkATan2((-Math.PI), -3, -Infinity);
+
+            checkNegZero(Math.atan2(-3, +Infinity),"Math.atan2(-3, +Infinity) should equal -0");
+
+            checkATan2((Math.PI)/2, +Infinity, 3);
+            checkATan2(-(Math.PI) / 2, -Infinity, 3);
+            checkATan2((Math.PI) / 2, +Infinity, -3);
+            checkATan2(-(Math.PI) / 2, -Infinity, -3);
+
+            checkATan2(Math.PI / 4, +Infinity, +Infinity);
+            checkATan2(3 * Math.PI / 4, +Infinity, -Infinity);
+            checkATan2(-Math.PI / 4, -Infinity, +Infinity);
+            checkATan2(-3 * Math.PI / 4, -Infinity, -Infinity);
+
+            checkATan2((Math.PI) / 4, 5, 5.0);
+        }
+    },
+    {
+        name: "Math.ceil and Math.floor",
+        body() {
+            checkNaN(Math.ceil(NaN), "Math.ceil(NaN) should be NaN");
+            checkNaN(Math.ceil(), "Math.ceil() should be NaN");
+            checkNaN(Math.floor(NaN), "Math.floor(NaN) should be NaN");
+            checkNaN(Math.floor(), "Math.floor() should be NaN");
+
+            function check(result, value) {
+                var ceil = Math.ceil(value);
+                var floor = Math.floor(-value);
+                if (result !== 0) {
+                    assert.strictEqual(ceil, result, `Math.ceil(${value}) should equal ${result} not ${ceil}`);
+                    assert.strictEqual(-floor, result, `-Math.floor(${-value}) should equal ${result} not ${-floor}`);
+                } else if (1/result === -Infinity || (value > -1 && value < 1 && value !== 0)) {
+                    checkNegZero(ceil, `Math.ceil(${value}) should equal -0 not ${ceil}`);
+                    checkPlusZero(floor, `Math.floor(${-value}) should equal +0 not ${floor}`)
+                } else {
+                    checkPlusZero(ceil, `Math.ceil(${value}) should equal +0 not ${ceil}`);
+                    checkNegZero(floor, `Math.floor(${-value}) should equal -0 not ${floor}`)
+                }
+            }
+            
+            check(+0, +0);
+            check(-0, -0);
+            check(+Infinity, +Infinity);
+            check(-Infinity, -Infinity);
+
+            // values abs(x) < 1
+            check(-0, -4.9406564584124654000e-324);
+            check(-0, -9.8813129168249309000e-324);
+            check(-0, -0.5);
+            check(-0, -9.9999999999999989000e-001);
+            check(-0, -9.9999999999999978000e-001);
+            check(-1, -1);
+            check(1,   4.9406564584124654000e-324);
+            check(1,   9.8813129168249309000e-324);
+            check(1, 0.5);
+            check(1, 9.9999999999999989000e-001);
+            check(1, 9.9999999999999978000e-001);
+            check(1, 1);
+
+            // other interesting double values
+            var x = 1;
+            for(var i = 0; i < 50; ++i)
+            {
+                check(x, x - 0.1);
+                check(-x + 1, -x + 0.1);
+                x = x * 2;
+            }
+            check(54, 53.7);
+            check(112233581321, 112233581320.001);
+
+            // values around the maximums
+            check(1.7976931348623157000e+308, 1.7976931348623157000e+308);
+            check(-1.7976931348623157000e+308, -1.7976931348623157000e+308)
+
+            // values around INT_MIN and INT_MAX for amd64 (Bug 179932)
+            assert.isFalse(Math.ceil(2147483648) <= 2147483647, "Math.ceil(2147483648) should not be <= 2147483647");
+            assert.isFalse(Math.ceil(-2147483649) >= -2147483648, "Math.ceil(-2147483649) should not be >= -2147483648");
+
+            check(-0, -0.1);
+            check(-0, -0);
+            
+        }
+    },
+    {
+        name : "Math.round",
+        body() {
+            // check rounding of NaN
+            checkNaN(Math.round(NaN), "Math.round(NaN) should be NaN");
+            checkNaN(Math.round(Math.asin(2.0)), "Math.round(Math.asin(2.0)) should be NaN");
+            checkNaN(Math.round(), "Math.round() should be NaN");
+
+            // check rounding of Infinity
+            assert.strictEqual(Infinity, Math.round(Infinity), "Math.round(Infinity)");
+            assert.strictEqual(-Infinity, Math.round(-Infinity), "Math.round(-Infinity)");
+
+            // check positive and negative 0
+            checkPlusZero(Math.round(+0), "Math.round(+0)");
+            checkNegZero(Math.round(-0), "Math.round(-0)");
+
+            // check various values between 0 and 0.5
+            checkPlusZero(Math.round(4.9999999999999994000e-001), "round largest value < 0.5"); // for ES5 the result is 0
+            checkPlusZero(Math.round(4.9999999999999989000e-001), "round 2nd largest value < 0.5");
+            checkPlusZero(Math.round(4.9406564584124654000e-324), "round smallest value > 0");
+            checkPlusZero(Math.round(9.8813129168249309000e-324), "round 2nd smallest value > 0");
+            for(var i = 0.001; i < 0.5; i += 0.001)
+            {
+                checkPlusZero(Math.round(i), "round " + i);
+            }
+
+            // check various values between -0.5 and 0
+            checkNegZero(Math.round(-4.9406564584124654000e-324), "round most positive value < 0");
+            checkNegZero(Math.round(-9.8813129168249309000e-324), "round 2nd most positive value < 0");
+            checkNegZero(Math.round(-4.9999999999999994000e-001), "round most negative value > -0.5");
+            checkNegZero(Math.round(-4.9999999999999989000e-001), "round 2nd most negative value > -0.5");
+            checkNegZero(Math.round(-0), "round -0 should be -0");
+
+            for(var i = -0.001; i > -0.5; i -= 0.001)
+            {
+                checkNegZero(Math.round(i), "round " + i);
+            }
+
+            // check various integers
+            assert.strictEqual(1, Math.round(1), "round 1");
+            assert.strictEqual(2, Math.round(2), "round 2");
+            assert.strictEqual(-1, Math.round(-1), "round -1");
+            assert.strictEqual(-2, Math.round(-2), "round -2");
+            assert.strictEqual(4294967295, Math.round(4294967295), "round 4294967295");
+            assert.strictEqual(4294967296, Math.round(4294967296), "round 4294967296");
+            assert.strictEqual(-4294967296, Math.round(-4294967296), "round -4294967296");
+            for(var i = 1000; i < 398519; i += 179)
+            {
+                assert.strictEqual(i, Math.round(i), "round " + i);
+            }
+            for(var i = 0.001; i <= 0.5; i += 0.001)
+            {
+                assert.strictEqual(1, Math.round(0.5 + i), "round " + (0.5+i));
+            }
+            for(var i = -0.001; i >= -0.5; i -= 0.001)
+            {
+                assert.strictEqual(-1, Math.round(-0.5 + i), "round " + (-0.5+i));
+            }
+
+            // check I + 0.5
+            assert.strictEqual(1, Math.round(0.5), "round 0.5");
+            assert.strictEqual(2, Math.round(1.5), "round 1.5");
+            assert.strictEqual(3, Math.round(2.5), "round 2.5");
+            assert.strictEqual(4294967296, Math.round(4294967295 + 0.5), "round 4294967295.5");
+            for(var i = -100000; i <= 100000; i += 100)
+            {
+                assert.strictEqual(i+1, Math.round(i + 0.5), "round " + (i+0.5));
+            }
+
+            // miscellaneous other real numbers
+            assert.strictEqual(30593859183, Math.round(30593859183.3915898), "round a double with high precision");
+            assert.strictEqual(1, Math.round(5.0000000000000011000e-001), "round smallest value > 0.5");
+            assert.strictEqual(1, Math.round(5.0000000000000022000e-001), "round 2nd smallest value > 0.5");
+            assert.strictEqual(1.7976931348623157000e+308, Math.round(1.7976931348623157000e+308), "round largest number < Infinity");
+            assert.strictEqual(1.7976931348623155000e+308, Math.round(1.7976931348623155000e+308), "round 2nd largest number < Infinity");
+            assert.strictEqual(-1.7976931348623157000e+308, Math.round(-1.7976931348623157000e+308), "round least positive number > -Infinity");
+            assert.strictEqual(-1.7976931348623155000e+308, Math.round(-1.7976931348623155000e+308), "round 2nd least positive number > -Infinity");
+
+            // if x <= -2^52 or x >= 2^52, Math.round(x) == x
+            assert.strictEqual(4503599627370496, Math.round(4503599627370496), "round 4503599627370496");
+            assert.strictEqual(4503599627370497, Math.round(4503599627370497), "round 4503599627370497");
+            assert.strictEqual(4503599627370548, Math.round(4503599627370548), "round 4503599627370548");
+            assert.strictEqual(9007199254740991, Math.round(9007199254740991), "round 9007199254740991");
+            assert.strictEqual(-4503599627370496, Math.round(-4503599627370496), "round -4503599627370496");
+            assert.strictEqual(-4503599627370497, Math.round(-4503599627370497), "round -4503599627370497");
+            assert.strictEqual(-4503599627370548, Math.round(-4503599627370548), "round -4503599627370548");
+            assert.strictEqual(-9007199254740991, Math.round(-9007199254740991), "round -9007199254740991");
+
+            // values around INT_MIN and INT_MAX for amd64 (Bug 179932)
+            assert.isFalse(Math.round(2147483648) <= 2147483647, "Math.round(2147483648)")
+            assert.isFalse(Math.round(-2147483649) >= -2147483648, "Math.round(-2147483649)")
+        }
+    }
+
+];
+
+testRunner.runTests(tests, { verbose: WScript.Arguments[0] != "summary" });

+ 0 - 5
test/Math/ceilfloor.baseline

@@ -1,5 +0,0 @@
-pass
-pass
-done
-PASSED: Math.ceil around negative 0
-PASSED: Math.floor around negative 0

+ 0 - 101
test/Math/ceilfloor.js

@@ -1,101 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-// interesting floating point limits
-check(NaN, NaN);
-check(+0, +0);
-check(-0, -0);
-check(+Infinity, +Infinity);
-check(-Infinity, -Infinity);
-
-// values abs(x) < 1
-check(-0, -4.9406564584124654000e-324);
-check(-0, -9.8813129168249309000e-324);
-check(-0, -0.5);
-check(-0, -9.9999999999999989000e-001);
-check(-0, -9.9999999999999978000e-001);
-check(-1, -1);
-check(1,   4.9406564584124654000e-324);
-check(1,   9.8813129168249309000e-324);
-check(1, 0.5);
-check(1, 9.9999999999999989000e-001);
-check(1, 9.9999999999999978000e-001);
-check(1, 1);
-
-// other interesting double values
-var x = 1;
-for(var i = 0; i < 50; ++i)
-{
-    check(x, x - 0.1);
-    check(-x + 1, -x + 0.1);
-    x = x * 2;
-}
-check(54, 53.7);
-check(112233581321, 112233581320.001);
-
-// values around the maximums
-check(1.7976931348623157000e+308, 1.7976931348623157000e+308);
-check(-1.7976931348623157000e+308, -1.7976931348623157000e+308)
-
-// values around INT_MIN and INT_MAX for amd64 (Bug 179932)
-function foo(b)
-{
-    //Its okay to check only for ceil as correctness tests for floor are already here and floor and ceil will have the same value for the parameter passed for this test
-    var ceil = Math.ceil(b);
-
-    if(ceil <= 2147483647)
-        return "fail";
-
-    return "pass";
-}
-WScript.Echo(foo(2147483648));
-
-function bar(b)
-{
-    //Its okay to check only for ceil as correctness tests for floor are already here and floor and ceil will have the same value for the parameter passed for this test
-    var ceil = Math.ceil(b);
-
-    if(ceil >= -2147483648)
-        return "fail";
-
-    return "pass";
-}
-WScript.Echo(bar(-2147483649));
-
-WScript.Echo("done");
-
-function check(result, n)
-{
-    if(!isNaN(n))
-    {
-        if(Math.ceil(n) != result)
-        {
-            WScript.Echo("ceil(" + n + ") != " + result);
-        }
-        if(-Math.floor(-n) != result)
-        {
-            WScript.Echo("floor(" + (-n) + ") != " + (-result));
-        }
-    }
-    else
-    {
-        if(!isNaN(Math.ceil(n)) || !isNaN(-Math.floor(-n)))
-        {
-            WScript.Echo("error with ceil/floor of NaNs");
-        }
-    }
-}
-
-Verify("Math.ceil around negative 0", -Infinity, 1/Math.ceil(-0.1));
-Verify("Math.floor around negative 0", -Infinity, 1/Math.floor(-0));
-
-function Verify(test, expected, actual) {
-    if (expected === actual) {
-        WScript.Echo("PASSED: " + test);
-    }
-    else {
-        WScript.Echo("FAILED: " + test + " Expected:" + expected + "Actual:" + actual);
-    }
-}

+ 0 - 9
test/Math/constants.baseline

@@ -1,9 +0,0 @@
-Math constants:
-2.718281828459045
-3.141592653589793
-2.302585092994046
-0.6931471805599453
-1.4426950408889633
-0.4342944819032518
-0.7071067811865476
-1.4142135623730951

+ 0 - 15
test/Math/constants.js

@@ -1,15 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-// check constants, just echo
-WScript.Echo("Math constants:")
-WScript.Echo(Math.E);
-WScript.Echo(Math.PI);
-WScript.Echo(Math.LN10);
-WScript.Echo(Math.LN2);
-WScript.Echo(Math.LOG2E);
-WScript.Echo(Math.LOG10E);
-WScript.Echo(Math.SQRT1_2);
-WScript.Echo(Math.SQRT2);

+ 0 - 1
test/Math/cos.baseline

@@ -1 +0,0 @@
-done

+ 0 - 38
test/Math/cos.js

@@ -1,38 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-// interesting floating point limits
-checkNaN(NaN);
-check(1, +0);
-check(1, -0.0);
-checkNaN(+Infinity);
-checkNaN(-Infinity);
-
-check(0, (Math.PI) /2);
-check(0.5 , (Math.PI) / 3);
-
-
-
-if(!isNaN(Math.cos()))
-{
-    WScript.Echo("error: Math.cos() is not NaN");
-}
-
-WScript.Echo("done");
-
-function check(result, n) {
-    var rs = Math.cos(n);
-    if (Math.abs(rs - result) > 0.00000000001) {
-        WScript.Echo("cos(" + n + ") != " + result);
-        WScript.Echo(" wrong result is cos(" + n + ") = " + rs);
-    }
-}
-function checkNaN(x) {
-    var rs = Math.cos(x);
-    if (!isNaN(rs)) {
-        WScript.Echo("cos(" + x + ") !=  NaN");
-        WScript.Echo(" wrong result is cos(" + x + ") = " + rs);
-    }
-}

+ 0 - 1
test/Math/exp.baseline

@@ -1 +0,0 @@
-done

+ 0 - 36
test/Math/exp.js

@@ -1,36 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-// interesting floating point limits
-checkNaN(NaN);
-check(1, +0);
-check(1, -0.0);
-check(+Infinity, +Infinity);
-check(0, -Infinity);
-check(Math.E * Math.E * Math.E, 3);
-
-if(!isNaN(Math.exp()))
-{
-    WScript.Echo("error: Math.exp() is not NaN");
-}
-
-WScript.Echo("done");
-
-function check(result, n) {
-    var rs = Math.exp(n);
-
-    if (isNaN(result) || isNaN(n) ||
-        Math.abs(rs - result) > 0.00000000001) {
-        WScript.Echo("exp(" + n + ") != " + result);
-        WScript.Echo(" wrong result is exp(" + n + ") = " + rs);
-    }
-}
-function checkNaN(x) {
-    var rs = Math.exp(x);
-    if (!isNaN(rs)) {
-        WScript.Echo("exp(" + x + ") !=  NaN");
-        WScript.Echo(" wrong result is exp(" + x + ") = " + rs);
-    }
-}

+ 0 - 1
test/Math/log.baseline

@@ -1 +0,0 @@
-done

+ 0 - 37
test/Math/log.js

@@ -1,37 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-// interesting floating point limits
-checkNaN(NaN);
-checkNaN(-4);
-check(-Infinity, +0);
-check(-Infinity, -0.0);
-check(0, 1);
-check(+Infinity, +Infinity);
-check(3, Math.E*Math.E*Math.E);
-
-if(!isNaN(Math.log()))
-{
-    WScript.Echo("error: Math.log() is not NaN");
-}
-
-WScript.Echo("done");
-
-function check(result, n) {
-    var rs = Math.log(n);
-    if ( Math.abs(rs - result) > 0.00000000001) {
-        WScript.Echo("log(" + n + ") != " + result);
-        WScript.Echo(" wrong result is log(" + n + ") = " + rs);
-    }
-}
-
-function checkNaN(x) {
-    var rs = Math.log(x);
-    if (!isNaN(rs)) {
-        WScript.Echo("log(" + x + ") !=  NaN");
-        WScript.Echo(" wrong result is log(" + x + ") = " + rs);
-    }
-}
-

+ 0 - 1
test/Math/pow.baseline

@@ -1 +0,0 @@
-done

+ 0 - 102
test/Math/pow.js

@@ -1,102 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-// interesting floating point limits
-checkNaN(NaN, NaN);
-checkNaN(Infinity, NaN);
-checkNaN(-Infinity, NaN);
-checkNaN(0, NaN);
-checkNaN(-0, NaN);
-checkNaN(3, NaN);
-checkNaN(-3, NaN);
-
-check(1, NaN, 0);
-check(1, Infinity, 0);
-check(1, -Infinity, 0);
-check(1, 0, 0);
-check(1, -0, 0);
-check(1, 3, 0);
-check(1, -3, 0);
-
-check(1, NaN, -0);
-check(1, Infinity, -0);
-check(1, -Infinity, -0);
-check(1, 0, -0);
-check(1, -0, -0);
-check(1, 3, -0);
-check(1, -3, -0);
-
-checkNaN(NaN, 3);
-checkNaN(NaN, Infinity);
-checkNaN(NaN, -Infinity);
-
-check(Infinity, +1.1, Infinity);
-check(Infinity, -1.1, Infinity);
-
-check(0, +1.1, -Infinity);
-check(0, -1.1, -Infinity);
-
-checkNaN(+1, Infinity);
-checkNaN(-1, Infinity);
-
-checkNaN(+1, -Infinity);
-checkNaN(-1, -Infinity);
-
-check(0, +0.9, Infinity);
-check(0, -0.9, Infinity);
-
-check(Infinity, +0.9, -Infinity);
-check(Infinity, -0.9, -Infinity);
-
-check(Infinity, Infinity, 0.1);
-check(+0, Infinity, -0.1);
-
-check(-Infinity, -Infinity, 3);
-check(+Infinity, -Infinity, 4);
-
-check(-0, -Infinity, -3);
-check(+0, -Infinity, -4);
-
-check(0, 0, 0.1);
-
-check(+Infinity, +0, -3);
-check(+Infinity, +0, -0.1);
-check(+Infinity, -0, -1.1);
-
-check(-0.0, -0, +3);
-check(+0.0, -0, +4);
-check(-Infinity, -0, -3);
-check(+Infinity, -0, -4);
-
-checkNaN(-3, 3.3);
-
-check(25, 5, 2);
-
-check(25, -5, 2);
-check(1/25, -5, -2);
-
-if(!isNaN(Math.pow()))
-{
-    WScript.Echo("error: Math.pow() is not NaN");
-}
-WScript.Echo("done");
-
-function check(result, x, y) {
-    var rs = Math.pow(x, y);
-    if ( Math.abs(rs - result) > 0.00000000001) {
-        WScript.Echo("pow(" + x + " , " + y + ") != " + result);
-        WScript.Echo(" wrong result is pow(" + x + " , " + y + ") = " + rs);
-    }
-}
-
-function checkNaN(x, y) {
-    var rs = Math.pow(x, y);
-    if (!isNaN(rs)) {
-        WScript.Echo("pow(" + x + " , " + y + ") !=  NaN" );
-        WScript.Echo(" wrong result is pow(" + x + " , " + y + ") = " + rs);
-    }
-
-
-}

+ 4 - 88
test/Math/rlexe.xml

@@ -1,65 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
-  <test>
-    <default>
-      <files>abs.js</files>
-      <baseline>abs.baseline</baseline>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>acos.js</files>
-      <baseline>acos.baseline</baseline>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>asin.js</files>
-      <baseline>asin.baseline</baseline>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>atan.js</files>
-      <baseline>atan.baseline</baseline>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>atan2.js</files>
-      <baseline>atan2.baseline</baseline>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>cos.js</files>
-      <baseline>cos.baseline</baseline>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>exp.js</files>
-      <baseline>exp.baseline</baseline>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>log.js</files>
-      <baseline>log.baseline</baseline>
-    </default>
-  </test>
   <test>
     <default>
       <files>neg.js</files>
       <baseline>neg.baseline</baseline>
     </default>
   </test>
-  <test>
-    <default>
-      <files>pow.js</files>
-      <baseline>pow.baseline</baseline>
-    </default>
-  </test>
   <test>
     <default>
       <files>min.js</files>
@@ -80,44 +26,14 @@
   </test>
   <test>
     <default>
-      <files>round.js</files>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>ceilfloor.js</files>
-      <baseline>ceilfloor.baseline</baseline>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>ceilfloor.js</files>
-      <baseline>ceilfloor.baseline</baseline>
-      <compile-flags>-sse:3</compile-flags>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>sin.js</files>
-      <baseline>sin.baseline</baseline>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>sqrt.js</files>
-      <baseline>sqrt.baseline</baseline>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>tan.js</files>
-      <baseline>tan.baseline</baseline>
+      <files>basics.js</files>
+      <compile-flags>-args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
-      <files>constants.js</files>
-      <baseline>constants.baseline</baseline>
+      <files>basics.js</files>
+      <compile-flags>-sse:3 -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>

+ 0 - 144
test/Math/round.js

@@ -1,144 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-var FAILED = false;
-
-// check rounding of NaN
-checknan(Math.round(NaN), "Math.round(NaN)");
-checknan(Math.round(Math.asin(2.0)), "Math.round(Math.asin(2.0))");
-
-// check rounding of Infinity
-check(Infinity, Math.round(Infinity), "Math.round(Infinity)");
-check(-Infinity, Math.round(-Infinity), "Math.round(-Infinity)");
-
-// check positive and negative 0
-//check(0, Math.round(+0), "Math.round(+0)");
-check(-0, Math.round(-0), "Math.round(-0)");
-
-// check various values between 0 and 0.5
-check(0, Math.round(4.9999999999999994000e-001), "round largest value < 0.5"); // for ES5 the result is 0
-check(0, Math.round(4.9999999999999989000e-001), "round 2nd largest value < 0.5");
-check(0, Math.round(4.9406564584124654000e-324), "round smallest value > 0");
-check(0, Math.round(9.8813129168249309000e-324), "round 2nd smallest value > 0");
-for(var i = 0.001; i < 0.5; i += 0.001)
-{
-    check(0, Math.round(i), "round " + i);
-}
-
-// check various values between -0.5 and 0
-checkisnegativezero(Math.round(-4.9406564584124654000e-324), "round most positive value < 0");
-checkisnegativezero(Math.round(-9.8813129168249309000e-324), "round 2nd most positive value < 0");
-checkisnegativezero(Math.round(-4.9999999999999994000e-001), "round most negative value > -0.5");
-checkisnegativezero(Math.round(-4.9999999999999989000e-001), "round 2nd most negative value > -0.5");
-checkisnegativezero(Math.round(-0), "round -0 should be -0");
-
-for(var i = -0.001; i > -0.5; i -= 0.001)
-{
-    checkisnegativezero(Math.round(i), "round " + i);
-}
-
-// check various integers
-check(1, Math.round(1), "round 1");
-check(2, Math.round(2), "round 2");
-check(-1, Math.round(-1), "round -1");
-check(-2, Math.round(-2), "round -2");
-check(4294967295, Math.round(4294967295), "round 4294967295");
-check(4294967296, Math.round(4294967296), "round 4294967296");
-check(-4294967296, Math.round(-4294967296), "round -4294967296");
-for(var i = 1000; i < 398519; i += 179)
-{
-    check(i, Math.round(i), "round " + i);
-}
-for(var i = 0.001; i <= 0.5; i += 0.001)
-{
-    check(1, Math.round(0.5 + i), "round " + (0.5+i));
-}
-for(var i = -0.001; i >= -0.5; i -= 0.001)
-{
-    check(-1, Math.round(-0.5 + i), "round " + (-0.5+i));
-}
-
-// check I + 0.5
-check(1, Math.round(0.5), "round 0.5");
-check(2, Math.round(1.5), "round 1.5");
-check(3, Math.round(2.5), "round 2.5");
-check(4294967296, Math.round(4294967295 + 0.5), "round 4294967295.5");
-for(var i = -100000; i <= 100000; i += 100)
-{
-    check(i+1, Math.round(i + 0.5), "round " + (i+0.5));
-}
-
-// miscellaneous other real numbers
-check(30593859183, Math.round(30593859183.3915898), "round a double with high precision");
-check(1, Math.round(5.0000000000000011000e-001), "round smallest value > 0.5");
-check(1, Math.round(5.0000000000000022000e-001), "round 2nd smallest value > 0.5");
-check(1.7976931348623157000e+308, Math.round(1.7976931348623157000e+308), "round largest number < Infinity");
-check(1.7976931348623155000e+308, Math.round(1.7976931348623155000e+308), "round 2nd largest number < Infinity");
-check(-1.7976931348623157000e+308, Math.round(-1.7976931348623157000e+308), "round least positive number > -Infinity");
-check(-1.7976931348623155000e+308, Math.round(-1.7976931348623155000e+308), "round 2nd least positive number > -Infinity");
-
-+// if x <= -2^52 or x >= 2^52, Math.round(x) == x
-+check(4503599627370496, Math.round(4503599627370496), "round 4503599627370496");
-+check(4503599627370497, Math.round(4503599627370497), "round 4503599627370497");
-+check(4503599627370548, Math.round(4503599627370548), "round 4503599627370548");
-+check(9007199254740991, Math.round(9007199254740991), "round 9007199254740991");
-+check(-4503599627370496, Math.round(-4503599627370496), "round -4503599627370496");
-+check(-4503599627370497, Math.round(-4503599627370497), "round -4503599627370497");
-+check(-4503599627370548, Math.round(-4503599627370548), "round -4503599627370548");
-+check(-9007199254740991, Math.round(-9007199254740991), "round -9007199254740991");
-
-// values around INT_MIN and INT_MAX for amd64 (Bug 179932)
-function foo(b)
-{
-    var round = Math.round(b);
-
-    if(round <= 2147483647)
-    {
-        FAILED = true;
-    }
-}
-foo(2147483648);
-
-function bar(b)
-{
-    var round = Math.round(b);
-
-    if(round >= -2147483648)
-    {
-        FAILED = true;
-    }
-}
-bar(-2147483649);
-
-if (!FAILED)
-{
-    WScript.Echo("Passed");
-}
-
-function check(x, y, str)
-{
-    if(x != y)
-    {
-        FAILED = true;
-        WScript.Echo("fail: " + str);
-    }
-}
-function checkisnegativezero(x, str)
-{
-    // this is a quick way to check if a number is -0
-    if(x != 0 || 1/x >= 0)
-    {
-        FAILED = true;
-        WScript.Echo("fail: " + str);
-    }
-}
-function checknan(x, str)
-{
-    if(!isNaN(x))
-    {
-        FAILED = true;
-        WScript.Echo("fail: " + str);
-    }
-}

+ 0 - 1
test/Math/sin.baseline

@@ -1 +0,0 @@
-done

+ 0 - 39
test/Math/sin.js

@@ -1,39 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-// interesting floating point limits
-checkNaN(NaN);
-check(+0, +0);
-check(-0.0, -0.0);
-checkNaN(+Infinity);
-checkNaN(-Infinity);
-
-check(1, (Math.PI) /2);
-check(0.5 , (Math.PI) / 6);
-
-
-
-if(!isNaN(Math.sin()))
-{
-    WScript.Echo("error: Math.sin() is not NaN");
-}
-
-WScript.Echo("done");
-
-function check(result, n) {
-    var rs = Math.sin(n);
-    if (Math.abs(rs - result) > 0.00000000001) {
-        WScript.Echo("sin(" + n + ") != " + result);
-        WScript.Echo(" wrong result is sin(" + n + ") = " + rs);
-    }
-}
-
-function checkNaN(x) {
-    var rs = Math.sin(x);
-    if (!isNaN(rs)) {
-        WScript.Echo("sin(" + x + ") !=  NaN");
-        WScript.Echo(" wrong result is sin(" + x + ") = " + rs);
-    }
-}

+ 0 - 1
test/Math/sqrt.baseline

@@ -1 +0,0 @@
-done

+ 0 - 36
test/Math/sqrt.js

@@ -1,36 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-// interesting floating point limits
-checkNaN(NaN);
-checkNaN(-Infinity);
-checkNaN(-0.1);
-check(+0, +0);
-check(-0.0, -0.0);
-check(+Infinity, +Infinity);
-check(5, 25);
-
-
-if(!isNaN(Math.sqrt()))
-{
-    WScript.Echo("error: Math.sqrt() is not NaN");
-}
-
-WScript.Echo("done");
-
-function check(result, n) {
-    var rs = Math.sqrt(n);
-    if (Math.abs(rs - result) > 0.00000000001) {
-        WScript.Echo("sqrt(" + n + ") != " + result);
-        WScript.Echo(" wrong result is sqrt(" + n + ") = " + rs);
-    }
-}
-function checkNaN(x) {
-    var rs = Math.sqrt(x);
-    if (!isNaN(rs)) {
-        WScript.Echo("sqrt(" + x + ") !=  NaN");
-        WScript.Echo(" wrong result is sqrt(" + x + ") = " + rs);
-    }
-}

+ 0 - 1
test/Math/tan.baseline

@@ -1 +0,0 @@
-done

+ 0 - 37
test/Math/tan.js

@@ -1,37 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-// interesting floating point limits
-checkNaN(NaN);
-check(+0, +0);
-check(-0.0, -0.0);
-checkNaN(+Infinity);
-checkNaN(-Infinity);
-
-check(1, (Math.PI) /4);
-
-
-if(!isNaN(Math.tan()))
-{
-    WScript.Echo("error: Math.tan() is not NaN");
-}
-
-WScript.Echo("done");
-
-function check(result, n) {
-    var rs = Math.tan(n);
-    if (Math.abs(rs - result) > 0.00000000001) {
-        WScript.Echo("tan(" + n + ") != " + result);
-        WScript.Echo(" wrong result is tan(" + n + ") = " + rs);
-    }
-}
-
-function checkNaN(x) {
-    var rs = Math.tan(x);
-    if (!isNaN(rs)) {
-        WScript.Echo("tan(" + x + ") !=  NaN");
-        WScript.Echo(" wrong result is tan(" + x + ") = " + rs);
-    }
-}

+ 0 - 1
test/TaggedIntegers/addition.baseline

@@ -1 +0,0 @@
-done

+ 2 - 1
test/TaggedIntegers/addition.js

@@ -24093,4 +24093,5 @@ test36();
 test37();
 test38();
 test39();
-WScript.Echo("done");
+
+print("pass");

+ 0 - 1
test/TaggedIntegers/and.baseline

@@ -1 +0,0 @@
-done

+ 2 - 1
test/TaggedIntegers/and.js

@@ -23342,4 +23342,5 @@ test35();
 test36();
 test37();
 test38();
-WScript.Echo("done");
+
+print("pass");

+ 0 - 1
test/TaggedIntegers/arrays.baseline

@@ -1 +0,0 @@
-Done

+ 1 - 2
test/TaggedIntegers/arrays.js

@@ -68,5 +68,4 @@ verify(arr8.length, 3, id++,"\"Testing negative array length property \"")
 
 }
 
-WScript.Echo("Done");
-
+print("pass");

+ 0 - 1
test/TaggedIntegers/comparison.baseline

@@ -1 +0,0 @@
-done

+ 1 - 1
test/TaggedIntegers/comparison.js

@@ -292,4 +292,4 @@ check_inequality();
 check_greaterless();
 check_greaterlessequals();
 
-WScript.Echo("done");
+print("pass");

+ 0 - 1
test/TaggedIntegers/divide.baseline

@@ -1 +0,0 @@
-done

+ 2 - 1
test/TaggedIntegers/divide.js

@@ -6346,4 +6346,5 @@ test7();
 test8();
 test9();
 test10();
-WScript.Echo("done");
+
+print("pass");

+ 0 - 1
test/TaggedIntegers/modulus.baseline

@@ -1 +0,0 @@
-done

+ 2 - 1
test/TaggedIntegers/modulus.js

@@ -24093,4 +24093,5 @@ test36();
 test37();
 test38();
 test39();
-WScript.Echo("done");
+
+print("pass");

+ 0 - 1
test/TaggedIntegers/multiplication.baseline

@@ -1 +0,0 @@
-done

+ 2 - 1
test/TaggedIntegers/multiplication.js

@@ -22879,4 +22879,5 @@ test34();
 test35();
 test36();
 test37();
-WScript.Echo("done");
+
+print("pass");

+ 0 - 1
test/TaggedIntegers/negate.baseline

@@ -1 +0,0 @@
-done

+ 2 - 1
test/TaggedIntegers/negate.js

@@ -353,4 +353,5 @@ if(result != check) {{ fail(test, check, result); }} ++test;
 
 }
 test0();
-WScript.Echo("done");
+
+print("pass");

+ 0 - 1
test/TaggedIntegers/not.baseline

@@ -1 +0,0 @@
-done

+ 2 - 1
test/TaggedIntegers/not.js

@@ -353,4 +353,5 @@ if(result != check) {{ fail(test, check, result); }} ++test;
 
 }
 test0();
-WScript.Echo("done");
+
+print("pass");

+ 0 - 1
test/TaggedIntegers/not_1.baseline

@@ -1 +0,0 @@
-Done

+ 1 - 1
test/TaggedIntegers/not_1.js

@@ -60,4 +60,4 @@ verify(~-536870913,536870912,11,"\"Checkings result for Tagged Limits+1 -5368709
 
 verify(~-0,-1,12,"\"Checking result for -0\"");
 
-WScript.Echo("Done");
+print("pass");

+ 0 - 1
test/TaggedIntegers/or.baseline

@@ -1 +0,0 @@
-done

+ 2 - 1
test/TaggedIntegers/or.js

@@ -23342,4 +23342,5 @@ test35();
 test36();
 test37();
 test38();
-WScript.Echo("done");
+
+print("pass");

+ 0 - 1
test/TaggedIntegers/predecrement.baseline

@@ -1 +0,0 @@
-done

+ 2 - 1
test/TaggedIntegers/predecrement.js

@@ -198,4 +198,5 @@ if(result != check) { fail(test, check, result); } ++test;
 
 }
 test0();
-WScript.Echo("done");
+
+print("pass");

+ 0 - 1
test/TaggedIntegers/preincrement.baseline

@@ -1 +0,0 @@
-done

+ 2 - 1
test/TaggedIntegers/preincrement.js

@@ -198,4 +198,5 @@ if(result != check) { fail(test, check, result); } ++test;
 
 }
 test0();
-WScript.Echo("done");
+
+print("pass");

+ 0 - 38
test/TaggedIntegers/rlexe.xml

@@ -8,20 +8,17 @@
   <test>
     <default>
       <files>comparison.js</files>
-      <baseline>comparison.baseline</baseline>
     </default>
   </test>
   <test>
     <default>
       <files>addition.js</files>
-      <baseline>addition.baseline</baseline>
       <tags>Slow</tags>
     </default>
   </test>
   <test>
     <default>
       <files>subtraction.js</files>
-      <baseline>subtraction.baseline</baseline>
       <tags>Slow</tags>
     </default>
   </test>
@@ -33,71 +30,60 @@
   <test>
     <default>
       <files>multiplication.js</files>
-      <baseline>multiplication.baseline</baseline>
       <tags>Slow</tags>
     </default>
   </test>
   <test>
     <default>
       <files>divide.js</files>
-      <baseline>divide.baseline</baseline>
     </default>
   </test>
   <test>
     <default>
       <files>and.js</files>
-      <baseline>and.baseline</baseline>
       <tags>Slow</tags>
     </default>
   </test>
   <test>
     <default>
       <files>or.js</files>
-      <baseline>or.baseline</baseline>
       <tags>Slow</tags>
     </default>
   </test>
   <test>
     <default>
       <files>xor.js</files>
-      <baseline>xor.baseline</baseline>
       <tags>Slow</tags>
     </default>
   </test>
   <test>
     <default>
       <files>not.js</files>
-      <baseline>not.baseline</baseline>
     </default>
   </test>
   <test>
     <default>
       <files>negate.js</files>
-      <baseline>negate.baseline</baseline>
     </default>
   </test>
   <test>
     <default>
       <files>signedshiftleft.js</files>
-      <baseline>signedshiftleft.baseline</baseline>
     </default>
   </test>
   <test>
     <default>
       <files>signedshiftright.js</files>
-      <baseline>signedshiftright.baseline</baseline>
     </default>
   </test>
   <test>
     <default>
       <files>unsignedshiftright.js</files>
-      <baseline>unsignedshiftright.baseline</baseline>
     </default>
   </test>
   <test>
     <default>
       <files>modulus.js</files>
-      <baseline>modulus.baseline</baseline>
       <tags>Slow</tags>
     </default>
   </test>
@@ -110,13 +96,11 @@
   <test>
     <default>
       <files>not_1.js</files>
-      <baseline>not_1.baseline</baseline>
     </default>
   </test>
   <test>
     <default>
       <files>shift_constants.js</files>
-      <baseline>shift_constants.baseline</baseline>
     </default>
   </test>
   <test>
@@ -129,19 +113,16 @@
   <test>
     <default>
       <files>predecrement.js</files>
-      <baseline>predecrement.baseline</baseline>
     </default>
   </test>
   <test>
     <default>
       <files>preincrement.js</files>
-      <baseline>preincrement.baseline</baseline>
     </default>
   </test>
   <test>
     <default>
       <files>comparison.js</files>
-      <baseline>comparison.baseline</baseline>
       <tags>exclude_test</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -149,7 +130,6 @@
   <test>
     <default>
       <files>addition.js</files>
-      <baseline>addition.baseline</baseline>
       <tags>exclude_test,Slow</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -157,7 +137,6 @@
   <test>
     <default>
       <files>subtraction.js</files>
-      <baseline>subtraction.baseline</baseline>
       <tags>exclude_test,Slow</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -165,7 +144,6 @@
   <test>
     <default>
       <files>multiplication.js</files>
-      <baseline>multiplication.baseline</baseline>
       <tags>exclude_test,Slow</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -173,7 +151,6 @@
   <test>
     <default>
       <files>divide.js</files>
-      <baseline>divide.baseline</baseline>
       <tags>exclude_test</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -181,7 +158,6 @@
   <test>
     <default>
       <files>and.js</files>
-      <baseline>and.baseline</baseline>
       <tags>exclude_test,Slow</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -189,7 +165,6 @@
   <test>
     <default>
       <files>or.js</files>
-      <baseline>or.baseline</baseline>
       <tags>exclude_test,Slow</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -197,7 +172,6 @@
   <test>
     <default>
       <files>xor.js</files>
-      <baseline>xor.baseline</baseline>
       <tags>exclude_test,Slow</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -205,7 +179,6 @@
   <test>
     <default>
       <files>not.js</files>
-      <baseline>not.baseline</baseline>
       <tags>exclude_test</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -213,7 +186,6 @@
   <test>
     <default>
       <files>negate.js</files>
-      <baseline>negate.baseline</baseline>
       <tags>exclude_test</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -221,7 +193,6 @@
   <test>
     <default>
       <files>signedshiftleft.js</files>
-      <baseline>signedshiftleft.baseline</baseline>
       <tags>exclude_test,Slow</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -229,7 +200,6 @@
   <test>
     <default>
       <files>signedshiftright.js</files>
-      <baseline>signedshiftright.baseline</baseline>
       <tags>exclude_test,Slow</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -237,7 +207,6 @@
   <test>
     <default>
       <files>unsignedshiftright.js</files>
-      <baseline>unsignedshiftright.baseline</baseline>
       <tags>exclude_test,Slow</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -245,7 +214,6 @@
   <test>
     <default>
       <files>modulus.js</files>
-      <baseline>modulus.baseline</baseline>
       <tags>exclude_test,Slow</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -261,7 +229,6 @@
   <test>
     <default>
       <files>arrays.js</files>
-      <baseline>arrays.baseline</baseline>
       <tags>exclude_dynapogo,exclude_serialized,require_backend</tags>
       <compile-flags>-dynamicprofilecache:profile.dpl.arrays.js</compile-flags>
     </default>
@@ -269,7 +236,6 @@
   <test>
     <default>
       <files>arrays.js</files>
-      <baseline>arrays.baseline</baseline>
       <tags>exclude_interpreted,exclude_serialized,require_backend</tags>
       <compile-flags>-dynamicprofileinput:profile.dpl.arrays.js -off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -277,7 +243,6 @@
   <test>
     <default>
       <files>not_1.js</files>
-      <baseline>not_1.baseline</baseline>
       <tags>exclude_test</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -285,7 +250,6 @@
   <test>
     <default>
       <files>shift_constants.js</files>
-      <baseline>shift_constants.baseline</baseline>
       <tags>exclude_test</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -301,7 +265,6 @@
   <test>
     <default>
       <files>predecrement.js</files>
-      <baseline>predecrement.baseline</baseline>
       <tags>exclude_test</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
@@ -309,7 +272,6 @@
   <test>
     <default>
       <files>preincrement.js</files>
-      <baseline>preincrement.baseline</baseline>
       <tags>exclude_test</tags>
       <compile-flags>-off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>

+ 0 - 1
test/TaggedIntegers/shift_constants.baseline

@@ -1 +0,0 @@
-Done

+ 1 - 1
test/TaggedIntegers/shift_constants.js

@@ -45,4 +45,4 @@ verify(-1 <<31, -2147483648, id++, "\"Testing Signed Left Shift by 31 for negati
 verify((0x7fffffff>>32)|1, 2147483647, id++, "\" Testing whether the shift operation does not change the tagged integer to a normal integer for Or \"");
 verify((0x7fffffff>>32)^0x2, 2147483645, id++, "\"Testing whether the shift operation does not change the tagged integer to a normal integer for xor\"");
 
-WScript.Echo("Done");
+print("pass");

+ 0 - 1
test/TaggedIntegers/signedshiftleft.baseline

@@ -1 +0,0 @@
-done

+ 2 - 1
test/TaggedIntegers/signedshiftleft.js

@@ -11298,4 +11298,5 @@ test15();
 test16();
 test17();
 test18();
-WScript.Echo("done");
+
+print("pass");

+ 0 - 1
test/TaggedIntegers/signedshiftright.baseline

@@ -1 +0,0 @@
-done

+ 2 - 1
test/TaggedIntegers/signedshiftright.js

@@ -11298,4 +11298,5 @@ test15();
 test16();
 test17();
 test18();
-WScript.Echo("done");
+
+print("pass");

+ 0 - 1
test/TaggedIntegers/subtraction.baseline

@@ -1 +0,0 @@
-done

+ 2 - 1
test/TaggedIntegers/subtraction.js

@@ -24093,4 +24093,5 @@ test36();
 test37();
 test38();
 test39();
-WScript.Echo("done");
+
+print("pass");

+ 0 - 1
test/TaggedIntegers/unsignedshiftright.baseline

@@ -1 +0,0 @@
-done

+ 2 - 1
test/TaggedIntegers/unsignedshiftright.js

@@ -11298,4 +11298,5 @@ test15();
 test16();
 test17();
 test18();
-WScript.Echo("done");
+
+print("pass");

+ 0 - 1
test/TaggedIntegers/xor.baseline

@@ -1 +0,0 @@
-done

+ 2 - 1
test/TaggedIntegers/xor.js

@@ -23342,4 +23342,5 @@ test35();
 test36();
 test37();
 test38();
-WScript.Echo("done");
+
+print("pass");

+ 11 - 5
test/runtests.py

@@ -571,10 +571,16 @@ class TestVariant(object):
         if not return_code_only:
             # check output
             if 'baseline' not in test:
-                # output lines must be 'pass' or 'passed' or empty
-                lines = (line.lower() for line in js_output.split(b'\n'))
-                if any(line != b'' and line != b'pass' and line != b'passed'
-                        for line in lines):
+                # output lines must be 'pass' or 'passed' or empty with at least 1 not empty
+                passes = 0
+                for line in js_output.split(b'\n'):
+                    if line !=b'':
+                        low = line.lower()
+                        if low == b'pass' or low == b'passed':
+                            passes = 1
+                        else:
+                            return self._show_failed(**fail_args)
+                if passes == 0:
                     return self._show_failed(**fail_args)
             else:
                 baseline = test.get('baseline')
@@ -584,7 +590,7 @@ class TestVariant(object):
                     with open(baseline, 'rb') as bs_file:
                         baseline_output = bs_file.read()
 
-                    # Cleanup carriage return
+                    # Clean up carriage return
                     # todo: remove carriage return at the end of the line
                     #       or better fix ch to output same on all platforms
                     expected_output = normalize_new_line(baseline_output)