diff --git a/test/built-ins/Boolean/S15.6.1.1_A1_T1.js b/test/built-ins/Boolean/S15.6.1.1_A1_T1.js index e0301006f4..9b03b00378 100644 --- a/test/built-ins/Boolean/S15.6.1.1_A1_T1.js +++ b/test/built-ins/Boolean/S15.6.1.1_A1_T1.js @@ -13,20 +13,20 @@ description: > //CHECK#1 if (typeof Boolean() !== "boolean") { - $ERROR('#1: typeof Boolean() should be "boolean", actual is "' + typeof Boolean() + '"'); + throw new Test262Error('#1: typeof Boolean() should be "boolean", actual is "' + typeof Boolean() + '"'); } //CHECK#2 if (typeof Boolean(1) !== "boolean") { - $ERROR('#2: typeof Boolean(1) should be "boolean", actual is "' + typeof Boolean(1) + '"'); + throw new Test262Error('#2: typeof Boolean(1) should be "boolean", actual is "' + typeof Boolean(1) + '"'); } //CHECK#3 if (typeof Boolean(new String("1")) !== "boolean") { - $ERROR('#3: typeof Boolean(new String("1")) should be "boolean", actual is "' + typeof Boolean(new String("1")) + '"'); + throw new Test262Error('#3: typeof Boolean(new String("1")) should be "boolean", actual is "' + typeof Boolean(new String("1")) + '"'); } //CHECK#4 if (typeof Boolean(new Object(1)) !== "boolean") { - $ERROR('#4: typeof Boolean(new Object(1)) should be "boolean", actual is "' + typeof Boolean(new Object(1)) + '"'); + throw new Test262Error('#4: typeof Boolean(new Object(1)) should be "boolean", actual is "' + typeof Boolean(new Object(1)) + '"'); } diff --git a/test/built-ins/Boolean/S15.6.1.1_A1_T2.js b/test/built-ins/Boolean/S15.6.1.1_A1_T2.js index 1f00ef633c..aecde0e22f 100644 --- a/test/built-ins/Boolean/S15.6.1.1_A1_T2.js +++ b/test/built-ins/Boolean/S15.6.1.1_A1_T2.js @@ -11,32 +11,32 @@ description: Used various number values as argument //CHECK#1 if (typeof Boolean(0) !== "boolean") { - $ERROR('#1.1: typeof Boolean(0) should be "boolean", actual is "' + typeof Boolean(0) + '"'); + throw new Test262Error('#1.1: typeof Boolean(0) should be "boolean", actual is "' + typeof Boolean(0) + '"'); } if (Boolean(0) !== false) { - $ERROR('#1.2: Boolean(0) should be false, actual is ' + Boolean(0)); + throw new Test262Error('#1.2: Boolean(0) should be false, actual is ' + Boolean(0)); } //CHECK#2 if (typeof Boolean(-1) !== "boolean") { - $ERROR('#2.1: typeof Boolean(-1) should be "boolean", actual is "' + typeof Boolean(-1) + '"'); + throw new Test262Error('#2.1: typeof Boolean(-1) should be "boolean", actual is "' + typeof Boolean(-1) + '"'); } if (Boolean(-1) !== true) { - $ERROR('#2.2: Boolean(-1) should be true, actual is ' + Boolean(-1)); + throw new Test262Error('#2.2: Boolean(-1) should be true, actual is ' + Boolean(-1)); } //CHECK#3 if (typeof Boolean(-Infinity) !== "boolean") { - $ERROR('#3.1: typeof Boolean(-Infinity) should be "boolean", actual is "' + typeof Boolean(-Infinity) + '"'); + throw new Test262Error('#3.1: typeof Boolean(-Infinity) should be "boolean", actual is "' + typeof Boolean(-Infinity) + '"'); } if (Boolean(-Infinity) !== true) { - $ERROR('#3.2: Boolean(-Infinity) should be true, actual is ' + Boolean(-Infinity)); + throw new Test262Error('#3.2: Boolean(-Infinity) should be true, actual is ' + Boolean(-Infinity)); } //CHECK#4 if (typeof Boolean(NaN) !== "boolean") { - $ERROR('#4.1: typeof Boolean(NaN) should be "boolean", actual is "' + typeof Boolean(NaN) + '"'); + throw new Test262Error('#4.1: typeof Boolean(NaN) should be "boolean", actual is "' + typeof Boolean(NaN) + '"'); } if (Boolean(NaN) !== false) { - $ERROR('#4.2: Boolean(NaN) should be false, actual is ' + Boolean(NaN)); + throw new Test262Error('#4.2: Boolean(NaN) should be false, actual is ' + Boolean(NaN)); } diff --git a/test/built-ins/Boolean/S15.6.1.1_A1_T3.js b/test/built-ins/Boolean/S15.6.1.1_A1_T3.js index 41c3cc5a93..54801ae1cc 100644 --- a/test/built-ins/Boolean/S15.6.1.1_A1_T3.js +++ b/test/built-ins/Boolean/S15.6.1.1_A1_T3.js @@ -11,40 +11,40 @@ description: Used various string values as argument //CHECK#1 if (typeof Boolean("0") !== "boolean") { - $ERROR('#1.1: typeof Boolean("0") should be "boolean", actual is "' + typeof Boolean("0") + '"'); + throw new Test262Error('#1.1: typeof Boolean("0") should be "boolean", actual is "' + typeof Boolean("0") + '"'); } if (Boolean("0") !== true) { - $ERROR('#1.2: Boolean("0") should be true'); + throw new Test262Error('#1.2: Boolean("0") should be true'); } //CHECK#2 if (typeof Boolean("-1") !== "boolean") { - $ERROR('#2.1: typeof Boolean("-1") should be "boolean", actual is "' + typeof Boolean("-1") + '"'); + throw new Test262Error('#2.1: typeof Boolean("-1") should be "boolean", actual is "' + typeof Boolean("-1") + '"'); } if (Boolean("-1") !== true) { - $ERROR('#2.2: Boolean("-1") should be true'); + throw new Test262Error('#2.2: Boolean("-1") should be true'); } //CHECK#3 if (typeof Boolean("1") !== "boolean") { - $ERROR('#3.1: typeof Boolean("1") should be "boolean", actual is "' + typeof Boolean("1") + '"'); + throw new Test262Error('#3.1: typeof Boolean("1") should be "boolean", actual is "' + typeof Boolean("1") + '"'); } if (Boolean("1") !== true) { - $ERROR('#3.2: Boolean("1") should be true'); + throw new Test262Error('#3.2: Boolean("1") should be true'); } //CHECK#4 if (typeof Boolean("false") !== "boolean") { - $ERROR('#4.1: typeof Boolean("false") should be "boolean", actual is "' + typeof Boolean("false") + '"'); + throw new Test262Error('#4.1: typeof Boolean("false") should be "boolean", actual is "' + typeof Boolean("false") + '"'); } if (Boolean("false") !== true) { - $ERROR('#4.2: Boolean("false") should be true'); + throw new Test262Error('#4.2: Boolean("false") should be true'); } //CHECK#5 if (typeof Boolean("true") !== "boolean") { - $ERROR('#5.1: typeof Boolean("true") should be "boolean", actual is "' + typeof Boolean("true") + '"'); + throw new Test262Error('#5.1: typeof Boolean("true") should be "boolean", actual is "' + typeof Boolean("true") + '"'); } if (Boolean("true") !== true) { - $ERROR('#5.2: Boolean("true") should be true'); + throw new Test262Error('#5.2: Boolean("true") should be true'); } diff --git a/test/built-ins/Boolean/S15.6.1.1_A1_T4.js b/test/built-ins/Boolean/S15.6.1.1_A1_T4.js index 915b2c7ac7..083f7edc2e 100644 --- a/test/built-ins/Boolean/S15.6.1.1_A1_T4.js +++ b/test/built-ins/Boolean/S15.6.1.1_A1_T4.js @@ -11,41 +11,41 @@ description: Used various undefined values and null as argument //CHECK#1 if (typeof Boolean(undefined) !== "boolean") { - $ERROR('#1.1: typeof Boolean(undefined) should be "boolean", actual is "' + typeof Boolean(undefined) + '"'); + throw new Test262Error('#1.1: typeof Boolean(undefined) should be "boolean", actual is "' + typeof Boolean(undefined) + '"'); } if (Boolean(undefined) !== false) { - $ERROR('#1.2: Boolean(undefined) should be false'); + throw new Test262Error('#1.2: Boolean(undefined) should be false'); } //CHECK#2 if (typeof Boolean(void 0) !== "boolean") { - $ERROR('#2.1: typeof Boolean(void 0) should be "boolean", actual is "' + typeof Boolean(void 0) + '"'); + throw new Test262Error('#2.1: typeof Boolean(void 0) should be "boolean", actual is "' + typeof Boolean(void 0) + '"'); } if (Boolean(void 0) !== false) { - $ERROR('#2.2: Boolean(void 0) should be false'); + throw new Test262Error('#2.2: Boolean(void 0) should be false'); } //CHECK#3 if (typeof Boolean(function() {}()) !== "boolean") { - $ERROR('#3.1: typeof Boolean(function(){}()) should be "boolean", actual is "' + typeof Boolean(function() {}()) + '"'); + throw new Test262Error('#3.1: typeof Boolean(function(){}()) should be "boolean", actual is "' + typeof Boolean(function() {}()) + '"'); } if (Boolean(function() {}()) !== false) { - $ERROR('#3.2: Boolean(function(){}()) should be false'); + throw new Test262Error('#3.2: Boolean(function(){}()) should be false'); } //CHECK#4 if (typeof Boolean(null) !== "boolean") { - $ERROR('#4.1: typeof Boolean(null) should be "boolean", actual is "' + typeof Boolean(null) + '"'); + throw new Test262Error('#4.1: typeof Boolean(null) should be "boolean", actual is "' + typeof Boolean(null) + '"'); } if (Boolean(null) !== false) { - $ERROR('#4.2: Boolean(null) should be false'); + throw new Test262Error('#4.2: Boolean(null) should be false'); } //CHECK#5 if (typeof Boolean(x) !== "boolean") { - $ERROR('#5.1: var x; typeof Boolean(x) should be "boolean", actual is "' + typeof Boolean(x) + '"'); + throw new Test262Error('#5.1: var x; typeof Boolean(x) should be "boolean", actual is "' + typeof Boolean(x) + '"'); } if (Boolean(x) !== false) { - $ERROR('#5.2: var x; Boolean(x) should be false'); + throw new Test262Error('#5.2: var x; Boolean(x) should be false'); } var x; diff --git a/test/built-ins/Boolean/S15.6.1.1_A1_T5.js b/test/built-ins/Boolean/S15.6.1.1_A1_T5.js index 6bd24ee450..5eb9177f3b 100644 --- a/test/built-ins/Boolean/S15.6.1.1_A1_T5.js +++ b/test/built-ins/Boolean/S15.6.1.1_A1_T5.js @@ -13,40 +13,40 @@ var x; //CHECK#1 if (typeof Boolean(x = 0) !== "boolean") { - $ERROR('#1.1: typeof Boolean(x=0) should be "boolean", actual is "' + typeof Boolean(x = 0) + '"'); + throw new Test262Error('#1.1: typeof Boolean(x=0) should be "boolean", actual is "' + typeof Boolean(x = 0) + '"'); } if (Boolean(x = 0) !== false) { - $ERROR('#1.2: Boolean(x=0) should be false'); + throw new Test262Error('#1.2: Boolean(x=0) should be false'); } //CHECK#2 if (typeof Boolean(x = 1) !== "boolean") { - $ERROR('#2.1: typeof Boolean(x=1) should be "boolean", actual is "' + typeof Boolean(x = 1) + '"'); + throw new Test262Error('#2.1: typeof Boolean(x=1) should be "boolean", actual is "' + typeof Boolean(x = 1) + '"'); } if (Boolean(x = 1) !== true) { - $ERROR('#2.2: Boolean(x=1) should be true'); + throw new Test262Error('#2.2: Boolean(x=1) should be true'); } //CHECK#3 if (typeof Boolean(x = false) !== "boolean") { - $ERROR('#3.1: typeof Boolean(x=false) should be "boolean", actual is "' + typeof Boolean(x = false) + '"'); + throw new Test262Error('#3.1: typeof Boolean(x=false) should be "boolean", actual is "' + typeof Boolean(x = false) + '"'); } if (Boolean(x = false) !== false) { - $ERROR('#3.2: Boolean(x=false) should be false'); + throw new Test262Error('#3.2: Boolean(x=false) should be false'); } //CHECK#4 if (typeof Boolean(x = true) !== "boolean") { - $ERROR('#4.1: typeof Boolean(x=true) should be "boolean", actual is "' + typeof Boolean(x = true) + '"'); + throw new Test262Error('#4.1: typeof Boolean(x=true) should be "boolean", actual is "' + typeof Boolean(x = true) + '"'); } if (Boolean(x = true) !== true) { - $ERROR('#4.2: Boolean(x=true) should be true'); + throw new Test262Error('#4.2: Boolean(x=true) should be true'); } //CHECK#5 if (typeof Boolean(x = null) !== "boolean") { - $ERROR('#5.1: typeof Boolean(x=null) should be "boolean", actual is "' + typeof Boolean(x = null) + '"'); + throw new Test262Error('#5.1: typeof Boolean(x=null) should be "boolean", actual is "' + typeof Boolean(x = null) + '"'); } if (Boolean(x = null) !== false) { - $ERROR('#5.2: Boolean(x=null) should be false'); + throw new Test262Error('#5.2: Boolean(x=null) should be false'); } diff --git a/test/built-ins/Boolean/S15.6.1.1_A2.js b/test/built-ins/Boolean/S15.6.1.1_A2.js index 86305a6560..53fbc9f691 100644 --- a/test/built-ins/Boolean/S15.6.1.1_A2.js +++ b/test/built-ins/Boolean/S15.6.1.1_A2.js @@ -9,10 +9,10 @@ description: Call Boolean() and check result //CHECK#1 if (typeof Boolean() !== "boolean") { - $ERROR('#1: typeof Boolean() should be "boolean", actual is "' + typeof Boolean() + '"'); + throw new Test262Error('#1: typeof Boolean() should be "boolean", actual is "' + typeof Boolean() + '"'); } //CHECK#2 if (Boolean() !== false) { - $ERROR('#2: Boolean() should be false'); + throw new Test262Error('#2: Boolean() should be false'); } diff --git a/test/built-ins/Boolean/S15.6.2.1_A1.js b/test/built-ins/Boolean/S15.6.2.1_A1.js index a1192b0ce1..f0ccd8a217 100644 --- a/test/built-ins/Boolean/S15.6.2.1_A1.js +++ b/test/built-ins/Boolean/S15.6.2.1_A1.js @@ -11,44 +11,44 @@ description: Checking type of the newly created object and it value //CHECK#1 if (typeof new Boolean() !== "object") { - $ERROR("#1: typeof new Boolean() === 'object'"); + throw new Test262Error("#1: typeof new Boolean() === 'object'"); } //CHECK#2 if (new Boolean() === undefined) { - $ERROR("#2: new Boolean() should not be undefined"); + throw new Test262Error("#2: new Boolean() should not be undefined"); } //CHECK#3 var x3 = new Boolean(); if (typeof x3 !== "object") { - $ERROR("#3: typeof new Boolean() !== 'object'"); + throw new Test262Error("#3: typeof new Boolean() !== 'object'"); } //CHECK#4 var x4 = new Boolean(); if (x4 === undefined) { - $ERROR("#4: new Boolean() should not be undefined"); + throw new Test262Error("#4: new Boolean() should not be undefined"); } //CHECK#5 if (typeof new Boolean(1) !== "object") { - $ERROR("#5: typeof new Boolean(10) === 'object'"); + throw new Test262Error("#5: typeof new Boolean(10) === 'object'"); } //CHECK#6 if (new Boolean(1) === undefined) { - $ERROR("#6: new Boolean(1) should not be undefined"); + throw new Test262Error("#6: new Boolean(1) should not be undefined"); } //CHECK#7 var x7 = new Boolean(1); if (typeof x7 !== "object") { - $ERROR("#7: typeof new Boolean(1) !== 'object'"); + throw new Test262Error("#7: typeof new Boolean(1) !== 'object'"); } //CHECK#8 var x8 = new Boolean(1); if (x8 === undefined) { - $ERROR("#8: new Boolean(1) should not be undefined"); + throw new Test262Error("#8: new Boolean(1) should not be undefined"); } diff --git a/test/built-ins/Boolean/S15.6.2.1_A2.js b/test/built-ins/Boolean/S15.6.2.1_A2.js index 06cc0f187e..c45df404b2 100644 --- a/test/built-ins/Boolean/S15.6.2.1_A2.js +++ b/test/built-ins/Boolean/S15.6.2.1_A2.js @@ -13,17 +13,17 @@ description: Checking prototype property of the newly created object // CHECK#1 var x1 = new Boolean(1); if (typeof x1.constructor.prototype !== "object") { - $ERROR('#1: typeof x1.constructor.prototype === "object"'); + throw new Test262Error('#1: typeof x1.constructor.prototype === "object"'); } //CHECK#2 var x2 = new Boolean(2); if (!Boolean.prototype.isPrototypeOf(x2)) { - $ERROR('#2: Boolean.prototype.isPrototypeOf(x2)'); + throw new Test262Error('#2: Boolean.prototype.isPrototypeOf(x2)'); } //CHECK#3 var x3 = new Boolean(3); if (Boolean.prototype !== x3.constructor.prototype) { - $ERROR('#3: Boolean.prototype === x3.constructor.prototype'); + throw new Test262Error('#3: Boolean.prototype === x3.constructor.prototype'); } diff --git a/test/built-ins/Boolean/S15.6.2.1_A3.js b/test/built-ins/Boolean/S15.6.2.1_A3.js index 40155c7835..d7cf2dcd51 100644 --- a/test/built-ins/Boolean/S15.6.2.1_A3.js +++ b/test/built-ins/Boolean/S15.6.2.1_A3.js @@ -12,23 +12,23 @@ description: Checking value of the newly created object // CHECK#1 var x1 = new Boolean(1); if (x1.valueOf() !== true) { - $ERROR('#1: var x1 = new Boolean(1); x1.valueOf() === true'); + throw new Test262Error('#1: var x1 = new Boolean(1); x1.valueOf() === true'); } //CHECK#2 var x2 = new Boolean(); if (x2.valueOf() !== false) { - $ERROR('#2: var x2 = new Boolean(); x2.valueOf() === false'); + throw new Test262Error('#2: var x2 = new Boolean(); x2.valueOf() === false'); } //CHECK#3 var x2 = new Boolean(0); if (x2.valueOf() !== false) { - $ERROR('#3: var x2 = new Boolean(0); x2.valueOf() === false'); + throw new Test262Error('#3: var x2 = new Boolean(0); x2.valueOf() === false'); } //CHECK#4 var x2 = new Boolean(new Object()); if (x2.valueOf() !== true) { - $ERROR('#4: var x2 = new Boolean(new Object()); x2.valueOf() === true'); + throw new Test262Error('#4: var x2 = new Boolean(new Object()); x2.valueOf() === true'); } diff --git a/test/built-ins/Boolean/S15.6.2.1_A4.js b/test/built-ins/Boolean/S15.6.2.1_A4.js index 90c3df4c5b..82aa244fae 100644 --- a/test/built-ins/Boolean/S15.6.2.1_A4.js +++ b/test/built-ins/Boolean/S15.6.2.1_A4.js @@ -15,5 +15,5 @@ var obj = new Boolean(); //CHECK#1 if (obj.toString() !== "[object Boolean]") { - $ERROR('#1: The [[Class]] property of the newly constructed object is set to "Boolean"'); + throw new Test262Error('#1: The [[Class]] property of the newly constructed object is set to "Boolean"'); } diff --git a/test/built-ins/Boolean/S15.6.3_A1.js b/test/built-ins/Boolean/S15.6.3_A1.js index a3064ef32d..a80531708b 100644 --- a/test/built-ins/Boolean/S15.6.3_A1.js +++ b/test/built-ins/Boolean/S15.6.3_A1.js @@ -8,5 +8,5 @@ description: Checking existence of the property "prototype" ---*/ if (!Boolean.hasOwnProperty("prototype")) { - $ERROR('#1: The Boolean constructor has the property "prototype"'); + throw new Test262Error('#1: The Boolean constructor has the property "prototype"'); } diff --git a/test/built-ins/Boolean/S15.6.3_A2.js b/test/built-ins/Boolean/S15.6.3_A2.js index 34ee302a89..0ebd6d55e6 100644 --- a/test/built-ins/Boolean/S15.6.3_A2.js +++ b/test/built-ins/Boolean/S15.6.3_A2.js @@ -11,5 +11,5 @@ description: Checking prototype of the Boolean constructor //CHECK#1 if (!(Function.prototype.isPrototypeOf(Boolean))) { - $ERROR('#1: the value of the internal [[Prototype]] property of the Boolean constructor is the Function prototype object.'); + throw new Test262Error('#1: the value of the internal [[Prototype]] property of the Boolean constructor is the Function prototype object.'); } diff --git a/test/built-ins/Boolean/S15.6.3_A3.js b/test/built-ins/Boolean/S15.6.3_A3.js index c046cac966..16cbe9b8ff 100644 --- a/test/built-ins/Boolean/S15.6.3_A3.js +++ b/test/built-ins/Boolean/S15.6.3_A3.js @@ -9,10 +9,10 @@ description: Checking Boolean.length property //CHECK#1 if (!Boolean.hasOwnProperty("length")) { - $ERROR('#1: Boolean constructor has length property'); + throw new Test262Error('#1: Boolean constructor has length property'); } //CHECK#2 if (Boolean.length !== 1) { - $ERROR('#2: Boolean constructor length property value is 1'); + throw new Test262Error('#2: Boolean constructor length property value is 1'); } diff --git a/test/built-ins/Boolean/S9.2_A1_T1.js b/test/built-ins/Boolean/S9.2_A1_T1.js index 7d20361806..fd7011c5ae 100644 --- a/test/built-ins/Boolean/S9.2_A1_T1.js +++ b/test/built-ins/Boolean/S9.2_A1_T1.js @@ -11,20 +11,20 @@ description: > // CHECK#1 if (Boolean(undefined) !== false) { - $ERROR('#1: Boolean(undefined) === false. Actual: ' + (Boolean(undefined))); + throw new Test262Error('#1: Boolean(undefined) === false. Actual: ' + (Boolean(undefined))); } // CHECK#2 if (Boolean(void 0) !== false) { - $ERROR('#2: Boolean(undefined) === false. Actual: ' + (Boolean(undefined))); + throw new Test262Error('#2: Boolean(undefined) === false. Actual: ' + (Boolean(undefined))); } // CHECK#3 if (Boolean(eval("var x")) !== false) { - $ERROR('#3: Boolean(eval("var x")) === false. Actual: ' + (Boolean(eval("var x")))); + throw new Test262Error('#3: Boolean(eval("var x")) === false. Actual: ' + (Boolean(eval("var x")))); } // CHECK#4 if (Boolean() !== false) { - $ERROR('#4: Boolean() === false. Actual: ' + (Boolean())); + throw new Test262Error('#4: Boolean() === false. Actual: ' + (Boolean())); } diff --git a/test/built-ins/Boolean/S9.2_A2_T1.js b/test/built-ins/Boolean/S9.2_A2_T1.js index c9a1271e5e..04862a012e 100644 --- a/test/built-ins/Boolean/S9.2_A2_T1.js +++ b/test/built-ins/Boolean/S9.2_A2_T1.js @@ -9,5 +9,5 @@ description: null convert to Boolean by explicit transformation // CHECK#1 if (Boolean(null) !== false) { - $ERROR('#1: Boolean(null) === false. Actual: ' + (Boolean(null))); + throw new Test262Error('#1: Boolean(null) === false. Actual: ' + (Boolean(null))); } diff --git a/test/built-ins/Boolean/S9.2_A3_T1.js b/test/built-ins/Boolean/S9.2_A3_T1.js index 1b6f32e82b..0f961dba9c 100644 --- a/test/built-ins/Boolean/S9.2_A3_T1.js +++ b/test/built-ins/Boolean/S9.2_A3_T1.js @@ -9,10 +9,10 @@ description: true and false convert to Boolean by explicit transformation // CHECK#1 if (Boolean(true) !== true) { - $ERROR('#1: Boolean(true) === true. Actual: ' + (Boolean(true))); + throw new Test262Error('#1: Boolean(true) === true. Actual: ' + (Boolean(true))); } // CHECK#2 if (Boolean(false) !== false) { - $ERROR('#2: Boolean(false) === false. Actual: ' + (Boolean(false))); + throw new Test262Error('#2: Boolean(false) === false. Actual: ' + (Boolean(false))); } diff --git a/test/built-ins/Boolean/S9.2_A4_T1.js b/test/built-ins/Boolean/S9.2_A4_T1.js index b44c85d151..617c739995 100644 --- a/test/built-ins/Boolean/S9.2_A4_T1.js +++ b/test/built-ins/Boolean/S9.2_A4_T1.js @@ -11,15 +11,15 @@ description: +0, -0 and NaN convert to Boolean by explicit transformation // CHECK#1 if (Boolean(+0) !== false) { - $ERROR('#1: Boolean(+0) === false. Actual: ' + (Boolean(+0))); + throw new Test262Error('#1: Boolean(+0) === false. Actual: ' + (Boolean(+0))); } // CHECK#2 if (Boolean(-0) !== false) { - $ERROR('#2: Boolean(-0) === false. Actual: ' + (Boolean(-0))); + throw new Test262Error('#2: Boolean(-0) === false. Actual: ' + (Boolean(-0))); } // CHECK#3 if (Boolean(Number.NaN) !== false) { - $ERROR('#3: Boolean(Number.NaN) === false. Actual: ' + (Boolean(Number.NaN))); + throw new Test262Error('#3: Boolean(Number.NaN) === false. Actual: ' + (Boolean(Number.NaN))); } diff --git a/test/built-ins/Boolean/S9.2_A4_T3.js b/test/built-ins/Boolean/S9.2_A4_T3.js index 9d1671b87d..894e289603 100644 --- a/test/built-ins/Boolean/S9.2_A4_T3.js +++ b/test/built-ins/Boolean/S9.2_A4_T3.js @@ -14,40 +14,40 @@ description: > // CHECK#1 if (Boolean(Number.POSITIVE_INFINITY) !== true) { - $ERROR('#1: Boolean(+Infinity) === true. Actual: ' + (Boolean(+Infinity))); + throw new Test262Error('#1: Boolean(+Infinity) === true. Actual: ' + (Boolean(+Infinity))); } // CHECK#2; if (Boolean(Number.NEGATIVE_INFINITY) !== true) { - $ERROR('#2: Boolean(-Infinity) === true. Actual: ' + (Boolean(-Infinity))); + throw new Test262Error('#2: Boolean(-Infinity) === true. Actual: ' + (Boolean(-Infinity))); } // CHECK#3 if (Boolean(Number.MAX_VALUE) !== true) { - $ERROR('#3: Boolean(Number.MAX_VALUE) === true. Actual: ' + (Boolean(Number.MAX_VALUE))); + throw new Test262Error('#3: Boolean(Number.MAX_VALUE) === true. Actual: ' + (Boolean(Number.MAX_VALUE))); } // CHECK#4 if (Boolean(Number.MIN_VALUE) !== true) { - $ERROR('#4: Boolean(Number.MIN_VALUE) === true. Actual: ' + (Boolean(Number.MIN_VALUE))); + throw new Test262Error('#4: Boolean(Number.MIN_VALUE) === true. Actual: ' + (Boolean(Number.MIN_VALUE))); } // CHECK#5 if (Boolean(13) !== true) { - $ERROR('#5: Boolean(13) === true. Actual: ' + (Boolean(13))); + throw new Test262Error('#5: Boolean(13) === true. Actual: ' + (Boolean(13))); } // CHECK#6 if (Boolean(-13) !== true) { - $ERROR('#6: Boolean(-13) === true. Actual: ' + (Boolean(-13))); + throw new Test262Error('#6: Boolean(-13) === true. Actual: ' + (Boolean(-13))); } // CHECK#7 if (Boolean(1.3) !== true) { - $ERROR('#7: Boolean(1.3) === true. Actual: ' + (Boolean(1.3))); + throw new Test262Error('#7: Boolean(1.3) === true. Actual: ' + (Boolean(1.3))); } // CHECK#8 if (Boolean(-1.3) !== true) { - $ERROR('#8: Boolean(-1.3) === true. Actual: ' + (Boolean(-1.3))); + throw new Test262Error('#8: Boolean(-1.3) === true. Actual: ' + (Boolean(-1.3))); } diff --git a/test/built-ins/Boolean/S9.2_A5_T1.js b/test/built-ins/Boolean/S9.2_A5_T1.js index df8c8a54b3..0b475d9c07 100644 --- a/test/built-ins/Boolean/S9.2_A5_T1.js +++ b/test/built-ins/Boolean/S9.2_A5_T1.js @@ -11,5 +11,5 @@ description: "\"\" is converted to Boolean by explicit transformation" // CHECK#1 if (Boolean("") !== false) { - $ERROR('#1: Boolean("") === false. Actual: ' + (Boolean(""))); + throw new Test262Error('#1: Boolean("") === false. Actual: ' + (Boolean(""))); } diff --git a/test/built-ins/Boolean/S9.2_A5_T3.js b/test/built-ins/Boolean/S9.2_A5_T3.js index 26989ff162..5e72451d04 100644 --- a/test/built-ins/Boolean/S9.2_A5_T3.js +++ b/test/built-ins/Boolean/S9.2_A5_T3.js @@ -11,10 +11,10 @@ description: Any nonempty string convert to Boolean by explicit transformation // CHECK#1 if (Boolean(" ") !== true) { - $ERROR('#1: Boolean(" ") === true. Actual: ' + (Boolean(" "))); + throw new Test262Error('#1: Boolean(" ") === true. Actual: ' + (Boolean(" "))); } // CHECK#2 if (Boolean("Nonempty String") !== true) { - $ERROR('#2: Boolean("Nonempty String") === true. Actual: ' + (Boolean("Nonempty String"))); + throw new Test262Error('#2: Boolean("Nonempty String") === true. Actual: ' + (Boolean("Nonempty String"))); } diff --git a/test/built-ins/Boolean/S9.2_A6_T1.js b/test/built-ins/Boolean/S9.2_A6_T1.js index 99c7c3893b..07313fae0d 100644 --- a/test/built-ins/Boolean/S9.2_A6_T1.js +++ b/test/built-ins/Boolean/S9.2_A6_T1.js @@ -9,95 +9,95 @@ description: Different objects convert to Boolean by explicit transformation // CHECK#1 if (Boolean(new Object()) !== true) { - $ERROR('#1: Boolean(new Object()) === true. Actual: ' + (Boolean(new Object()))); + throw new Test262Error('#1: Boolean(new Object()) === true. Actual: ' + (Boolean(new Object()))); } // CHECK#2 if (Boolean(new String("")) !== true) { - $ERROR('#2: Boolean(new String("")) === true. Actual: ' + (Boolean(new String("")))); + throw new Test262Error('#2: Boolean(new String("")) === true. Actual: ' + (Boolean(new String("")))); } // CHECK#3 if (Boolean(new String()) !== true) { - $ERROR('#3: Boolean(new String()) === true. Actual: ' + (Boolean(new String()))); + throw new Test262Error('#3: Boolean(new String()) === true. Actual: ' + (Boolean(new String()))); } // CHECK#4 if (Boolean(new Boolean(true)) !== true) { - $ERROR('#4: Boolean(new Boolean(true)) === true. Actual: ' + (Boolean(new Boolean(true)))); + throw new Test262Error('#4: Boolean(new Boolean(true)) === true. Actual: ' + (Boolean(new Boolean(true)))); } // CHECK#5 if (Boolean(new Boolean(false)) !== true) { - $ERROR('#5: Boolean(new Boolean(false)) === true. Actual: ' + (Boolean(new Boolean(false)))); + throw new Test262Error('#5: Boolean(new Boolean(false)) === true. Actual: ' + (Boolean(new Boolean(false)))); } // CHECK#6 if (Boolean(new Boolean()) !== true) { - $ERROR('#6: Boolean(new Boolean()) === true. Actual: ' + (Boolean(new Boolean()))); + throw new Test262Error('#6: Boolean(new Boolean()) === true. Actual: ' + (Boolean(new Boolean()))); } // CHECK#7 if (Boolean(new Array()) !== true) { - $ERROR('#7: Boolean(new Array()) === true. Actual: ' + (Boolean(new Array()))); + throw new Test262Error('#7: Boolean(new Array()) === true. Actual: ' + (Boolean(new Array()))); } // CHECK#8 if (Boolean(new Number()) !== true) { - $ERROR('#8: Boolean(new Number()) === true. Actual: ' + (Boolean(new Number()))); + throw new Test262Error('#8: Boolean(new Number()) === true. Actual: ' + (Boolean(new Number()))); } // CHECK#9 if (Boolean(new Number(-0)) !== true) { - $ERROR('#9: Boolean(new Number(-0)) === true. Actual: ' + (Boolean(new Number(-0)))); + throw new Test262Error('#9: Boolean(new Number(-0)) === true. Actual: ' + (Boolean(new Number(-0)))); } // CHECK#10 if (Boolean(new Number(0)) !== true) { - $ERROR('#10: Boolean(new Number(0)) === true. Actual: ' + (Boolean(new Number(0)))); + throw new Test262Error('#10: Boolean(new Number(0)) === true. Actual: ' + (Boolean(new Number(0)))); } // CHECK#11 if (Boolean(new Number()) !== true) { - $ERROR('#11: Boolean(new Number()) === true. Actual: ' + (Boolean(new Number()))); + throw new Test262Error('#11: Boolean(new Number()) === true. Actual: ' + (Boolean(new Number()))); } // CHECK#12 if (Boolean(new Number(Number.NaN)) !== true) { - $ERROR('#12: Boolean(new Number(Number.NaN)) === true. Actual: ' + (Boolean(new Number(Number.NaN)))); + throw new Test262Error('#12: Boolean(new Number(Number.NaN)) === true. Actual: ' + (Boolean(new Number(Number.NaN)))); } // CHECK#13 if (Boolean(new Number(-1)) !== true) { - $ERROR('#13: Boolean(new Number(-1)) === true. Actual: ' + (Boolean(new Number(-1)))); + throw new Test262Error('#13: Boolean(new Number(-1)) === true. Actual: ' + (Boolean(new Number(-1)))); } // CHECK#14 if (Boolean(new Number(1)) !== true) { - $ERROR('#14: Boolean(new Number(1)) === true. Actual: ' + (Boolean(new Number(1)))); + throw new Test262Error('#14: Boolean(new Number(1)) === true. Actual: ' + (Boolean(new Number(1)))); } // CHECK#15 if (Boolean(new Number(Number.POSITIVE_INFINITY)) !== true) { - $ERROR('#15: Boolean(new Number(Number.POSITIVE_INFINITY)) === true. Actual: ' + (Boolean(new Number(Number.POSITIVE_INFINITY)))); + throw new Test262Error('#15: Boolean(new Number(Number.POSITIVE_INFINITY)) === true. Actual: ' + (Boolean(new Number(Number.POSITIVE_INFINITY)))); } // CHECK#16 if (Boolean(new Number(Number.NEGATIVE_INFINITY)) !== true) { - $ERROR('#16: Boolean(new Number(Number.NEGATIVE_INFINITY)) === true. Actual: ' + (Boolean(new Number(Number.NEGATIVE_INFINITY)))); + throw new Test262Error('#16: Boolean(new Number(Number.NEGATIVE_INFINITY)) === true. Actual: ' + (Boolean(new Number(Number.NEGATIVE_INFINITY)))); } // CHECK#17 if (Boolean(new Function()) !== true) { - $ERROR('#17: Boolean(new Function()) === true. Actual: ' + (Boolean(new Function()))); + throw new Test262Error('#17: Boolean(new Function()) === true. Actual: ' + (Boolean(new Function()))); } // CHECK#18 if (Boolean(new Date()) !== true) { - $ERROR('#18: Boolean(new Date()) === true. Actual: ' + (Boolean(new Date()))); + throw new Test262Error('#18: Boolean(new Date()) === true. Actual: ' + (Boolean(new Date()))); } // CHECK#19 if (Boolean(new Date(0)) !== true) { - $ERROR('#19: Boolean(new Date(0)) === true. Actual: ' + (Boolean(new Date(0)))); + throw new Test262Error('#19: Boolean(new Date(0)) === true. Actual: ' + (Boolean(new Date(0)))); } diff --git a/test/built-ins/Boolean/prototype/S15.6.3.1_A1.js b/test/built-ins/Boolean/prototype/S15.6.3.1_A1.js index 5f55ea25b2..3c2643eaa5 100644 --- a/test/built-ins/Boolean/prototype/S15.6.3.1_A1.js +++ b/test/built-ins/Boolean/prototype/S15.6.3.1_A1.js @@ -11,16 +11,16 @@ description: Checking Boolean.prototype property //CHECK#1 if (typeof Boolean.prototype !== "object") { - $ERROR('#1: typeof Boolean.prototype === "object"'); + throw new Test262Error('#1: typeof Boolean.prototype === "object"'); } //CHECK#2 if (Boolean.prototype != false) { - $ERROR('#2: Boolean.prototype == false'); + throw new Test262Error('#2: Boolean.prototype == false'); } delete Boolean.prototype.toString; if (Boolean.prototype.toString() !== "[object Boolean]") { - $ERROR('#3: The [[Class]] property of the Boolean prototype object is set to "Boolean"'); + throw new Test262Error('#3: The [[Class]] property of the Boolean prototype object is set to "Boolean"'); } diff --git a/test/built-ins/Boolean/prototype/S15.6.3.1_A2.js b/test/built-ins/Boolean/prototype/S15.6.3.1_A2.js index bd20f86ce7..3763855612 100644 --- a/test/built-ins/Boolean/prototype/S15.6.3.1_A2.js +++ b/test/built-ins/Boolean/prototype/S15.6.3.1_A2.js @@ -12,5 +12,5 @@ includes: [propertyHelper.js] var x = Boolean.prototype; verifyNotWritable(Boolean, "prototype", null, 1); if (Boolean.prototype !== x) { - $ERROR('#1: Boolean.prototype has the attribute ReadOnly'); + throw new Test262Error('#1: Boolean.prototype has the attribute ReadOnly'); } diff --git a/test/built-ins/Boolean/prototype/S15.6.3.1_A3.js b/test/built-ins/Boolean/prototype/S15.6.3.1_A3.js index 68ee65376b..96c9b1ee15 100644 --- a/test/built-ins/Boolean/prototype/S15.6.3.1_A3.js +++ b/test/built-ins/Boolean/prototype/S15.6.3.1_A3.js @@ -13,7 +13,7 @@ verifyNotConfigurable(Boolean, "prototype"); try { if (delete Boolean.prototype !== false) { - $ERROR('#1: Boolean.prototype has the attribute DontDelete'); + throw new Test262Error('#1: Boolean.prototype has the attribute DontDelete'); } } catch (e) { if (e instanceof Test262Error) throw e; diff --git a/test/built-ins/Boolean/prototype/S15.6.3.1_A4.js b/test/built-ins/Boolean/prototype/S15.6.3.1_A4.js index bb36667baf..b55ee7d637 100644 --- a/test/built-ins/Boolean/prototype/S15.6.3.1_A4.js +++ b/test/built-ins/Boolean/prototype/S15.6.3.1_A4.js @@ -10,10 +10,10 @@ description: Checking if enumerating the Boolean.prototype property fails //CHECK#1 for (x in Boolean) { if (x === "prototype") { - $ERROR('#1: Boolean.prototype has the attribute DontEnum'); + throw new Test262Error('#1: Boolean.prototype has the attribute DontEnum'); } } if (Boolean.propertyIsEnumerable('prototype')) { - $ERROR('#2: Boolean.prototype has the attribute DontEnum'); + throw new Test262Error('#2: Boolean.prototype has the attribute DontEnum'); } diff --git a/test/built-ins/Boolean/prototype/S15.6.4_A1.js b/test/built-ins/Boolean/prototype/S15.6.4_A1.js index f69be7d987..addd15d0a0 100644 --- a/test/built-ins/Boolean/prototype/S15.6.4_A1.js +++ b/test/built-ins/Boolean/prototype/S15.6.4_A1.js @@ -11,16 +11,16 @@ description: Checking type and value of Boolean.prototype //CHECK#1 if (typeof Boolean.prototype !== "object") { - $ERROR('#1: typeof Boolean.prototype === "object"'); + throw new Test262Error('#1: typeof Boolean.prototype === "object"'); } //CHECK#2 if (Boolean.prototype != false) { - $ERROR('#2: Boolean.prototype == false'); + throw new Test262Error('#2: Boolean.prototype == false'); } delete Boolean.prototype.toString; if (Boolean.prototype.toString() !== "[object Boolean]") { - $ERROR('#3: The [[Class]] property of the Boolean prototype object is set to "Boolean"'); + throw new Test262Error('#3: The [[Class]] property of the Boolean prototype object is set to "Boolean"'); } diff --git a/test/built-ins/Boolean/prototype/S15.6.4_A2.js b/test/built-ins/Boolean/prototype/S15.6.4_A2.js index 1815554027..3e1ba3602c 100644 --- a/test/built-ins/Boolean/prototype/S15.6.4_A2.js +++ b/test/built-ins/Boolean/prototype/S15.6.4_A2.js @@ -11,5 +11,5 @@ description: Checking Object.prototype.isPrototypeOf(Boolean.prototype) //CHECK#1 if (!Object.prototype.isPrototypeOf(Boolean.prototype)) { - $ERROR('#1: Object prototype object is the prototype of Boolean prototype object'); + throw new Test262Error('#1: Object prototype object is the prototype of Boolean prototype object'); } diff --git a/test/built-ins/Boolean/prototype/constructor/S15.6.4.1_A1.js b/test/built-ins/Boolean/prototype/constructor/S15.6.4.1_A1.js index d0aa999b4d..2688193fba 100644 --- a/test/built-ins/Boolean/prototype/constructor/S15.6.4.1_A1.js +++ b/test/built-ins/Boolean/prototype/constructor/S15.6.4.1_A1.js @@ -11,5 +11,5 @@ description: Compare Boolean.prototype.constructor with Boolean //CHECK#1 if (Boolean.prototype.constructor !== Boolean) { - $ERROR('#1: Boolean.prototype.constructor === Boolean'); + throw new Test262Error('#1: Boolean.prototype.constructor === Boolean'); } diff --git a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T1.js b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T1.js index cf32db61ab..1be7ad201c 100644 --- a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T1.js +++ b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T1.js @@ -13,35 +13,35 @@ description: no arguments //CHECK#1 if (Boolean.prototype.toString() !== "false") { - $ERROR('#1: Boolean.prototype.toString() === "false"'); + throw new Test262Error('#1: Boolean.prototype.toString() === "false"'); } //CHECK#2 if ((new Boolean()).toString() !== "false") { - $ERROR('#2: (new Boolean()).toString() === "false"'); + throw new Test262Error('#2: (new Boolean()).toString() === "false"'); } //CHECK#3 if ((new Boolean(false)).toString() !== "false") { - $ERROR('#3: (new Boolean(false)).toString() === "false"'); + throw new Test262Error('#3: (new Boolean(false)).toString() === "false"'); } //CHECK#4 if ((new Boolean(true)).toString() !== "true") { - $ERROR('#4: (new Boolean(true)).toString() === "true"'); + throw new Test262Error('#4: (new Boolean(true)).toString() === "true"'); } //CHECK#5 if ((new Boolean(1)).toString() !== "true") { - $ERROR('#5: (new Boolean(1)).toString() === "true"'); + throw new Test262Error('#5: (new Boolean(1)).toString() === "true"'); } //CHECK#6 if ((new Boolean(0)).toString() !== "false") { - $ERROR('#6: (new Boolean(0)).toString() === "false"'); + throw new Test262Error('#6: (new Boolean(0)).toString() === "false"'); } //CHECK#7 if ((new Boolean(new Object())).toString() !== "true") { - $ERROR('#7: (new Boolean(new Object())).toString() === "true"'); + throw new Test262Error('#7: (new Boolean(new Object())).toString() === "true"'); } diff --git a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T2.js b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T2.js index 399a3676c8..63a3ccc43c 100644 --- a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T2.js +++ b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T2.js @@ -13,35 +13,35 @@ description: with some argument //CHECK#1 if (Boolean.prototype.toString(true) !== "false") { - $ERROR('#1: Boolean.prototype.toString(true) === "false"'); + throw new Test262Error('#1: Boolean.prototype.toString(true) === "false"'); } //CHECK#2 if ((new Boolean()).toString(true) !== "false") { - $ERROR('#2: (new Boolean()).toString(true) === "false"'); + throw new Test262Error('#2: (new Boolean()).toString(true) === "false"'); } //CHECK#3 if ((new Boolean(false)).toString(true) !== "false") { - $ERROR('#3: (new Boolean(false)).toString(true) === "false"'); + throw new Test262Error('#3: (new Boolean(false)).toString(true) === "false"'); } //CHECK#4 if ((new Boolean(true)).toString(false) !== "true") { - $ERROR('#4: (new Boolean(true)).toString(false) === "true"'); + throw new Test262Error('#4: (new Boolean(true)).toString(false) === "true"'); } //CHECK#5 if ((new Boolean(1)).toString(false) !== "true") { - $ERROR('#5: (new Boolean(1)).toString(false) === "true"'); + throw new Test262Error('#5: (new Boolean(1)).toString(false) === "true"'); } //CHECK#6 if ((new Boolean(0)).toString(true) !== "false") { - $ERROR('#6: (new Boolean(0)).toString(true) === "false"'); + throw new Test262Error('#6: (new Boolean(0)).toString(true) === "false"'); } //CHECK#7 if ((new Boolean(new Object())).toString(false) !== "true") { - $ERROR('#7: (new Boolean(new Object())).toString(false) === "true"'); + throw new Test262Error('#7: (new Boolean(new Object())).toString(false) === "true"'); } diff --git a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T1.js b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T1.js index df5ad2fe80..a7e1e4ce8d 100644 --- a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T1.js +++ b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T1.js @@ -16,11 +16,11 @@ try { var s1 = new String(); s1.toString = Boolean.prototype.toString; var v1 = s1.toString(); - $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError'); + throw new Test262Error('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); } } @@ -29,10 +29,10 @@ try { var s2 = new String(); s2.myToString = Boolean.prototype.toString; var v2 = s2.myToString(); - $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError'); + throw new Test262Error('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); } } diff --git a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T2.js b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T2.js index 8ada5d7462..583d633ecb 100644 --- a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T2.js +++ b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T2.js @@ -16,11 +16,11 @@ try { var s1 = new Number(); s1.toString = Boolean.prototype.toString; var v1 = s1.toString(); - $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError'); + throw new Test262Error('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); } } @@ -29,10 +29,10 @@ try { var s2 = new Number(); s2.myToString = Boolean.prototype.toString; var v2 = s2.myToString(); - $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError'); + throw new Test262Error('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); } } diff --git a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T3.js b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T3.js index f3df79be20..2bb3bad3ad 100644 --- a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T3.js +++ b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T3.js @@ -16,11 +16,11 @@ try { var s1 = new Date(); s1.toString = Boolean.prototype.toString; var v1 = s1.toString(); - $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError'); + throw new Test262Error('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); } } @@ -29,10 +29,10 @@ try { var s2 = new Date(); s2.myToString = Boolean.prototype.toString; var v2 = s2.myToString(); - $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError'); + throw new Test262Error('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); } } diff --git a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T4.js b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T4.js index 277cf2646b..659c144f29 100644 --- a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T4.js +++ b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T4.js @@ -16,11 +16,11 @@ try { var s1 = new Object(); s1.toString = Boolean.prototype.toString; var v1 = s1.toString(); - $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError'); + throw new Test262Error('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); } } @@ -29,10 +29,10 @@ try { var s2 = new Object(); s2.myToString = Boolean.prototype.toString; var v2 = s2.myToString(); - $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError'); + throw new Test262Error('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); } } diff --git a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T5.js b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T5.js index 99776dd85f..b7a7dcf73d 100644 --- a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T5.js +++ b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T5.js @@ -18,11 +18,11 @@ try { }; s1.toString = Boolean.prototype.toString; var v1 = s1.toString(); - $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError'); + throw new Test262Error('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); } } @@ -33,10 +33,10 @@ try { }; s2.myToString = Boolean.prototype.toString; var v2 = s2.myToString(); - $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError'); + throw new Test262Error('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); } } diff --git a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T1.js b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T1.js index 597ccffbde..d17eec52eb 100644 --- a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T1.js +++ b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T1.js @@ -9,30 +9,30 @@ description: no arguments //CHECK#1 if (Boolean.prototype.valueOf() !== false) { - $ERROR('#1: Boolean.prototype.valueOf() === false'); + throw new Test262Error('#1: Boolean.prototype.valueOf() === false'); } //CHECK#2 if ((new Boolean()).valueOf() !== false) { - $ERROR('#2: (new Boolean()).valueOf() === false'); + throw new Test262Error('#2: (new Boolean()).valueOf() === false'); } //CHECK#3 if ((new Boolean(0)).valueOf() !== false) { - $ERROR('#3: (new Boolean(0)).valueOf() === false'); + throw new Test262Error('#3: (new Boolean(0)).valueOf() === false'); } //CHECK#4 if ((new Boolean(-1)).valueOf() !== true) { - $ERROR('#4: (new Boolean(-1)).valueOf() === true'); + throw new Test262Error('#4: (new Boolean(-1)).valueOf() === true'); } //CHECK#5 if ((new Boolean(1)).valueOf() !== true) { - $ERROR('#5: (new Boolean(1)).valueOf() === true'); + throw new Test262Error('#5: (new Boolean(1)).valueOf() === true'); } //CHECK#6 if ((new Boolean(new Object())).valueOf() !== true) { - $ERROR('#6: (new Boolean(new Object())).valueOf() === true'); + throw new Test262Error('#6: (new Boolean(new Object())).valueOf() === true'); } diff --git a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T2.js b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T2.js index 7420e78bbe..2c2b8b23aa 100644 --- a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T2.js +++ b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T2.js @@ -9,30 +9,30 @@ description: calling with argument //CHECK#1 if (Boolean.prototype.valueOf(true) !== false) { - $ERROR('#1: Boolean.prototype.valueOf(true) === false'); + throw new Test262Error('#1: Boolean.prototype.valueOf(true) === false'); } //CHECK#2 if ((new Boolean()).valueOf(true) !== false) { - $ERROR('#2: (new Boolean()).valueOf(true) === false'); + throw new Test262Error('#2: (new Boolean()).valueOf(true) === false'); } //CHECK#3 if ((new Boolean(0)).valueOf(true) !== false) { - $ERROR('#3: (new Boolean(0)).valueOf(true) === false'); + throw new Test262Error('#3: (new Boolean(0)).valueOf(true) === false'); } //CHECK#4 if ((new Boolean(-1)).valueOf(false) !== true) { - $ERROR('#4: (new Boolean(-1)).valueOf(false) === true'); + throw new Test262Error('#4: (new Boolean(-1)).valueOf(false) === true'); } //CHECK#5 if ((new Boolean(1)).valueOf(false) !== true) { - $ERROR('#5: (new Boolean(1)).valueOf(false) === true'); + throw new Test262Error('#5: (new Boolean(1)).valueOf(false) === true'); } //CHECK#6 if ((new Boolean(new Object())).valueOf(false) !== true) { - $ERROR('#6: (new Boolean(new Object())).valueOf(false) === true'); + throw new Test262Error('#6: (new Boolean(new Object())).valueOf(false) === true'); } diff --git a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T1.js b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T1.js index 591957f4d3..72ba9dd6c4 100644 --- a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T1.js +++ b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T1.js @@ -15,11 +15,11 @@ try { var s1 = new String(); s1.valueOf = Boolean.prototype.valueOf; var v1 = s1.valueOf(); - $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); + throw new Test262Error('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); } } @@ -28,10 +28,10 @@ try { var s2 = new String(); s2.myValueOf = Boolean.prototype.valueOf; var v2 = s2.myValueOf(); - $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); + throw new Test262Error('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); } } diff --git a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T2.js b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T2.js index fba4fbe9c1..85be0f0bb1 100644 --- a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T2.js +++ b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T2.js @@ -15,11 +15,11 @@ try { var s1 = new Number(); s1.valueOf = Boolean.prototype.valueOf; var v1 = s1.valueOf(); - $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); + throw new Test262Error('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); } } @@ -28,10 +28,10 @@ try { var s2 = new Number(); s2.myValueOf = Boolean.prototype.valueOf; var v2 = s2.myValueOf(); - $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); + throw new Test262Error('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); } } diff --git a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T3.js b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T3.js index a2cd6f63ba..f6ac9d7376 100644 --- a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T3.js +++ b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T3.js @@ -15,11 +15,11 @@ try { var s1 = new Date(); s1.valueOf = Boolean.prototype.valueOf; var v1 = s1.valueOf(); - $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); + throw new Test262Error('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); } } @@ -28,10 +28,10 @@ try { var s2 = new Date(); s2.myValueOf = Boolean.prototype.valueOf; var v2 = s2.myValueOf(); - $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); + throw new Test262Error('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); } } diff --git a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T4.js b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T4.js index cd5c3d1c42..2eb35aa2b7 100644 --- a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T4.js +++ b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T4.js @@ -15,11 +15,11 @@ try { var s1 = new Object(); s1.valueOf = Boolean.prototype.valueOf; var v1 = s1.valueOf(); - $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); + throw new Test262Error('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); } } @@ -28,10 +28,10 @@ try { var s2 = new Object(); s2.myValueOf = Boolean.prototype.valueOf; var v2 = s2.myValueOf(); - $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); + throw new Test262Error('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); } } diff --git a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T5.js b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T5.js index f575fa1814..cbbffad489 100644 --- a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T5.js +++ b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T5.js @@ -17,11 +17,11 @@ try { }; s1.valueOf = Boolean.prototype.valueOf; var v1 = s1.valueOf(); - $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); + throw new Test262Error('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); } } @@ -32,10 +32,10 @@ try { }; s2.myValueOf = Boolean.prototype.valueOf; var v2 = s2.myValueOf(); - $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); + throw new Test262Error('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); + throw new Test262Error('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); } }