diff --git a/test/built-ins/Object/S15.2.1.1_A1_T1.js b/test/built-ins/Object/S15.2.1.1_A1_T1.js index ed1059c682..1964b17703 100644 --- a/test/built-ins/Object/S15.2.1.1_A1_T1.js +++ b/test/built-ins/Object/S15.2.1.1_A1_T1.js @@ -14,21 +14,21 @@ var __obj = Object(null); var n__obj = new Object(null); if (__obj.toString() !== n__obj.toString()) { - $ERROR('#1'); + throw new Test262Error('#1'); } if (__obj.constructor !== n__obj.constructor) { - $ERROR('#2'); + throw new Test262Error('#2'); } if (__obj.prototype !== n__obj.prototype) { - $ERROR('#3'); + throw new Test262Error('#3'); } if (__obj.toLocaleString() !== n__obj.toLocaleString()) { - $ERROR('#4'); + throw new Test262Error('#4'); } if (typeof __obj !== typeof n__obj) { - $ERROR('#5'); + throw new Test262Error('#5'); } diff --git a/test/built-ins/Object/S15.2.1.1_A1_T2.js b/test/built-ins/Object/S15.2.1.1_A1_T2.js index d49d7c709f..9ce97bed60 100644 --- a/test/built-ins/Object/S15.2.1.1_A1_T2.js +++ b/test/built-ins/Object/S15.2.1.1_A1_T2.js @@ -17,21 +17,21 @@ var n__obj = new Object(void 0); if (__obj.toString() !== n__obj.toString()) { - $ERROR('#1'); + throw new Test262Error('#1'); } if (__obj.constructor !== n__obj.constructor) { - $ERROR('#2'); + throw new Test262Error('#2'); } if (__obj.prototype !== n__obj.prototype) { - $ERROR('#3'); + throw new Test262Error('#3'); } if (__obj.toLocaleString() !== n__obj.toLocaleString()) { - $ERROR('#4'); + throw new Test262Error('#4'); } if (typeof __obj !== typeof n__obj) { - $ERROR('#5'); + throw new Test262Error('#5'); } diff --git a/test/built-ins/Object/S15.2.1.1_A1_T3.js b/test/built-ins/Object/S15.2.1.1_A1_T3.js index 47685eae43..1a5ebc6265 100644 --- a/test/built-ins/Object/S15.2.1.1_A1_T3.js +++ b/test/built-ins/Object/S15.2.1.1_A1_T3.js @@ -14,21 +14,21 @@ var __obj = Object(); var n__obj = new Object(); if (__obj.toString() !== n__obj.toString()) { - $ERROR('#1'); + throw new Test262Error('#1'); } if (__obj.constructor !== n__obj.constructor) { - $ERROR('#2'); + throw new Test262Error('#2'); } if (__obj.prototype !== n__obj.prototype) { - $ERROR('#3'); + throw new Test262Error('#3'); } if (__obj.toLocaleString() !== n__obj.toLocaleString()) { - $ERROR('#4'); + throw new Test262Error('#4'); } if (typeof __obj !== typeof n__obj) { - $ERROR('#5'); + throw new Test262Error('#5'); } diff --git a/test/built-ins/Object/S15.2.1.1_A1_T4.js b/test/built-ins/Object/S15.2.1.1_A1_T4.js index 15a35d0a05..067271461f 100644 --- a/test/built-ins/Object/S15.2.1.1_A1_T4.js +++ b/test/built-ins/Object/S15.2.1.1_A1_T4.js @@ -14,21 +14,21 @@ var __obj = Object(undefined); var n__obj = new Object(undefined); if (__obj.toString() !== n__obj.toString()) { - $ERROR('#1'); + throw new Test262Error('#1'); } if (__obj.constructor !== n__obj.constructor) { - $ERROR('#2'); + throw new Test262Error('#2'); } if (__obj.prototype !== n__obj.prototype) { - $ERROR('#3'); + throw new Test262Error('#3'); } if (__obj.toLocaleString() !== n__obj.toLocaleString()) { - $ERROR('#4'); + throw new Test262Error('#4'); } if (typeof __obj !== typeof n__obj) { - $ERROR('#5'); + throw new Test262Error('#5'); } diff --git a/test/built-ins/Object/S15.2.1.1_A1_T5.js b/test/built-ins/Object/S15.2.1.1_A1_T5.js index bf55633125..ba66948dfc 100644 --- a/test/built-ins/Object/S15.2.1.1_A1_T5.js +++ b/test/built-ins/Object/S15.2.1.1_A1_T5.js @@ -14,23 +14,23 @@ var __obj = Object(x); var n__obj = new Object(x); if (__obj.toString() !== n__obj.toString()) { - $ERROR('#1'); + throw new Test262Error('#1'); } if (__obj.constructor !== n__obj.constructor) { - $ERROR('#2'); + throw new Test262Error('#2'); } if (__obj.prototype !== n__obj.prototype) { - $ERROR('#3'); + throw new Test262Error('#3'); } if (__obj.toLocaleString() !== n__obj.toLocaleString()) { - $ERROR('#4'); + throw new Test262Error('#4'); } if (typeof __obj !== typeof n__obj) { - $ERROR('#5'); + throw new Test262Error('#5'); } var x; diff --git a/test/built-ins/Object/S15.2.1.1_A2_T1.js b/test/built-ins/Object/S15.2.1.1_A2_T1.js index 48bfbfd6e1..e6eb529ad0 100644 --- a/test/built-ins/Object/S15.2.1.1_A2_T1.js +++ b/test/built-ins/Object/S15.2.1.1_A2_T1.js @@ -12,23 +12,23 @@ description: Calling Object function with boolean argument value var bool = true; if (typeof bool !== 'boolean') { - $ERROR('#1: bool should be boolean primitive'); + throw new Test262Error('#1: bool should be boolean primitive'); } var obj = Object(bool); if (obj.constructor !== Boolean) { - $ERROR('#2: Object(true) returns ToObject(true)'); + throw new Test262Error('#2: Object(true) returns ToObject(true)'); } if (typeof obj !== "object") { - $ERROR('#3: Object(true) returns ToObject(true)'); + throw new Test262Error('#3: Object(true) returns ToObject(true)'); } if (!obj) { - $ERROR('#4: Object(true) returns ToObject(true)'); + throw new Test262Error('#4: Object(true) returns ToObject(true)'); } if (obj === true) { - $ERROR('#5: Object(true) returns ToObject(true)'); + throw new Test262Error('#5: Object(true) returns ToObject(true)'); } diff --git a/test/built-ins/Object/S15.2.1.1_A2_T10.js b/test/built-ins/Object/S15.2.1.1_A2_T10.js index c0f0606d78..ee98f99a3a 100644 --- a/test/built-ins/Object/S15.2.1.1_A2_T10.js +++ b/test/built-ins/Object/S15.2.1.1_A2_T10.js @@ -13,7 +13,7 @@ var arr = [1, 2, 3]; //CHECK#1 if (typeof arr !== 'object') { - $ERROR('#1: arr = [1,2,3] is NOT an object'); + throw new Test262Error('#1: arr = [1,2,3] is NOT an object'); } var n_obj = Object(arr); @@ -22,5 +22,5 @@ arr.push(4); //CHECK#2 if ((n_obj !== arr) || (n_obj[3] !== 4)) { - $ERROR('#2: Object([1,2,3]) returns ToObject([1,2,3])'); + throw new Test262Error('#2: Object([1,2,3]) returns ToObject([1,2,3])'); } diff --git a/test/built-ins/Object/S15.2.1.1_A2_T11.js b/test/built-ins/Object/S15.2.1.1_A2_T11.js index 03ca6fbccb..e61e0dbe98 100644 --- a/test/built-ins/Object/S15.2.1.1_A2_T11.js +++ b/test/built-ins/Object/S15.2.1.1_A2_T11.js @@ -11,7 +11,7 @@ description: Calling Object function with function declaration as argument value //CHECK#1 if (typeof func !== 'undefined') { - $ERROR('#1: function expression can\'t be declarated'); + throw new Test262Error('#1: function expression can\'t be declarated'); } var n_obj = Object(function func() { @@ -20,10 +20,10 @@ var n_obj = Object(function func() { //CHECK#2 if ((n_obj.constructor !== Function) || (n_obj() !== 1)) { - $ERROR('#2: Object(function func(){return 1;}) returns function'); + throw new Test262Error('#2: Object(function func(){return 1;}) returns function'); } //CHECK#3 if (typeof func !== 'undefined') { - $ERROR('#3: function expression can\'t be declarated'); + throw new Test262Error('#3: function expression can\'t be declarated'); } diff --git a/test/built-ins/Object/S15.2.1.1_A2_T12.js b/test/built-ins/Object/S15.2.1.1_A2_T12.js index 820956ed6b..6df2800f57 100644 --- a/test/built-ins/Object/S15.2.1.1_A2_T12.js +++ b/test/built-ins/Object/S15.2.1.1_A2_T12.js @@ -15,16 +15,16 @@ var obj = Object(1.1 * ([].length + { //CHECK#2 if (typeof obj !== "object") { - $ERROR('#2: Object(expression) returns ToObject(expression)'); + throw new Test262Error('#2: Object(expression) returns ToObject(expression)'); } //CHECK#3 if (obj.constructor !== Number) { - $ERROR('#3: Object(expression) returns ToObject(expression)'); + throw new Test262Error('#3: Object(expression) returns ToObject(expression)'); } //CHECK#4 if ((obj != 1.1) || (obj === 1.1)) { - $ERROR('#4: Object(expression) returns ToObject(expression)'); + throw new Test262Error('#4: Object(expression) returns ToObject(expression)'); } // diff --git a/test/built-ins/Object/S15.2.1.1_A2_T13.js b/test/built-ins/Object/S15.2.1.1_A2_T13.js index d301fb5ecc..e164bd6fc3 100644 --- a/test/built-ins/Object/S15.2.1.1_A2_T13.js +++ b/test/built-ins/Object/S15.2.1.1_A2_T13.js @@ -13,20 +13,20 @@ var obj = Object((1 === 1) && (!false)); //CHECK#1 if (obj.constructor !== Boolean) { - $ERROR('#1: Object(expression) returns ToObject(expression)'); + throw new Test262Error('#1: Object(expression) returns ToObject(expression)'); } //CHECK#1.1 if (typeof obj !== "object") { - $ERROR('#1.1: Object(expression) returns ToObject(expression)'); + throw new Test262Error('#1.1: Object(expression) returns ToObject(expression)'); } //CHECK#2 if (!(obj)) { - $ERROR('#2: Object(expression) returns ToObject(expression)'); + throw new Test262Error('#2: Object(expression) returns ToObject(expression)'); } //CHECK#3 if (obj === true) { - $ERROR('#3: Object(expression) returns ToObject(expression)'); + throw new Test262Error('#3: Object(expression) returns ToObject(expression)'); } diff --git a/test/built-ins/Object/S15.2.1.1_A2_T14.js b/test/built-ins/Object/S15.2.1.1_A2_T14.js index 69e4299315..f4f9a845e4 100644 --- a/test/built-ins/Object/S15.2.1.1_A2_T14.js +++ b/test/built-ins/Object/S15.2.1.1_A2_T14.js @@ -15,15 +15,15 @@ var obj = Object("" + 1); //CHECK#2 if (obj.constructor !== String) { - $ERROR('#2: Object(expression) returns ToObject(expression)'); + throw new Test262Error('#2: Object(expression) returns ToObject(expression)'); } //CHECK#3 if (typeof obj !== "object") { - $ERROR('#3: Object(expression) returns ToObject(expression)'); + throw new Test262Error('#3: Object(expression) returns ToObject(expression)'); } //CHECK#4 if ((obj != "1") || (obj === "1")) { - $ERROR('#4: Object(expression) returns ToObject(expression)'); + throw new Test262Error('#4: Object(expression) returns ToObject(expression)'); } diff --git a/test/built-ins/Object/S15.2.1.1_A2_T2.js b/test/built-ins/Object/S15.2.1.1_A2_T2.js index d9241c2ce0..b9d812dbeb 100644 --- a/test/built-ins/Object/S15.2.1.1_A2_T2.js +++ b/test/built-ins/Object/S15.2.1.1_A2_T2.js @@ -13,23 +13,23 @@ var num = 1.1; // CHECK#1 if (typeof num !== 'number') { - $ERROR('#1: num = 1.1 should be Number primitive'); + throw new Test262Error('#1: num = 1.1 should be Number primitive'); } var obj = Object(num); //CHECK#2 if (typeof obj !== "object") { - $ERROR('#2: Object(1.1) returns ToObject(1.1)'); + throw new Test262Error('#2: Object(1.1) returns ToObject(1.1)'); } //CHECK#3 if (obj.constructor !== Number) { - $ERROR('#3: Object(1.1) returns ToObject(1.1)'); + throw new Test262Error('#3: Object(1.1) returns ToObject(1.1)'); } //CHECK#4 if ((obj != 1.1) || (obj === 1.1)) { - $ERROR('#4: Object(1.1) returns ToObject(1.1)'); + throw new Test262Error('#4: Object(1.1) returns ToObject(1.1)'); } // diff --git a/test/built-ins/Object/S15.2.1.1_A2_T3.js b/test/built-ins/Object/S15.2.1.1_A2_T3.js index f0dc0a6158..3b476b6dec 100644 --- a/test/built-ins/Object/S15.2.1.1_A2_T3.js +++ b/test/built-ins/Object/S15.2.1.1_A2_T3.js @@ -13,22 +13,22 @@ var str = 'Luke Skywalker'; // CHECK#1 if (typeof str !== 'string') { - $ERROR('#1: "Luke Skywalker" should be a String primitive'); + throw new Test262Error('#1: "Luke Skywalker" should be a String primitive'); } var obj = Object(str); //CHECK#2 if (obj.constructor !== String) { - $ERROR('#2: Object("Luke Skywalker") returns ToObject("Luke Skywalker")'); + throw new Test262Error('#2: Object("Luke Skywalker") returns ToObject("Luke Skywalker")'); } //CHECK#3 if (typeof obj !== "object") { - $ERROR('#3: Object("Luke Skywalker") returns ToObject("Luke Skywalker")'); + throw new Test262Error('#3: Object("Luke Skywalker") returns ToObject("Luke Skywalker")'); } //CHECK#4 if ((obj != "Luke Skywalker") || (obj === "Luke Skywalker")) { - $ERROR('#4: Object("Luke Skywalker") returns ToObject("Luke Skywalker")'); + throw new Test262Error('#4: Object("Luke Skywalker") returns ToObject("Luke Skywalker")'); } diff --git a/test/built-ins/Object/S15.2.1.1_A2_T4.js b/test/built-ins/Object/S15.2.1.1_A2_T4.js index 21090a7a1d..673e74f309 100644 --- a/test/built-ins/Object/S15.2.1.1_A2_T4.js +++ b/test/built-ins/Object/S15.2.1.1_A2_T4.js @@ -15,12 +15,12 @@ var obj = { //CHECK#1 if (typeof(obj) !== 'object') { - $ERROR('#1: obj = {flag:true} should be an Object'); + throw new Test262Error('#1: obj = {flag:true} should be an Object'); } var n_obj = Object(obj); //CHECK#2 if ((n_obj !== obj) || (!(n_obj['flag']))) { - $ERROR('#2: Object({flag:true}) returns ToObject({flag:true})'); + throw new Test262Error('#2: Object({flag:true}) returns ToObject({flag:true})'); } diff --git a/test/built-ins/Object/S15.2.1.1_A2_T5.js b/test/built-ins/Object/S15.2.1.1_A2_T5.js index ff1c17d8bf..a147ef147a 100644 --- a/test/built-ins/Object/S15.2.1.1_A2_T5.js +++ b/test/built-ins/Object/S15.2.1.1_A2_T5.js @@ -13,18 +13,18 @@ var num = NaN; // CHECK#1 if (typeof num !== 'number') { - $ERROR('#1: num = NaN should have number type'); + throw new Test262Error('#1: num = NaN should have number type'); } var obj = Object(num); //CHECK#2 if (obj.constructor !== Number) { - $ERROR('#2: Object(NaN) returns ToObject(NaN)'); + throw new Test262Error('#2: Object(NaN) returns ToObject(NaN)'); } //CHECK#3 if (typeof obj !== "object") { - $ERROR('#2: Object(NaN) returns ToObject(NaN)'); + throw new Test262Error('#2: Object(NaN) returns ToObject(NaN)'); } // diff --git a/test/built-ins/Object/S15.2.1.1_A2_T6.js b/test/built-ins/Object/S15.2.1.1_A2_T6.js index 0d1d4a3bb5..8d566e782c 100644 --- a/test/built-ins/Object/S15.2.1.1_A2_T6.js +++ b/test/built-ins/Object/S15.2.1.1_A2_T6.js @@ -13,22 +13,22 @@ var num = Infinity; // CHECK#1 if (typeof num !== 'number') { - $ERROR('#1: num = Infinity should be a Number primitive'); + throw new Test262Error('#1: num = Infinity should be a Number primitive'); } var obj = Object(num); //CHECK#2 if (obj.constructor !== Number) { - $ERROR('#2: Object(Infinity) returns ToObject(Infinity)'); + throw new Test262Error('#2: Object(Infinity) returns ToObject(Infinity)'); } //CHECK#3 if (typeof obj !== "object") { - $ERROR('#3: Object(Infinity) returns ToObject(Infinity)'); + throw new Test262Error('#3: Object(Infinity) returns ToObject(Infinity)'); } //CHECK#4 if ((obj != Infinity) || (obj === Infinity)) { - $ERROR('#4: Object(Infinity) returns ToObject(Infinity)'); + throw new Test262Error('#4: Object(Infinity) returns ToObject(Infinity)'); } diff --git a/test/built-ins/Object/S15.2.1.1_A2_T7.js b/test/built-ins/Object/S15.2.1.1_A2_T7.js index 33d4117cd7..7eb8e22548 100644 --- a/test/built-ins/Object/S15.2.1.1_A2_T7.js +++ b/test/built-ins/Object/S15.2.1.1_A2_T7.js @@ -13,22 +13,22 @@ var str = ''; // CHECK#1 if (typeof(str) !== 'string') { - $ERROR('#1: "" is NOT a String'); + throw new Test262Error('#1: "" is NOT a String'); } var obj = Object(str); //CHECK#2 if (obj.constructor !== String) { - $ERROR('#2: Object("") returns ToObject("")'); + throw new Test262Error('#2: Object("") returns ToObject("")'); } //CHECK#3 if (typeof obj !== "object") { - $ERROR('#3: Object("") returns ToObject("")'); + throw new Test262Error('#3: Object("") returns ToObject("")'); } //CHECK#4 if ((obj != "") || (obj === "")) { - $ERROR('#4: Object("") returns ToObject("")'); + throw new Test262Error('#4: Object("") returns ToObject("")'); } diff --git a/test/built-ins/Object/S15.2.1.1_A2_T8.js b/test/built-ins/Object/S15.2.1.1_A2_T8.js index a55517655f..ad8428338c 100644 --- a/test/built-ins/Object/S15.2.1.1_A2_T8.js +++ b/test/built-ins/Object/S15.2.1.1_A2_T8.js @@ -15,12 +15,12 @@ var func = function() { //CHECK#1 if (typeof func !== 'function') { - $ERROR('#1: func = function(){return 1;} is NOT an function'); + throw new Test262Error('#1: func = function(){return 1;} is NOT an function'); } var n_obj = Object(func); //CHECK#2 if ((n_obj !== func) || (n_obj() !== 1)) { - $ERROR('#2: Object(function) returns function'); + throw new Test262Error('#2: Object(function) returns function'); } diff --git a/test/built-ins/Object/S15.2.1.1_A2_T9.js b/test/built-ins/Object/S15.2.1.1_A2_T9.js index 223566efc1..2757ec3608 100644 --- a/test/built-ins/Object/S15.2.1.1_A2_T9.js +++ b/test/built-ins/Object/S15.2.1.1_A2_T9.js @@ -13,14 +13,14 @@ description: > //CHECK#1 if (typeof func !== 'function') { - $ERROR('#1: func = function(){return 1;} is NOT an function'); + throw new Test262Error('#1: func = function(){return 1;} is NOT an function'); } var n_obj = Object(func); //CHECK#2 if ((n_obj !== func) || (n_obj() !== 1)) { - $ERROR('#2: Object(function) returns function'); + throw new Test262Error('#2: Object(function) returns function'); } function func() { diff --git a/test/built-ins/Object/S15.2.1.1_A3_T1.js b/test/built-ins/Object/S15.2.1.1_A3_T1.js index de23e0a570..d7921485dc 100644 --- a/test/built-ins/Object/S15.2.1.1_A3_T1.js +++ b/test/built-ins/Object/S15.2.1.1_A3_T1.js @@ -13,15 +13,15 @@ var obj = Object(1, 2, 3); //CHECK#1 if (obj.constructor !== Number) { - $ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); + throw new Test262Error('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } //CHECK#2 if (typeof obj !== "object") { - $ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); + throw new Test262Error('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } //CHECK#3 if ((obj != 1) || (obj === 1)) { - $ERROR('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); + throw new Test262Error('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } diff --git a/test/built-ins/Object/S15.2.1.1_A3_T2.js b/test/built-ins/Object/S15.2.1.1_A3_T2.js index a19658eaaa..afc5c2cf61 100644 --- a/test/built-ins/Object/S15.2.1.1_A3_T2.js +++ b/test/built-ins/Object/S15.2.1.1_A3_T2.js @@ -13,10 +13,10 @@ var obj = Object(null, 2, 3); //CHECK#1 if (obj.constructor !== Object) { - $ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); + throw new Test262Error('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } //CHECK#2 if (typeof obj !== "object") { - $ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); + throw new Test262Error('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } diff --git a/test/built-ins/Object/S15.2.1.1_A3_T3.js b/test/built-ins/Object/S15.2.1.1_A3_T3.js index 6d45592dae..da1aef8148 100644 --- a/test/built-ins/Object/S15.2.1.1_A3_T3.js +++ b/test/built-ins/Object/S15.2.1.1_A3_T3.js @@ -13,15 +13,15 @@ var obj = Object((null, 2, 3), 1, 2); //CHECK#1 if (obj.constructor !== Number) { - $ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); + throw new Test262Error('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } //CHECK#2 if (typeof obj !== "object") { - $ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); + throw new Test262Error('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } //CHECK#3 if ((obj != 3) || (obj === 3)) { - $ERROR('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); + throw new Test262Error('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } diff --git a/test/built-ins/Object/S15.2.2.1_A1_T1.js b/test/built-ins/Object/S15.2.2.1_A1_T1.js index f2ca067e80..ce30cf9ab4 100644 --- a/test/built-ins/Object/S15.2.2.1_A1_T1.js +++ b/test/built-ins/Object/S15.2.2.1_A1_T1.js @@ -18,26 +18,26 @@ var obj = new Object(); // CHECK#0 if (obj === undefined) { - $ERROR('#0: new Object() return the newly created native object.'); + throw new Test262Error('#0: new Object() return the newly created native object.'); } // CHECK#1 if (obj.constructor !== Object) { - $ERROR('#1: new Object() create a new native ECMAScript object'); + throw new Test262Error('#1: new Object() create a new native ECMAScript object'); } // CHECK#2 if (!(Object.prototype.isPrototypeOf(obj))) { - $ERROR('#2: when new Object() calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.'); + throw new Test262Error('#2: when new Object() calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.'); } // CHECK#3 var to_string_result = '[object ' + 'Object' + ']'; if (obj.toString() !== to_string_result) { - $ERROR('#3: when new Object() calls the [[Class]] property of the newly constructed object is set to "Object".'); + throw new Test262Error('#3: when new Object() calls the [[Class]] property of the newly constructed object is set to "Object".'); } // CHECK#4 if (obj.valueOf().toString() !== to_string_result.toString()) { - $ERROR('#4: when new Object() calls the newly constructed object has no [[Value]] property.'); + throw new Test262Error('#4: when new Object() calls the newly constructed object has no [[Value]] property.'); } diff --git a/test/built-ins/Object/S15.2.2.1_A1_T2.js b/test/built-ins/Object/S15.2.2.1_A1_T2.js index 9d073d2158..27744917ff 100644 --- a/test/built-ins/Object/S15.2.2.1_A1_T2.js +++ b/test/built-ins/Object/S15.2.2.1_A1_T2.js @@ -19,26 +19,26 @@ var obj = new Object(void 0); // CHECK#0 if (obj === undefined) { - $ERROR('#0: new Object(undefined) return the newly created native object.'); + throw new Test262Error('#0: new Object(undefined) return the newly created native object.'); } // CHECK#1 if (obj.constructor !== Object) { - $ERROR('#1: new Object(undefined) create a new native ECMAScript object'); + throw new Test262Error('#1: new Object(undefined) create a new native ECMAScript object'); } // CHECK#2 if (!(Object.prototype.isPrototypeOf(obj))) { - $ERROR('#2: when new Object(undefined) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.'); + throw new Test262Error('#2: when new Object(undefined) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.'); } // CHECK#3 var to_string_result = '[object ' + 'Object' + ']'; if (obj.toString() !== to_string_result) { - $ERROR('#3: when new Object(undefined) calls the [[Class]] property of the newly constructed object is set to "Object".'); + throw new Test262Error('#3: when new Object(undefined) calls the [[Class]] property of the newly constructed object is set to "Object".'); } // CHECK#4 if (obj.valueOf().toString() !== to_string_result.toString()) { - $ERROR('#4: when new Object(undefined) calls the newly constructed object has no [[Value]] property.'); + throw new Test262Error('#4: when new Object(undefined) calls the newly constructed object has no [[Value]] property.'); } diff --git a/test/built-ins/Object/S15.2.2.1_A1_T3.js b/test/built-ins/Object/S15.2.2.1_A1_T3.js index 754853b211..847e93b180 100644 --- a/test/built-ins/Object/S15.2.2.1_A1_T3.js +++ b/test/built-ins/Object/S15.2.2.1_A1_T3.js @@ -18,26 +18,26 @@ var obj = new Object(null); // CHECK#0 if (obj === undefined) { - $ERROR('#0: new Object(null) return the newly created native object.'); + throw new Test262Error('#0: new Object(null) return the newly created native object.'); } // CHECK#1 if (obj.constructor !== Object) { - $ERROR('#1: new Object(null) create a new native ECMAScript object'); + throw new Test262Error('#1: new Object(null) create a new native ECMAScript object'); } // CHECK#2 if (!(Object.prototype.isPrototypeOf(obj))) { - $ERROR('#2: when new Object(null) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.'); + throw new Test262Error('#2: when new Object(null) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.'); } // CHECK#3 var to_string_result = '[object ' + 'Object' + ']'; if (obj.toString() !== to_string_result) { - $ERROR('#3: when new Object(null) calls the [[Class]] property of the newly constructed object is set to "Object".'); + throw new Test262Error('#3: when new Object(null) calls the [[Class]] property of the newly constructed object is set to "Object".'); } // CHECK#4 if (obj.valueOf().toString() !== to_string_result.toString()) { - $ERROR('#4: when new Object(null) calls the newly constructed object has no [[Value]] property.'); + throw new Test262Error('#4: when new Object(null) calls the newly constructed object has no [[Value]] property.'); } diff --git a/test/built-ins/Object/S15.2.2.1_A1_T4.js b/test/built-ins/Object/S15.2.2.1_A1_T4.js index c04305b17b..8b0cfab4b9 100644 --- a/test/built-ins/Object/S15.2.2.1_A1_T4.js +++ b/test/built-ins/Object/S15.2.2.1_A1_T4.js @@ -18,26 +18,26 @@ var obj = new Object(undefined); // CHECK#0 if (obj === undefined) { - $ERROR('#0: new Object(undefined) return the newly created native object.'); + throw new Test262Error('#0: new Object(undefined) return the newly created native object.'); } // CHECK#1 if (obj.constructor !== Object) { - $ERROR('#1: new Object(undefined) create a new native ECMAScript object'); + throw new Test262Error('#1: new Object(undefined) create a new native ECMAScript object'); } // CHECK#2 if (!(Object.prototype.isPrototypeOf(obj))) { - $ERROR('#2: when new Object(undefined) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.'); + throw new Test262Error('#2: when new Object(undefined) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.'); } // CHECK#3 var to_string_result = '[object ' + 'Object' + ']'; if (obj.toString() !== to_string_result) { - $ERROR('#3: when new Object(undefined) calls the [[Class]] property of the newly constructed object is set to "Object".'); + throw new Test262Error('#3: when new Object(undefined) calls the [[Class]] property of the newly constructed object is set to "Object".'); } // CHECK#4 if (obj.valueOf().toString() !== to_string_result.toString()) { - $ERROR('#4: when new Object(undefined) calls the newly constructed object has no [[Value]] property.'); + throw new Test262Error('#4: when new Object(undefined) calls the newly constructed object has no [[Value]] property.'); } diff --git a/test/built-ins/Object/S15.2.2.1_A1_T5.js b/test/built-ins/Object/S15.2.2.1_A1_T5.js index b2835a9b86..294b220995 100644 --- a/test/built-ins/Object/S15.2.2.1_A1_T5.js +++ b/test/built-ins/Object/S15.2.2.1_A1_T5.js @@ -20,28 +20,28 @@ var obj = new Object(x); // CHECK#0 if (obj === undefined) { - $ERROR('#0: new Object(undefined) return the newly created native object.'); + throw new Test262Error('#0: new Object(undefined) return the newly created native object.'); } // CHECK#1 if (obj.constructor !== Object) { - $ERROR('#1: new Object(undefined) create a new native ECMAScript object'); + throw new Test262Error('#1: new Object(undefined) create a new native ECMAScript object'); } // CHECK#2 if (!(Object.prototype.isPrototypeOf(obj))) { - $ERROR('#2: when new Object(undefined) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.'); + throw new Test262Error('#2: when new Object(undefined) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.'); } // CHECK#3 var to_string_result = '[object ' + 'Object' + ']'; if (obj.toString() !== to_string_result) { - $ERROR('#3: when new Object(undefined) calls the [[Class]] property of the newly constructed object is set to "Object".'); + throw new Test262Error('#3: when new Object(undefined) calls the [[Class]] property of the newly constructed object is set to "Object".'); } // CHECK#4 if (obj.valueOf().toString() !== to_string_result.toString()) { - $ERROR('#4: when new Object(undefined) calls the newly constructed object has no [[Value]] property.'); + throw new Test262Error('#4: when new Object(undefined) calls the newly constructed object has no [[Value]] property.'); } var x; diff --git a/test/built-ins/Object/S15.2.2.1_A2_T1.js b/test/built-ins/Object/S15.2.2.1_A2_T1.js index 1740d2fb23..c6593fe6da 100644 --- a/test/built-ins/Object/S15.2.2.1_A2_T1.js +++ b/test/built-ins/Object/S15.2.2.1_A2_T1.js @@ -17,10 +17,10 @@ var n_obj = new Object(obj); //CHECK#1 if (n_obj !== obj) { - $ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns.'); + throw new Test262Error('#1: When the Object constructor is called and if the value is an Object simply value returns.'); } //CHECK#2 if (n_obj['prop'] !== 1) { - $ERROR('#2: When the Object constructor is called and if the value is an Object simply value returns.'); + throw new Test262Error('#2: When the Object constructor is called and if the value is an Object simply value returns.'); } diff --git a/test/built-ins/Object/S15.2.2.1_A2_T2.js b/test/built-ins/Object/S15.2.2.1_A2_T2.js index 58fb4f0b53..16052dd49a 100644 --- a/test/built-ins/Object/S15.2.2.1_A2_T2.js +++ b/test/built-ins/Object/S15.2.2.1_A2_T2.js @@ -17,11 +17,11 @@ var n_obj = new Object(func); //CHECK#1 if (n_obj !== func) { - $ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns'); + throw new Test262Error('#1: When the Object constructor is called and if the value is an Object simply value returns'); } //CHECK#2 if (n_obj() !== 1) { - $ERROR('When the Object constructor is called and if the value is an Object simply value returns'); + throw new Test262Error('When the Object constructor is called and if the value is an Object simply value returns'); } // diff --git a/test/built-ins/Object/S15.2.2.1_A2_T3.js b/test/built-ins/Object/S15.2.2.1_A2_T3.js index 2321141c2f..5102962688 100644 --- a/test/built-ins/Object/S15.2.2.1_A2_T3.js +++ b/test/built-ins/Object/S15.2.2.1_A2_T3.js @@ -17,10 +17,10 @@ arr.push(4); //CHECK#1 if (n_obj !== arr) { - $ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns.'); + throw new Test262Error('#1: When the Object constructor is called and if the value is an Object simply value returns.'); } //CHECK#2 if (n_obj[3] !== 4) { - $ERROR('#2: When the Object constructor is called and if the value is an Object simply value returns.'); + throw new Test262Error('#2: When the Object constructor is called and if the value is an Object simply value returns.'); } diff --git a/test/built-ins/Object/S15.2.2.1_A2_T5.js b/test/built-ins/Object/S15.2.2.1_A2_T5.js index a0bb964544..1bf78b9028 100644 --- a/test/built-ins/Object/S15.2.2.1_A2_T5.js +++ b/test/built-ins/Object/S15.2.2.1_A2_T5.js @@ -15,10 +15,10 @@ var n_obj = new Object(obj); //CHECK#1 if (n_obj !== obj) { - $ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns.'); + throw new Test262Error('#1: When the Object constructor is called and if the value is an Object simply value returns.'); } //CHECK#2 if ((n_obj.getFullYear() !== 1978) || (n_obj.getMonth() !== 3)) { - $ERROR('#2: When the Object constructor is called and if the value is an Object simply value returns.'); + throw new Test262Error('#2: When the Object constructor is called and if the value is an Object simply value returns.'); } diff --git a/test/built-ins/Object/S15.2.2.1_A2_T6.js b/test/built-ins/Object/S15.2.2.1_A2_T6.js index f2cdbfbf78..211032c595 100644 --- a/test/built-ins/Object/S15.2.2.1_A2_T6.js +++ b/test/built-ins/Object/S15.2.2.1_A2_T6.js @@ -13,12 +13,12 @@ var n_obj = new Object(func); //CHECK#1 if (n_obj !== func) { - $ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns'); + throw new Test262Error('#1: When the Object constructor is called and if the value is an Object simply value returns'); } //CHECK#2 if (n_obj() !== 1) { - $ERROR('When the Object constructor is called and if the value is an Object simply value returns'); + throw new Test262Error('When the Object constructor is called and if the value is an Object simply value returns'); } function func() { diff --git a/test/built-ins/Object/S15.2.2.1_A2_T7.js b/test/built-ins/Object/S15.2.2.1_A2_T7.js index a4cf47654c..dd1675e74c 100644 --- a/test/built-ins/Object/S15.2.2.1_A2_T7.js +++ b/test/built-ins/Object/S15.2.2.1_A2_T7.js @@ -11,7 +11,7 @@ description: The value is a function declaration //CHECK#0 if (typeof func !== 'undefined') { - $ERROR('#0: function expression can\'t be declarated'); + throw new Test262Error('#0: function expression can\'t be declarated'); } var n_obj = new Object(function func() { @@ -20,15 +20,15 @@ var n_obj = new Object(function func() { //CHECK#1 if (n_obj.constructor !== Function) { - $ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns'); + throw new Test262Error('#1: When the Object constructor is called and if the value is an Object simply value returns'); } //CHECK#2 if (n_obj() !== 1) { - $ERROR('#2: When the Object constructor is called and if the value is an Object simply value returns'); + throw new Test262Error('#2: When the Object constructor is called and if the value is an Object simply value returns'); } //CHECK#3 if (typeof func !== 'undefined') { - $ERROR('#3: function expression can\'t be declarated'); + throw new Test262Error('#3: function expression can\'t be declarated'); } diff --git a/test/built-ins/Object/S15.2.2.1_A3_T1.js b/test/built-ins/Object/S15.2.2.1_A3_T1.js index a1aca13ca6..54aa6c1daf 100644 --- a/test/built-ins/Object/S15.2.2.1_A3_T1.js +++ b/test/built-ins/Object/S15.2.2.1_A3_T1.js @@ -13,7 +13,7 @@ var str = 'Obi-Wan Kenobi'; //CHECK#1 if (typeof str !== 'string') { - $ERROR('#1: "Obi-Wan Kenobi" is NOT a String'); + throw new Test262Error('#1: "Obi-Wan Kenobi" is NOT a String'); } @@ -21,20 +21,20 @@ var n_obj = new Object(str); //CHECK#2 if (n_obj.constructor !== String) { - $ERROR('#2: When the Object constructor is called with String argument return ToObject(string)'); + throw new Test262Error('#2: When the Object constructor is called with String argument return ToObject(string)'); } //CHECK#3 if (typeof n_obj !== 'object') { - $ERROR('#3: When the Object constructor is called with String argument return ToObject(string)'); + throw new Test262Error('#3: When the Object constructor is called with String argument return ToObject(string)'); } //CHECK#4 if (n_obj != str) { - $ERROR('#4: When the Object constructor is called with String argument return ToObject(string)'); + throw new Test262Error('#4: When the Object constructor is called with String argument return ToObject(string)'); } //CHECK#5 if (n_obj === str) { - $ERROR('#5: When the Object constructor is called with String argument return ToObject(string)'); + throw new Test262Error('#5: When the Object constructor is called with String argument return ToObject(string)'); } diff --git a/test/built-ins/Object/S15.2.2.1_A3_T2.js b/test/built-ins/Object/S15.2.2.1_A3_T2.js index 5b4a35edfb..3df6985a5a 100644 --- a/test/built-ins/Object/S15.2.2.1_A3_T2.js +++ b/test/built-ins/Object/S15.2.2.1_A3_T2.js @@ -13,27 +13,27 @@ var str = ''; //CHECK#1 if (typeof str !== 'string') { - $ERROR('#1: "" is NOT a String'); + throw new Test262Error('#1: "" is NOT a String'); } var n_obj = new Object(str); //CHECK#2 if (n_obj.constructor !== String) { - $ERROR('#2: When the Object constructor is called with String argument return ToObject(string)'); + throw new Test262Error('#2: When the Object constructor is called with String argument return ToObject(string)'); } //CHECK#3 if (typeof n_obj !== 'object') { - $ERROR('#3: When the Object constructor is called with String argument return ToObject(string)'); + throw new Test262Error('#3: When the Object constructor is called with String argument return ToObject(string)'); } //CHECK#4 if (n_obj != str) { - $ERROR('#4: When the Object constructor is called with String argument return ToObject(string)'); + throw new Test262Error('#4: When the Object constructor is called with String argument return ToObject(string)'); } //CHECK#5 if (n_obj === str) { - $ERROR('#5: When the Object constructor is called with String argument return ToObject(string)'); + throw new Test262Error('#5: When the Object constructor is called with String argument return ToObject(string)'); } diff --git a/test/built-ins/Object/S15.2.2.1_A3_T3.js b/test/built-ins/Object/S15.2.2.1_A3_T3.js index 8210a7d3e4..f476237c96 100644 --- a/test/built-ins/Object/S15.2.2.1_A3_T3.js +++ b/test/built-ins/Object/S15.2.2.1_A3_T3.js @@ -13,20 +13,20 @@ var n_obj = new Object("" + 1); //CHECK#2 if (n_obj.constructor !== String) { - $ERROR('#2: When the Object constructor is called with String argument return ToObject(string)'); + throw new Test262Error('#2: When the Object constructor is called with String argument return ToObject(string)'); } //CHECK#3 if (typeof n_obj !== 'object') { - $ERROR('#3: When the Object constructor is called with String argument return ToObject(string)'); + throw new Test262Error('#3: When the Object constructor is called with String argument return ToObject(string)'); } //CHECK#4 if (n_obj != "1") { - $ERROR('#4: When the Object constructor is called with String argument return ToObject(string)'); + throw new Test262Error('#4: When the Object constructor is called with String argument return ToObject(string)'); } //CHECK#5 if (n_obj === "1") { - $ERROR('#5: When the Object constructor is called with String argument return ToObject(string)'); + throw new Test262Error('#5: When the Object constructor is called with String argument return ToObject(string)'); } diff --git a/test/built-ins/Object/S15.2.2.1_A4_T1.js b/test/built-ins/Object/S15.2.2.1_A4_T1.js index f3238f139c..147e0676b1 100644 --- a/test/built-ins/Object/S15.2.2.1_A4_T1.js +++ b/test/built-ins/Object/S15.2.2.1_A4_T1.js @@ -13,27 +13,27 @@ var bool = true; //CHECK#1 if (typeof bool !== 'boolean') { - $ERROR('#1: true is NOT a boolean'); + throw new Test262Error('#1: true is NOT a boolean'); } var n_obj = new Object(bool); //CHECK#2 if (n_obj.constructor !== Boolean) { - $ERROR('#2: When the Object constructor is called with Boolean argument return ToObject(boolean)'); + throw new Test262Error('#2: When the Object constructor is called with Boolean argument return ToObject(boolean)'); } //CHECK#3 if (typeof n_obj !== 'object') { - $ERROR('#3: When the Object constructor is called with Boolean argument return ToObject(boolean)'); + throw new Test262Error('#3: When the Object constructor is called with Boolean argument return ToObject(boolean)'); } //CHECK#4 if (n_obj != bool) { - $ERROR('#4: When the Object constructor is called with Boolean argument return ToObject(boolean)'); + throw new Test262Error('#4: When the Object constructor is called with Boolean argument return ToObject(boolean)'); } //CHECK#5 if (n_obj === bool) { - $ERROR('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)'); + throw new Test262Error('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)'); } diff --git a/test/built-ins/Object/S15.2.2.1_A4_T2.js b/test/built-ins/Object/S15.2.2.1_A4_T2.js index c84eeeed56..0e0676006a 100644 --- a/test/built-ins/Object/S15.2.2.1_A4_T2.js +++ b/test/built-ins/Object/S15.2.2.1_A4_T2.js @@ -13,27 +13,27 @@ var bool = false; //CHECK#1 if (typeof bool !== 'boolean') { - $ERROR('#1: false is NOT a boolean'); + throw new Test262Error('#1: false is NOT a boolean'); } var n_obj = new Object(bool); //CHECK#2 if (n_obj.constructor !== Boolean) { - $ERROR('#2: When the Object constructor is called with Boolean argument return ToObject(boolean)'); + throw new Test262Error('#2: When the Object constructor is called with Boolean argument return ToObject(boolean)'); } //CHECK#3 if (typeof n_obj !== 'object') { - $ERROR('#3: When the Object constructor is called with Boolean argument return ToObject(boolean)'); + throw new Test262Error('#3: When the Object constructor is called with Boolean argument return ToObject(boolean)'); } //CHECK#4 if (n_obj != bool) { - $ERROR('#4: When the Object constructor is called with Boolean argument return ToObject(boolean)'); + throw new Test262Error('#4: When the Object constructor is called with Boolean argument return ToObject(boolean)'); } //CHECK#5 if (n_obj === bool) { - $ERROR('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)'); + throw new Test262Error('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)'); } diff --git a/test/built-ins/Object/S15.2.2.1_A4_T3.js b/test/built-ins/Object/S15.2.2.1_A4_T3.js index 9515740fc0..3769cfc0ae 100644 --- a/test/built-ins/Object/S15.2.2.1_A4_T3.js +++ b/test/built-ins/Object/S15.2.2.1_A4_T3.js @@ -13,20 +13,20 @@ var n_obj = new Object((1 === 1) && !(false)); //CHECK#2 if (n_obj.constructor !== Boolean) { - $ERROR('#2: When the Object constructor is called with Boolean argument return ToObject(boolean)'); + throw new Test262Error('#2: When the Object constructor is called with Boolean argument return ToObject(boolean)'); } //CHECK#3 if (typeof n_obj !== 'object') { - $ERROR('#3: When the Object constructor is called with Boolean argument return ToObject(boolean)'); + throw new Test262Error('#3: When the Object constructor is called with Boolean argument return ToObject(boolean)'); } //CHECK#4 if (n_obj != true) { - $ERROR('#4: When the Object constructor is called with Boolean argument return ToObject(boolean)'); + throw new Test262Error('#4: When the Object constructor is called with Boolean argument return ToObject(boolean)'); } //CHECK#5 if (n_obj === true) { - $ERROR('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)'); + throw new Test262Error('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)'); } diff --git a/test/built-ins/Object/S15.2.2.1_A5_T1.js b/test/built-ins/Object/S15.2.2.1_A5_T1.js index ec8809219d..da2b630bfa 100644 --- a/test/built-ins/Object/S15.2.2.1_A5_T1.js +++ b/test/built-ins/Object/S15.2.2.1_A5_T1.js @@ -13,27 +13,27 @@ var num = 1.0; //CHECK#1 if (typeof num !== 'number') { - $ERROR('#1: 1.0 is NOT a number'); + throw new Test262Error('#1: 1.0 is NOT a number'); } var n_obj = new Object(num); //CHECK#2 if (n_obj.constructor !== Number) { - $ERROR('#2: When the Object constructor is called with Number argument return ToObject(number)'); + throw new Test262Error('#2: When the Object constructor is called with Number argument return ToObject(number)'); } //CHECK#3 if (typeof n_obj !== 'object') { - $ERROR('#3: When the Object constructor is called with Number argument return ToObject(number)'); + throw new Test262Error('#3: When the Object constructor is called with Number argument return ToObject(number)'); } //CHECK#4 if (n_obj != num) { - $ERROR('#4: When the Object constructor is called with Number argument return ToObject(number)'); + throw new Test262Error('#4: When the Object constructor is called with Number argument return ToObject(number)'); } //CHECK#5 if (n_obj === num) { - $ERROR('#5: When the Object constructor is called with Number argument return ToObject(number)'); + throw new Test262Error('#5: When the Object constructor is called with Number argument return ToObject(number)'); } diff --git a/test/built-ins/Object/S15.2.2.1_A5_T2.js b/test/built-ins/Object/S15.2.2.1_A5_T2.js index 722d6b38df..2e5e2fa924 100644 --- a/test/built-ins/Object/S15.2.2.1_A5_T2.js +++ b/test/built-ins/Object/S15.2.2.1_A5_T2.js @@ -13,17 +13,17 @@ var num = NaN; //CHECK#1 if (typeof num !== 'number') { - $ERROR('#1: NaN is NOT a number'); + throw new Test262Error('#1: NaN is NOT a number'); } var n_obj = new Object(num); //CHECK#2 if (n_obj.constructor !== Number) { - $ERROR('#2: When the Object constructor is called with Number argument return ToObject(number)'); + throw new Test262Error('#2: When the Object constructor is called with Number argument return ToObject(number)'); } //CHECK#3 if (typeof n_obj !== 'object') { - $ERROR('#3: When the Object constructor is called with Number argument return ToObject(number)'); + throw new Test262Error('#3: When the Object constructor is called with Number argument return ToObject(number)'); } diff --git a/test/built-ins/Object/S15.2.2.1_A5_T3.js b/test/built-ins/Object/S15.2.2.1_A5_T3.js index ae1d15c912..dd001ce384 100644 --- a/test/built-ins/Object/S15.2.2.1_A5_T3.js +++ b/test/built-ins/Object/S15.2.2.1_A5_T3.js @@ -13,27 +13,27 @@ var num = Infinity; //CHECK#1 if (typeof num !== 'number') { - $ERROR('#1: Infinity is NOT a number'); + throw new Test262Error('#1: Infinity is NOT a number'); } var n_obj = new Object(num); //CHECK#2 if (n_obj.constructor !== Number) { - $ERROR('#2: When the Object constructor is called with Number argument return ToObject(number)'); + throw new Test262Error('#2: When the Object constructor is called with Number argument return ToObject(number)'); } //CHECK#3 if (typeof n_obj !== 'object') { - $ERROR('#3: When the Object constructor is called with Number argument return ToObject(number)'); + throw new Test262Error('#3: When the Object constructor is called with Number argument return ToObject(number)'); } //CHECK#4 if (n_obj != num) { - $ERROR('#4: When the Object constructor is called with Number argument return ToObject(number)'); + throw new Test262Error('#4: When the Object constructor is called with Number argument return ToObject(number)'); } //CHECK#5 if (n_obj === num) { - $ERROR('#5: When the Object constructor is called with Number argument return ToObject(number)'); + throw new Test262Error('#5: When the Object constructor is called with Number argument return ToObject(number)'); } diff --git a/test/built-ins/Object/S15.2.2.1_A5_T4.js b/test/built-ins/Object/S15.2.2.1_A5_T4.js index 1ea06e2c91..1abad02825 100644 --- a/test/built-ins/Object/S15.2.2.1_A5_T4.js +++ b/test/built-ins/Object/S15.2.2.1_A5_T4.js @@ -15,20 +15,20 @@ var n_obj = new Object(2 * ([].length + { //CHECK#2 if (n_obj.constructor !== Number) { - $ERROR('#2: When the Object constructor is called with Number argument return ToObject(number)'); + throw new Test262Error('#2: When the Object constructor is called with Number argument return ToObject(number)'); } //CHECK#3 if (typeof n_obj !== 'object') { - $ERROR('#3: When the Object constructor is called with Number argument return ToObject(number)'); + throw new Test262Error('#3: When the Object constructor is called with Number argument return ToObject(number)'); } //CHECK#4 if (n_obj != 2) { - $ERROR('#4: When the Object constructor is called with Number argument return ToObject(number)'); + throw new Test262Error('#4: When the Object constructor is called with Number argument return ToObject(number)'); } //CHECK#5 if (n_obj === 2) { - $ERROR('#5: When the Object constructor is called with Number argument return ToObject(number)'); + throw new Test262Error('#5: When the Object constructor is called with Number argument return ToObject(number)'); } diff --git a/test/built-ins/Object/S15.2.2.1_A6_T1.js b/test/built-ins/Object/S15.2.2.1_A6_T1.js index 23f73a818e..8e68d11934 100644 --- a/test/built-ins/Object/S15.2.2.1_A6_T1.js +++ b/test/built-ins/Object/S15.2.2.1_A6_T1.js @@ -13,15 +13,15 @@ var obj = new Object(1, 2, 3); //CHECK#1 if (obj.constructor !== Number) { - $ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); + throw new Test262Error('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } //CHECK#2 if (typeof obj !== "object") { - $ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); + throw new Test262Error('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } //CHECK#3 if ((obj != 1) || (obj === 1)) { - $ERROR('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); + throw new Test262Error('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } diff --git a/test/built-ins/Object/S15.2.2.1_A6_T2.js b/test/built-ins/Object/S15.2.2.1_A6_T2.js index 537ed6e546..f98242ba78 100644 --- a/test/built-ins/Object/S15.2.2.1_A6_T2.js +++ b/test/built-ins/Object/S15.2.2.1_A6_T2.js @@ -13,10 +13,10 @@ var obj = new Object(null, 2, 3); //CHECK#1 if (obj.constructor !== Object) { - $ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); + throw new Test262Error('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } //CHECK#2 if (typeof obj !== "object") { - $ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); + throw new Test262Error('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } diff --git a/test/built-ins/Object/S15.2.2.1_A6_T3.js b/test/built-ins/Object/S15.2.2.1_A6_T3.js index cee0898bae..8cf2e36893 100644 --- a/test/built-ins/Object/S15.2.2.1_A6_T3.js +++ b/test/built-ins/Object/S15.2.2.1_A6_T3.js @@ -13,15 +13,15 @@ var obj = new Object((null, 2, 3), 1, 2); //CHECK#1 if (obj.constructor !== Number) { - $ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); + throw new Test262Error('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } //CHECK#2 if (typeof obj !== "object") { - $ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); + throw new Test262Error('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } //CHECK#3 if ((obj != 3) || (obj === 3)) { - $ERROR('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); + throw new Test262Error('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } diff --git a/test/built-ins/Object/S15.2.3_A1.js b/test/built-ins/Object/S15.2.3_A1.js index 663f1eaaf1..d95164824e 100644 --- a/test/built-ins/Object/S15.2.3_A1.js +++ b/test/built-ins/Object/S15.2.3_A1.js @@ -8,5 +8,5 @@ description: Checking existence of the property "prototype" ---*/ if (!Object.hasOwnProperty("prototype")) { - $ERROR('#1: The Object constructor has the property "prototype"'); + throw new Test262Error('#1: The Object constructor has the property "prototype"'); } diff --git a/test/built-ins/Object/S15.2.3_A2.js b/test/built-ins/Object/S15.2.3_A2.js index 2e9ef05e91..b9ec98f0c9 100644 --- a/test/built-ins/Object/S15.2.3_A2.js +++ b/test/built-ins/Object/S15.2.3_A2.js @@ -11,5 +11,5 @@ description: Checking Function.prototype.isPrototypeOf(Object) // CHECK# if (!(Function.prototype.isPrototypeOf(Object))) { - $ERROR('#1: the value of the internal [[Prototype]] property of the Object constructor is the Function prototype object.'); + throw new Test262Error('#1: the value of the internal [[Prototype]] property of the Object constructor is the Function prototype object.'); } diff --git a/test/built-ins/Object/S15.2.3_A3.js b/test/built-ins/Object/S15.2.3_A3.js index cdff0f5ad4..cad0df324e 100644 --- a/test/built-ins/Object/S15.2.3_A3.js +++ b/test/built-ins/Object/S15.2.3_A3.js @@ -9,10 +9,10 @@ description: Checking Object.length //CHECK#1 if (!Object.hasOwnProperty("length")) { - $ERROR('#1: The Object constructor has the property "length"'); + throw new Test262Error('#1: The Object constructor has the property "length"'); } //CHECK#2 if (Object.length !== 1) { - $ERROR('#2: Object.length property value should be 1'); + throw new Test262Error('#2: Object.length property value should be 1'); } diff --git a/test/built-ins/Object/S15.2_A1.js b/test/built-ins/Object/S15.2_A1.js index b8bc45d87e..23f9686492 100644 --- a/test/built-ins/Object/S15.2_A1.js +++ b/test/built-ins/Object/S15.2_A1.js @@ -12,5 +12,5 @@ var obj = Object; var thisobj = this.Object; if (obj !== thisobj) { - $ERROR('Object is the property of global'); + throw new Test262Error('Object is the property of global'); } diff --git a/test/built-ins/Object/S9.9_A3.js b/test/built-ins/Object/S9.9_A3.js index b527535393..97956ab66a 100644 --- a/test/built-ins/Object/S9.9_A3.js +++ b/test/built-ins/Object/S9.9_A3.js @@ -11,30 +11,30 @@ description: Trying to convert from Boolean to Object // CHECK#1 if (Object(true).valueOf() !== true) { - $ERROR('#1: Object(true).valueOf() === true. Actual: ' + (Object(true).valueOf())); + throw new Test262Error('#1: Object(true).valueOf() === true. Actual: ' + (Object(true).valueOf())); } // CHECK#2 if (typeof Object(true) !== "object") { - $ERROR('#2: typeof Object(true) === "object". Actual: ' + (typeof Object(true))); + throw new Test262Error('#2: typeof Object(true) === "object". Actual: ' + (typeof Object(true))); } // CHECK#3 if (Object(true).constructor.prototype !== Boolean.prototype) { - $ERROR('#3: Object(true).constructor.prototype === Boolean.prototype. Actual: ' + (Object(true).constructor.prototype)); + throw new Test262Error('#3: Object(true).constructor.prototype === Boolean.prototype. Actual: ' + (Object(true).constructor.prototype)); } // CHECK#4 if (Object(false).valueOf() !== false) { - $ERROR('#4: Object(false).valueOf() === false. Actual: ' + (Object(false).valueOf())); + throw new Test262Error('#4: Object(false).valueOf() === false. Actual: ' + (Object(false).valueOf())); } // CHECK#5 if (typeof Object(false) !== "object") { - $ERROR('#5: typeof Object(false) === "object". Actual: ' + (typeof Object(false))); + throw new Test262Error('#5: typeof Object(false) === "object". Actual: ' + (typeof Object(false))); } // CHECK#6 if (Object(false).constructor.prototype !== Boolean.prototype) { - $ERROR('#6: Object(false).constructor.prototype === Boolean.prototype. Actual: ' + (Object(false).constructor.prototype)); + throw new Test262Error('#6: Object(false).constructor.prototype === Boolean.prototype. Actual: ' + (Object(false).constructor.prototype)); } diff --git a/test/built-ins/Object/S9.9_A4.js b/test/built-ins/Object/S9.9_A4.js index 7421de20ce..7fc29a7aaf 100644 --- a/test/built-ins/Object/S9.9_A4.js +++ b/test/built-ins/Object/S9.9_A4.js @@ -11,124 +11,124 @@ description: Converting from various numbers to Object // CHECK#1 if (Object(0).valueOf() !== 0) { - $ERROR('#1: Object(0).valueOf() === 0. Actual: ' + (Object(0).valueOf())); + throw new Test262Error('#1: Object(0).valueOf() === 0. Actual: ' + (Object(0).valueOf())); } // CHECK#2 if (typeof Object(0) !== "object") { - $ERROR('#2: typeof Object(0) === "object". Actual: ' + (typeof Object(0))); + throw new Test262Error('#2: typeof Object(0) === "object". Actual: ' + (typeof Object(0))); } // CHECK#3 if (Object(0).constructor.prototype !== Number.prototype) { - $ERROR('#3: Object(0).constructor.prototype === Number.prototype. Actual: ' + (Object(0).constructor.prototype)); + throw new Test262Error('#3: Object(0).constructor.prototype === Number.prototype. Actual: ' + (Object(0).constructor.prototype)); } // CHECK#4 if (Object(-0).valueOf() !== -0) { - $ERROR('#4.1: Object(-0).valueOf() === 0. Actual: ' + (Object(-0).valueOf())); + throw new Test262Error('#4.1: Object(-0).valueOf() === 0. Actual: ' + (Object(-0).valueOf())); } else if (1 / Object(-0).valueOf() !== Number.NEGATIVE_INFINITY) { - $ERROR('#4.2: Object(-0).valueOf() === -0. Actual: +0'); + throw new Test262Error('#4.2: Object(-0).valueOf() === -0. Actual: +0'); } // CHECK#5 if (typeof Object(-0) !== "object") { - $ERROR('#5: typeof Object(-0) === "object". Actual: ' + (typeof Object(-0))); + throw new Test262Error('#5: typeof Object(-0) === "object". Actual: ' + (typeof Object(-0))); } // CHECK#6 if (Object(-0).constructor.prototype !== Number.prototype) { - $ERROR('#6: Object(-0).constructor.prototype === Number.prototype. Actual: ' + (Object(-0).constructor.prototype)); + throw new Test262Error('#6: Object(-0).constructor.prototype === Number.prototype. Actual: ' + (Object(-0).constructor.prototype)); } // CHECK#7 if (Object(1).valueOf() !== 1) { - $ERROR('#7: Object(1).valueOf() === 1. Actual: ' + (Object(1).valueOf())); + throw new Test262Error('#7: Object(1).valueOf() === 1. Actual: ' + (Object(1).valueOf())); } // CHECK#8 if (typeof Object(1) !== "object") { - $ERROR('#8: typeof Object(1) === "object". Actual: ' + (typeof Object(1))); + throw new Test262Error('#8: typeof Object(1) === "object". Actual: ' + (typeof Object(1))); } // CHECK#9 if (Object(1).constructor.prototype !== Number.prototype) { - $ERROR('#9: Object(1).constructor.prototype === Number.prototype. Actual: ' + (Object(1).constructor.prototype)); + throw new Test262Error('#9: Object(1).constructor.prototype === Number.prototype. Actual: ' + (Object(1).constructor.prototype)); } // CHECK#10 if (Object(-1).valueOf() !== -1) { - $ERROR('#10: Object(-1).valueOf() === -1. Actual: ' + (Object(-1).valueOf())); + throw new Test262Error('#10: Object(-1).valueOf() === -1. Actual: ' + (Object(-1).valueOf())); } // CHECK#11 if (typeof Object(-1) !== "object") { - $ERROR('#11: typeof Object(-1) === "object". Actual: ' + (typeof Object(-1))); + throw new Test262Error('#11: typeof Object(-1) === "object". Actual: ' + (typeof Object(-1))); } // CHECK#12 if (Object(-1).constructor.prototype !== Number.prototype) { - $ERROR('#12: Object(-1).constructor.prototype === Number.prototype. Actual: ' + (Object(-1).constructor.prototype)); + throw new Test262Error('#12: Object(-1).constructor.prototype === Number.prototype. Actual: ' + (Object(-1).constructor.prototype)); } // CHECK#13 if (Object(Number.MIN_VALUE).valueOf() !== Number.MIN_VALUE) { - $ERROR('#13: Object(Number.MIN_VALUE).valueOf() === Number.MIN_VALUE. Actual: ' + (Object(Number.MIN_VALUE).valueOf())); + throw new Test262Error('#13: Object(Number.MIN_VALUE).valueOf() === Number.MIN_VALUE. Actual: ' + (Object(Number.MIN_VALUE).valueOf())); } // CHECK#14 if (typeof Object(Number.MIN_VALUE) !== "object") { - $ERROR('#14: typeof Object(Number.MIN_VALUE) === "object". Actual: ' + (typeof Object(Number.MIN_VALUE))); + throw new Test262Error('#14: typeof Object(Number.MIN_VALUE) === "object". Actual: ' + (typeof Object(Number.MIN_VALUE))); } // CHECK#15 if (Object(Number.MIN_VALUE).constructor.prototype !== Number.prototype) { - $ERROR('#15: Object(Number.MIN_VALUE).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.MIN_VALUE).constructor.prototype)); + throw new Test262Error('#15: Object(Number.MIN_VALUE).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.MIN_VALUE).constructor.prototype)); } // CHECK#16 if (Object(Number.MAX_VALUE).valueOf() !== Number.MAX_VALUE) { - $ERROR('#16: Object(Number.MAX_VALUE).valueOf() === Number.MAX_VALUE. Actual: ' + (Object(Number.MAX_VALUE).valueOf())); + throw new Test262Error('#16: Object(Number.MAX_VALUE).valueOf() === Number.MAX_VALUE. Actual: ' + (Object(Number.MAX_VALUE).valueOf())); } // CHECK#17 if (typeof Object(Number.MAX_VALUE) !== "object") { - $ERROR('#17: typeof Object(Number.MAX_VALUE) === "object". Actual: ' + (typeof Object(Number.MAX_VALUE))); + throw new Test262Error('#17: typeof Object(Number.MAX_VALUE) === "object". Actual: ' + (typeof Object(Number.MAX_VALUE))); } // CHECK#18 if (Object(Number.MAX_VALUE).constructor.prototype !== Number.prototype) { - $ERROR('#18: Object(Number.MAX_VALUE).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.MAX_VALUE).constructor.prototype)); + throw new Test262Error('#18: Object(Number.MAX_VALUE).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.MAX_VALUE).constructor.prototype)); } // CHECK#19 if (Object(Number.POSITIVE_INFINITY).valueOf() !== Number.POSITIVE_INFINITY) { - $ERROR('#19: Object(Number.POSITIVE_INFINITY).valueOf() === Number.POSITIVE_INFINITY. Actual: ' + (Object(Number.POSITIVE_INFINITY).valueOf())); + throw new Test262Error('#19: Object(Number.POSITIVE_INFINITY).valueOf() === Number.POSITIVE_INFINITY. Actual: ' + (Object(Number.POSITIVE_INFINITY).valueOf())); } // CHECK#20 if (typeof Object(Number.POSITIVE_INFINITY) !== "object") { - $ERROR('#20: typeof Object(Number.POSITIVE_INFINITY) === "object". Actual: ' + (typeof Object(Number.POSITIVE_INFINITY))); + throw new Test262Error('#20: typeof Object(Number.POSITIVE_INFINITY) === "object". Actual: ' + (typeof Object(Number.POSITIVE_INFINITY))); } // CHECK#21 if (Object(Number.POSITIVE_INFINITY).constructor.prototype !== Number.prototype) { - $ERROR('#21: Object(Number.POSITIVE_INFINITY).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.POSITIVE_INFINITY).constructor.prototype)); + throw new Test262Error('#21: Object(Number.POSITIVE_INFINITY).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.POSITIVE_INFINITY).constructor.prototype)); } // CHECK#22 if (Object(Number.NEGATIVE_INFINITY).valueOf() !== Number.NEGATIVE_INFINITY) { - $ERROR('#22: Object(Number.NEGATIVE_INFINITY).valueOf() === Number.NEGATIVE_INFINITY. Actual: ' + (Object(Number.NEGATIVE_INFINITY).valueOf())); + throw new Test262Error('#22: Object(Number.NEGATIVE_INFINITY).valueOf() === Number.NEGATIVE_INFINITY. Actual: ' + (Object(Number.NEGATIVE_INFINITY).valueOf())); } // CHECK#23 if (typeof Object(Number.NEGATIVE_INFINITY) !== "object") { - $ERROR('#23: typeof Object(Number.NEGATIVE_INFINITY) === "object". Actual: ' + (typeof Object(Number.NEGATIVE_INFINITY))); + throw new Test262Error('#23: typeof Object(Number.NEGATIVE_INFINITY) === "object". Actual: ' + (typeof Object(Number.NEGATIVE_INFINITY))); } // CHECK#24 if (Object(Number.NEGATIVE_INFINITY).constructor.prototype !== Number.prototype) { - $ERROR('#24: Object(Number.NEGATIVE_INFINITY).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.NEGATIVE_INFINITY).constructor.prototype)); + throw new Test262Error('#24: Object(Number.NEGATIVE_INFINITY).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.NEGATIVE_INFINITY).constructor.prototype)); } // CHECK#25 @@ -136,40 +136,40 @@ assert.sameValue(Object(NaN).valueOf(), NaN, "Object(NaN).valueOf()"); // CHECK#26 if (typeof Object(Number.NaN) !== "object") { - $ERROR('#26: typeof Object(Number.NaN) === "object". Actual: ' + (typeof Object(Number.NaN))); + throw new Test262Error('#26: typeof Object(Number.NaN) === "object". Actual: ' + (typeof Object(Number.NaN))); } // CHECK#27 if (Object(Number.NaN).constructor.prototype !== Number.prototype) { - $ERROR('#27: Object(Number.NaN).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.NaN).constructor.prototype)); + throw new Test262Error('#27: Object(Number.NaN).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.NaN).constructor.prototype)); } // CHECK#28 if (Object(1.2345).valueOf() !== 1.2345) { - $ERROR('#28: Object(1.2345).valueOf() === 1.2345. Actual: ' + (Object(1.2345).valueOf())); + throw new Test262Error('#28: Object(1.2345).valueOf() === 1.2345. Actual: ' + (Object(1.2345).valueOf())); } // CHECK#29 if (typeof Object(1.2345) !== "object") { - $ERROR('#29: typeof Object(1.2345) === "object". Actual: ' + (typeof Object(1.2345))); + throw new Test262Error('#29: typeof Object(1.2345) === "object". Actual: ' + (typeof Object(1.2345))); } // CHECK#30 if (Object(1.2345).constructor.prototype !== Number.prototype) { - $ERROR('#30: Object(1.2345).constructor.prototype === Number.prototype. Actual: ' + (Object(1.2345).constructor.prototype)); + throw new Test262Error('#30: Object(1.2345).constructor.prototype === Number.prototype. Actual: ' + (Object(1.2345).constructor.prototype)); } // CHECK#31 if (Object(-1.2345).valueOf() !== -1.2345) { - $ERROR('#31: Object(-1.2345).valueOf() === -1.2345. Actual: ' + (Object(-1.2345).valueOf())); + throw new Test262Error('#31: Object(-1.2345).valueOf() === -1.2345. Actual: ' + (Object(-1.2345).valueOf())); } // CHECK#32 if (typeof Object(-1.2345) !== "object") { - $ERROR('#32: typeof Object(-1.2345) === "object". Actual: ' + (typeof Object(-1.2345))); + throw new Test262Error('#32: typeof Object(-1.2345) === "object". Actual: ' + (typeof Object(-1.2345))); } // CHECK#33 if (Object(-1.2345).constructor.prototype !== Number.prototype) { - $ERROR('#33: Object(-1.2345).constructor.prototype === Number.prototype. Actual: ' + (Object(-1.2345).constructor.prototype)); + throw new Test262Error('#33: Object(-1.2345).constructor.prototype === Number.prototype. Actual: ' + (Object(-1.2345).constructor.prototype)); } diff --git a/test/built-ins/Object/S9.9_A5.js b/test/built-ins/Object/S9.9_A5.js index a303eafc9f..32c7744775 100644 --- a/test/built-ins/Object/S9.9_A5.js +++ b/test/built-ins/Object/S9.9_A5.js @@ -11,60 +11,60 @@ description: Converting from various strings to Object // CHECK#1 if (Object("some string").valueOf() !== "some string") { - $ERROR('#1: Object("some string").valueOf() === "some string". Actual: ' + (Object("some string").valueOf())); + throw new Test262Error('#1: Object("some string").valueOf() === "some string". Actual: ' + (Object("some string").valueOf())); } // CHECK#2 if (typeof Object("some string") !== "object") { - $ERROR('#2: typeof Object("some string") === "object". Actual: ' + (typeof Object("some string"))); + throw new Test262Error('#2: typeof Object("some string") === "object". Actual: ' + (typeof Object("some string"))); } // CHECK#3 if (Object("some string").constructor.prototype !== String.prototype) { - $ERROR('#3: Object("some string").constructor.prototype === String.prototype. Actual: ' + (Object("some string").constructor.prototype)); + throw new Test262Error('#3: Object("some string").constructor.prototype === String.prototype. Actual: ' + (Object("some string").constructor.prototype)); } // CHECK#4 if (Object("").valueOf() !== "") { - $ERROR('#4: Object("").valueOf() === false. Actual: ' + (Object("").valueOf())); + throw new Test262Error('#4: Object("").valueOf() === false. Actual: ' + (Object("").valueOf())); } // CHECK#5 if (typeof Object("") !== "object") { - $ERROR('#5: typeof Object("") === "object". Actual: ' + (typeof Object(""))); + throw new Test262Error('#5: typeof Object("") === "object". Actual: ' + (typeof Object(""))); } // CHECK#6 if (Object("").constructor.prototype !== String.prototype) { - $ERROR('#6: Object("").constructor.prototype === String.prototype. Actual: ' + (Object("").constructor.prototype)); + throw new Test262Error('#6: Object("").constructor.prototype === String.prototype. Actual: ' + (Object("").constructor.prototype)); } // CHECK#7 if (Object("\r\t\b\n\v\f").valueOf() !== "\r\t\b\n\v\f") { - $ERROR('#7: Object("\\r\\t\\b\\n\\v\\f").valueOf() === false. Actual: ' + (Object("\r\t\b\n\v\f").valueOf())); + throw new Test262Error('#7: Object("\\r\\t\\b\\n\\v\\f").valueOf() === false. Actual: ' + (Object("\r\t\b\n\v\f").valueOf())); } // CHECK#8 if (typeof Object("\r\t\b\n\v\f") !== "object") { - $ERROR('#8: typeof Object("\\r\\t\\b\\n\\v\\f") === "object". Actual: ' + (typeof Object("\r\t\b\n\v\f"))); + throw new Test262Error('#8: typeof Object("\\r\\t\\b\\n\\v\\f") === "object". Actual: ' + (typeof Object("\r\t\b\n\v\f"))); } // CHECK#9 if (Object("\r\t\b\n\v\f").constructor.prototype !== String.prototype) { - $ERROR('#9: Object("\\r\\t\\b\\n\\v\\f").constructor.prototype === String.prototype. Actual: ' + (Object("\r\t\b\n\v\f").constructor.prototype)); + throw new Test262Error('#9: Object("\\r\\t\\b\\n\\v\\f").constructor.prototype === String.prototype. Actual: ' + (Object("\r\t\b\n\v\f").constructor.prototype)); } // CHECK#10 if (Object(String(10)).valueOf() !== "10") { - $ERROR('#10: Object(String(10)).valueOf() === false. Actual: ' + (Object(String(10)).valueOf())); + throw new Test262Error('#10: Object(String(10)).valueOf() === false. Actual: ' + (Object(String(10)).valueOf())); } // CHECK#11 if (typeof Object(String(10)) !== "object") { - $ERROR('#11: typeof Object(String(10)) === "object". Actual: ' + (typeof Object(String(10)))); + throw new Test262Error('#11: typeof Object(String(10)) === "object". Actual: ' + (typeof Object(String(10)))); } // CHECK#12 if (Object(String(10)).constructor.prototype !== String.prototype) { - $ERROR('#12: Object(String(10)).constructor.prototype === String.prototype. Actual: ' + (Object(String(10)).constructor.prototype)); + throw new Test262Error('#12: Object(String(10)).constructor.prototype === String.prototype. Actual: ' + (Object(String(10)).constructor.prototype)); } diff --git a/test/built-ins/Object/S9.9_A6.js b/test/built-ins/Object/S9.9_A6.js index 566177e3ac..15bfe5b0dd 100644 --- a/test/built-ins/Object/S9.9_A6.js +++ b/test/built-ins/Object/S9.9_A6.js @@ -21,21 +21,21 @@ var y = Object(x); // CHECK#1 if (y.valueOf() !== x.valueOf()) { - $ERROR('#1: Object(obj).valueOf() === obj.valueOf(). Actual: ' + (Object(obj).valueOf())); + throw new Test262Error('#1: Object(obj).valueOf() === obj.valueOf(). Actual: ' + (Object(obj).valueOf())); } // CHECK#2 if (typeof y !== typeof x) { - $ERROR('#2: typeof Object(obj) === typeof obj. Actual: ' + (typeof Object(obj))); + throw new Test262Error('#2: typeof Object(obj) === typeof obj. Actual: ' + (typeof Object(obj))); } // CHECK#3 if (y.constructor.prototype !== x.constructor.prototype) { - $ERROR('#3: Object(obj).constructor.prototype === obj.constructor.prototype. Actual: ' + (Object(obj).constructor.prototype)); + throw new Test262Error('#3: Object(obj).constructor.prototype === obj.constructor.prototype. Actual: ' + (Object(obj).constructor.prototype)); } // CHECK#4 if (y !== x) { - $ERROR('#4: Object(obj) === obj'); + throw new Test262Error('#4: Object(obj) === obj'); } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-2-18.js b/test/built-ins/Object/defineProperties/15.2.3.7-2-18.js index 01f658dfec..0ee156d1d8 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-2-18.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-2-18.js @@ -25,7 +25,7 @@ try { Object.defineProperties(obj, this); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } result = true; } finally { diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-114-b.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-114-b.js index 3d5a76ff0a..1b69a370d5 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-114-b.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-114-b.js @@ -17,7 +17,7 @@ Object.defineProperties(arr, { }); if (arr.length !== 0) { - $ERROR("Expected arr.length to be 0, actually " + arr.length); + throw new Test262Error("Expected arr.length to be 0, actually " + arr.length); } verifyEqualTo(arr, "length", 0); diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-114.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-114.js index f696eab099..5e203a7b6a 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-114.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-114.js @@ -17,7 +17,7 @@ Object.defineProperties(arr, { }); if (arr.length !== 0) { - $ERROR("Expected arr.length to be 0, actually " + arr.length); + throw new Test262Error("Expected arr.length to be 0, actually " + arr.length); } arr.length = 2; diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-12.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-12.js index 62e92a46bc..1528a8698e 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-12.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-12.js @@ -24,7 +24,7 @@ try { configurable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(fun, "prop", 11); @@ -35,7 +35,7 @@ try { verifyNotConfigurable(fun, "prop"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-13.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-13.js index ea15dcbf4e..f0fcc73b50 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-13.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-13.js @@ -23,7 +23,7 @@ try { configurable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "prop", 11); @@ -34,7 +34,7 @@ try { verifyNotConfigurable(arr, "prop"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-14.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-14.js index a07faad547..624ae86535 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-14.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-14.js @@ -23,7 +23,7 @@ try { configurable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(str, "prop", 11); @@ -34,7 +34,7 @@ try { verifyNotConfigurable(str, "prop"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-15.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-15.js index 510ef8b41a..be64d29528 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-15.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-15.js @@ -24,7 +24,7 @@ try { configurable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "prop", 11); @@ -35,7 +35,7 @@ try { verifyNotConfigurable(obj, "prop"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-16.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-16.js index 61769efc52..085080bf97 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-16.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-16.js @@ -24,7 +24,7 @@ try { configurable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "prop", 11); @@ -35,7 +35,7 @@ try { verifyNotConfigurable(obj, "prop"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-164.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-164.js index af2cbd543b..eb4f1f84c3 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-164.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-164.js @@ -28,7 +28,7 @@ try { } }); - $ERROR("expected to throw TypeError") + throw new Test262Error("expected to throw TypeError") } catch (e) { assert(e instanceof TypeError); assert.sameValue(arr.length, 2); diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-176.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-176.js index 228c529c10..007c3758f5 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-176.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-176.js @@ -28,7 +28,7 @@ try { } }); - $ERROR("Expected to throw TypeError"); + throw new Test262Error("Expected to throw TypeError"); } catch (e) { assert(e instanceof TypeError); assert(arr.hasOwnProperty("1")); diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-18.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-18.js index fdba2202b2..6211c04805 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-18.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-18.js @@ -24,7 +24,7 @@ try { configurable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "prop", 11); @@ -35,7 +35,7 @@ try { verifyNotConfigurable(obj, "prop"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-19.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-19.js index 262f370b77..262c39b426 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-19.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-19.js @@ -24,7 +24,7 @@ try { configurable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "prop", 11); @@ -35,7 +35,7 @@ try { verifyNotConfigurable(obj, "prop"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-204.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-204.js index c120b0c916..4a00ccd71b 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-204.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-204.js @@ -28,7 +28,7 @@ Object.defineProperties(arr, { }); if (!Object.prototype.hasOwnProperty.call(arr, "0")) { - $ERROR("Expected hasOwnProperty to return true."); + throw new Test262Error("Expected hasOwnProperty to return true."); } arr[0] = 101; @@ -36,7 +36,7 @@ arr[0] = 101; verifyEqualTo(arr, 0, 101); if (arr.verifySetter !== 101) { - $ERROR('Expected arr.verifySetter === 101, actually ' + arr.verifySetter); + throw new Test262Error('Expected arr.verifySetter === 101, actually ' + arr.verifySetter); } verifyNotConfigurable(arr, 0); diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-21.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-21.js index f516ad3d05..56cf493bb8 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-21.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-21.js @@ -24,7 +24,7 @@ try { configurable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "prop", 11); @@ -35,7 +35,7 @@ try { verifyNotConfigurable(obj, "prop"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-213.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-213.js index 2050822962..a925936e72 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-213.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-213.js @@ -22,7 +22,7 @@ try { value: +0 } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "0", -0); @@ -33,7 +33,7 @@ try { verifyNotConfigurable(arr, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-214.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-214.js index 0492fc9891..b44d5b8ed3 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-214.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-214.js @@ -22,7 +22,7 @@ try { value: -0 } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "0", +0); @@ -33,7 +33,7 @@ try { verifyNotConfigurable(arr, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-227.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-227.js index 653550a213..4ba4881d5d 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-227.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-227.js @@ -36,7 +36,7 @@ try { verifyNotConfigurable(arr, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-228.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-228.js index a250ae9d82..792f72d878 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-228.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-228.js @@ -29,7 +29,7 @@ try { enumerable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "1", 3); @@ -40,7 +40,7 @@ try { verifyNotConfigurable(arr, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-229.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-229.js index af726bb472..1269a27715 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-229.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-229.js @@ -30,7 +30,7 @@ try { value: 13 } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arr, "1", "setVerifyHelpProp"); @@ -40,7 +40,7 @@ try { verifyNotConfigurable(arr, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-230.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-230.js index f736890864..ad7611baff 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-230.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-230.js @@ -25,7 +25,7 @@ try { set: function() {} } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "1", 3); @@ -36,7 +36,7 @@ try { verifyNotConfigurable(arr, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-233.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-233.js index 3980d3d268..32191889e1 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-233.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-233.js @@ -28,7 +28,7 @@ try { writable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "1", undefined); @@ -39,7 +39,7 @@ try { verifyNotConfigurable(arr, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-234.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-234.js index a9e97ed641..ceb0167227 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-234.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-234.js @@ -30,7 +30,7 @@ try { value: "abc" } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "1", 3); @@ -41,7 +41,7 @@ try { verifyNotConfigurable(arr, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-235.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-235.js index 6b05968e0d..61e29220e9 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-235.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-235.js @@ -24,7 +24,7 @@ try { value: -0 } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "1", +0); @@ -35,7 +35,7 @@ try { verifyNotConfigurable(arr, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-236.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-236.js index d8a49387c8..66139db54b 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-236.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-236.js @@ -25,7 +25,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "1", -0); @@ -36,7 +36,7 @@ try { verifyNotConfigurable(arr, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-237.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-237.js index b0d4a4ca9b..23ab2ffb3b 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-237.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-237.js @@ -26,7 +26,7 @@ try { value: 36 } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "1", 12); @@ -37,7 +37,7 @@ try { verifyNotConfigurable(arr, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-238.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-238.js index 2874c575ff..4a16a4df46 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-238.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-238.js @@ -25,7 +25,7 @@ try { value: "efgh" } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "1", "abcd"); @@ -36,7 +36,7 @@ try { verifyNotConfigurable(arr, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-239.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-239.js index 491f525f55..698cea70dd 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-239.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-239.js @@ -26,7 +26,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "1", true); @@ -37,7 +37,7 @@ try { verifyNotConfigurable(arr, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-240.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-240.js index 36c03a7689..c10e41ba8b 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-240.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-240.js @@ -32,7 +32,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "1", obj1); @@ -43,7 +43,7 @@ try { verifyNotConfigurable(arr, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-241.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-241.js index 74406da4a0..f2cde48b8b 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-241.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-241.js @@ -30,7 +30,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arr, "1", "setVerifyHelpProp"); @@ -39,7 +39,7 @@ try { verifyNotConfigurable(arr, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-242.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-242.js index 814abc3ece..1fe4e44ae7 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-242.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-242.js @@ -29,7 +29,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arr, "1", "setVerifyHelpProp"); @@ -38,7 +38,7 @@ try { verifyNotConfigurable(arr, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-244.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-244.js index 7d465cd8a0..90fff2b203 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-244.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-244.js @@ -32,7 +32,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "1", get_fun()); @@ -41,7 +41,7 @@ try { verifyNotConfigurable(arr, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-245.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-245.js index c4037f25de..fbc583fa37 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-245.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-245.js @@ -28,7 +28,7 @@ try { get: undefined } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "1", get_fun()); @@ -37,7 +37,7 @@ try { verifyNotConfigurable(arr, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-266.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-266.js index 886cbecff9..cbce8d5bf7 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-266.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-266.js @@ -31,5 +31,5 @@ verifyEnumerable(arr, "property"); verifyConfigurable(arr, "property"); if (arr.length !== 0) { - $ERROR('Expected arr.length === 0, actually ' + arr.length); + throw new Test262Error('Expected arr.length === 0, actually ' + arr.length); } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-267.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-267.js index 3a2ac372d4..f94f5f1a64 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-267.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-267.js @@ -38,5 +38,5 @@ verifyEnumerable(arr, "property"); verifyConfigurable(arr, "property"); if (arr.length !== 0) { - $ERROR('Expected arr.length === 0, actually ' + arr.length); + throw new Test262Error('Expected arr.length === 0, actually ' + arr.length); } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-269.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-269.js index 5a5f33fbb9..d30054d9b3 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-269.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-269.js @@ -30,5 +30,5 @@ verifyNotEnumerable(arr, "property"); verifyNotConfigurable(arr, "property"); if (arr.length !== 0) { - $ERROR('Expected arr.length === 0, actually ' + arr.length); + throw new Test262Error('Expected arr.length === 0, actually ' + arr.length); } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-270.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-270.js index 128bdf8be0..f2f485c782 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-270.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-270.js @@ -24,7 +24,7 @@ try { value: 36 } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "property", 12); @@ -35,7 +35,7 @@ try { verifyNotConfigurable(arr, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-271.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-271.js index 00e6605b9e..c741cfb05b 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-271.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-271.js @@ -24,7 +24,7 @@ try { writable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "property", undefined); @@ -35,7 +35,7 @@ try { verifyNotConfigurable(arr, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-272.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-272.js index deacff5007..ac12088789 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-272.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-272.js @@ -25,7 +25,7 @@ try { enumerable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "property", 12); @@ -36,7 +36,7 @@ try { verifyNotConfigurable(arr, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-273.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-273.js index c300e411d3..bbca771f61 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-273.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-273.js @@ -24,7 +24,7 @@ try { configurable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "property", 12); @@ -35,7 +35,7 @@ try { verifyNotConfigurable(arr, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-274.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-274.js index 8d1baaab96..f107fe0f7e 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-274.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-274.js @@ -33,7 +33,7 @@ try { } } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arr, "property", get_fun()); @@ -44,7 +44,7 @@ try { verifyNotConfigurable(arr, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-275.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-275.js index 1dbc7bb0f4..666ad88998 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-275.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-275.js @@ -35,7 +35,7 @@ try { verifyNotConfigurable(arr, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-276.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-276.js index 5da3d5c05e..52a568c740 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-276.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-276.js @@ -28,7 +28,7 @@ try { enumerable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arr, "property", "setVerifyHelpProp"); @@ -37,7 +37,7 @@ try { verifyNotConfigurable(arr, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-277.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-277.js index c77ec6b477..0f6ea49723 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-277.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-277.js @@ -28,7 +28,7 @@ try { configurable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arr, "property", "setVerifyHelpProp"); @@ -37,7 +37,7 @@ try { verifyNotConfigurable(arr, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-28.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-28.js index ec6f4a5876..cd9e4cab81 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-28.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-28.js @@ -21,9 +21,9 @@ Object.defineProperties(obj, { verifyNotWritable(obj, "prop"); if (!obj.hasOwnProperty("prop")) { - $ERROR('Expected obj.hasOwnProperty("prop") to be true, actually ' + obj.hasOwnProperty("prop")); + throw new Test262Error('Expected obj.hasOwnProperty("prop") to be true, actually ' + obj.hasOwnProperty("prop")); } if (obj.prop !== 1001) { - $ERROR('Expected obj.prop === 1001, actually ' + obj.prop); + throw new Test262Error('Expected obj.prop === 1001, actually ' + obj.prop); } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-282.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-282.js index 01c1bdf287..60fcebb7f0 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-282.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-282.js @@ -32,7 +32,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "0", 0); @@ -43,7 +43,7 @@ try { verifyNotConfigurable(arg, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-283.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-283.js index a00a24558f..1d732bd165 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-283.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-283.js @@ -33,7 +33,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "0", 0); @@ -44,7 +44,7 @@ try { verifyNotConfigurable(arg, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-284.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-284.js index b7401b4e2e..09dc8321c8 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-284.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-284.js @@ -33,7 +33,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "0", 0); @@ -44,7 +44,7 @@ try { verifyNotConfigurable(arg, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-285.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-285.js index 80f05bf0fc..9745ad05c2 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-285.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-285.js @@ -33,7 +33,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "0", 0); @@ -44,7 +44,7 @@ try { verifyNotConfigurable(arg, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-288.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-288.js index 0bcc9bc3e2..8e927ac411 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-288.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-288.js @@ -36,7 +36,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "0", get_func()); @@ -45,7 +45,7 @@ try { verifyNotConfigurable(arg, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-289.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-289.js index 42169d9c87..acff19c589 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-289.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-289.js @@ -36,7 +36,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "0", get_func()); @@ -45,7 +45,7 @@ try { verifyNotConfigurable(arg, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-294.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-294.js index 13b0269da1..6303b8d268 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-294.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-294.js @@ -32,7 +32,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "0", 0); @@ -43,7 +43,7 @@ try { verifyNotConfigurable(arg, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-295.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-295.js index 42dc477b56..cb23c9ca14 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-295.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-295.js @@ -33,7 +33,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "0", 0); @@ -44,7 +44,7 @@ try { verifyNotConfigurable(arg, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-296.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-296.js index 7be2e646ee..315f1d04b8 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-296.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-296.js @@ -33,7 +33,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "0", 0); @@ -44,7 +44,7 @@ try { verifyNotConfigurable(arg, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-297.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-297.js index e59a4f51bc..c457452922 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-297.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-297.js @@ -33,7 +33,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "0", 0); @@ -44,7 +44,7 @@ try { verifyNotConfigurable(arg, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-298.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-298.js index 5247a1c023..e22e4d2d8d 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-298.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-298.js @@ -38,7 +38,7 @@ try { get: get_func2 } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "0", get_func1()); @@ -47,7 +47,7 @@ try { verifyNotConfigurable(arg, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-299.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-299.js index f8483571d3..92269ed324 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-299.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-299.js @@ -39,7 +39,7 @@ try { set: set_func } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "0", get_func()); @@ -48,7 +48,7 @@ try { verifyNotConfigurable(arg, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-30.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-30.js index 56f43b86f6..7684d352e2 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-30.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-30.js @@ -22,9 +22,9 @@ Object.defineProperties(obj, { verifyNotConfigurable(obj, "prop"); if (!obj.hasOwnProperty("prop")) { - $ERROR('Expected obj.hasOwnProperty("prop") to be true, actually ' + obj.hasOwnProperty("prop")); + throw new Test262Error('Expected obj.hasOwnProperty("prop") to be true, actually ' + obj.hasOwnProperty("prop")); } if (obj.prop !== 1001) { - $ERROR('Expected obj.prop === 1001, actually ' + obj.prop); + throw new Test262Error('Expected obj.prop === 1001, actually ' + obj.prop); } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-300.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-300.js index 1042edc13b..236d48c3af 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-300.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-300.js @@ -35,7 +35,7 @@ try { enumerable: false } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "0", get_func()); @@ -44,7 +44,7 @@ try { verifyNotConfigurable(arg, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-301.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-301.js index 686311e13c..14a7e84966 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-301.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-301.js @@ -35,7 +35,7 @@ try { configurable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "0", get_func()); @@ -44,7 +44,7 @@ try { verifyNotConfigurable(arg, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-306.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-306.js index 14968edc0a..bf7b3bd55c 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-306.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-306.js @@ -28,7 +28,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "genericProperty", 1001); @@ -39,7 +39,7 @@ try { verifyNotConfigurable(arg, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-307.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-307.js index f4309ee3ad..0a484a6122 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-307.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-307.js @@ -27,7 +27,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "genericProperty", undefined); @@ -38,7 +38,7 @@ try { verifyNotConfigurable(arg, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-308.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-308.js index 6052175b1a..ea3ac1cd98 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-308.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-308.js @@ -27,7 +27,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "genericProperty", undefined); @@ -38,7 +38,7 @@ try { verifyNotConfigurable(arg, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-309.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-309.js index 2ec2e38b73..d53d9cccf8 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-309.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-309.js @@ -26,7 +26,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "genericProperty", undefined); @@ -37,7 +37,7 @@ try { verifyNotConfigurable(arg, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-310.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-310.js index 6c252eac44..27a6b2a157 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-310.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-310.js @@ -37,7 +37,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arg, "genericProperty", getFun()); @@ -48,7 +48,7 @@ try { verifyNotConfigurable(arg, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-311.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-311.js index eacfb495e1..cdc89b7747 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-311.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-311.js @@ -32,7 +32,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arg, "genericProperty", "genericPropertyString"); @@ -41,7 +41,7 @@ try { verifyNotConfigurable(arg, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-312.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-312.js index 331f6565f2..9f9ed9ba94 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-312.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-312.js @@ -31,7 +31,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arg, "genericProperty", "genericPropertyString"); @@ -40,7 +40,7 @@ try { verifyNotConfigurable(arg, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-313.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-313.js index 17291265a7..d305aff7af 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-313.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-313.js @@ -30,7 +30,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arg, "genericProperty", "genericPropertyString"); @@ -39,7 +39,7 @@ try { verifyNotConfigurable(arg, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-45.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-45.js index bda21bfe23..f39be696be 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-45.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-45.js @@ -23,7 +23,7 @@ try { value: +0 } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", -0); @@ -34,7 +34,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-46.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-46.js index 1a7348c643..e262de7bad 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-46.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-46.js @@ -23,7 +23,7 @@ try { value: -0 } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", +0); @@ -34,7 +34,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-5.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-5.js index 6159e5341f..9953e89c6b 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-5.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-5.js @@ -27,7 +27,7 @@ try { configurable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "prop", getFunc()); @@ -36,7 +36,7 @@ try { verifyNotConfigurable(obj, "prop"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-65.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-65.js index 96f9243e64..fa9eb71198 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-65.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-65.js @@ -23,7 +23,7 @@ try { configurable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", 10); @@ -34,7 +34,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-66-1.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-66-1.js index 1295aa86f5..a26b0fd573 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-66-1.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-66-1.js @@ -25,7 +25,7 @@ try { enumerable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", 10); @@ -36,7 +36,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-66.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-66.js index 7029437054..35b451e5e1 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-66.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-66.js @@ -25,7 +25,7 @@ try { enumerable: false } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", 10); @@ -36,7 +36,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-67.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-67.js index 94d360b5e0..9acb0e6a9e 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-67.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-67.js @@ -28,7 +28,7 @@ try { } }); - $ERROR("Expected TypeError"); + throw new Test262Error("Expected TypeError"); } catch (e) { assert(e instanceof TypeError); verifyNotEnumerable(obj, "foo"); diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-68.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-68.js index 8a5b27f21b..e6be1b6ed4 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-68.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-68.js @@ -28,7 +28,7 @@ try { get: get_func } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", 10); @@ -39,7 +39,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-71.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-71.js index 4b1fa51835..e08154b335 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-71.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-71.js @@ -25,7 +25,7 @@ try { writable: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", 10); @@ -36,7 +36,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-72.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-72.js index 45b00d5b29..215e5ac51e 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-72.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-72.js @@ -26,7 +26,7 @@ try { value: 20 } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", 10); @@ -37,7 +37,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-76.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-76.js index 9bc65e0567..985c00c0d2 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-76.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-76.js @@ -25,7 +25,7 @@ try { value: +0 } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", -0); @@ -36,7 +36,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-77.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-77.js index bdda83d93f..99b179f557 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-77.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-77.js @@ -25,7 +25,7 @@ try { value: -0 } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", +0); @@ -36,7 +36,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-79.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-79.js index e364fa6038..31a2cc9a09 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-79.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-79.js @@ -25,7 +25,7 @@ try { value: 20 } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", 10); @@ -36,7 +36,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-81.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-81.js index 99a88342da..e1a84a03e7 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-81.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-81.js @@ -25,7 +25,7 @@ try { value: "defg" } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", "abcd"); @@ -36,7 +36,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-83.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-83.js index 6288ea2b3c..3f063fccbd 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-83.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-83.js @@ -25,7 +25,7 @@ try { value: true } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", false); @@ -36,7 +36,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-85.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-85.js index 9ff21468b2..2d3149c789 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-85.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-85.js @@ -33,7 +33,7 @@ try { value: obj2 } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", obj1); @@ -44,7 +44,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-86-1.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-86-1.js index 120d7ecce6..2a29e46e44 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-86-1.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-86-1.js @@ -41,7 +41,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-87.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-87.js index 13dbde09c8..fca6320e52 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-87.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-87.js @@ -30,7 +30,7 @@ try { set: set_func2 } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(obj, "foo", "setVerifyHelpProp"); @@ -39,7 +39,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-88.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-88.js index bc961e8ffa..1844e92d61 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-88.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-88.js @@ -32,7 +32,7 @@ try { set: set_Func } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyNotEnumerable(obj, "foo"); @@ -40,12 +40,12 @@ try { var desc = Object.getOwnPropertyDescriptor(obj, "foo"); if (typeof(desc.set) !== "undefined") { - $ERROR('Expected typeof (desc.set) === "undefined", actually ' + typeof(desc.set)); + throw new Test262Error('Expected typeof (desc.set) === "undefined", actually ' + typeof(desc.set)); } if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-89.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-89.js index 0c2d713de0..4610c88e66 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-89.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-89.js @@ -37,5 +37,5 @@ verifyNotConfigurable(obj, "foo"); var desc = Object.getOwnPropertyDescriptor(obj, "foo"); if (typeof(desc.set) !== "undefined") { - $ERROR('Expected typeof (desc.set) === "undefined", actually ' + typeof(desc.set)); + throw new Test262Error('Expected typeof (desc.set) === "undefined", actually ' + typeof(desc.set)); } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-91.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-91.js index ec80c007b3..a7d84ae0cf 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-91.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-91.js @@ -38,7 +38,7 @@ try { get: get_func2 } }); - $ERROR("Expected an exception"); + throw new Test262Error("Expected an exception"); } catch (e) { verifyEqualTo(obj, "foo", get_func1()); @@ -49,7 +49,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-92.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-92.js index 2af77cd282..882fb4a1ff 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-92.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-92.js @@ -34,7 +34,7 @@ try { get: get_func } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(obj, "foo", "setVerifyHelpProp"); @@ -43,7 +43,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-93-1.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-93-1.js index 2b77c05dba..d235be5f5d 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-93-1.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-93-1.js @@ -36,7 +36,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "property", 1002); @@ -54,7 +54,7 @@ try { verifyNotConfigurable(obj, "property1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-93-2.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-93-2.js index ccab6d7e8e..8f20c0ff53 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-93-2.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-93-2.js @@ -36,7 +36,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "0", 1002); @@ -54,7 +54,7 @@ try { verifyNotConfigurable(obj, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-93-3.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-93-3.js index 040fd17b3f..ee208d1d53 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-93-3.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-93-3.js @@ -35,7 +35,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "property", 1001); @@ -54,7 +54,7 @@ try { verifyConfigurable(obj, "property1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-93-4.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-93-4.js index 3f871066b1..881fec60d1 100644 --- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-93-4.js +++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-93-4.js @@ -35,7 +35,7 @@ try { } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "0", 1001); @@ -53,7 +53,7 @@ try { verifyConfigurable(obj, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-190.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-190.js index 098e05861c..41014a62f7 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-190.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-190.js @@ -22,7 +22,7 @@ try { Object.defineProperty(arrObj, 0, { configurable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "0", "ownDataProperty"); @@ -33,6 +33,6 @@ try { verifyNotConfigurable(arrObj, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-191.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-191.js index 1b4fb59bdd..419e994283 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-191.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-191.js @@ -22,13 +22,13 @@ try { }); if (!arrObj.hasOwnProperty("0")) { - $ERROR("Expected arrObj.hasOwnProperty('0') === true, actually " + arrObj.hasOwnProperty("0")); + throw new Test262Error("Expected arrObj.hasOwnProperty('0') === true, actually " + arrObj.hasOwnProperty("0")); } if (Array.prototype[0] !== 11) { - $ERROR("Expected Array.prototype[0] === 11), actually " + Array.prototype[0]); + throw new Test262Error("Expected Array.prototype[0] === 11), actually " + Array.prototype[0]); } if (typeof arrObj[0] !== "undefined") { - $ERROR("Expected typeof arrObj[0] === 'undefined'), actually " + typeof arrObj[0]); + throw new Test262Error("Expected typeof arrObj[0] === 'undefined'), actually " + typeof arrObj[0]); } } finally { diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-194.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-194.js index 990f8f92bc..2bbd215e26 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-194.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-194.js @@ -25,7 +25,7 @@ try { Object.defineProperty(arrObj, "0", { configurable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "0", getFunc()); @@ -34,7 +34,7 @@ try { verifyNotConfigurable(arrObj, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e.name); + throw new Test262Error("Expected TypeError, got " + e.name); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-214.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-214.js index eacdbcdc47..be41ec4109 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-214.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-214.js @@ -24,7 +24,7 @@ try { Object.defineProperty(arrObj, "0", { value: "abc" }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "0", 101); @@ -35,7 +35,7 @@ try { verifyNotConfigurable(arrObj, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-218.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-218.js index c81c6c0555..346045a403 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-218.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-218.js @@ -21,7 +21,7 @@ try { Object.defineProperty(arrObj, "0", { value: +0 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "0", -0); @@ -32,7 +32,7 @@ try { verifyNotConfigurable(arrObj, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-219.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-219.js index d2f045ce58..28624b02f9 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-219.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-219.js @@ -21,7 +21,7 @@ try { Object.defineProperty(arrObj, "0", { value: -0 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "0", +0); @@ -32,7 +32,7 @@ try { verifyNotConfigurable(arrObj, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-221.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-221.js index d2a4ae6adb..3bc3554501 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-221.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-221.js @@ -23,7 +23,7 @@ try { Object.defineProperty(arrObj, "0", { value: 123 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "0", 101); @@ -34,7 +34,7 @@ try { verifyNotConfigurable(arrObj, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-223.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-223.js index 03029236f2..2fd286ba29 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-223.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-223.js @@ -23,7 +23,7 @@ try { Object.defineProperty(arrObj, "0", { value: "fghj" }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "0", "abcd"); @@ -34,7 +34,7 @@ try { verifyNotConfigurable(arrObj, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-225.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-225.js index c2da23fe64..f988e61f52 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-225.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-225.js @@ -23,7 +23,7 @@ try { Object.defineProperty(arrObj, "0", { value: false }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "0", true); @@ -34,7 +34,7 @@ try { verifyNotConfigurable(arrObj, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-227.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-227.js index 7eabcaaad3..5acc07bb1c 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-227.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-227.js @@ -30,7 +30,7 @@ try { Object.defineProperty(arrObj, "0", { value: obj2 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "0", obj1); @@ -41,7 +41,7 @@ try { verifyNotConfigurable(arrObj, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-238.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-238.js index bbcac3d555..c68c3e635d 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-238.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-238.js @@ -26,7 +26,7 @@ try { writable: true, configurable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "1", 3); @@ -38,7 +38,7 @@ try { verifyNotConfigurable(arrObj, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-239.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-239.js index 0863f52f55..7421b5a81b 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-239.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-239.js @@ -28,7 +28,7 @@ try { writable: true, enumerable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "1", 3); @@ -40,7 +40,7 @@ try { verifyNotConfigurable(arrObj, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-240.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-240.js index 4b6b824e86..ffd8f4db3e 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-240.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-240.js @@ -27,7 +27,7 @@ try { Object.defineProperty(arrObj, "1", { value: 13 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arrObj, "1", "setVerifyHelpProp"); @@ -37,7 +37,7 @@ try { verifyNotConfigurable(arrObj, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-241.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-241.js index 1cad6cfc8c..4b2b67198f 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-241.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-241.js @@ -23,7 +23,7 @@ try { Object.defineProperty(arrObj, "1", { set: function() {} }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "1", 3); @@ -35,7 +35,7 @@ try { verifyNotConfigurable(arrObj, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-244.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-244.js index 71a507f315..d00495689a 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-244.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-244.js @@ -26,7 +26,7 @@ try { Object.defineProperty(arrObj, "1", { writable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "1", undefined); @@ -38,7 +38,7 @@ try { verifyNotConfigurable(arrObj, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-245.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-245.js index 9684f81e73..a6135654e3 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-245.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-245.js @@ -27,7 +27,7 @@ try { Object.defineProperty(arrObj, "1", { value: "abc" }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "1", 3); @@ -38,7 +38,7 @@ try { verifyNotConfigurable(arrObj, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-246.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-246.js index caefee79ce..a9108891fd 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-246.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-246.js @@ -25,7 +25,7 @@ try { Object.defineProperty(arrObj, "1", { value: +0 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "1", -0); @@ -36,7 +36,7 @@ try { verifyNotConfigurable(arrObj, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-247.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-247.js index 0bec019134..15c3378d42 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-247.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-247.js @@ -25,7 +25,7 @@ try { Object.defineProperty(arrObj, "1", { value: -0 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "1", +0); @@ -36,7 +36,7 @@ try { verifyNotConfigurable(arrObj, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-248.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-248.js index 8467c4e603..cb168bfe8f 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-248.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-248.js @@ -24,7 +24,7 @@ try { Object.defineProperty(arrObj, "1", { value: 15 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "1", 12); @@ -35,7 +35,7 @@ try { verifyNotConfigurable(arrObj, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-249.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-249.js index 5987bb6575..a5c3fbeacd 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-249.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-249.js @@ -24,7 +24,7 @@ try { Object.defineProperty(arrObj, "1", { value: "fgh" }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "1", "abc"); @@ -35,7 +35,7 @@ try { verifyNotConfigurable(arrObj, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-250.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-250.js index 607e0d752b..e3aed4b274 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-250.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-250.js @@ -24,7 +24,7 @@ try { Object.defineProperty(arrObj, "1", { value: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "1", false); @@ -35,7 +35,7 @@ try { verifyNotConfigurable(arrObj, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-251.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-251.js index 23fdaab4c7..0524d0a4e9 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-251.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-251.js @@ -27,7 +27,7 @@ try { Object.defineProperty(arrObj, "1", { value: {} }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "1", obj); @@ -38,7 +38,7 @@ try { verifyNotConfigurable(arrObj, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-252.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-252.js index 4d9f341fe6..354a5bbcbf 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-252.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-252.js @@ -27,7 +27,7 @@ try { Object.defineProperty(arrObj, "1", { set: function() {} }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arrObj, "1", "setVerifyHelpProp"); @@ -37,7 +37,7 @@ try { verifyNotConfigurable(arrObj, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-253.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-253.js index 3885a37c5e..bc278d21eb 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-253.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-253.js @@ -28,7 +28,7 @@ try { Object.defineProperty(arrObj, "1", { set: function() {} }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "1", getFunc()); @@ -37,7 +37,7 @@ try { verifyNotConfigurable(arrObj, "1"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-255.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-255.js index 054edeca85..2ea48e0801 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-255.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-255.js @@ -30,7 +30,7 @@ try { } }); - $ERROR("Expected TypeError"); + throw new Test262Error("Expected TypeError"); } catch (e) { assert(e instanceof TypeError); assert(arrObj.hasOwnProperty("1")); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-256.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-256.js index 5082b79ff3..65eaf21ef6 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-256.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-256.js @@ -27,7 +27,7 @@ try { Object.defineProperty(arrObj, "1", { get: undefined }); - $ERROR("Expected TypeError"); + throw new Test262Error("Expected TypeError"); } catch (e) { assert(e instanceof TypeError); assert(arrObj.hasOwnProperty("1")); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-281.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-281.js index e222043de1..7e6fd7e763 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-281.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-281.js @@ -21,7 +21,7 @@ try { Object.defineProperty(arrObj, "property", { value: 36 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "property", 12); @@ -32,7 +32,7 @@ try { verifyNotConfigurable(arrObj, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-282.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-282.js index 4aaa7cc070..fc13067f13 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-282.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-282.js @@ -21,7 +21,7 @@ try { Object.defineProperty(arrObj, "property", { writable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "property", undefined); @@ -32,7 +32,7 @@ try { verifyNotConfigurable(arrObj, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-283.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-283.js index f86d1ce0e6..dc04dd3c51 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-283.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-283.js @@ -21,7 +21,7 @@ try { Object.defineProperty(arrObj, "property", { enumerable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "property", 12); @@ -32,7 +32,7 @@ try { verifyNotConfigurable(arrObj, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-284.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-284.js index 1ef365e86e..9fbead3859 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-284.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-284.js @@ -21,7 +21,7 @@ try { Object.defineProperty(arrObj, "property", { configurable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "property", 12); @@ -32,7 +32,7 @@ try { verifyNotConfigurable(arrObj, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-285.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-285.js index 1de36f3b1f..b3c187de14 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-285.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-285.js @@ -31,7 +31,7 @@ try { return 36; } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arrObj, "property", getFunc()); @@ -42,7 +42,7 @@ try { verifyNotConfigurable(arrObj, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-286.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-286.js index 5299882040..ed8430424f 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-286.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-286.js @@ -24,7 +24,7 @@ try { Object.defineProperty(arrObj, "property", { set: function() {} }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arrObj, "property", "setVerifyHelpProp"); @@ -33,7 +33,7 @@ try { verifyNotConfigurable(arrObj, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-287.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-287.js index 354519f6b9..34f2595375 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-287.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-287.js @@ -25,7 +25,7 @@ try { Object.defineProperty(arrObj, "property", { enumerable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arrObj, "property", "setVerifyHelpProp"); @@ -34,7 +34,7 @@ try { verifyNotConfigurable(arrObj, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-288.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-288.js index a0290cf044..e196cf7581 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-288.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-288.js @@ -25,7 +25,7 @@ try { Object.defineProperty(arrObj, "property", { configurable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arrObj, "property", "setVerifyHelpProp"); @@ -34,7 +34,7 @@ try { verifyNotConfigurable(arrObj, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-289-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-289-1.js index d4e64bd889..5062611af0 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-289-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-289-1.js @@ -25,7 +25,7 @@ includes: [propertyHelper.js] }); if (a !== 0) { - $ERROR("Expected a === 0, actually " + a); + throw new Test262Error("Expected a === 0, actually " + a); } verifyEqualTo(arguments, "0", 10); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-290-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-290-1.js index 0cd20ff34a..99ff4e802c 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-290-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-290-1.js @@ -30,7 +30,7 @@ includes: [propertyHelper.js] configurable: true }); if (a !== 0) { - $ERROR('Expected a === 0, actually ' + a); + throw new Test262Error('Expected a === 0, actually ' + a); } verifyEqualTo(arguments, "0", getFunc()); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-291-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-291-1.js index 4b75da8ade..0bf6c88e69 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-291-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-291-1.js @@ -31,7 +31,7 @@ includes: [propertyHelper.js] configurable: false }); if (a !== 0) { - $ERROR('Expected a === 0, actually ' + a); + throw new Test262Error('Expected a === 0, actually ' + a); } verifyEqualTo(arguments, "0", getFunc2()); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-292-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-292-1.js index 9c20ee4590..c4760e5ca9 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-292-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-292-1.js @@ -22,7 +22,7 @@ flags: [noStrict] }); if (a !== 20) { - $ERROR('Expected a === 20, actually ' + a); + throw new Test262Error('Expected a === 20, actually ' + a); } verifyEqualTo(arguments, "0", 20); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-292-2.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-292-2.js index 1e9fec466f..c5c6b371ad 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-292-2.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-292-2.js @@ -22,7 +22,7 @@ flags: [onlyStrict] }); if (a !== 0) { - $ERROR('Expected a === 0, actually ' + a); + throw new Test262Error('Expected a === 0, actually ' + a); } verifyEqualTo(arguments, "0", 20); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-293-2.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-293-2.js index 10e87a7fbb..98eb9586b7 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-293-2.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-293-2.js @@ -25,12 +25,12 @@ flags: [noStrict] Object.defineProperty(arguments, "0", { value: 20 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } verifyEqualTo(arguments, "0", 10); @@ -42,7 +42,7 @@ flags: [noStrict] verifyNotConfigurable(arguments, "0"); if (a !== 10) { - $ERROR('Expected "a === 10", actually ' + a); + throw new Test262Error('Expected "a === 10", actually ' + a); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-293-3.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-293-3.js index 9ba1c6d058..79a71fed67 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-293-3.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-293-3.js @@ -23,7 +23,7 @@ flags: [noStrict] value: 20 }); if (a !== 10) { - $ERROR('Expected "a === 10", actually ' + a); + throw new Test262Error('Expected "a === 10", actually ' + a); } verifyEqualTo(arguments, "0", 20); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-293-4.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-293-4.js index 384e59654f..4d8158fa2a 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-293-4.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-293-4.js @@ -23,7 +23,7 @@ flags: [onlyStrict] value: 20 }); if (a !== 0) { - $ERROR('Expected "a === 0", actually ' + a); + throw new Test262Error('Expected "a === 0", actually ' + a); } verifyEqualTo(arguments, "0", 20); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-293.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-293.js index 4f42459319..25dae83a37 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-293.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-293.js @@ -23,7 +23,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { value: 20 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "0", 10); @@ -34,7 +34,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-294-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-294-1.js index 7ece96050d..4b40ae8e88 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-294-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-294-1.js @@ -25,11 +25,11 @@ flags: [noStrict] Object.defineProperty(arguments, "0", { writable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } verifyEqualTo(arguments, "0", 10); @@ -41,7 +41,7 @@ flags: [noStrict] verifyNotConfigurable(arguments, "0"); if (a !== 10) { - $ERROR('Expected "a === 10", actually ' + a); + throw new Test262Error('Expected "a === 10", actually ' + a); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-294.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-294.js index 33567f4004..b6dc716f20 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-294.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-294.js @@ -22,7 +22,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { writable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "0", 10); @@ -33,7 +33,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-295-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-295-1.js index c430603b43..7e5b60dd1a 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-295-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-295-1.js @@ -26,10 +26,10 @@ flags: [noStrict] Object.defineProperty(arguments, "0", { enumerable: false }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } verifyEqualTo(arguments, "0", 10); @@ -41,7 +41,7 @@ flags: [noStrict] verifyNotConfigurable(arguments, "0"); if (a !== 10) { - $ERROR('Expected "a === 10", actually ' + a); + throw new Test262Error('Expected "a === 10", actually ' + a); } } }(0, 1, 2)); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-295.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-295.js index 1aec126bbe..c84bf1ed89 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-295.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-295.js @@ -22,7 +22,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { enumerable: false }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "0", 10); @@ -33,7 +33,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-296-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-296-1.js index 6c092c6ee4..dd632b8672 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-296-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-296-1.js @@ -25,10 +25,10 @@ flags: [noStrict] Object.defineProperty(arguments, "0", { configurable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } verifyEqualTo(arguments, "0", 10); @@ -40,7 +40,7 @@ flags: [noStrict] verifyNotConfigurable(arguments, "0"); if (a !== 10) { - $ERROR('Expected "a === 10", actually ' + a); + throw new Test262Error('Expected "a === 10", actually ' + a); } } }(0, 1, 2)); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-296.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-296.js index 6791a73d72..e6295ca2b1 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-296.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-296.js @@ -22,7 +22,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { configurable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "0", 10); @@ -33,7 +33,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-297-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-297-1.js index 184c9a58ce..6f6b5b0d9e 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-297-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-297-1.js @@ -30,10 +30,10 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { get: getFunc2 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { if (a !== 0) { - $ERROR('Expected a === 0, actually ' + a); + throw new Test262Error('Expected a === 0, actually ' + a); } verifyEqualTo(arguments, "0", getFunc1()); @@ -43,7 +43,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-297.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-297.js index 974e8ecdbb..402c570c5e 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-297.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-297.js @@ -28,7 +28,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { get: getFunc2 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "0", getFunc1()); @@ -37,7 +37,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-298-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-298-1.js index 0b2827750e..30dd1f884f 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-298-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-298-1.js @@ -31,10 +31,10 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { set: setFunc }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { if (a !== 0) { - $ERROR('Expected a === 0, actually ' + a); + throw new Test262Error('Expected a === 0, actually ' + a); } verifyEqualTo(arguments, "0", getFunc()); @@ -44,7 +44,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-298.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-298.js index 14ac5ab6af..5bb323da6a 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-298.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-298.js @@ -29,7 +29,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { set: setFunc }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "0", getFunc()); @@ -38,7 +38,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-299-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-299-1.js index 671be86441..00d3eeff30 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-299-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-299-1.js @@ -26,10 +26,10 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { enumerable: false }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { if (a !== 0) { - $ERROR('Expected a === 0, actually ' + a); + throw new Test262Error('Expected a === 0, actually ' + a); } verifyEqualTo(arguments, "0", getFunc()); @@ -38,7 +38,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-299.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-299.js index 38c23592e7..9ef1eea060 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-299.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-299.js @@ -24,7 +24,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { enumerable: false }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "0", getFunc()); @@ -33,7 +33,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-300-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-300-1.js index 04174e0bce..a2e8fbb3e4 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-300-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-300-1.js @@ -26,10 +26,10 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { configurable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { if (a !== 0) { - $ERROR('Expected a === 0, actually ' + a); + throw new Test262Error('Expected a === 0, actually ' + a); } verifyEqualTo(arguments, "0", getFunc()); @@ -38,7 +38,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-300.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-300.js index 89f3607be8..094ebaf8ae 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-300.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-300.js @@ -24,7 +24,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { configurable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "0", getFunc()); @@ -33,7 +33,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-301-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-301-1.js index 68f714814f..34ee4e9274 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-301-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-301-1.js @@ -21,7 +21,7 @@ includes: [propertyHelper.js] configurable: false }); if (a !== 0) { - $ERROR("Expected a === 0, actually " + a); + throw new Test262Error("Expected a === 0, actually " + a); } verifyEqualTo(arguments, "0", 10); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-302-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-302-1.js index 2abc9a5ca2..fe96b1e9a4 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-302-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-302-1.js @@ -30,7 +30,7 @@ includes: [propertyHelper.js] configurable: false }); if (a !== 0) { - $ERROR('Expected a === 0, actually ' + a); + throw new Test262Error('Expected a === 0, actually ' + a); } verifyEqualTo(arguments, "0", getFunc()); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-305.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-305.js index e02038bfa1..f0ed749b85 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-305.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-305.js @@ -23,7 +23,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { value: 10 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "0", 0); @@ -34,7 +34,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-306.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-306.js index 5cd489d478..1ea0cc7311 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-306.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-306.js @@ -23,7 +23,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { writable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "0", 0); @@ -34,7 +34,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-307.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-307.js index 043ae972ff..7269014ff7 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-307.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-307.js @@ -23,7 +23,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { enumerable: false }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "0", 0); @@ -34,7 +34,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-308.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-308.js index 33aff6bdbb..04e0737d50 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-308.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-308.js @@ -23,7 +23,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { configurable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "0", 0); @@ -34,7 +34,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-309.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-309.js index f35c9908c1..f98793d004 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-309.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-309.js @@ -29,7 +29,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { get: getFunc2 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "0", getFunc1()); @@ -38,7 +38,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-310.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-310.js index 69301af5fa..8b72ae3ed3 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-310.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-310.js @@ -30,7 +30,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { set: setFunc }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "0", getFunc()); @@ -39,7 +39,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-311.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-311.js index 4d574987cc..d743858af9 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-311.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-311.js @@ -25,7 +25,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { enumerable: false }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "0", getFunc()); @@ -34,7 +34,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-312.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-312.js index a78e3f2c57..c3bf8b75a8 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-312.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-312.js @@ -23,7 +23,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { configurable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "0", getFunc()); @@ -32,7 +32,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-315-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-315-1.js index a223dc3d46..6cc433db93 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-315-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-315-1.js @@ -37,7 +37,7 @@ includes: [propertyHelper.js] configurable: false }); if (c !== 3) { - $ERROR('Expected c === 3, actually ' + c); + throw new Test262Error('Expected c === 3, actually ' + c); } verifyEqualTo(arguments, "genericProperty", getFunc()); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-317-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-317-1.js index b8263cf93f..bde6835e1f 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-317-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-317-1.js @@ -22,10 +22,10 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "genericProperty", { value: 1002 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { if (b !== 2) { - $ERROR('Expected "b === 2;", actually ' + b); + throw new Test262Error('Expected "b === 2;", actually ' + b); } verifyEqualTo(arguments, "genericProperty", 1001); @@ -37,7 +37,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-317.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-317.js index 737aa02bde..6c46d73ab6 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-317.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-317.js @@ -21,7 +21,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "genericProperty", { value: 1002 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "genericProperty", 1001); @@ -32,7 +32,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-318-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-318-1.js index 563f912119..376ec4a966 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-318-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-318-1.js @@ -21,7 +21,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "genericProperty", { writable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "genericProperty", undefined); @@ -32,7 +32,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-318.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-318.js index 8ffe4fac99..9fdbfd57c0 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-318.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-318.js @@ -20,7 +20,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "genericProperty", { writable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "genericProperty", undefined); @@ -32,7 +32,7 @@ includes: [propertyHelper.js] if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-319-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-319-1.js index 43ba1dee9f..1d819cc170 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-319-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-319-1.js @@ -21,7 +21,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "genericProperty", { enumerable: false }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "genericProperty", undefined); @@ -33,7 +33,7 @@ includes: [propertyHelper.js] if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-319.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-319.js index 4df5a0c9bc..3a9778eb9c 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-319.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-319.js @@ -20,7 +20,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "genericProperty", { enumerable: false }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "genericProperty", undefined); @@ -31,7 +31,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-320-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-320-1.js index abf523f65e..cebb0b8342 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-320-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-320-1.js @@ -20,7 +20,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "genericProperty", { configurable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "genericProperty", undefined); @@ -31,7 +31,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-320.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-320.js index 67d041b9fe..0502133f05 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-320.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-320.js @@ -19,7 +19,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "genericProperty", { configurable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "genericProperty", undefined); @@ -31,7 +31,7 @@ includes: [propertyHelper.js] if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-321-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-321-1.js index c1cd750ee2..2a49eb3db5 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-321-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-321-1.js @@ -31,10 +31,10 @@ includes: [propertyHelper.js] return "overideGenericPropertyString"; } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { if (a !== 1) { - $ERROR('Expected a === 1, actually ' + a); + throw new Test262Error('Expected a === 1, actually ' + a); } verifyEqualTo(arguments, "genericProperty", getFunc()); @@ -46,7 +46,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-321.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-321.js index 18efcbf7e1..f00c928059 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-321.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-321.js @@ -30,7 +30,7 @@ includes: [propertyHelper.js] return "overideGenericPropertyString"; } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(arguments, "genericProperty", getFunc()); @@ -41,7 +41,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-322-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-322-1.js index b4da0dc39f..918bf4b5dc 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-322-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-322-1.js @@ -26,7 +26,7 @@ includes: [propertyHelper.js] this.genericPropertyString1 = value; } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arguments, "genericProperty", "genericPropertyString"); @@ -35,7 +35,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-322.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-322.js index b14567fe79..a940aa506b 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-322.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-322.js @@ -25,7 +25,7 @@ includes: [propertyHelper.js] this.genericPropertyString1 = value; } }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arguments, "genericProperty", "genericPropertyString"); @@ -34,7 +34,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-323-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-323-1.js index 9f6c3f0e91..7bbe5d1d86 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-323-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-323-1.js @@ -25,10 +25,10 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "genericProperty", { enumerable: false }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { if (c !== 3) { - $ERROR('Expected c === 3, actually ' + c); + throw new Test262Error('Expected c === 3, actually ' + c); } verifyWritable(arguments, "genericProperty", "genericPropertyString"); @@ -37,7 +37,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-323.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-323.js index b7104257de..38dd7166c7 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-323.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-323.js @@ -24,7 +24,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "genericProperty", { enumerable: false }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arguments, "genericProperty", "genericPropertyString"); @@ -33,7 +33,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-324-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-324-1.js index ef6ec1c0da..8bb9cecb08 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-324-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-324-1.js @@ -24,7 +24,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "genericProperty", { configurable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arguments, "genericProperty", "genericPropertyString"); @@ -33,7 +33,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-324.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-324.js index 0986e4a5bb..caab62dbe3 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-324.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-324.js @@ -23,7 +23,7 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "genericProperty", { configurable: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(arguments, "genericProperty", "genericPropertyString"); @@ -32,7 +32,7 @@ includes: [propertyHelper.js] verifyNotConfigurable(arguments, "genericProperty"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-438.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-438.js index 68fc319294..1ccc9f436d 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-438.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-438.js @@ -26,7 +26,7 @@ try { configurable: true }); - $ERROR("Expected TypeError"); + throw new Test262Error("Expected TypeError"); } catch (e) { assert(e instanceof TypeError); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-456.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-456.js index e6c6836548..996b566cfc 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-456.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-456.js @@ -26,7 +26,7 @@ try { configurable: true }); - $ERROR("Expected TypeError"); + throw new Test262Error("Expected TypeError"); } catch (e) { assert(e instanceof TypeError); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-474.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-474.js index 27355b6c5c..20533735ab 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-474.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-474.js @@ -31,7 +31,7 @@ try { configurable: true }); - $ERROR("Expected TypeError"); + throw new Test262Error("Expected TypeError"); } catch (e) { assert(e instanceof TypeError); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-492.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-492.js index 1cdf9be44b..55d5e0cbf7 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-492.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-492.js @@ -31,7 +31,7 @@ try { configurable: true }); - $ERROR("Expected TypeError"); + throw new Test262Error("Expected TypeError"); } catch (e) { assert(e instanceof TypeError); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-510.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-510.js index 1ca3ab85a0..af4e5108e7 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-510.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-510.js @@ -30,7 +30,7 @@ try { configurable: true }); - $ERROR("Expected TypeError"); + throw new Test262Error("Expected TypeError"); } catch (e) { assert(e instanceof TypeError); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-528.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-528.js index 12189aeb17..c53535ba5f 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-528.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-528.js @@ -30,7 +30,7 @@ try { configurable: true }); - $ERROR("Expected TypeError"); + throw new Test262Error("Expected TypeError"); } catch (e) { assert(e instanceof TypeError); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-538-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-538-1.js index 3b65218cca..585a7a6c0d 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-538-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-538-1.js @@ -35,19 +35,19 @@ Object.defineProperty(obj, "0", { var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); if (!desc1.hasOwnProperty("get")) { - $ERROR('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); + throw new Test262Error('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); } if (!desc2.hasOwnProperty("value")) { - $ERROR('Expected desc2.hasOwnProperty("value") to be true, actually ' + desc2.hasOwnProperty("value")); + throw new Test262Error('Expected desc2.hasOwnProperty("value") to be true, actually ' + desc2.hasOwnProperty("value")); } if (typeof desc2.get !== "undefined") { - $ERROR('Expected typeof desc2.get === "undefined", actually ' + typeof desc2.get); + throw new Test262Error('Expected typeof desc2.get === "undefined", actually ' + typeof desc2.get); } if (typeof desc2.set !== "undefined") { - $ERROR('Expected typeof desc2.set === "undefined", actually ' + typeof desc2.set); + throw new Test262Error('Expected typeof desc2.set === "undefined", actually ' + typeof desc2.set); } verifyEqualTo(obj, "0", 1001); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-538-2.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-538-2.js index 78d2ca97b4..7e7a31eb01 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-538-2.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-538-2.js @@ -37,19 +37,19 @@ Object.defineProperty(obj, "prop", { var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); if (!desc1.hasOwnProperty("get")) { - $ERROR('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); + throw new Test262Error('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); } if (!desc2.hasOwnProperty("value")) { - $ERROR('Expected desc2.hasOwnProperty("value") to be true, actually ' + desc2.hasOwnProperty("value")); + throw new Test262Error('Expected desc2.hasOwnProperty("value") to be true, actually ' + desc2.hasOwnProperty("value")); } if (typeof desc2.get !== "undefined") { - $ERROR('Expected typeof desc2.get === "undefined" , actually ' + typeof desc2.get); + throw new Test262Error('Expected typeof desc2.get === "undefined" , actually ' + typeof desc2.get); } if (typeof desc2.set !== "undefined") { - $ERROR('Expected typeof desc2.set === "undefined" , actually ' + typeof desc2.set); + throw new Test262Error('Expected typeof desc2.set === "undefined" , actually ' + typeof desc2.set); } verifyEqualTo(obj, "prop", 1001); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-538-5.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-538-5.js index fdc987cfdc..86e3bc4186 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-538-5.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-538-5.js @@ -35,19 +35,19 @@ Object.defineProperty(obj, "prop", { var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); if (!desc1.hasOwnProperty("get")) { - $ERROR('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); + throw new Test262Error('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); } if (!desc2.hasOwnProperty("value")) { - $ERROR('Expected desc2.hasOwnProperty("value") to be true, actually ' + desc2.hasOwnProperty("value")); + throw new Test262Error('Expected desc2.hasOwnProperty("value") to be true, actually ' + desc2.hasOwnProperty("value")); } if (typeof desc2.get !== "undefined") { - $ERROR('Expected typeof desc2.get === "undefined" , actually ' + typeof desc2.get); + throw new Test262Error('Expected typeof desc2.get === "undefined" , actually ' + typeof desc2.get); } if (typeof desc2.set !== "undefined") { - $ERROR('Expected typeof desc2.set === "undefined" , actually ' + typeof desc2.set); + throw new Test262Error('Expected typeof desc2.set === "undefined" , actually ' + typeof desc2.set); } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-538-6.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-538-6.js index 5c90ba8f9e..5f90f5676a 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-538-6.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-538-6.js @@ -37,19 +37,19 @@ Object.defineProperty(obj, "0", { var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); if (!desc1.hasOwnProperty("get")) { - $ERROR('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); + throw new Test262Error('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); } if (!desc2.hasOwnProperty("value")) { - $ERROR('Expected desc2.hasOwnProperty("value") to be true, actually ' + desc2.hasOwnProperty("value")); + throw new Test262Error('Expected desc2.hasOwnProperty("value") to be true, actually ' + desc2.hasOwnProperty("value")); } if (typeof desc2.get !== "undefined") { - $ERROR('Expected typeof desc2.get === "undefined" , actually ' + typeof desc2.get); + throw new Test262Error('Expected typeof desc2.get === "undefined" , actually ' + typeof desc2.get); } if (typeof desc2.set !== "undefined") { - $ERROR('Expected typeof desc2.set === "undefined" , actually ' + typeof desc2.set); + throw new Test262Error('Expected typeof desc2.set === "undefined" , actually ' + typeof desc2.set); } verifyEqualTo(obj, "0", 1001); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-538.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-538.js index 3b97da4a8c..16f883a9b4 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-538.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-538.js @@ -35,15 +35,15 @@ Object.defineProperty(obj, "prop", { var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); if (!desc1.hasOwnProperty("get")) { - $ERROR('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); + throw new Test262Error('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); } if (!desc2.hasOwnProperty("value")) { - $ERROR('Expected desc2.hasOwnProperty("value") to be true, actually ' + desc2.hasOwnProperty("value")); + throw new Test262Error('Expected desc2.hasOwnProperty("value") to be true, actually ' + desc2.hasOwnProperty("value")); } if (typeof desc2.get !== "undefined") { - $ERROR('Expected typeof desc2.get === "undefined" , actually ' + typeof desc2.get); + throw new Test262Error('Expected typeof desc2.get === "undefined" , actually ' + typeof desc2.get); } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-540-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-540-1.js index 396bcfba3e..0a9fea9843 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-540-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-540-1.js @@ -52,7 +52,7 @@ try { }); } catch (e) { if (!result) { - $ERROR('Expected result to be true, actually ' + result); + throw new Test262Error('Expected result to be true, actually ' + result); } verifyEqualTo(obj, "property", getFunc()); @@ -64,7 +64,7 @@ try { verifyNotConfigurable(obj, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-540-2.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-540-2.js index 6d5e5a4fd0..14b503ae68 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-540-2.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-540-2.js @@ -52,7 +52,7 @@ try { }); } catch (e) { if (!result) { - $ERROR('Expected result to be true, actually ' + result); + throw new Test262Error('Expected result to be true, actually ' + result); } verifyEqualTo(obj, "0", getFunc()); @@ -64,7 +64,7 @@ try { verifyNotConfigurable(obj, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-540-3.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-540-3.js index 0b7b5bcdc1..507a9f6ab8 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-540-3.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-540-3.js @@ -54,7 +54,7 @@ try { } catch (e) { if (!result) { - $ERROR('Expected result to be true, actually ' + result); + throw new Test262Error('Expected result to be true, actually ' + result); } verifyEqualTo(obj, "property", getFunc()); @@ -66,7 +66,7 @@ try { verifyNotConfigurable(obj, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-540-6.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-540-6.js index 778a22ac5c..cb6c76f337 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-540-6.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-540-6.js @@ -53,7 +53,7 @@ try { }); } catch (e) { if (!result) { - $ERROR('Expected result to be true, actually ' + result); + throw new Test262Error('Expected result to be true, actually ' + result); } verifyEqualTo(obj, "0", getFunc()); @@ -66,7 +66,7 @@ try { if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-540-7.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-540-7.js index b953deb29d..edd742881c 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-540-7.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-540-7.js @@ -52,7 +52,7 @@ try { }); } catch (e1) { if (!result) { - $ERROR('Expected result to be true, actually ' + result); + throw new Test262Error('Expected result to be true, actually ' + result); } @@ -66,7 +66,7 @@ try { if (!(e1 instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e1); + throw new Test262Error("Expected TypeError, got " + e1); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-540-8.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-540-8.js index d9df97b880..ab4b8c8b0e 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-540-8.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-540-8.js @@ -54,7 +54,7 @@ try { }); } catch (e) { if (!result) { - $ERROR('Expected result to be true, actually ' + result); + throw new Test262Error('Expected result to be true, actually ' + result); } verifyEqualTo(obj, "0", getFunc()); @@ -66,7 +66,7 @@ try { verifyNotConfigurable(obj, "0"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-546.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-546.js index 74dca6bda0..4bcc2a7234 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-546.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-546.js @@ -35,7 +35,7 @@ try { configurable: true }); - $ERROR("Expected TypeError"); + throw new Test262Error("Expected TypeError"); } catch (e) { assert(e instanceof TypeError); assert.sameValue(desc1.configurable, false); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-547-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-547-1.js index 359362b861..ddcb88bea7 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-547-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-547-1.js @@ -34,16 +34,16 @@ try { value: 1001 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); if (!desc1.hasOwnProperty("get")) { - $ERROR('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); + throw new Test262Error('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); } if (desc2.hasOwnProperty("value")) { - $ERROR('Expected !desc2.hasOwnProperty("value") to be true, actually ' + !desc2.hasOwnProperty("value")); + throw new Test262Error('Expected !desc2.hasOwnProperty("value") to be true, actually ' + !desc2.hasOwnProperty("value")); } @@ -57,7 +57,7 @@ try { if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-547-2.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-547-2.js index 6a08c62d6f..f555557321 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-547-2.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-547-2.js @@ -36,16 +36,16 @@ try { value: 1001 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); if (!desc1.hasOwnProperty("get")) { - $ERROR('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); + throw new Test262Error('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); } if (desc2.hasOwnProperty("value")) { - $ERROR('Expected !desc2.hasOwnProperty("value") to be true, actually ' + !desc2.hasOwnProperty("value")); + throw new Test262Error('Expected !desc2.hasOwnProperty("value") to be true, actually ' + !desc2.hasOwnProperty("value")); } @@ -59,7 +59,7 @@ try { if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-547-3.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-547-3.js index db807f2b64..fa61275260 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-547-3.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-547-3.js @@ -34,16 +34,16 @@ try { value: 1001 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); if (!desc1.hasOwnProperty("get")) { - $ERROR('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); + throw new Test262Error('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); } if (desc2.hasOwnProperty("value")) { - $ERROR('Expected !desc2.hasOwnProperty("value") to be true, actually ' + !desc2.hasOwnProperty("value")); + throw new Test262Error('Expected !desc2.hasOwnProperty("value") to be true, actually ' + !desc2.hasOwnProperty("value")); } @@ -56,7 +56,7 @@ try { verifyNotConfigurable(obj, "prop"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-547-4.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-547-4.js index fd8fe6f5b5..a2af81f61a 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-547-4.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-547-4.js @@ -35,16 +35,16 @@ try { Object.defineProperty(obj, "0", { value: 1001 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); if (!desc1.hasOwnProperty("get")) { - $ERROR('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); + throw new Test262Error('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get")); } if (desc2.hasOwnProperty("value")) { - $ERROR('Expected !desc2.hasOwnProperty("value") to be true, actually ' + !desc2.hasOwnProperty("value")); + throw new Test262Error('Expected !desc2.hasOwnProperty("value") to be true, actually ' + !desc2.hasOwnProperty("value")); } verifyEqualTo(obj, "0", getFunc()); @@ -57,7 +57,7 @@ try { if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-564.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-564.js index 81f0cc5a53..7b17cd4992 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-564.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-564.js @@ -35,7 +35,7 @@ try { configurable: true }); - $ERROR("Expected TypeError"); + throw new Test262Error("Expected TypeError"); } catch (e) { assert(e instanceof TypeError); assert.sameValue(desc1.configurable, false); diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-64.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-64.js index b079432a35..ea10286897 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-64.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-64.js @@ -20,7 +20,7 @@ try { Object.defineProperty(obj, "foo", { value: +0 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", -0); @@ -32,7 +32,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-65.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-65.js index d420ffa4e8..02d0c6ffe3 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-65.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-65.js @@ -20,7 +20,7 @@ try { Object.defineProperty(obj, "foo", { value: -0 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", +0); @@ -31,7 +31,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-86.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-86.js index e302bff64e..ea1b1b3986 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-86.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-86.js @@ -23,7 +23,7 @@ try { Object.defineProperty(obj, "foo", { value: +0 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", -0); @@ -34,7 +34,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-87.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-87.js index a7edd420c5..4a2890f390 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-87.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-87.js @@ -23,7 +23,7 @@ try { Object.defineProperty(obj, "foo", { value: -0 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", +0); @@ -34,7 +34,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-89.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-89.js index dbbf9c6199..19ecac3f59 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-89.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-89.js @@ -23,7 +23,7 @@ try { Object.defineProperty(obj, "foo", { value: 20 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", 10); @@ -34,7 +34,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-91.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-91.js index 0f9ae100eb..20d3d198f9 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-91.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-91.js @@ -23,7 +23,7 @@ try { Object.defineProperty(obj, "foo", { value: "fghj" }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", "abcd"); @@ -34,7 +34,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-93.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-93.js index 867b24e24d..0c693d7dd1 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-93.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-93.js @@ -23,7 +23,7 @@ try { Object.defineProperty(obj, "foo", { value: true }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", false); @@ -34,7 +34,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-95.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-95.js index 4157be5779..bc7e45b0d5 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-95.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-95.js @@ -32,7 +32,7 @@ try { Object.defineProperty(obj, "foo", { value: obj2 }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "foo", obj1); @@ -43,7 +43,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-97.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-97.js index 501e58cb34..38ef4724f0 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-97.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-97.js @@ -29,7 +29,7 @@ try { configurable: false }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyEqualTo(obj, "property", getFunc()); @@ -38,7 +38,7 @@ try { verifyNotConfigurable(obj, "property"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-99.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-99.js index ee0111080e..8aaba926f1 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-99.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-99.js @@ -31,7 +31,7 @@ try { get: getFunc, set: setFunc }); - $ERROR("Expected an exception."); + throw new Test262Error("Expected an exception."); } catch (e) { verifyWritable(obj, "foo", "setVerifyHelpProp"); @@ -40,7 +40,7 @@ try { verifyNotConfigurable(obj, "foo"); if (!(e instanceof TypeError)) { - $ERROR("Expected TypeError, got " + e); + throw new Test262Error("Expected TypeError, got " + e); } } diff --git a/test/built-ins/Object/defineProperty/S15.2.3.6_A1.js b/test/built-ins/Object/defineProperty/S15.2.3.6_A1.js index 151157c484..c4ee2d69c0 100644 --- a/test/built-ins/Object/defineProperty/S15.2.3.6_A1.js +++ b/test/built-ins/Object/defineProperty/S15.2.3.6_A1.js @@ -32,7 +32,7 @@ if (typeof document !== 'undefined' && if (!refused) { var desc = Object.getOwnPropertyDescriptor(f, 'foo'); if (desc.get !== getter) { - $ERROR('Getter on HTMLFormElement disappears'); + throw new Test262Error('Getter on HTMLFormElement disappears'); } } } diff --git a/test/built-ins/Object/defineProperty/S15.2.3.6_A2.js b/test/built-ins/Object/defineProperty/S15.2.3.6_A2.js index 05e6aa3c19..2df9f1cde3 100644 --- a/test/built-ins/Object/defineProperty/S15.2.3.6_A2.js +++ b/test/built-ins/Object/defineProperty/S15.2.3.6_A2.js @@ -18,5 +18,5 @@ Object.defineProperty(base, 'foo', { get: getter }); if (derived.hasOwnProperty('foo')) { - $ERROR('Accessor properties inherit as own properties'); + throw new Test262Error('Accessor properties inherit as own properties'); } diff --git a/test/built-ins/Object/entries/exception-during-enumeration.js b/test/built-ins/Object/entries/exception-during-enumeration.js index c4dba3f558..262d4c3aa9 100644 --- a/test/built-ins/Object/entries/exception-during-enumeration.js +++ b/test/built-ins/Object/entries/exception-during-enumeration.js @@ -12,7 +12,7 @@ var trappedKey = { throw new RangeError('This error should be re-thrown'); }, get b() { - $ERROR('Should not try to get the second element'); + throw new Test262Error('Should not try to get the second element'); } }; diff --git a/test/built-ins/Object/entries/tamper-with-global-object.js b/test/built-ins/Object/entries/tamper-with-global-object.js index cea8a87bb4..66f3b560c8 100644 --- a/test/built-ins/Object/entries/tamper-with-global-object.js +++ b/test/built-ins/Object/entries/tamper-with-global-object.js @@ -9,7 +9,7 @@ author: Jordan Harband ---*/ function fakeObject() { - $ERROR('The overriden version of Object was called!'); + throw new Test262Error('The overriden version of Object was called!'); } fakeObject.entries = Object.entries; diff --git a/test/built-ins/Object/entries/tamper-with-object-keys.js b/test/built-ins/Object/entries/tamper-with-object-keys.js index 7217292f0f..dc6f4c11e8 100644 --- a/test/built-ins/Object/entries/tamper-with-object-keys.js +++ b/test/built-ins/Object/entries/tamper-with-object-keys.js @@ -9,7 +9,7 @@ author: Jordan Harband ---*/ function fakeObjectKeys() { - $ERROR('The overriden version of Object.keys was called!'); + throw new Test262Error('The overriden version of Object.keys was called!'); } Object.keys = fakeObjectKeys; diff --git a/test/built-ins/Object/freeze/15.2.3.9-2-b-i-1.js b/test/built-ins/Object/freeze/15.2.3.9-2-b-i-1.js index 96de0e1f7d..3ee9e83aaa 100644 --- a/test/built-ins/Object/freeze/15.2.3.9-2-b-i-1.js +++ b/test/built-ins/Object/freeze/15.2.3.9-2-b-i-1.js @@ -30,9 +30,9 @@ verifyEnumerable(obj, "foo"); verifyNotConfigurable(obj, "foo"); if (desc.writable !== false) { - $ERROR('Expected desc.writable === false, actually ' + desc.writable); + throw new Test262Error('Expected desc.writable === false, actually ' + desc.writable); } if (desc.configurable !== false) { - $ERROR('Expected desc.configurable === false, actually ' + desc.configurable); + throw new Test262Error('Expected desc.configurable === false, actually ' + desc.configurable); } diff --git a/test/built-ins/Object/freeze/15.2.3.9-2-b-i-2.js b/test/built-ins/Object/freeze/15.2.3.9-2-b-i-2.js index 150f18635c..41077c8f93 100644 --- a/test/built-ins/Object/freeze/15.2.3.9-2-b-i-2.js +++ b/test/built-ins/Object/freeze/15.2.3.9-2-b-i-2.js @@ -48,17 +48,17 @@ verifyNotEnumerable(obj, "foo2"); verifyNotConfigurable(obj, "foo2"); if (desc1.configurable !== false) { - $ERROR('Expected desc1.configurable === false, actually ' + desc1.configurable); + throw new Test262Error('Expected desc1.configurable === false, actually ' + desc1.configurable); } if (desc1.writable !== false) { - $ERROR('Expected desc1.writable === false, actually ' + desc1.writable); + throw new Test262Error('Expected desc1.writable === false, actually ' + desc1.writable); } if (desc2.configurable !== false) { - $ERROR('Expected desc2.configurable === false, actually ' + desc2.configurable); + throw new Test262Error('Expected desc2.configurable === false, actually ' + desc2.configurable); } if (desc2.writable !== false) { - $ERROR('Expected desc2.writable === false, actually ' + desc2.writable); + throw new Test262Error('Expected desc2.writable === false, actually ' + desc2.writable); } diff --git a/test/built-ins/Object/freeze/15.2.3.9-2-c-1.js b/test/built-ins/Object/freeze/15.2.3.9-2-c-1.js index ea4ad70eac..7fc4aba3f7 100644 --- a/test/built-ins/Object/freeze/15.2.3.9-2-c-1.js +++ b/test/built-ins/Object/freeze/15.2.3.9-2-c-1.js @@ -24,10 +24,10 @@ Object.freeze(obj); var desc = Object.getOwnPropertyDescriptor(obj, "foo"); if (desc.configurable !== false) { - $ERROR("Expected desc.configurable to be false, actually " + desc.configurable); + throw new Test262Error("Expected desc.configurable to be false, actually " + desc.configurable); } if (desc.writable !== false) { - $ERROR("Expected desc.writable to be false, actually " + desc.writable); + throw new Test262Error("Expected desc.writable to be false, actually " + desc.writable); } verifyEqualTo(obj, "foo", 10); diff --git a/test/built-ins/Object/freeze/15.2.3.9-2-c-3.js b/test/built-ins/Object/freeze/15.2.3.9-2-c-3.js index 5f0d7c1d23..63b16a5087 100644 --- a/test/built-ins/Object/freeze/15.2.3.9-2-c-3.js +++ b/test/built-ins/Object/freeze/15.2.3.9-2-c-3.js @@ -42,21 +42,21 @@ verifyEqualTo(obj, "foo2", 10); obj.foo2 = 12; if (!resultSetFun) { - $ERROR('Expected obj["foo2"] set() to be called, but was not.'); + throw new Test262Error('Expected obj["foo2"] set() to be called, but was not.'); } if (!isEnumerable(obj, "foo2")) { - $ERROR('Expected obj["foo2"] to be enumerable.'); + throw new Test262Error('Expected obj["foo2"] to be enumerable.'); } var desc1 = Object.getOwnPropertyDescriptor(obj, "foo1"); if (desc1.configurable || desc1.writable) { - $ERROR('Expected obj["foo1"] to be non-writable, non-configurable; actually ' + JSON.stringify(desc1)); + throw new Test262Error('Expected obj["foo1"] to be non-writable, non-configurable; actually ' + JSON.stringify(desc1)); } var desc2 = Object.getOwnPropertyDescriptor(obj, "foo2"); if (desc2.configurable || desc2.writable) { - $ERROR('Expected obj["foo2"] to be non-writable, non-configurable; actually ' + JSON.stringify(desc2)); + throw new Test262Error('Expected obj["foo2"] to be non-writable, non-configurable; actually ' + JSON.stringify(desc2)); } verifyEqualTo(obj, "foo1", 10); diff --git a/test/built-ins/Object/freeze/15.2.3.9-2-c-4.js b/test/built-ins/Object/freeze/15.2.3.9-2-c-4.js index 6723c16f05..eb08e41d48 100644 --- a/test/built-ins/Object/freeze/15.2.3.9-2-c-4.js +++ b/test/built-ins/Object/freeze/15.2.3.9-2-c-4.js @@ -42,19 +42,19 @@ verifyNotConfigurable(obj, "foo2"); obj.foo2 = 12; if (!resultSetFun) { - $ERROR('Expected obj["foo2"] set() to be called, but was not.'); + throw new Test262Error('Expected obj["foo2"] set() to be called, but was not.'); } verifyEnumerable(obj, "foo2"); var desc1 = Object.getOwnPropertyDescriptor(obj, "foo1"); if (desc1.configurable || desc1.writable) { - $ERROR('Expected obj["foo1"] to be non-writable, non-configurable; actually ' + JSON.stringify(desc1)); + throw new Test262Error('Expected obj["foo1"] to be non-writable, non-configurable; actually ' + JSON.stringify(desc1)); } var desc2 = Object.getOwnPropertyDescriptor(obj, "foo2"); if (desc2.configurable || desc2.writable) { - $ERROR('Expected obj["foo2"] to be non-writable, non-configurable; actually ' + JSON.stringify(desc2)); + throw new Test262Error('Expected obj["foo2"] to be non-writable, non-configurable; actually ' + JSON.stringify(desc2)); } verifyEqualTo(obj, "foo1", 10); diff --git a/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-global-object.js b/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-global-object.js index 4fc046ae65..3895399c76 100644 --- a/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-global-object.js +++ b/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-global-object.js @@ -9,7 +9,7 @@ author: Jordan Harband ---*/ function fakeObject() { - $ERROR('The overriden version of Object was called!'); + throw new Test262Error('The overriden version of Object was called!'); } fakeObject.getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors; fakeObject.keys = Object.keys; diff --git a/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-object-keys.js b/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-object-keys.js index bfe13dd0d0..6cb8a5070f 100644 --- a/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-object-keys.js +++ b/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-object-keys.js @@ -9,7 +9,7 @@ author: Jordan Harband ---*/ function fakeObjectGetOwnPropertyDescriptor() { - $ERROR('The overriden version of Object.getOwnPropertyDescriptor was called!'); + throw new Test262Error('The overriden version of Object.getOwnPropertyDescriptor was called!'); } Object.getOwnPropertyDescriptor = fakeObjectGetOwnPropertyDescriptor; diff --git a/test/built-ins/Object/getOwnPropertyNames/S15.2.3.4_A1_T1.js b/test/built-ins/Object/getOwnPropertyNames/S15.2.3.4_A1_T1.js index f1eab4e002..14c8bb9b11 100644 --- a/test/built-ins/Object/getOwnPropertyNames/S15.2.3.4_A1_T1.js +++ b/test/built-ins/Object/getOwnPropertyNames/S15.2.3.4_A1_T1.js @@ -17,6 +17,6 @@ function foo() {} var names = Object.getOwnPropertyNames(foo); for (var i = 0, len = names.length; i < len; i++) { if (!foo.hasOwnProperty(names[i])) { - $ERROR('Phantom own property: ' + names[i]); + throw new Test262Error('Phantom own property: ' + names[i]); } } diff --git a/test/built-ins/Object/prototype/S15.2.3.1_A1.js b/test/built-ins/Object/prototype/S15.2.3.1_A1.js index a182b4f737..95bf68c92d 100644 --- a/test/built-ins/Object/prototype/S15.2.3.1_A1.js +++ b/test/built-ins/Object/prototype/S15.2.3.1_A1.js @@ -15,13 +15,13 @@ verifyNotWritable(Object, "prototype", null, function() { //CHECK#1 if (Object.prototype !== obj) { - $ERROR('#1: the Object.prototype property has the attributes ReadOnly.'); + throw new Test262Error('#1: the Object.prototype property has the attributes ReadOnly.'); } //CHECK#2 try { Object.prototype(); - $ERROR('#2: the Object.prototype property has the attributes ReadOnly'); + throw new Test262Error('#2: the Object.prototype property has the attributes ReadOnly'); } catch (e) { if (e instanceof Test262Error) throw e; } diff --git a/test/built-ins/Object/prototype/S15.2.3.1_A2.js b/test/built-ins/Object/prototype/S15.2.3.1_A2.js index 96ee379f65..904495076f 100644 --- a/test/built-ins/Object/prototype/S15.2.3.1_A2.js +++ b/test/built-ins/Object/prototype/S15.2.3.1_A2.js @@ -9,7 +9,7 @@ description: Checking if enumerating "Object.prototype" property fails // CHECK#1 if (Object.propertyIsEnumerable('prototype')) { - $ERROR('#1: the Object.prototype property has the attributes DontEnum'); + throw new Test262Error('#1: the Object.prototype property has the attributes DontEnum'); } // CHECK#2 @@ -20,5 +20,5 @@ for (var p in Object) { } if (cout !== 0) { - $ERROR('#2: the Object.prototype property has the attributes DontEnum'); + throw new Test262Error('#2: the Object.prototype property has the attributes DontEnum'); } diff --git a/test/built-ins/Object/prototype/S15.2.3.1_A3.js b/test/built-ins/Object/prototype/S15.2.3.1_A3.js index d2ffa50ca6..dc24eb5ba8 100644 --- a/test/built-ins/Object/prototype/S15.2.3.1_A3.js +++ b/test/built-ins/Object/prototype/S15.2.3.1_A3.js @@ -12,7 +12,7 @@ verifyNotConfigurable(Object, "prototype"); //CHECK#1 try { if ((delete Object.prototype) !== false) { - $ERROR('#1: Object.prototype has the attribute DontDelete'); + throw new Test262Error('#1: Object.prototype has the attribute DontDelete'); } } catch (e) { if (e instanceof Test262Error) throw e; @@ -21,5 +21,5 @@ try { //CHECK#2 if (!(Object.hasOwnProperty('prototype'))) { - $ERROR('#2: the Object.prototype property has the attributes DontDelete.'); + throw new Test262Error('#2: the Object.prototype property has the attributes DontDelete.'); } diff --git a/test/built-ins/Object/prototype/S15.2.4_A1_T1.js b/test/built-ins/Object/prototype/S15.2.4_A1_T1.js index 9e975c0094..4e13708e22 100644 --- a/test/built-ins/Object/prototype/S15.2.4_A1_T1.js +++ b/test/built-ins/Object/prototype/S15.2.4_A1_T1.js @@ -9,5 +9,5 @@ description: Checking if obtaining Object.prototype.prototype fails // CHECK#1 if (Object.prototype.prototype !== undefined) { - $ERROR('#1: Object prototype has not prototype'); + throw new Test262Error('#1: Object prototype has not prototype'); } diff --git a/test/built-ins/Object/prototype/S15.2.4_A1_T2.js b/test/built-ins/Object/prototype/S15.2.4_A1_T2.js index f92c6b479a..76ee577e39 100644 --- a/test/built-ins/Object/prototype/S15.2.4_A1_T2.js +++ b/test/built-ins/Object/prototype/S15.2.4_A1_T2.js @@ -11,7 +11,7 @@ description: > //CHECK#1 if (Object.prototype.toString() == false) { - $ERROR('#1: Object prototype object has not prototype'); + throw new Test262Error('#1: Object prototype object has not prototype'); } delete Object.prototype.toString; @@ -19,10 +19,10 @@ delete Object.prototype.toString; // CHECK#2 try { Object.prototype.toString(); - $ERROR('#2: Object prototype object has not prototype'); + throw new Test262Error('#2: Object prototype object has not prototype'); } catch (e) { if ((e instanceof TypeError) !== true) { - $ERROR('#1.1: delete Object.prototype.toString; Object.prototype.toString() throw a TypeError. Actual: ' + (e)); + throw new Test262Error('#1.1: delete Object.prototype.toString; Object.prototype.toString() throw a TypeError. Actual: ' + (e)); } } // diff --git a/test/built-ins/Object/prototype/S15.2.4_A2.js b/test/built-ins/Object/prototype/S15.2.4_A2.js index 73075314ff..9a8bc9d58e 100644 --- a/test/built-ins/Object/prototype/S15.2.4_A2.js +++ b/test/built-ins/Object/prototype/S15.2.4_A2.js @@ -15,5 +15,5 @@ var tostr = Object.prototype.toString(); //CHECK#1 if (tostr !== "[object Object]") { - $ERROR('#1: the value of the internal [[Class]] property of Object prototype object is "Object"'); + throw new Test262Error('#1: the value of the internal [[Class]] property of Object prototype object is "Object"'); } diff --git a/test/built-ins/Object/prototype/constructor/S15.2.4.1_A1_T1.js b/test/built-ins/Object/prototype/constructor/S15.2.4.1_A1_T1.js index 6266c8a6ae..e73a888f0a 100644 --- a/test/built-ins/Object/prototype/constructor/S15.2.4.1_A1_T1.js +++ b/test/built-ins/Object/prototype/constructor/S15.2.4.1_A1_T1.js @@ -11,5 +11,5 @@ description: Checking the Object.prototype.constructor //CHECK#1 if (Object.prototype.constructor !== Object) { - $ERROR('#1: The initial value of Object.prototype.constructor is the built-in Object constructor'); + throw new Test262Error('#1: The initial value of Object.prototype.constructor is the built-in Object constructor'); } diff --git a/test/built-ins/Object/prototype/constructor/S15.2.4.1_A1_T2.js b/test/built-ins/Object/prototype/constructor/S15.2.4.1_A1_T2.js index a9fe417615..31183632ae 100644 --- a/test/built-ins/Object/prototype/constructor/S15.2.4.1_A1_T2.js +++ b/test/built-ins/Object/prototype/constructor/S15.2.4.1_A1_T2.js @@ -17,26 +17,26 @@ var obj = new constr; // CHECK#0 if (obj === undefined) { - $ERROR('#0: new Object() return the newly created native object.'); + throw new Test262Error('#0: new Object() return the newly created native object.'); } // CHECK#1 if (obj.constructor !== Object) { - $ERROR('#1: new Object() create a new native ECMAScript object'); + throw new Test262Error('#1: new Object() create a new native ECMAScript object'); } // CHECK#2 if (!(Object.prototype.isPrototypeOf(obj))) { - $ERROR('#2: when new Object() calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.'); + throw new Test262Error('#2: when new Object() calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.'); } // CHECK#3 var to_string_result = '[object ' + 'Object' + ']'; if (obj.toString() !== to_string_result) { - $ERROR('#3: when new Object() calls the [[Class]] property of the newly constructed object is set to "Object".'); + throw new Test262Error('#3: when new Object() calls the [[Class]] property of the newly constructed object is set to "Object".'); } // CHECK#4 if (obj.valueOf().toString() !== to_string_result) { - $ERROR('#4: when new Object() calls the newly constructed object has no [[Value]] property.'); + throw new Test262Error('#4: when new Object() calls the newly constructed object has no [[Value]] property.'); } diff --git a/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A1_T1.js b/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A1_T1.js index 65402cc5a1..e141eb214b 100644 --- a/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A1_T1.js +++ b/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A1_T1.js @@ -16,11 +16,11 @@ description: > //CHECK#1 if (typeof Object.prototype.hasOwnProperty !== "function") { - $ERROR('#1: hasOwnProperty method is defined'); + throw new Test262Error('#1: hasOwnProperty method is defined'); } //CHECK#2 if (!(Object.prototype.hasOwnProperty("hasOwnProperty"))) { - $ERROR('#2: hasOwnProperty method works properly'); + throw new Test262Error('#2: hasOwnProperty method works properly'); } // diff --git a/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A1_T2.js b/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A1_T2.js index 7fa88ceae1..d5cc9d19e9 100644 --- a/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A1_T2.js +++ b/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A1_T2.js @@ -14,7 +14,7 @@ description: Argument of the hasOwnProperty method is a custom boolean property //CHECK#1 if (typeof Object.prototype.hasOwnProperty !== "function") { - $ERROR('#1: hasOwnProperty method is defined'); + throw new Test262Error('#1: hasOwnProperty method is defined'); } var obj = { @@ -23,16 +23,16 @@ var obj = { //CHECK#2 if (typeof obj.hasOwnProperty !== "function") { - $ERROR('#2: hasOwnProperty method is accessed'); + throw new Test262Error('#2: hasOwnProperty method is accessed'); } //CHECK#3 if (obj.hasOwnProperty("hasOwnProperty")) { - $ERROR('#3: hasOwnProperty method works properly'); + throw new Test262Error('#3: hasOwnProperty method works properly'); } //CHECK#4 if (!(obj.hasOwnProperty("the_property"))) { - $ERROR('#4: hasOwnProperty method works properly'); + throw new Test262Error('#4: hasOwnProperty method works properly'); } // diff --git a/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A1_T3.js b/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A1_T3.js index 9108ec9627..99e1f97004 100644 --- a/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A1_T3.js +++ b/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A1_T3.js @@ -22,20 +22,20 @@ var instance = new FACTORY; //CHECK#1 if (typeof Object.prototype.hasOwnProperty !== "function") { - $ERROR('#1: hasOwnProperty method is defined'); + throw new Test262Error('#1: hasOwnProperty method is defined'); } //CHECK#2 if (typeof instance.hasOwnProperty !== "function") { - $ERROR('#2: hasOwnProperty method is accessed'); + throw new Test262Error('#2: hasOwnProperty method is accessed'); } //CHECK#3 if (instance.hasOwnProperty("toString")) { - $ERROR('#3: hasOwnProperty method works properly'); + throw new Test262Error('#3: hasOwnProperty method works properly'); } //CHECK#4 if (!(instance.hasOwnProperty("aproperty"))) { - $ERROR('#4: hasOwnProperty method works properly'); + throw new Test262Error('#4: hasOwnProperty method works properly'); } diff --git a/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A6.js b/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A6.js index 9318f23219..be9fd54663 100644 --- a/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A6.js +++ b/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A6.js @@ -11,6 +11,6 @@ description: > //CHECK#1 if (Object.prototype.hasOwnProperty.prototype !== undefined) { - $ERROR('#1: Object.prototype.hasOwnProperty has not prototype property' + Object.prototype.hasOwnProperty.prototype); + throw new Test262Error('#1: Object.prototype.hasOwnProperty has not prototype property' + Object.prototype.hasOwnProperty.prototype); } // diff --git a/test/built-ins/Object/prototype/hasOwnProperty/symbol_property_toString.js b/test/built-ins/Object/prototype/hasOwnProperty/symbol_property_toString.js index 1223bc2fe0..a42feac915 100644 --- a/test/built-ins/Object/prototype/hasOwnProperty/symbol_property_toString.js +++ b/test/built-ins/Object/prototype/hasOwnProperty/symbol_property_toString.js @@ -23,7 +23,7 @@ var wrapper = { return sym; }, valueOf: function() { - $ERROR("valueOf() called"); + throw new Test262Error("valueOf() called"); } }; diff --git a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A10.js b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A10.js index 8bef9171c9..54385a21a8 100644 --- a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A10.js +++ b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A10.js @@ -14,7 +14,7 @@ includes: [propertyHelper.js] //CHECK#1 if (!(Object.prototype.propertyIsEnumerable.hasOwnProperty('length'))) { - $ERROR('#1: the Object.prototype.propertyIsEnumerable has length property'); + throw new Test262Error('#1: the Object.prototype.propertyIsEnumerable has length property'); } var obj = Object.prototype.propertyIsEnumerable.length; @@ -25,5 +25,5 @@ verifyNotWritable(Object.prototype.propertyIsEnumerable, "length", null, functio //CHECK#2 if (Object.prototype.propertyIsEnumerable.length !== obj) { - $ERROR('#2: the Object.prototype.propertyIsEnumerable length property has the attributes ReadOnly'); + throw new Test262Error('#2: the Object.prototype.propertyIsEnumerable length property has the attributes ReadOnly'); } diff --git a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A11.js b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A11.js index 6c9cbe659b..35d2d5e2da 100644 --- a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A11.js +++ b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A11.js @@ -9,10 +9,10 @@ description: Checking the value of Object.prototype.hasOwnProperty.length //CHECK#1 if (!(Object.prototype.propertyIsEnumerable.hasOwnProperty("length"))) { - $ERROR('#1: the Object.prototype.propertyIsEnumerable has length property'); + throw new Test262Error('#1: the Object.prototype.propertyIsEnumerable has length property'); } //CHECK#2 if (Object.prototype.propertyIsEnumerable.length !== 1) { - $ERROR('#2: The length property of the toObject method is 1'); + throw new Test262Error('#2: The length property of the toObject method is 1'); } diff --git a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A1_T1.js b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A1_T1.js index a571b5a297..c7e48df8f8 100644 --- a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A1_T1.js +++ b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A1_T1.js @@ -13,7 +13,7 @@ description: > //CHECK#1 if (typeof Object.prototype.propertyIsEnumerable !== "function") { - $ERROR('#1: propertyIsEnumerable method is defined'); + throw new Test262Error('#1: propertyIsEnumerable method is defined'); } var proto = { @@ -30,16 +30,16 @@ var seagull = new AVISFACTORY("seagull"); //CHECK#2 if (typeof seagull.propertyIsEnumerable !== "function") { - $ERROR('#2: propertyIsEnumerable method is accessed'); + throw new Test262Error('#2: propertyIsEnumerable method is accessed'); } //CHECK#3 if (!(seagull.propertyIsEnumerable("name"))) { - $ERROR('#3: propertyIsEnumerable method works properly'); + throw new Test262Error('#3: propertyIsEnumerable method works properly'); } //CHECK#4 if (seagull.propertyIsEnumerable("rootprop")) { - $ERROR('#4: propertyIsEnumerable method does not consider objects in the prototype chain'); + throw new Test262Error('#4: propertyIsEnumerable method does not consider objects in the prototype chain'); } // diff --git a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A2_T1.js b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A2_T1.js index cdd3b579a5..df53c1359f 100644 --- a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A2_T1.js +++ b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A2_T1.js @@ -17,11 +17,11 @@ description: > //CHECK#1 if (typeof Object.prototype.propertyIsEnumerable !== "function") { - $ERROR('#1: hasOwnProperty method is defined'); + throw new Test262Error('#1: hasOwnProperty method is defined'); } //CHECK#2 if (Object.prototype.propertyIsEnumerable("propertyIsEnumerable")) { - $ERROR('#2: hasOwnProperty method works properly'); + throw new Test262Error('#2: hasOwnProperty method works properly'); } // diff --git a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A2_T2.js b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A2_T2.js index 16aa7b4e27..c43d61ae41 100644 --- a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A2_T2.js +++ b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A2_T2.js @@ -17,7 +17,7 @@ description: > //CHECK#1 if (typeof Object.prototype.propertyIsEnumerable !== "function") { - $ERROR('#1: propertyIsEnumerable method is defined'); + throw new Test262Error('#1: propertyIsEnumerable method is defined'); } var obj = { @@ -26,12 +26,12 @@ var obj = { //CHECK#2 if (typeof obj.propertyIsEnumerable !== "function") { - $ERROR('#2: propertyIsEnumerable method is accessed'); + throw new Test262Error('#2: propertyIsEnumerable method is accessed'); } //CHECK#3 if (!(obj.propertyIsEnumerable("the_property"))) { - $ERROR('#3: propertyIsEnumerable method works properly'); + throw new Test262Error('#3: propertyIsEnumerable method works properly'); } //CHECK#4 @@ -40,6 +40,6 @@ for (var prop in obj) { accum += prop; } if (accum.indexOf("the_property") !== 0) { - $ERROR('#4: enumerating works properly'); + throw new Test262Error('#4: enumerating works properly'); } // diff --git a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A6.js b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A6.js index 001f70b48e..3c147edd62 100644 --- a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A6.js +++ b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A6.js @@ -11,6 +11,6 @@ description: > //CHECK#1 if (Object.prototype.propertyIsEnumerable.prototype !== undefined) { - $ERROR('#1: Object.prototype.propertyIsEnumerable has not prototype property' + Object.prototype.propertyIsEnumerable.prototype); + throw new Test262Error('#1: Object.prototype.propertyIsEnumerable has not prototype property' + Object.prototype.propertyIsEnumerable.prototype); } // diff --git a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A8.js b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A8.js index 70465fab8e..b625c00039 100644 --- a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A8.js +++ b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A8.js @@ -13,18 +13,18 @@ description: > //CHECK#0 if (!(Object.prototype.propertyIsEnumerable.hasOwnProperty('length'))) { - $ERROR('#0: the Object.prototype.propertyIsEnumerable has length property'); + throw new Test262Error('#0: the Object.prototype.propertyIsEnumerable has length property'); } // CHECK#1 if (Object.prototype.propertyIsEnumerable.propertyIsEnumerable('length')) { - $ERROR('#1: the Object.prototype.propertyIsEnumerable.length property has the attributes DontEnum'); + throw new Test262Error('#1: the Object.prototype.propertyIsEnumerable.length property has the attributes DontEnum'); } // CHECK#2 for (var p in Object.prototype.propertyIsEnumerable) { if (p === "length") - $ERROR('#2: the Object.prototype.propertyIsEnumerable.length property has the attributes DontEnum'); + throw new Test262Error('#2: the Object.prototype.propertyIsEnumerable.length property has the attributes DontEnum'); } // diff --git a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A9.js b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A9.js index b13e5f001c..de32336545 100644 --- a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A9.js +++ b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A9.js @@ -13,11 +13,11 @@ description: > //CHECK#0 if (!(Object.prototype.propertyIsEnumerable.hasOwnProperty('length'))) { - $ERROR('#0: the Object.prototype.propertyIsEnumerable has length property'); + throw new Test262Error('#0: the Object.prototype.propertyIsEnumerable has length property'); } //CHECK#1 if (!delete Object.prototype.propertyIsEnumerable.length) { - $ERROR('#1: The Object.prototype.propertyIsEnumerable.length property does not have the attributes DontDelete'); + throw new Test262Error('#1: The Object.prototype.propertyIsEnumerable.length property does not have the attributes DontDelete'); } // diff --git a/test/built-ins/Object/prototype/propertyIsEnumerable/symbol_property_toString.js b/test/built-ins/Object/prototype/propertyIsEnumerable/symbol_property_toString.js index 1d41f6ea4a..648fcd3360 100644 --- a/test/built-ins/Object/prototype/propertyIsEnumerable/symbol_property_toString.js +++ b/test/built-ins/Object/prototype/propertyIsEnumerable/symbol_property_toString.js @@ -23,7 +23,7 @@ var wrapper = { return sym; }, valueOf: function() { - $ERROR("valueOf() called"); + throw new Test262Error("valueOf() called"); } }; diff --git a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A1.js b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A1.js index c1fad81ff3..2cf1ea7ca2 100644 --- a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A1.js +++ b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A1.js @@ -11,15 +11,15 @@ description: > //CHECK#1 if (typeof Object.prototype.toLocaleString !== "function") { - $ERROR('#1: toLocaleString method defined'); + throw new Test262Error('#1: toLocaleString method defined'); } //CHECK#2 if (Object.prototype.toLocaleString() !== Object.prototype.toString()) { - $ERROR('#1: toLocaleString function returns the result of calling toString()'); + throw new Test262Error('#1: toLocaleString function returns the result of calling toString()'); } //CHECK#2 if ({}.toLocaleString() !== {}.toString()) { - $ERROR('#2: toLocaleString function returns the result of calling toString()'); + throw new Test262Error('#2: toLocaleString function returns the result of calling toString()'); } diff --git a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A10.js b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A10.js index 874c1a86a1..dfdb84f0cc 100644 --- a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A10.js +++ b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A10.js @@ -14,7 +14,7 @@ includes: [propertyHelper.js] //CHECK#1 if (!(Object.prototype.toLocaleString.hasOwnProperty('length'))) { - $ERROR('#1: the Object.prototype.toLocaleString has length property.'); + throw new Test262Error('#1: the Object.prototype.toLocaleString has length property.'); } var obj = Object.prototype.toLocaleString.length; @@ -25,5 +25,5 @@ verifyNotWritable(Object.prototype.toLocaleString, "length", null, function() { //CHECK#2 if (Object.prototype.toLocaleString.length !== obj) { - $ERROR('#2: the Object.prototype.toLocaleString length property has the attributes ReadOnly.'); + throw new Test262Error('#2: the Object.prototype.toLocaleString length property has the attributes ReadOnly.'); } diff --git a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A11.js b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A11.js index 41828b41fd..d75b565d4e 100644 --- a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A11.js +++ b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A11.js @@ -9,10 +9,10 @@ description: Checking the Object.prototype.toLocaleString.length //CHECK#1 if (!(Object.prototype.toLocaleString.hasOwnProperty("length"))) { - $ERROR('#1: The length property of the toLocaleString method is 0'); + throw new Test262Error('#1: The length property of the toLocaleString method is 0'); } //CHECK#2 if (Object.prototype.toLocaleString.length !== 0) { - $ERROR('#2: The length property of the toLocaleString method is 0'); + throw new Test262Error('#2: The length property of the toLocaleString method is 0'); } diff --git a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A6.js b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A6.js index 21474c3d61..8b91c83818 100644 --- a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A6.js +++ b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A6.js @@ -11,6 +11,6 @@ description: > //CHECK#1 if (Object.prototype.toLocaleString.prototype !== undefined) { - $ERROR('#1: Object.prototype.toLocaleString has not prototype property' + Object.prototype.toLocaleString.prototype); + throw new Test262Error('#1: Object.prototype.toLocaleString has not prototype property' + Object.prototype.toLocaleString.prototype); } // diff --git a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A8.js b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A8.js index 4e6402e8ce..8ccaaaa0dd 100644 --- a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A8.js +++ b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A8.js @@ -13,18 +13,18 @@ description: > //CHECK#0 if (!(Object.prototype.toLocaleString.hasOwnProperty('length'))) { - $ERROR('#0: the Object.prototype.toLocaleString has length property.'); + throw new Test262Error('#0: the Object.prototype.toLocaleString has length property.'); } // CHECK#1 if (Object.prototype.toLocaleString.propertyIsEnumerable('length')) { - $ERROR('#1: the Object.prototype.toLocaleString.length property has the attributes DontEnum'); + throw new Test262Error('#1: the Object.prototype.toLocaleString.length property has the attributes DontEnum'); } // CHECK#2 for (var p in Object.prototype.toLocaleString) { if (p === "length") - $ERROR('#2: the Object.prototype.toLocaleString.length property has the attributes DontEnum'); + throw new Test262Error('#2: the Object.prototype.toLocaleString.length property has the attributes DontEnum'); } // diff --git a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A9.js b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A9.js index 546b6b7891..9ad9048933 100644 --- a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A9.js +++ b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A9.js @@ -13,15 +13,15 @@ description: > //CHECK#0 if (!(Object.prototype.toLocaleString.hasOwnProperty('length'))) { - $ERROR('#0: the Object.prototype.toLocaleString has length property'); + throw new Test262Error('#0: the Object.prototype.toLocaleString has length property'); } //CHECK#1 if (!delete Object.prototype.toLocaleString.length) { - $ERROR('#1: The Object.prototype.toLocaleString.length property does not have the attributes DontDelete'); + throw new Test262Error('#1: The Object.prototype.toLocaleString.length property does not have the attributes DontDelete'); } //CHECK#2 if (Object.prototype.toLocaleString.hasOwnProperty('length')) { - $ERROR('#2: The Object.prototype.toLocaleString.length property does not have the attributes DontDelete'); + throw new Test262Error('#2: The Object.prototype.toLocaleString.length property does not have the attributes DontDelete'); } diff --git a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A10.js b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A10.js index c8d3c25a5b..87bf53f3a3 100644 --- a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A10.js +++ b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A10.js @@ -12,7 +12,7 @@ includes: [propertyHelper.js] //CHECK#1 if (!(Object.prototype.valueOf.hasOwnProperty('length'))) { - $ERROR('#1: the Object.prototype.valueOf has length property.'); + throw new Test262Error('#1: the Object.prototype.valueOf has length property.'); } var obj = Object.prototype.valueOf.length; @@ -23,5 +23,5 @@ verifyNotWritable(Object.prototype.valueOf, "length", null, function() { //CHECK#2 if (Object.prototype.valueOf.length !== obj) { - $ERROR('#2: the Object.prototype.valueOf length property has the attributes ReadOnly.'); + throw new Test262Error('#2: the Object.prototype.valueOf length property has the attributes ReadOnly.'); } diff --git a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A11.js b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A11.js index 7ed73a36d5..a458389c8f 100644 --- a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A11.js +++ b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A11.js @@ -9,10 +9,10 @@ description: Checking the Object.prototype.valueOf.length //CHECK#1 if (!(Object.prototype.valueOf.hasOwnProperty("length"))) { - $ERROR('#1: The length property of the toObject method is 0'); + throw new Test262Error('#1: The length property of the toObject method is 0'); } //CHECK#2 if (Object.prototype.valueOf.length !== 0) { - $ERROR('#2: The length property of the toObject method is 0'); + throw new Test262Error('#2: The length property of the toObject method is 0'); } diff --git a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T1.js b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T1.js index 31e763a474..8b92b63bf5 100644 --- a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T1.js +++ b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T1.js @@ -9,17 +9,17 @@ description: "\"this\" value is a number" //CHECK#1 if (typeof Object.prototype.valueOf !== "function") { - $ERROR('#1: valueOf method defined'); + throw new Test262Error('#1: valueOf method defined'); } var obj = new Object(1.1); //CHECK#2 if (typeof obj.valueOf !== "function") { - $ERROR('#2: valueOf method accessed'); + throw new Test262Error('#2: valueOf method accessed'); } //CHECK#3 if (obj.valueOf() !== 1.1) { - $ERROR('#3: The valueOf method returns its this value'); + throw new Test262Error('#3: The valueOf method returns its this value'); } diff --git a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T2.js b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T2.js index 116cfeec6b..f9957da53a 100644 --- a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T2.js +++ b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T2.js @@ -9,17 +9,17 @@ description: "\"this\" value is a boolean" //CHECK#1 if (typeof Object.prototype.valueOf !== "function") { - $ERROR('#1: valueOf method defined'); + throw new Test262Error('#1: valueOf method defined'); } var obj = new Object(true); //CHECK#2 if (typeof obj.valueOf !== "function") { - $ERROR('#2: valueOf method accessed'); + throw new Test262Error('#2: valueOf method accessed'); } //CHECK#3 if (obj.valueOf() !== true) { - $ERROR('#3: The valueOf method returns its this value'); + throw new Test262Error('#3: The valueOf method returns its this value'); } diff --git a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T3.js b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T3.js index 7a62551a31..0696660a84 100644 --- a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T3.js +++ b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T3.js @@ -9,17 +9,17 @@ description: "\"this\" value is a string" //CHECK#1 if (typeof Object.prototype.valueOf !== "function") { - $ERROR('#1: valueOf method defined'); + throw new Test262Error('#1: valueOf method defined'); } var obj = new Object("greenfield"); //CHECK#2 if (typeof obj.valueOf !== "function") { - $ERROR('#2: valueOf method accessed'); + throw new Test262Error('#2: valueOf method accessed'); } //CHECK#3 if (obj.valueOf() !== "greenfield") { - $ERROR('#3: The valueOf method returns its this value'); + throw new Test262Error('#3: The valueOf method returns its this value'); } diff --git a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T4.js b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T4.js index b5e10ce3f8..85e4c711be 100644 --- a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T4.js +++ b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T4.js @@ -9,17 +9,17 @@ description: "\"this\" value is an object" //CHECK#1 if (typeof Object.prototype.valueOf !== "function") { - $ERROR('#1: valueOf method defined'); + throw new Test262Error('#1: valueOf method defined'); } var obj = new Object; //CHECK#2 if (typeof obj.valueOf !== "function") { - $ERROR('#2: valueOf method accessed'); + throw new Test262Error('#2: valueOf method accessed'); } //CHECK#3 if (obj.valueOf() !== obj) { - $ERROR('#3: The valueOf method returns its this value'); + throw new Test262Error('#3: The valueOf method returns its this value'); } diff --git a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T5.js b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T5.js index ad158cea26..b18598e28b 100644 --- a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T5.js +++ b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T5.js @@ -9,17 +9,17 @@ description: "\"this\" value is \"null\"" //CHECK#1 if (typeof Object.prototype.valueOf !== "function") { - $ERROR('#1: valueOf method defined'); + throw new Test262Error('#1: valueOf method defined'); } var obj = new Object(null); //CHECK#2 if (typeof obj.valueOf !== "function") { - $ERROR('#2: valueOf method accessed'); + throw new Test262Error('#2: valueOf method accessed'); } //CHECK#3 if (obj.valueOf() !== obj) { - $ERROR('#3: The valueOf method returns its this value'); + throw new Test262Error('#3: The valueOf method returns its this value'); } diff --git a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T6.js b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T6.js index b371d63d08..b37d43f01f 100644 --- a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T6.js +++ b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T6.js @@ -9,17 +9,17 @@ description: "\"this\" value is \"undefined\"" //CHECK#1 if (typeof Object.prototype.valueOf !== "function") { - $ERROR('#1: valueOf method defined'); + throw new Test262Error('#1: valueOf method defined'); } var obj = new Object(undefined); //CHECK#2 if (typeof obj.valueOf !== "function") { - $ERROR('#2: valueOf method accessed'); + throw new Test262Error('#2: valueOf method accessed'); } //CHECK#3 if (obj.valueOf() !== obj) { - $ERROR('#3: The valueOf method returns its this value'); + throw new Test262Error('#3: The valueOf method returns its this value'); } diff --git a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T7.js b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T7.js index 61befa57cd..6c8a26d36e 100644 --- a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T7.js +++ b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A1_T7.js @@ -9,17 +9,17 @@ description: "\"this\" value is \"void 0\"" //CHECK#1 if (typeof Object.prototype.valueOf !== "function") { - $ERROR('#1: valueOf method defined'); + throw new Test262Error('#1: valueOf method defined'); } var obj = new Object(void 0); //CHECK#2 if (typeof obj.valueOf !== "function") { - $ERROR('#2: valueOf method accessed'); + throw new Test262Error('#2: valueOf method accessed'); } //CHECK#3 if (obj.valueOf() !== obj) { - $ERROR('#3: The valueOf method returns its this value'); + throw new Test262Error('#3: The valueOf method returns its this value'); } diff --git a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A6.js b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A6.js index 931f2d41f5..bf374ff792 100644 --- a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A6.js +++ b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A6.js @@ -11,6 +11,6 @@ description: > //CHECK#1 if (Object.prototype.valueOf.prototype !== undefined) { - $ERROR('#1: Object.prototype.valueOf has not prototype property' + Object.prototype.valueOf.prototype); + throw new Test262Error('#1: Object.prototype.valueOf has not prototype property' + Object.prototype.valueOf.prototype); } // diff --git a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A8.js b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A8.js index 424e643306..85d4bd9b79 100644 --- a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A8.js +++ b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A8.js @@ -11,18 +11,18 @@ description: > //CHECK#0 if (!(Object.prototype.valueOf.hasOwnProperty('length'))) { - $ERROR('#0: the Object.prototype.valueOf has length property.'); + throw new Test262Error('#0: the Object.prototype.valueOf has length property.'); } // CHECK#1 if (Object.prototype.valueOf.propertyIsEnumerable('length')) { - $ERROR('#1: the Object.prototype.valueOf.length property has the attributes DontEnum'); + throw new Test262Error('#1: the Object.prototype.valueOf.length property has the attributes DontEnum'); } // CHECK#2 for (var p in Object.prototype.valueOf) { if (p === "length") - $ERROR('#2: the Object.prototype.valueOf.length property has the attributes DontEnum'); + throw new Test262Error('#2: the Object.prototype.valueOf.length property has the attributes DontEnum'); } // diff --git a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A9.js b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A9.js index ef8a4b8035..a5d2960c29 100644 --- a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A9.js +++ b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A9.js @@ -13,15 +13,15 @@ description: > //CHECK#0 if (!(Object.prototype.valueOf.hasOwnProperty('length'))) { - $ERROR('#0: the Object.prototype.valueOf has length property'); + throw new Test262Error('#0: the Object.prototype.valueOf has length property'); } //CHECK#1 if (!delete Object.prototype.valueOf.length) { - $ERROR('#1: The Object.prototype.valueOf.length property does not have the attributes DontDelete'); + throw new Test262Error('#1: The Object.prototype.valueOf.length property does not have the attributes DontDelete'); } //CHECK#2 if (Object.prototype.valueOf.hasOwnProperty('length')) { - $ERROR('#2: The Object.prototype.valueOf.length property does not have the attributes DontDelete'); + throw new Test262Error('#2: The Object.prototype.valueOf.length property does not have the attributes DontDelete'); } diff --git a/test/built-ins/Object/seal/configurable-attribute-all-own-properties-set-from-true-to-false-property-are-unaltered.js b/test/built-ins/Object/seal/configurable-attribute-all-own-properties-set-from-true-to-false-property-are-unaltered.js index 03ba9015e4..2434aa78fb 100644 --- a/test/built-ins/Object/seal/configurable-attribute-all-own-properties-set-from-true-to-false-property-are-unaltered.js +++ b/test/built-ins/Object/seal/configurable-attribute-all-own-properties-set-from-true-to-false-property-are-unaltered.js @@ -37,7 +37,7 @@ var preCheck = Object.isExtensible(obj); Object.seal(obj); if (!preCheck) { - $ERROR('Expected preCheck to be true, actually ' + preCheck); + throw new Test262Error('Expected preCheck to be true, actually ' + preCheck); } diff --git a/test/built-ins/Object/seal/configurable-attribute-own-accessor-property-set-from-true-to-false-property-are-unaltered.js b/test/built-ins/Object/seal/configurable-attribute-own-accessor-property-set-from-true-to-false-property-are-unaltered.js index 315d7039a9..6c1f428277 100644 --- a/test/built-ins/Object/seal/configurable-attribute-own-accessor-property-set-from-true-to-false-property-are-unaltered.js +++ b/test/built-ins/Object/seal/configurable-attribute-own-accessor-property-set-from-true-to-false-property-are-unaltered.js @@ -30,7 +30,7 @@ var preCheck = Object.isExtensible(obj); Object.seal(obj); if (!preCheck) { - $ERROR('Expected preCheck to be true, actually ' + preCheck); + throw new Test262Error('Expected preCheck to be true, actually ' + preCheck); } verifyEqualTo(obj, "foo", getFunc()); diff --git a/test/built-ins/Object/seal/object-seal-all-own-properties-of-o-are-already-non-configurable.js b/test/built-ins/Object/seal/object-seal-all-own-properties-of-o-are-already-non-configurable.js index d9c5411418..819cc0c762 100644 --- a/test/built-ins/Object/seal/object-seal-all-own-properties-of-o-are-already-non-configurable.js +++ b/test/built-ins/Object/seal/object-seal-all-own-properties-of-o-are-already-non-configurable.js @@ -34,13 +34,13 @@ Object.defineProperty(obj, "foo2", { }); if (!Object.isExtensible(obj)) { - $ERROR('Expected obj to be extensible, actually ' + Object.isExtensible(obj)); + throw new Test262Error('Expected obj to be extensible, actually ' + Object.isExtensible(obj)); } Object.seal(obj); if (Object.isExtensible(obj)) { - $ERROR('Expected obj NOT to be extensible, actually ' + Object.isExtensible(obj)); + throw new Test262Error('Expected obj NOT to be extensible, actually ' + Object.isExtensible(obj)); } verifyEqualTo(obj, "foo1", 10); diff --git a/test/built-ins/Object/seal/object-seal-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js b/test/built-ins/Object/seal/object-seal-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js index db6ca9b1b0..17f53602f9 100644 --- a/test/built-ins/Object/seal/object-seal-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js +++ b/test/built-ins/Object/seal/object-seal-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js @@ -22,7 +22,7 @@ var preCheck = Object.isExtensible(obj); Object.seal(obj); if (!preCheck) { - $ERROR('Expected preCheck to be true, actually ' + preCheck); + throw new Test262Error('Expected preCheck to be true, actually ' + preCheck); } verifyEqualTo(obj, "foo", 10); diff --git a/test/built-ins/Object/setPrototypeOf/bigint.js b/test/built-ins/Object/setPrototypeOf/bigint.js index e3a3fceda1..454e5ee1e8 100644 --- a/test/built-ins/Object/setPrototypeOf/bigint.js +++ b/test/built-ins/Object/setPrototypeOf/bigint.js @@ -10,7 +10,7 @@ features: [BigInt] try { let {} = 0n; } catch (e) { - $ERROR('Expected RequireObjectCoercible to succeed for BigInt values'); + throw new Test262Error('Expected RequireObjectCoercible to succeed for BigInt values'); } assert.sameValue(Object.setPrototypeOf(0n, null), 0n); diff --git a/test/built-ins/Object/values/exception-during-enumeration.js b/test/built-ins/Object/values/exception-during-enumeration.js index 0446a33c52..b28545a940 100644 --- a/test/built-ins/Object/values/exception-during-enumeration.js +++ b/test/built-ins/Object/values/exception-during-enumeration.js @@ -12,7 +12,7 @@ var trappedKey = { throw new RangeError('This error should be re-thrown'); }, get b() { - $ERROR('Should not try to get the second element'); + throw new Test262Error('Should not try to get the second element'); } }; diff --git a/test/built-ins/Object/values/tamper-with-global-object.js b/test/built-ins/Object/values/tamper-with-global-object.js index 86d5340465..2fb2454898 100644 --- a/test/built-ins/Object/values/tamper-with-global-object.js +++ b/test/built-ins/Object/values/tamper-with-global-object.js @@ -9,7 +9,7 @@ author: Jordan Harband ---*/ function fakeObject() { - $ERROR('The overriden version of Object was called!'); + throw new Test262Error('The overriden version of Object was called!'); } fakeObject.values = Object.values; diff --git a/test/built-ins/Object/values/tamper-with-object-keys.js b/test/built-ins/Object/values/tamper-with-object-keys.js index 51dfbf5c46..bcb65f3762 100644 --- a/test/built-ins/Object/values/tamper-with-object-keys.js +++ b/test/built-ins/Object/values/tamper-with-object-keys.js @@ -9,7 +9,7 @@ author: Jordan Harband ---*/ function fakeObjectKeys() { - $ERROR('The overriden version of Object.keys was called!'); + throw new Test262Error('The overriden version of Object.keys was called!'); } Object.keys = fakeObjectKeys;