From e4c53bef5131f24d69fb11f98ffc9f5e73f8ce43 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Wed, 21 Jul 2021 15:10:32 -0400 Subject: [PATCH] chore: migrate $ERROR -> throw new Test262Error in test/built-ins/Math (#3088) --- test/built-ins/Math/abs/S15.8.2.1_A3.js | 2 +- test/built-ins/Math/ceil/S15.8.2.6_A4.js | 2 +- test/built-ins/Math/ceil/S15.8.2.6_A5.js | 2 +- test/built-ins/Math/ceil/S15.8.2.6_A7.js | 2 +- test/built-ins/Math/cos/S15.8.2.7_A2.js | 2 +- test/built-ins/Math/cos/S15.8.2.7_A3.js | 2 +- test/built-ins/Math/exp/S15.8.2.8_A2.js | 2 +- test/built-ins/Math/exp/S15.8.2.8_A3.js | 2 +- test/built-ins/Math/exp/S15.8.2.8_A4.js | 2 +- test/built-ins/Math/floor/S15.8.2.9_A4.js | 2 +- test/built-ins/Math/floor/S15.8.2.9_A5.js | 2 +- test/built-ins/Math/floor/S15.8.2.9_A7.js | 2 +- test/built-ins/Math/log/S15.8.2.10_A3.js | 4 ++-- test/built-ins/Math/log/S15.8.2.10_A5.js | 2 +- test/built-ins/Math/max/S15.8.2.11_A1.js | 2 +- test/built-ins/Math/max/S15.8.2.11_A4.js | 6 +++--- test/built-ins/Math/min/S15.8.2.12_A1.js | 2 +- test/built-ins/Math/min/S15.8.2.12_A4.js | 6 +++--- .../Math/pow/applying-the-exp-operator_A10.js | 2 +- .../Math/pow/applying-the-exp-operator_A11.js | 2 +- .../Math/pow/applying-the-exp-operator_A13.js | 2 +- .../Math/pow/applying-the-exp-operator_A14.js | 2 +- .../Math/pow/applying-the-exp-operator_A18.js | 2 +- .../Math/pow/applying-the-exp-operator_A2.js | 2 +- .../Math/pow/applying-the-exp-operator_A21.js | 2 +- .../Math/pow/applying-the-exp-operator_A22.js | 2 +- .../Math/pow/applying-the-exp-operator_A3.js | 2 +- .../Math/pow/applying-the-exp-operator_A5.js | 2 +- test/built-ins/Math/random/S15.8.2.14_A1.js | 2 +- test/built-ins/Math/round/S15.8.2.15_A4.js | 2 +- test/built-ins/Math/round/S15.8.2.15_A5.js | 2 +- test/built-ins/Math/round/S15.8.2.15_A6.js | 4 ++-- test/built-ins/Math/round/S15.8.2.15_A7.js | 20 +++++++++---------- test/built-ins/Math/sqrt/S15.8.2.17_A5.js | 2 +- 34 files changed, 49 insertions(+), 49 deletions(-) diff --git a/test/built-ins/Math/abs/S15.8.2.1_A3.js b/test/built-ins/Math/abs/S15.8.2.1_A3.js index da4ec1890c..e726ceb8d7 100644 --- a/test/built-ins/Math/abs/S15.8.2.1_A3.js +++ b/test/built-ins/Math/abs/S15.8.2.1_A3.js @@ -11,5 +11,5 @@ description: Checking if Math.abs(-Infinity) equals to +Infinity var x = -Infinity; if (Math.abs(x) !== +Infinity) { - $ERROR("#1: 'var x=-Infinity; Math.abs(x) !== +Infinity'"); + throw new Test262Error("#1: 'var x=-Infinity; Math.abs(x) !== +Infinity'"); } diff --git a/test/built-ins/Math/ceil/S15.8.2.6_A4.js b/test/built-ins/Math/ceil/S15.8.2.6_A4.js index 6339e327e8..697db99d0a 100644 --- a/test/built-ins/Math/ceil/S15.8.2.6_A4.js +++ b/test/built-ins/Math/ceil/S15.8.2.6_A4.js @@ -11,5 +11,5 @@ description: Checking if Math.ceil(x) is +Infinity, where x is +Infinity var x = +Infinity; if (Math.ceil(x) !== +Infinity) { - $ERROR("#1: 'var x = +Infinity; Math.ceil(x) !== +Infinity'"); + throw new Test262Error("#1: 'var x = +Infinity; Math.ceil(x) !== +Infinity'"); } diff --git a/test/built-ins/Math/ceil/S15.8.2.6_A5.js b/test/built-ins/Math/ceil/S15.8.2.6_A5.js index c37068f60f..3e99ec0601 100644 --- a/test/built-ins/Math/ceil/S15.8.2.6_A5.js +++ b/test/built-ins/Math/ceil/S15.8.2.6_A5.js @@ -11,5 +11,5 @@ description: Checking if Math.ceil(x) is -Infinity, where x is -Infinity var x = -Infinity; if (Math.ceil(x) !== -Infinity) { - $ERROR("#1: 'var x = -Infinity; Math.ceil(x) !== -Infinity'"); + throw new Test262Error("#1: 'var x = -Infinity; Math.ceil(x) !== -Infinity'"); } diff --git a/test/built-ins/Math/ceil/S15.8.2.6_A7.js b/test/built-ins/Math/ceil/S15.8.2.6_A7.js index b951f80d46..d8f7c7a348 100644 --- a/test/built-ins/Math/ceil/S15.8.2.6_A7.js +++ b/test/built-ins/Math/ceil/S15.8.2.6_A7.js @@ -15,6 +15,6 @@ for (var i = -1000; i < 1000; i++) var x = i / 10.0; if (Math.ceil(x) !== -Math.floor(-x)) { - $ERROR("#1: 'x = " + x + "; Math.ceil(x) !== -Math.floor(-x)'"); + throw new Test262Error("#1: 'x = " + x + "; Math.ceil(x) !== -Math.floor(-x)'"); } } diff --git a/test/built-ins/Math/cos/S15.8.2.7_A2.js b/test/built-ins/Math/cos/S15.8.2.7_A2.js index 8d3ca7f5a7..01c9382d8f 100644 --- a/test/built-ins/Math/cos/S15.8.2.7_A2.js +++ b/test/built-ins/Math/cos/S15.8.2.7_A2.js @@ -11,5 +11,5 @@ description: Checking if Math.cos(+0) is 1 var x = +0; if (Math.cos(x) !== 1) { - $ERROR("#1: 'var x = +0; Math.cos(x) !== 1'"); + throw new Test262Error("#1: 'var x = +0; Math.cos(x) !== 1'"); } diff --git a/test/built-ins/Math/cos/S15.8.2.7_A3.js b/test/built-ins/Math/cos/S15.8.2.7_A3.js index ef100a2835..fda964e414 100644 --- a/test/built-ins/Math/cos/S15.8.2.7_A3.js +++ b/test/built-ins/Math/cos/S15.8.2.7_A3.js @@ -11,5 +11,5 @@ description: Checking if Math.cos(-0) is 1 var x = -0; if (Math.cos(x) !== 1) { - $ERROR("#1: 'var x = -0; Math.cos(x) !== 1'"); + throw new Test262Error("#1: 'var x = -0; Math.cos(x) !== 1'"); } diff --git a/test/built-ins/Math/exp/S15.8.2.8_A2.js b/test/built-ins/Math/exp/S15.8.2.8_A2.js index 11ea36c450..e029015d49 100644 --- a/test/built-ins/Math/exp/S15.8.2.8_A2.js +++ b/test/built-ins/Math/exp/S15.8.2.8_A2.js @@ -11,5 +11,5 @@ description: Checking if Math.exp(+0) is 1 var x = +0; if (Math.exp(x) !== 1) { - $ERROR("#1: 'var x = +0; Math.exp(x) !== 1'"); + throw new Test262Error("#1: 'var x = +0; Math.exp(x) !== 1'"); } diff --git a/test/built-ins/Math/exp/S15.8.2.8_A3.js b/test/built-ins/Math/exp/S15.8.2.8_A3.js index 6f8e4ca46e..f321f12e32 100644 --- a/test/built-ins/Math/exp/S15.8.2.8_A3.js +++ b/test/built-ins/Math/exp/S15.8.2.8_A3.js @@ -11,5 +11,5 @@ description: Checking if Math.exp(-0) is 1 var x = -0; if (Math.exp(x) !== 1) { - $ERROR("#1: 'var x = -0; Math.exp(x) !== 1'"); + throw new Test262Error("#1: 'var x = -0; Math.exp(x) !== 1'"); } diff --git a/test/built-ins/Math/exp/S15.8.2.8_A4.js b/test/built-ins/Math/exp/S15.8.2.8_A4.js index a4bb1e2042..dc11e752bc 100644 --- a/test/built-ins/Math/exp/S15.8.2.8_A4.js +++ b/test/built-ins/Math/exp/S15.8.2.8_A4.js @@ -11,5 +11,5 @@ description: Checking if Math.exp(+Infinity) is +Ifinity var x = +Infinity; if (Math.exp(x) !== +Infinity) { - $ERROR("#1: 'var x = +Infinity; Math.exp(x) !== +Infinity'"); + throw new Test262Error("#1: 'var x = +Infinity; Math.exp(x) !== +Infinity'"); } diff --git a/test/built-ins/Math/floor/S15.8.2.9_A4.js b/test/built-ins/Math/floor/S15.8.2.9_A4.js index a74af8c6e9..7fb6639207 100644 --- a/test/built-ins/Math/floor/S15.8.2.9_A4.js +++ b/test/built-ins/Math/floor/S15.8.2.9_A4.js @@ -11,5 +11,5 @@ description: Checking if Math.floor(x) is +Infinity, where x is +Infinity var x = +Infinity; if (Math.floor(x) !== +Infinity) { - $ERROR("#1: 'var x = +Infinity; Math.floor(x) !== +Infinity'"); + throw new Test262Error("#1: 'var x = +Infinity; Math.floor(x) !== +Infinity'"); } diff --git a/test/built-ins/Math/floor/S15.8.2.9_A5.js b/test/built-ins/Math/floor/S15.8.2.9_A5.js index 290ce49310..1aaa8725f8 100644 --- a/test/built-ins/Math/floor/S15.8.2.9_A5.js +++ b/test/built-ins/Math/floor/S15.8.2.9_A5.js @@ -11,5 +11,5 @@ description: Checking if Math.floor(x) is -Infinity, where x is -Infinity var x = -Infinity; if (Math.floor(x) !== -Infinity) { - $ERROR("#1: 'var x = -Infinity; Math.floor(x) !== -Infinity'"); + throw new Test262Error("#1: 'var x = -Infinity; Math.floor(x) !== -Infinity'"); } diff --git a/test/built-ins/Math/floor/S15.8.2.9_A7.js b/test/built-ins/Math/floor/S15.8.2.9_A7.js index 2f19b43a79..e1d6a30a36 100644 --- a/test/built-ins/Math/floor/S15.8.2.9_A7.js +++ b/test/built-ins/Math/floor/S15.8.2.9_A7.js @@ -15,6 +15,6 @@ for (var i = -1000; i < 1000; i++) var x = i / 10.0; if (-Math.ceil(-x) !== Math.floor(x)) { - $ERROR("#1: 'x = " + x + "; Math.floor(x) !== -Math.ceil(-x)'"); + throw new Test262Error("#1: 'x = " + x + "; Math.floor(x) !== -Math.ceil(-x)'"); } } diff --git a/test/built-ins/Math/log/S15.8.2.10_A3.js b/test/built-ins/Math/log/S15.8.2.10_A3.js index b95438b2a7..acd08dd61a 100644 --- a/test/built-ins/Math/log/S15.8.2.10_A3.js +++ b/test/built-ins/Math/log/S15.8.2.10_A3.js @@ -11,12 +11,12 @@ description: Checking if Math.log(+0) and Math.log(-0) equals to -Infinity var x = +0; if (Math.log(x) !== -Infinity) { - $ERROR("#1: 'var x=+0; Math.log(x) !== -Infinity'"); + throw new Test262Error("#1: 'var x=+0; Math.log(x) !== -Infinity'"); } // CHECK#2 var x = -0; if (Math.log(x) !== -Infinity) { - $ERROR("#1: 'var x=-0; Math.log(x) !== -Infinity'"); + throw new Test262Error("#1: 'var x=-0; Math.log(x) !== -Infinity'"); } diff --git a/test/built-ins/Math/log/S15.8.2.10_A5.js b/test/built-ins/Math/log/S15.8.2.10_A5.js index 045b73c50e..db6debc73c 100644 --- a/test/built-ins/Math/log/S15.8.2.10_A5.js +++ b/test/built-ins/Math/log/S15.8.2.10_A5.js @@ -11,5 +11,5 @@ description: Checking if Math.log(+Infinity) equals to +Infinity var x = +Infinity; if (Math.log(x) !== +Infinity) { - $ERROR("#1: 'var x=+Infinity; Math.log(x) !== +Infinity'"); + throw new Test262Error("#1: 'var x=+Infinity; Math.log(x) !== +Infinity'"); } diff --git a/test/built-ins/Math/max/S15.8.2.11_A1.js b/test/built-ins/Math/max/S15.8.2.11_A1.js index 4fb9984f55..daa6ed6421 100644 --- a/test/built-ins/Math/max/S15.8.2.11_A1.js +++ b/test/built-ins/Math/max/S15.8.2.11_A1.js @@ -10,5 +10,5 @@ description: Checking if Math.max() equals to -Infinity // CHECK#1 if (Math.max() != -Infinity) { - $ERROR("#1: 'Math.max() != -Infinity'"); + throw new Test262Error("#1: 'Math.max() != -Infinity'"); } diff --git a/test/built-ins/Math/max/S15.8.2.11_A4.js b/test/built-ins/Math/max/S15.8.2.11_A4.js index 7055503d30..a777283f6f 100644 --- a/test/built-ins/Math/max/S15.8.2.11_A4.js +++ b/test/built-ins/Math/max/S15.8.2.11_A4.js @@ -9,15 +9,15 @@ description: Checking if Math.max.length property is defined and equals to 2 // CHECK#1 if (typeof Math.max !== "function") { - $ERROR('#1: Math.max method is not defined'); + throw new Test262Error('#1: Math.max method is not defined'); } // CHECK#2 if (typeof Math.max.length === "undefined") { - $ERROR('#2: length property of Math.max method is undefined'); + throw new Test262Error('#2: length property of Math.max method is undefined'); } // CHECK#3 if (Math.max.length !== 2) { - $ERROR('#3: The length property of the Math.max method is not 2'); + throw new Test262Error('#3: The length property of the Math.max method is not 2'); } diff --git a/test/built-ins/Math/min/S15.8.2.12_A1.js b/test/built-ins/Math/min/S15.8.2.12_A1.js index 0a396aeadb..2551934700 100644 --- a/test/built-ins/Math/min/S15.8.2.12_A1.js +++ b/test/built-ins/Math/min/S15.8.2.12_A1.js @@ -10,5 +10,5 @@ description: Checking if Math.min() equals to +Infinity // CHECK#1 if (Math.min() != +Infinity) { - $ERROR("#1: 'Math.min() != +Infinity'"); + throw new Test262Error("#1: 'Math.min() != +Infinity'"); } diff --git a/test/built-ins/Math/min/S15.8.2.12_A4.js b/test/built-ins/Math/min/S15.8.2.12_A4.js index e4f16bed2e..8d8ee272ee 100644 --- a/test/built-ins/Math/min/S15.8.2.12_A4.js +++ b/test/built-ins/Math/min/S15.8.2.12_A4.js @@ -9,15 +9,15 @@ description: Checking if Math.min.length property is defined and equals to 2 // CHECK#1 if (typeof Math.min !== "function") { - $ERROR('#1: Math.min method is not defined'); + throw new Test262Error('#1: Math.min method is not defined'); } // CHECK#2 if (typeof Math.min.length === "undefined") { - $ERROR('#2: length property of Math.min method is undefined'); + throw new Test262Error('#2: length property of Math.min method is undefined'); } // CHECK#3 if (Math.min.length !== 2) { - $ERROR('#3: The length property of the Math.min method is not 2'); + throw new Test262Error('#3: The length property of the Math.min method is not 2'); } diff --git a/test/built-ins/Math/pow/applying-the-exp-operator_A10.js b/test/built-ins/Math/pow/applying-the-exp-operator_A10.js index 5aff303831..a498da1302 100644 --- a/test/built-ins/Math/pow/applying-the-exp-operator_A10.js +++ b/test/built-ins/Math/pow/applying-the-exp-operator_A10.js @@ -19,6 +19,6 @@ var basenum = 6; for (var i = 0; i < basenum; i++) { if (Math.pow(base[i], exponent) !== +Infinity) { - $ERROR("#1: Math.pow(" + base[i] + ", " + exponent + ") !== +Infinity"); + throw new Test262Error("#1: Math.pow(" + base[i] + ", " + exponent + ") !== +Infinity"); } } diff --git a/test/built-ins/Math/pow/applying-the-exp-operator_A11.js b/test/built-ins/Math/pow/applying-the-exp-operator_A11.js index 04371a5457..50b983525a 100644 --- a/test/built-ins/Math/pow/applying-the-exp-operator_A11.js +++ b/test/built-ins/Math/pow/applying-the-exp-operator_A11.js @@ -17,6 +17,6 @@ var exponentnum = 4; for (var i = 0; i < exponentnum; i++) { if (Math.pow(base, exponent[i]) !== +Infinity) { - $ERROR("#1: Math.pow(" + base + ", " + exponent[i] + ") !== +Infinity"); + throw new Test262Error("#1: Math.pow(" + base + ", " + exponent[i] + ") !== +Infinity"); } } diff --git a/test/built-ins/Math/pow/applying-the-exp-operator_A13.js b/test/built-ins/Math/pow/applying-the-exp-operator_A13.js index e05737a7d1..813af9ec2f 100644 --- a/test/built-ins/Math/pow/applying-the-exp-operator_A13.js +++ b/test/built-ins/Math/pow/applying-the-exp-operator_A13.js @@ -16,6 +16,6 @@ var exponentnum = 3; for (var i = 0; i < exponentnum; i++) { if (Math.pow(base, exponent[i]) !== -Infinity) { - $ERROR("#1: Math.pow(" + base + ", " + exponent[i] + ") !== -Infinity"); + throw new Test262Error("#1: Math.pow(" + base + ", " + exponent[i] + ") !== -Infinity"); } } diff --git a/test/built-ins/Math/pow/applying-the-exp-operator_A14.js b/test/built-ins/Math/pow/applying-the-exp-operator_A14.js index fcfc594f8b..6ab0da77aa 100644 --- a/test/built-ins/Math/pow/applying-the-exp-operator_A14.js +++ b/test/built-ins/Math/pow/applying-the-exp-operator_A14.js @@ -18,6 +18,6 @@ var exponentnum = 5; for (var i = 0; i < exponentnum; i++) { if (Math.pow(base, exponent[i]) !== +Infinity) { - $ERROR("#1: Math.pow(" + base + ", " + exponent[i] + ") !== +Infinity"); + throw new Test262Error("#1: Math.pow(" + base + ", " + exponent[i] + ") !== +Infinity"); } } diff --git a/test/built-ins/Math/pow/applying-the-exp-operator_A18.js b/test/built-ins/Math/pow/applying-the-exp-operator_A18.js index 3fac38c844..fc38e1d869 100644 --- a/test/built-ins/Math/pow/applying-the-exp-operator_A18.js +++ b/test/built-ins/Math/pow/applying-the-exp-operator_A18.js @@ -17,6 +17,6 @@ var exponentnum = 4; for (var i = 0; i < exponentnum; i++) { if (Math.pow(base, exponent[i]) !== +Infinity) { - $ERROR("#1: Math.pow(" + base + ", " + exponent[i] + ") !== +Infinity"); + throw new Test262Error("#1: Math.pow(" + base + ", " + exponent[i] + ") !== +Infinity"); } } diff --git a/test/built-ins/Math/pow/applying-the-exp-operator_A2.js b/test/built-ins/Math/pow/applying-the-exp-operator_A2.js index 72e4489c55..99317688a8 100644 --- a/test/built-ins/Math/pow/applying-the-exp-operator_A2.js +++ b/test/built-ins/Math/pow/applying-the-exp-operator_A2.js @@ -22,6 +22,6 @@ var basenum = 9; for (var i = 0; i < basenum; i++) { if (Math.pow(base[i], exponent) !== 1) { - $ERROR("#1: Math.pow(" + base[i] + ", " + exponent + ") !== 1"); + throw new Test262Error("#1: Math.pow(" + base[i] + ", " + exponent + ") !== 1"); } } diff --git a/test/built-ins/Math/pow/applying-the-exp-operator_A21.js b/test/built-ins/Math/pow/applying-the-exp-operator_A21.js index 702143cd9f..2333df9393 100644 --- a/test/built-ins/Math/pow/applying-the-exp-operator_A21.js +++ b/test/built-ins/Math/pow/applying-the-exp-operator_A21.js @@ -16,6 +16,6 @@ var exponentnum = 3; for (var i = 0; i < exponentnum; i++) { if (Math.pow(base, exponent[i]) !== -Infinity) { - $ERROR("#1: Math.pow(" + base + ", " + exponent[i] + ") !== -Infinity"); + throw new Test262Error("#1: Math.pow(" + base + ", " + exponent[i] + ") !== -Infinity"); } } diff --git a/test/built-ins/Math/pow/applying-the-exp-operator_A22.js b/test/built-ins/Math/pow/applying-the-exp-operator_A22.js index 0fb7ac98b7..54b6f9228b 100644 --- a/test/built-ins/Math/pow/applying-the-exp-operator_A22.js +++ b/test/built-ins/Math/pow/applying-the-exp-operator_A22.js @@ -18,6 +18,6 @@ var exponentnum = 5; for (var i = 0; i < exponentnum; i++) { if (Math.pow(base, exponent[i]) !== +Infinity) { - $ERROR("#1: Math.pow(" + base + ", " + exponent[i] + ") !== +Infinity"); + throw new Test262Error("#1: Math.pow(" + base + ", " + exponent[i] + ") !== +Infinity"); } } diff --git a/test/built-ins/Math/pow/applying-the-exp-operator_A3.js b/test/built-ins/Math/pow/applying-the-exp-operator_A3.js index 65c6d86bb7..64a2810d56 100644 --- a/test/built-ins/Math/pow/applying-the-exp-operator_A3.js +++ b/test/built-ins/Math/pow/applying-the-exp-operator_A3.js @@ -22,6 +22,6 @@ var basenum = 9; for (var i = 0; i < basenum; i++) { if (Math.pow(base[i], exponent) !== 1) { - $ERROR("#1: Math.pow(" + base[i] + ", -0) !== 1"); + throw new Test262Error("#1: Math.pow(" + base[i] + ", -0) !== 1"); } } diff --git a/test/built-ins/Math/pow/applying-the-exp-operator_A5.js b/test/built-ins/Math/pow/applying-the-exp-operator_A5.js index 52c56b49c5..8e638bfdc3 100644 --- a/test/built-ins/Math/pow/applying-the-exp-operator_A5.js +++ b/test/built-ins/Math/pow/applying-the-exp-operator_A5.js @@ -19,6 +19,6 @@ var basenum = 6; for (var i = 0; i < basenum; i++) { if (Math.pow(base[i], exponent) !== +Infinity) { - $ERROR("#1: Math.pow(" + base[i] + ", " + exponent + ") !== +Infinity"); + throw new Test262Error("#1: Math.pow(" + base[i] + ", " + exponent + ") !== +Infinity"); } } diff --git a/test/built-ins/Math/random/S15.8.2.14_A1.js b/test/built-ins/Math/random/S15.8.2.14_A1.js index 4b5db856bc..b200e39efe 100644 --- a/test/built-ins/Math/random/S15.8.2.14_A1.js +++ b/test/built-ins/Math/random/S15.8.2.14_A1.js @@ -23,6 +23,6 @@ for (var i = 0; i < 100; i++) if (val < 0 || val >= 1) { - $ERROR("#1: Math.random() = " + val); + throw new Test262Error("#1: Math.random() = " + val); } } diff --git a/test/built-ins/Math/round/S15.8.2.15_A4.js b/test/built-ins/Math/round/S15.8.2.15_A4.js index b5743303f0..5cea0f4424 100644 --- a/test/built-ins/Math/round/S15.8.2.15_A4.js +++ b/test/built-ins/Math/round/S15.8.2.15_A4.js @@ -11,5 +11,5 @@ description: Checking if Math.round(x) is +Infinity, where x is +Infinity var x = +Infinity; if (Math.round(x) !== +Infinity) { - $ERROR("#1: 'var x=+Infinity; Math.round(x) !== +Infinity'"); + throw new Test262Error("#1: 'var x=+Infinity; Math.round(x) !== +Infinity'"); } diff --git a/test/built-ins/Math/round/S15.8.2.15_A5.js b/test/built-ins/Math/round/S15.8.2.15_A5.js index 0447ef01c4..7b5577db4f 100644 --- a/test/built-ins/Math/round/S15.8.2.15_A5.js +++ b/test/built-ins/Math/round/S15.8.2.15_A5.js @@ -11,5 +11,5 @@ description: Checking if Math.round(x) is -Infinity, where x is -Infinity var x = -Infinity; if (Math.round(x) !== -Infinity) { - $ERROR("#1: 'var x=-Infinity; Math.round(x) !== -Infinity'"); + throw new Test262Error("#1: 'var x=-Infinity; Math.round(x) !== -Infinity'"); } diff --git a/test/built-ins/Math/round/S15.8.2.15_A6.js b/test/built-ins/Math/round/S15.8.2.15_A6.js index a96cd1124b..bde1582d4e 100644 --- a/test/built-ins/Math/round/S15.8.2.15_A6.js +++ b/test/built-ins/Math/round/S15.8.2.15_A6.js @@ -18,7 +18,7 @@ for (var i = 0; i <= 1000; i++) var x = i / 10.0; if (Math.round(x) !== Math.floor(x + 0.5)) { - $ERROR("#1: 'x = " + x + "; Math.round(x) !== Math.floor(x + 0.5)'") + throw new Test262Error("#1: 'x = " + x + "; Math.round(x) !== Math.floor(x + 0.5)'") } } @@ -34,6 +34,6 @@ for (i = -5; i >= -1000; i--) if (Math.round(x) !== Math.floor(x + 0.5)) { - $ERROR("#2: 'x = " + x + "; Math.round(x) !== Math.floor(x + 0.5)'") + throw new Test262Error("#2: 'x = " + x + "; Math.round(x) !== Math.floor(x + 0.5)'") } } diff --git a/test/built-ins/Math/round/S15.8.2.15_A7.js b/test/built-ins/Math/round/S15.8.2.15_A7.js index ed92c8bf5f..6530f0c85f 100644 --- a/test/built-ins/Math/round/S15.8.2.15_A7.js +++ b/test/built-ins/Math/round/S15.8.2.15_A7.js @@ -16,17 +16,17 @@ description: > // CHECK#1 if (1 / Math.round(-0.5) !== 1 / -0) { - $ERROR("#1: '1 / Math.round(-0.5) !== 1 / -0'"); + throw new Test262Error("#1: '1 / Math.round(-0.5) !== 1 / -0'"); } // CHECK#2 if (1 / Math.round(-0.25) !== 1 / -0) { - $ERROR("#2: '1 / Math.round(-0.25) !== 1 / -0'"); + throw new Test262Error("#2: '1 / Math.round(-0.25) !== 1 / -0'"); } // CHECK#3 if (1 / Math.round(-0) !== 1 / -0) { - $ERROR("#3: '1 / Math.round(-0) !== 1 / -0'"); + throw new Test262Error("#3: '1 / Math.round(-0) !== 1 / -0'"); } var x = 0; @@ -34,41 +34,41 @@ var x = 0; // CHECK#4 x = 0.5 - Number.EPSILON / 4; if (1 / Math.round(x) !== 1 / 0) { - $ERROR("#4: '1 / Math.round(" + x + ") !== 1 / 0'"); + throw new Test262Error("#4: '1 / Math.round(" + x + ") !== 1 / 0'"); } // CHECK#5 x = -(2 / Number.EPSILON - 1); if (Math.round(x) !== x) { - $ERROR("#5: 'Math.round(" + x + ") !== " + x + "'"); + throw new Test262Error("#5: 'Math.round(" + x + ") !== " + x + "'"); } // CHECK#6 x = -(1.5 / Number.EPSILON - 1); if (Math.round(x) !== x) { - $ERROR("#6: 'Math.round(" + x + ") !== " + x + "'"); + throw new Test262Error("#6: 'Math.round(" + x + ") !== " + x + "'"); } // CHECK#7 x = -(1 / Number.EPSILON + 1); if (Math.round(x) !== x) { - $ERROR("#7: 'Math.round(" + x + ") !== " + x + "'"); + throw new Test262Error("#7: 'Math.round(" + x + ") !== " + x + "'"); } // CHECK#8 x = 1 / Number.EPSILON + 1; if (Math.round(x) !== x) { - $ERROR("#8: 'Math.round(" + x + ") !== " + x + "'"); + throw new Test262Error("#8: 'Math.round(" + x + ") !== " + x + "'"); } // CHECK#9 x = 1.5 / Number.EPSILON - 1; if (Math.round(x) !== x) { - $ERROR("#9: 'Math.round(" + x + ") !== " + x + "'"); + throw new Test262Error("#9: 'Math.round(" + x + ") !== " + x + "'"); } // CHECK#10 x = 2 / Number.EPSILON - 1; if (Math.round(x) !== x) { - $ERROR("#10: 'Math.round(" + x + ") !== " + x + "'"); + throw new Test262Error("#10: 'Math.round(" + x + ") !== " + x + "'"); } diff --git a/test/built-ins/Math/sqrt/S15.8.2.17_A5.js b/test/built-ins/Math/sqrt/S15.8.2.17_A5.js index 8cfd5fc324..6da33bd395 100644 --- a/test/built-ins/Math/sqrt/S15.8.2.17_A5.js +++ b/test/built-ins/Math/sqrt/S15.8.2.17_A5.js @@ -11,5 +11,5 @@ description: Checking if Math.sqrt(+Infinity) is +Infinity var x = +Infinity; if (Math.sqrt(x) !== +Infinity) { - $ERROR("#1: 'var x=+Infinity; Math.sqrt(x) !== +Infinity'"); + throw new Test262Error("#1: 'var x=+Infinity; Math.sqrt(x) !== +Infinity'"); }