diff --git a/test/built-ins/Function/S10.1.1_A1_T3.js b/test/built-ins/Function/S10.1.1_A1_T3.js index 3a9d96b63b..54f7eb9eaf 100644 --- a/test/built-ins/Function/S10.1.1_A1_T3.js +++ b/test/built-ins/Function/S10.1.1_A1_T3.js @@ -16,4 +16,4 @@ var x = new function f1() { return 1; }; if (typeof(x.constructor) !== "function") - $ERROR('#1: typeof(x.constructor)!=="function"'); + throw new Test262Error('#1: typeof(x.constructor)!=="function"'); diff --git a/test/built-ins/Function/S15.3.1_A1_T1.js b/test/built-ins/Function/S15.3.1_A1_T1.js index 8175c337df..d956532990 100644 --- a/test/built-ins/Function/S15.3.1_A1_T1.js +++ b/test/built-ins/Function/S15.3.1_A1_T1.js @@ -13,12 +13,12 @@ var f = Function("return arguments[0];"); //CHECK#1 if (!(f instanceof Function)) { - $ERROR('#1: f instanceof Function'); + throw new Test262Error('#1: f instanceof Function'); } //CHECK#2 if (f(1) !== 1) { - $ERROR('#2: f(1) !== 1'); + throw new Test262Error('#2: f(1) !== 1'); } var g = new Function("return arguments[0];"); @@ -26,15 +26,15 @@ var g = new Function("return arguments[0];"); //CHECK#3 if (!(g instanceof Function)) { - $ERROR('#3: g instanceof Function'); + throw new Test262Error('#3: g instanceof Function'); } //CHECK#4 if (g("A") !== "A") { - $ERROR('#4: g("A") !== "A"'); + throw new Test262Error('#4: g("A") !== "A"'); } //CHECK#5 if (g("A") !== f("A")) { - $ERROR('#5: g("A") !== f("A")'); + throw new Test262Error('#5: g("A") !== f("A")'); } diff --git a/test/built-ins/Function/S15.3.2.1_A1_T1.js b/test/built-ins/Function/S15.3.2.1_A1_T1.js index 52e20e1fd1..6fc8c0cee6 100644 --- a/test/built-ins/Function/S15.3.2.1_A1_T1.js +++ b/test/built-ins/Function/S15.3.2.1_A1_T1.js @@ -23,9 +23,9 @@ var body = { //CHECK#1 try { var f = new Function(body); - $ERROR('#1: When the Function constructor is called with one argument then body be that argument the following step are taken: call ToString(body)'); + throw new Test262Error('#1: When the Function constructor is called with one argument then body be that argument the following step are taken: call ToString(body)'); } catch (e) { if (e !== 7) { - $ERROR('#1.1: When the Function constructor is called with one argument then body be that argument the following step are taken: call ToString(body)'); + throw new Test262Error('#1.1: When the Function constructor is called with one argument then body be that argument the following step are taken: call ToString(body)'); } } diff --git a/test/built-ins/Function/S15.3.2.1_A1_T10.js b/test/built-ins/Function/S15.3.2.1_A1_T10.js index 764e5b2a00..ede43780bc 100644 --- a/test/built-ins/Function/S15.3.2.1_A1_T10.js +++ b/test/built-ins/Function/S15.3.2.1_A1_T10.js @@ -18,15 +18,15 @@ description: Value of the function constructor argument is "null" try { var f = new Function(null); } catch (e) { - $ERROR('#1: test fails with error ' + e); + throw new Test262Error('#1: test fails with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); } //CHECK#3 if (f() !== undefined) { - $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } diff --git a/test/built-ins/Function/S15.3.2.1_A1_T11.js b/test/built-ins/Function/S15.3.2.1_A1_T11.js index 74248f2832..174235723a 100644 --- a/test/built-ins/Function/S15.3.2.1_A1_T11.js +++ b/test/built-ins/Function/S15.3.2.1_A1_T11.js @@ -18,15 +18,15 @@ description: Value of the function constructor argument is "undefined" try { var f = new Function(undefined); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); } //CHECK#3 if (f() !== undefined) { - $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } diff --git a/test/built-ins/Function/S15.3.2.1_A1_T12.js b/test/built-ins/Function/S15.3.2.1_A1_T12.js index 81d816f38e..efdd574425 100644 --- a/test/built-ins/Function/S15.3.2.1_A1_T12.js +++ b/test/built-ins/Function/S15.3.2.1_A1_T12.js @@ -18,15 +18,15 @@ description: Value of the function constructor argument is "void 0" try { var f = new Function(void 0); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); } //CHECK#3 if (f() !== undefined) { - $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } diff --git a/test/built-ins/Function/S15.3.2.1_A1_T13.js b/test/built-ins/Function/S15.3.2.1_A1_T13.js index 09942b2c59..131981f350 100644 --- a/test/built-ins/Function/S15.3.2.1_A1_T13.js +++ b/test/built-ins/Function/S15.3.2.1_A1_T13.js @@ -17,9 +17,9 @@ description: Value of the function constructor argument is "{}" //CHECK#1 try { var f = new Function({}); - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } catch (e) { if (!(e instanceof SyntaxError)) { - $ERROR('#1.1: If body is not parsable as FunctionBody then throw a SyntaxError exception'); + throw new Test262Error('#1.1: If body is not parsable as FunctionBody then throw a SyntaxError exception'); } } diff --git a/test/built-ins/Function/S15.3.2.1_A1_T2.js b/test/built-ins/Function/S15.3.2.1_A1_T2.js index a1424960b6..6f54ecfbad 100644 --- a/test/built-ins/Function/S15.3.2.1_A1_T2.js +++ b/test/built-ins/Function/S15.3.2.1_A1_T2.js @@ -26,15 +26,15 @@ var body = { try { var f = new Function(body); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); } //CHECK#3 if (f() !== 1) { - $ERROR('#3: hen the Function constructor is called with one argument then body be that argument the following steps are taken...'); + throw new Test262Error('#3: hen the Function constructor is called with one argument then body be that argument the following steps are taken...'); } diff --git a/test/built-ins/Function/S15.3.2.1_A1_T3.js b/test/built-ins/Function/S15.3.2.1_A1_T3.js index 25e9f5493f..a3f6bff4cb 100644 --- a/test/built-ins/Function/S15.3.2.1_A1_T3.js +++ b/test/built-ins/Function/S15.3.2.1_A1_T3.js @@ -18,15 +18,15 @@ description: Value of the function constructor argument is 1 try { var f = new Function(1); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); } //CHECK#3 if (f() !== undefined) { - $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } diff --git a/test/built-ins/Function/S15.3.2.1_A1_T4.js b/test/built-ins/Function/S15.3.2.1_A1_T4.js index 2b9be51a58..5ad84eadfa 100644 --- a/test/built-ins/Function/S15.3.2.1_A1_T4.js +++ b/test/built-ins/Function/S15.3.2.1_A1_T4.js @@ -20,17 +20,17 @@ description: > try { var f = new Function(x); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); } //CHECK#3 if (f() !== undefined) { - $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } var x; diff --git a/test/built-ins/Function/S15.3.2.1_A1_T5.js b/test/built-ins/Function/S15.3.2.1_A1_T5.js index c7c3df4c09..553cba3ddb 100644 --- a/test/built-ins/Function/S15.3.2.1_A1_T5.js +++ b/test/built-ins/Function/S15.3.2.1_A1_T5.js @@ -22,15 +22,15 @@ var body = Object("return \'A\'"); try { var f = new Function(body); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); } //CHECK#3 if (f() !== "\u0041") { - $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } diff --git a/test/built-ins/Function/S15.3.2.1_A1_T6.js b/test/built-ins/Function/S15.3.2.1_A1_T6.js index 548718444b..8f40503c8e 100644 --- a/test/built-ins/Function/S15.3.2.1_A1_T6.js +++ b/test/built-ins/Function/S15.3.2.1_A1_T6.js @@ -20,15 +20,15 @@ description: > try { var f = new Function("return true;"); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); } //CHECK#3 if (!(f())) { - $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } diff --git a/test/built-ins/Function/S15.3.2.1_A1_T7.js b/test/built-ins/Function/S15.3.2.1_A1_T7.js index bb68c4257d..be884d91f3 100644 --- a/test/built-ins/Function/S15.3.2.1_A1_T7.js +++ b/test/built-ins/Function/S15.3.2.1_A1_T7.js @@ -20,15 +20,15 @@ var body = new Object(1); try { var f = new Function(body); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); } //CHECK#3 if (f() !== undefined) { - $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } diff --git a/test/built-ins/Function/S15.3.2.1_A1_T8.js b/test/built-ins/Function/S15.3.2.1_A1_T8.js index e17847cbde..063bf2d739 100644 --- a/test/built-ins/Function/S15.3.2.1_A1_T8.js +++ b/test/built-ins/Function/S15.3.2.1_A1_T8.js @@ -19,9 +19,9 @@ var body = "var 1=1;"; //CHECK#1 try { var f = new Function(body); - $ERROR('#1: If body is not parsable as FunctionBody then throw a SyntaxError exception'); + throw new Test262Error('#1: If body is not parsable as FunctionBody then throw a SyntaxError exception'); } catch (e) { if (!(e instanceof SyntaxError)) { - $ERROR('#1.1: If body is not parsable as FunctionBody then throw a SyntaxError exception'); + throw new Test262Error('#1.1: If body is not parsable as FunctionBody then throw a SyntaxError exception'); } } diff --git a/test/built-ins/Function/S15.3.2.1_A1_T9.js b/test/built-ins/Function/S15.3.2.1_A1_T9.js index b5df95aa47..df2acd1434 100644 --- a/test/built-ins/Function/S15.3.2.1_A1_T9.js +++ b/test/built-ins/Function/S15.3.2.1_A1_T9.js @@ -20,10 +20,10 @@ var f = new Function("return arguments[0];"); //CHECK#1 if (!(f instanceof Function)) { - $ERROR('#3: When the Function constructor is called with one argument then body be that argument and the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with one argument then body be that argument and the following steps are taken...'); } //CHECK#2 if (f("A") !== "A") { - $ERROR('#2: When the Function constructor is called with one argument then body be that argument and the following steps are taken...'); + throw new Test262Error('#2: When the Function constructor is called with one argument then body be that argument and the following steps are taken...'); } diff --git a/test/built-ins/Function/S15.3.2.1_A2_T1.js b/test/built-ins/Function/S15.3.2.1_A2_T1.js index e007a4af01..59025264fd 100644 --- a/test/built-ins/Function/S15.3.2.1_A2_T1.js +++ b/test/built-ins/Function/S15.3.2.1_A2_T1.js @@ -15,15 +15,15 @@ description: > try { var f = Function("arg1", "arg2", "arg3", "return arg1+arg2+arg3;"); } catch (e) { - $ERROR('#1: test failed'); + throw new Test262Error('#1: test failed'); } //CHECK#2 if (!(f instanceof Function)) { - $ERROR('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified'); + throw new Test262Error('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } //CHECK#3 if (f(1, 2, 3) !== 6) { - $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); + throw new Test262Error('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } diff --git a/test/built-ins/Function/S15.3.2.1_A2_T2.js b/test/built-ins/Function/S15.3.2.1_A2_T2.js index 241712a5b7..2323c609fd 100644 --- a/test/built-ins/Function/S15.3.2.1_A2_T2.js +++ b/test/built-ins/Function/S15.3.2.1_A2_T2.js @@ -15,15 +15,15 @@ description: > try { var f = Function("arg1, arg2", "arg3", "return arg1+arg2+arg3;"); } catch (e) { - $ERROR('#1: test failed'); + throw new Test262Error('#1: test failed'); } //CHECK#2 if (!(f instanceof Function)) { - $ERROR('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified'); + throw new Test262Error('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } //CHECK#3 if (f("AB", "BA", 1) !== "ABBA1") { - $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); + throw new Test262Error('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } diff --git a/test/built-ins/Function/S15.3.2.1_A2_T3.js b/test/built-ins/Function/S15.3.2.1_A2_T3.js index dee237ec5a..5c75b000f1 100644 --- a/test/built-ins/Function/S15.3.2.1_A2_T3.js +++ b/test/built-ins/Function/S15.3.2.1_A2_T3.js @@ -15,15 +15,15 @@ description: > try { var f = Function("arg1, arg2, arg3", "return arg1+arg2+arg3;"); } catch (e) { - $ERROR('#1: test failed'); + throw new Test262Error('#1: test failed'); } //CHECK#2 if (!(f instanceof Function)) { - $ERROR('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified'); + throw new Test262Error('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } //CHECK#3 if (f(1, 1, "ABBA") !== "2ABBA") { - $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); + throw new Test262Error('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } diff --git a/test/built-ins/Function/S15.3.2.1_A2_T4.js b/test/built-ins/Function/S15.3.2.1_A2_T4.js index d2e54ebb22..1fd4e4b7f8 100644 --- a/test/built-ins/Function/S15.3.2.1_A2_T4.js +++ b/test/built-ins/Function/S15.3.2.1_A2_T4.js @@ -23,15 +23,15 @@ var p = { try { var f = Function(p, p, p, "return arg1+arg2+arg3;"); } catch (e) { - $ERROR('#1: test failed'); + throw new Test262Error('#1: test failed'); } //CHECK#2 if (!(f instanceof Function)) { - $ERROR('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified'); + throw new Test262Error('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } //CHECK#3 if (f(4, "2", "QUESTION") !== "42QUESTION") { - $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); + throw new Test262Error('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } diff --git a/test/built-ins/Function/S15.3.2.1_A2_T5.js b/test/built-ins/Function/S15.3.2.1_A2_T5.js index bc9b1f0b46..fae676a25a 100644 --- a/test/built-ins/Function/S15.3.2.1_A2_T5.js +++ b/test/built-ins/Function/S15.3.2.1_A2_T5.js @@ -23,15 +23,15 @@ var p = { try { var f = Function(p + "," + p, p, "return arg1+arg2+arg3;"); } catch (e) { - $ERROR('#1: test failed'); + throw new Test262Error('#1: test failed'); } //CHECK#2 if (!(f instanceof Function)) { - $ERROR('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified'); + throw new Test262Error('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } //CHECK#3 if (f("", 1, 2) !== "12") { - $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); + throw new Test262Error('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } diff --git a/test/built-ins/Function/S15.3.2.1_A2_T6.js b/test/built-ins/Function/S15.3.2.1_A2_T6.js index 0d658808de..a7a973d1ed 100644 --- a/test/built-ins/Function/S15.3.2.1_A2_T6.js +++ b/test/built-ins/Function/S15.3.2.1_A2_T6.js @@ -23,15 +23,15 @@ var p = { try { var f = Function(p + "," + p + "," + p, "return arg1+arg2+arg3;"); } catch (e) { - $ERROR('#1: test failed'); + throw new Test262Error('#1: test failed'); } //CHECK#2 if (!(f instanceof Function)) { - $ERROR('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified'); + throw new Test262Error('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } //CHECK#3 if (f("", 1, p) !== "1arg4") { - $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); + throw new Test262Error('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } diff --git a/test/built-ins/Function/S15.3.2.1_A3_T1.js b/test/built-ins/Function/S15.3.2.1_A3_T1.js index b5c796b350..7c7a6f05c2 100644 --- a/test/built-ins/Function/S15.3.2.1_A3_T1.js +++ b/test/built-ins/Function/S15.3.2.1_A3_T1.js @@ -33,9 +33,9 @@ var body = { //CHECK#1 try { var f = new Function(p, body); - $ERROR('#1: test failed'); + throw new Test262Error('#1: test failed'); } catch (e) { if (e !== 1) { - $ERROR('#1.1: i) Let Result(i) be the first argument; ii) Let P be ToString(Result(i))'); + throw new Test262Error('#1.1: i) Let Result(i) be the first argument; ii) Let P be ToString(Result(i))'); } } diff --git a/test/built-ins/Function/S15.3.2.1_A3_T10.js b/test/built-ins/Function/S15.3.2.1_A3_T10.js index 684c1e7da3..9504a28301 100644 --- a/test/built-ins/Function/S15.3.2.1_A3_T10.js +++ b/test/built-ins/Function/S15.3.2.1_A3_T10.js @@ -28,9 +28,9 @@ var p = { //CHECK#1 try { var f = new Function(p, body); - $ERROR('#1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception'); + throw new Test262Error('#1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception'); } catch (e) { if (!(e instanceof SyntaxError)) { - $ERROR('#1.1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception'); + throw new Test262Error('#1.1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception'); } } diff --git a/test/built-ins/Function/S15.3.2.1_A3_T11.js b/test/built-ins/Function/S15.3.2.1_A3_T11.js index 1091a94b38..ebaf91171a 100644 --- a/test/built-ins/Function/S15.3.2.1_A3_T11.js +++ b/test/built-ins/Function/S15.3.2.1_A3_T11.js @@ -24,15 +24,15 @@ var p = "a,b,c"; try { var f = new Function(p, void 0); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2'); } //CHECK#3 if (f() !== undefined) { - $ERROR('#3: When the Function constructor is called with arguments p, body the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with arguments p, body the following steps are taken...'); } diff --git a/test/built-ins/Function/S15.3.2.1_A3_T12.js b/test/built-ins/Function/S15.3.2.1_A3_T12.js index a87f0ba3e9..0d4aa018e8 100644 --- a/test/built-ins/Function/S15.3.2.1_A3_T12.js +++ b/test/built-ins/Function/S15.3.2.1_A3_T12.js @@ -24,15 +24,15 @@ var p = "a,b,c"; try { var f = new Function(p, undefined); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2'); } //CHECK#3 if (f() !== undefined) { - $ERROR('#3: When the Function constructor is called with arguments p, body the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with arguments p, body the following steps are taken...'); } diff --git a/test/built-ins/Function/S15.3.2.1_A3_T13.js b/test/built-ins/Function/S15.3.2.1_A3_T13.js index e2d5c251a5..4eb40decf6 100644 --- a/test/built-ins/Function/S15.3.2.1_A3_T13.js +++ b/test/built-ins/Function/S15.3.2.1_A3_T13.js @@ -22,15 +22,15 @@ var p = "a,b,c"; try { var f = new Function(p, null); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2'); } //CHECK#3 if (f() !== undefined) { - $ERROR('#3: When the Function constructor is called with arguments p, body the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with arguments p, body the following steps are taken...'); } diff --git a/test/built-ins/Function/S15.3.2.1_A3_T14.js b/test/built-ins/Function/S15.3.2.1_A3_T14.js index 38af3ccdfe..903c5d2b1b 100644 --- a/test/built-ins/Function/S15.3.2.1_A3_T14.js +++ b/test/built-ins/Function/S15.3.2.1_A3_T14.js @@ -24,17 +24,17 @@ var p = "a,b,c"; try { var f = new Function(p, body); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2'); } //CHECK#3 if (f() !== undefined) { - $ERROR('#3: When the Function constructor is called with arguments p, body the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with arguments p, body the following steps are taken...'); } var body; diff --git a/test/built-ins/Function/S15.3.2.1_A3_T15.js b/test/built-ins/Function/S15.3.2.1_A3_T15.js index 43796ef884..457f9b5328 100644 --- a/test/built-ins/Function/S15.3.2.1_A3_T15.js +++ b/test/built-ins/Function/S15.3.2.1_A3_T15.js @@ -22,15 +22,15 @@ description: > try { var f = new Function("", ""); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2'); } //CHECK#3 if (f() !== undefined) { - $ERROR('#3: When the Function constructor is called with arguments p, body the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with arguments p, body the following steps are taken...'); } diff --git a/test/built-ins/Function/S15.3.2.1_A3_T2.js b/test/built-ins/Function/S15.3.2.1_A3_T2.js index 069ddeabf4..bfc34cc8d3 100644 --- a/test/built-ins/Function/S15.3.2.1_A3_T2.js +++ b/test/built-ins/Function/S15.3.2.1_A3_T2.js @@ -29,15 +29,15 @@ var body = "return a;"; try { var f = new Function(p, body); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2'); } //CHECK#3 if (f(42) !== 42) { - $ERROR('#3: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2'); + throw new Test262Error('#3: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2'); } diff --git a/test/built-ins/Function/S15.3.2.1_A3_T3.js b/test/built-ins/Function/S15.3.2.1_A3_T3.js index 29454c2f91..e13742cd89 100644 --- a/test/built-ins/Function/S15.3.2.1_A3_T3.js +++ b/test/built-ins/Function/S15.3.2.1_A3_T3.js @@ -34,14 +34,14 @@ var body = { //CHECK#1 try { var f = new Function(p, body); - $ERROR('#1: test failed'); + throw new Test262Error('#1: test failed'); } catch (e) { if (e !== "body") { - $ERROR('#1.1: i) Let Result(i) be the first argument; ii) Let P be ToString(Result(i))'); + throw new Test262Error('#1.1: i) Let Result(i) be the first argument; ii) Let P be ToString(Result(i))'); } } //CHECK#2 if (p !== 1) { - $ERROR('#2: i) Let Result(i) be the first argument; ii) Let P be ToString(Result(i))'); + throw new Test262Error('#2: i) Let Result(i) be the first argument; ii) Let P be ToString(Result(i))'); } diff --git a/test/built-ins/Function/S15.3.2.1_A3_T4.js b/test/built-ins/Function/S15.3.2.1_A3_T4.js index 7a0ec0d00c..25c48428e2 100644 --- a/test/built-ins/Function/S15.3.2.1_A3_T4.js +++ b/test/built-ins/Function/S15.3.2.1_A3_T4.js @@ -24,17 +24,17 @@ var body = "return 1.1;"; try { var f = new Function(p, body); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); } //CHECK#3 if (f() !== 1.1) { - $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } var p; diff --git a/test/built-ins/Function/S15.3.2.1_A3_T5.js b/test/built-ins/Function/S15.3.2.1_A3_T5.js index 47a69636ba..c74bf651f8 100644 --- a/test/built-ins/Function/S15.3.2.1_A3_T5.js +++ b/test/built-ins/Function/S15.3.2.1_A3_T5.js @@ -24,15 +24,15 @@ var body = "return \"A\";"; try { var f = new Function(void 0, body); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); } //CHECK#3 if (f() !== '\u0041') { - $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } diff --git a/test/built-ins/Function/S15.3.2.1_A3_T6.js b/test/built-ins/Function/S15.3.2.1_A3_T6.js index f39efaffc8..10f7c9d80e 100644 --- a/test/built-ins/Function/S15.3.2.1_A3_T6.js +++ b/test/built-ins/Function/S15.3.2.1_A3_T6.js @@ -23,9 +23,9 @@ var body = "return true;"; //CHECK#1 try { var f = new Function(null, body); - $ERROR('#1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception'); + throw new Test262Error('#1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception'); } catch (e) { if (!(e instanceof SyntaxError)) { - $ERROR('#1.1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception'); + throw new Test262Error('#1.1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception'); } } diff --git a/test/built-ins/Function/S15.3.2.1_A3_T7.js b/test/built-ins/Function/S15.3.2.1_A3_T7.js index de41763f2e..42b2a10b49 100644 --- a/test/built-ins/Function/S15.3.2.1_A3_T7.js +++ b/test/built-ins/Function/S15.3.2.1_A3_T7.js @@ -26,15 +26,15 @@ var p = Object("a"); try { var f = new Function(p, body); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); } //CHECK#3 if (f(1) !== 1) { - $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } diff --git a/test/built-ins/Function/S15.3.2.1_A3_T8.js b/test/built-ins/Function/S15.3.2.1_A3_T8.js index 33d353c922..ada275e9c3 100644 --- a/test/built-ins/Function/S15.3.2.1_A3_T8.js +++ b/test/built-ins/Function/S15.3.2.1_A3_T8.js @@ -24,15 +24,15 @@ var body = "return this;"; try { var f = new Function(undefined, body); } catch (e) { - $ERROR('#1: test failed with error ' + e); + throw new Test262Error('#1: test failed with error ' + e); } //CHECK#2 if (f.constructor !== Function) { - $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); + throw new Test262Error('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2'); } //CHECK#3 if (f() !== this) { - $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); + throw new Test262Error('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } diff --git a/test/built-ins/Function/S15.3.2.1_A3_T9.js b/test/built-ins/Function/S15.3.2.1_A3_T9.js index d4134cb375..76dc04d09d 100644 --- a/test/built-ins/Function/S15.3.2.1_A3_T9.js +++ b/test/built-ins/Function/S15.3.2.1_A3_T9.js @@ -24,9 +24,9 @@ var p = "1,1"; //CHECK#1 try { var f = new Function(p, body); - $ERROR('#1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception'); + throw new Test262Error('#1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception'); } catch (e) { if (!(e instanceof SyntaxError)) { - $ERROR('#1.1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception'); + throw new Test262Error('#1.1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception'); } } diff --git a/test/built-ins/Function/S15.3.2_A1.js b/test/built-ins/Function/S15.3.2_A1.js index 112ec035c6..96c23dbe37 100644 --- a/test/built-ins/Function/S15.3.2_A1.js +++ b/test/built-ins/Function/S15.3.2_A1.js @@ -15,10 +15,10 @@ var f = new Function; //CHECK#1 if (f.constructor !== Function) { - $ERROR('#1: When Function is called as part of a new expression, it is a constructor: it initialises the newly created object'); + throw new Test262Error('#1: When Function is called as part of a new expression, it is a constructor: it initialises the newly created object'); } //CHECK#2 if (f === undefined) { - $ERROR('#2: When Function is called as part of a new expression, it is a constructor: it initialises the newly created object'); + throw new Test262Error('#2: When Function is called as part of a new expression, it is a constructor: it initialises the newly created object'); } diff --git a/test/built-ins/Function/S15.3.3_A1.js b/test/built-ins/Function/S15.3.3_A1.js index a498f01311..026447992b 100644 --- a/test/built-ins/Function/S15.3.3_A1.js +++ b/test/built-ins/Function/S15.3.3_A1.js @@ -8,5 +8,5 @@ description: Checking existence of the property "prototype" ---*/ if (!Function.hasOwnProperty("prototype")) { - $ERROR('#1: The Function constructor has the property "prototype"'); + throw new Test262Error('#1: The Function constructor has the property "prototype"'); } diff --git a/test/built-ins/Function/S15.3.3_A2_T1.js b/test/built-ins/Function/S15.3.3_A2_T1.js index d389d5b869..71e49fdf65 100644 --- a/test/built-ins/Function/S15.3.3_A2_T1.js +++ b/test/built-ins/Function/S15.3.3_A2_T1.js @@ -11,5 +11,5 @@ description: Checking prototype of Function // CHECK# if (!(Function.prototype.isPrototypeOf(Function))) { - $ERROR('#1: the value of the internal [[Prototype]] property of the Function constructor is the Function prototype object.'); + throw new Test262Error('#1: the value of the internal [[Prototype]] property of the Function constructor is the Function prototype object.'); } diff --git a/test/built-ins/Function/S15.3.3_A2_T2.js b/test/built-ins/Function/S15.3.3_A2_T2.js index a26f63b5a2..fbfe79c93e 100644 --- a/test/built-ins/Function/S15.3.3_A2_T2.js +++ b/test/built-ins/Function/S15.3.3_A2_T2.js @@ -13,5 +13,5 @@ Function.prototype.indicator = 1; //CHECK# if (Function.indicator != 1) { - $ERROR('#1: the value of the internal [[Prototype]] property of the Function constructor is the Function prototype object.'); + throw new Test262Error('#1: the value of the internal [[Prototype]] property of the Function constructor is the Function prototype object.'); } diff --git a/test/built-ins/Function/S15.3.3_A3.js b/test/built-ins/Function/S15.3.3_A3.js index b4fb578792..a5090b2689 100644 --- a/test/built-ins/Function/S15.3.3_A3.js +++ b/test/built-ins/Function/S15.3.3_A3.js @@ -9,10 +9,10 @@ description: Checking Function.length property //CHECK#1 if (!Function.hasOwnProperty("length")) { - $ERROR('#1: Function constructor has length property'); + throw new Test262Error('#1: Function constructor has length property'); } //CHECK#2 if (Function.length !== 1) { - $ERROR('#2: Function constructor length property value is 1'); + throw new Test262Error('#2: Function constructor length property value is 1'); } diff --git a/test/built-ins/Function/S15.3.5_A1_T1.js b/test/built-ins/Function/S15.3.5_A1_T1.js index 1d664f053a..2a4e6816f3 100644 --- a/test/built-ins/Function/S15.3.5_A1_T1.js +++ b/test/built-ins/Function/S15.3.5_A1_T1.js @@ -10,5 +10,5 @@ description: For testing use variable f = new Function var f = new Function; if (Object.prototype.toString.call(f) !== "[object Function]") { - $ERROR('#1: The value of the [[Class]] property is "Function"'); + throw new Test262Error('#1: The value of the [[Class]] property is "Function"'); } diff --git a/test/built-ins/Function/S15.3.5_A1_T2.js b/test/built-ins/Function/S15.3.5_A1_T2.js index 6eb4cc32b4..a8e9258f51 100644 --- a/test/built-ins/Function/S15.3.5_A1_T2.js +++ b/test/built-ins/Function/S15.3.5_A1_T2.js @@ -10,5 +10,5 @@ description: For testing use variable f = Function() var f = Function(); if (Object.prototype.toString.call(f) !== "[object Function]") { - $ERROR('#1: The value of the [[Class]] property is "Function"'); + throw new Test262Error('#1: The value of the [[Class]] property is "Function"'); } diff --git a/test/built-ins/Function/S15.3.5_A2_T1.js b/test/built-ins/Function/S15.3.5_A2_T1.js index 5889c52875..a0bcbe8fea 100644 --- a/test/built-ins/Function/S15.3.5_A2_T1.js +++ b/test/built-ins/Function/S15.3.5_A2_T1.js @@ -9,15 +9,15 @@ description: For testing call Function("var x =1; this.y=2;return \"OK\";")() //CHECK#1 if (Function("var x =1; this.y=2;return \"OK\";")() !== "OK") { - $ERROR('#1: Every function instance has a [[Call]] property'); + throw new Test262Error('#1: Every function instance has a [[Call]] property'); } //CHECK#2 if (typeof x !== "undefined") { - $ERROR('#2: Every function instance has a [[Call]] property'); + throw new Test262Error('#2: Every function instance has a [[Call]] property'); } //CHECK#3 if (y !== 2) { - $ERROR('#3: Every function instance has a [[Call]] property'); + throw new Test262Error('#3: Every function instance has a [[Call]] property'); } diff --git a/test/built-ins/Function/S15.3.5_A2_T2.js b/test/built-ins/Function/S15.3.5_A2_T2.js index 00b25df86f..ac14569b2b 100644 --- a/test/built-ins/Function/S15.3.5_A2_T2.js +++ b/test/built-ins/Function/S15.3.5_A2_T2.js @@ -11,15 +11,15 @@ description: > //CHECK#1 if ((new Function("arg1,arg2", "var x =arg1; this.y=arg2;return arg1+arg2;"))("1", 2) !== "12") { - $ERROR('#1: Every function instance has a [[Call]] property'); + throw new Test262Error('#1: Every function instance has a [[Call]] property'); } //CHECK#2 if (typeof x !== "undefined") { - $ERROR('#2: Every function instance has a [[Call]] property'); + throw new Test262Error('#2: Every function instance has a [[Call]] property'); } //CHECK#3 if (y !== 2) { - $ERROR('#3: Every function instance has a [[Call]] property'); + throw new Test262Error('#3: Every function instance has a [[Call]] property'); } diff --git a/test/built-ins/Function/S15.3.5_A3_T1.js b/test/built-ins/Function/S15.3.5_A3_T1.js index a1aa14f966..d46c30bb01 100644 --- a/test/built-ins/Function/S15.3.5_A3_T1.js +++ b/test/built-ins/Function/S15.3.5_A3_T1.js @@ -12,15 +12,15 @@ var obj = new FACTORY; //CHECK#1 if (typeof obj !== "object") { - $ERROR('#1: every function instance has a [[Construct]] property'); + throw new Test262Error('#1: every function instance has a [[Construct]] property'); } //CHECK#2 if (obj.constructor !== FACTORY) { - $ERROR('#2: every function instance has a [[Construct]] property'); + throw new Test262Error('#2: every function instance has a [[Construct]] property'); } //CHECK#3 if (obj.y !== 2) { - $ERROR('#3: every function instance has a [[Construct]] property'); + throw new Test262Error('#3: every function instance has a [[Construct]] property'); } diff --git a/test/built-ins/Function/S15.3.5_A3_T2.js b/test/built-ins/Function/S15.3.5_A3_T2.js index 5a233d07fa..06e3329c03 100644 --- a/test/built-ins/Function/S15.3.5_A3_T2.js +++ b/test/built-ins/Function/S15.3.5_A3_T2.js @@ -14,15 +14,15 @@ var obj = new FACTORY("1", 2); //CHECK#1 if (typeof obj !== "object") { - $ERROR('#1: every function instance has a [[Construct]] property'); + throw new Test262Error('#1: every function instance has a [[Construct]] property'); } //CHECK#2 if (obj.constructor !== FACTORY) { - $ERROR('#2: every function instance has a [[Construct]] property'); + throw new Test262Error('#2: every function instance has a [[Construct]] property'); } //CHECK#3 if (obj.y !== "12") { - $ERROR('#3: every function instance has a [[Construct]] property'); + throw new Test262Error('#3: every function instance has a [[Construct]] property'); } diff --git a/test/built-ins/Function/S15.3_A1.js b/test/built-ins/Function/S15.3_A1.js index a7b1a8a1da..21288b5d23 100644 --- a/test/built-ins/Function/S15.3_A1.js +++ b/test/built-ins/Function/S15.3_A1.js @@ -12,5 +12,5 @@ var obj = Function; var thisobj = this.Function; if (obj !== thisobj) { - $ERROR('Function is the property of global'); + throw new Test262Error('Function is the property of global'); } diff --git a/test/built-ins/Function/S15.3_A2_T1.js b/test/built-ins/Function/S15.3_A2_T1.js index 92448aaf08..bf25c6a0d7 100644 --- a/test/built-ins/Function/S15.3_A2_T1.js +++ b/test/built-ins/Function/S15.3_A2_T1.js @@ -15,6 +15,6 @@ try { Function.call(this, "var x / = 1;"); } catch (e) { if (!(e instanceof SyntaxError)) { - $ERROR('#1: function body must be valid'); + throw new Test262Error('#1: function body must be valid'); } } diff --git a/test/built-ins/Function/S15.3_A2_T2.js b/test/built-ins/Function/S15.3_A2_T2.js index 1c3de3f64d..3838ba59b8 100644 --- a/test/built-ins/Function/S15.3_A2_T2.js +++ b/test/built-ins/Function/S15.3_A2_T2.js @@ -15,6 +15,6 @@ try { Function.call(this, "var #x = 1;"); } catch (e) { if (!(e instanceof SyntaxError)) { - $ERROR('#1: function body must be valid'); + throw new Test262Error('#1: function body must be valid'); } } diff --git a/test/built-ins/Function/S15.3_A3_T1.js b/test/built-ins/Function/S15.3_A3_T1.js index 8574cfb874..91258d0735 100644 --- a/test/built-ins/Function/S15.3_A3_T1.js +++ b/test/built-ins/Function/S15.3_A3_T1.js @@ -23,10 +23,10 @@ var about_mars = f(); //CHECK#2 if (about_mars !== undefined) { - $ERROR('#2: When applied to the Function object itself, thisArg should be ignored'); + throw new Test262Error('#2: When applied to the Function object itself, thisArg should be ignored'); } //CHECK#3 if (this.godname !== "ares" && mars.godname === undefined) { - $ERROR('#3: When applied to the Function object itself, thisArg should be ignored'); + throw new Test262Error('#3: When applied to the Function object itself, thisArg should be ignored'); } diff --git a/test/built-ins/Function/S15.3_A3_T2.js b/test/built-ins/Function/S15.3_A3_T2.js index aa0fe3961d..6fe1f842d8 100644 --- a/test/built-ins/Function/S15.3_A3_T2.js +++ b/test/built-ins/Function/S15.3_A3_T2.js @@ -16,12 +16,12 @@ var f = Function.call("blablastring", "return this.color;"); //CHECK#1 if (f() !== "red") { - $ERROR('#1: '); + throw new Test262Error('#1: '); } var g = Function.call(null, "return this.planet;"); //CHECK#2 if (g() !== "mars") { - $ERROR('#2: '); + throw new Test262Error('#2: '); } diff --git a/test/built-ins/Function/S15.3_A3_T3.js b/test/built-ins/Function/S15.3_A3_T3.js index 7ac27927d2..ceead23003 100644 --- a/test/built-ins/Function/S15.3_A3_T3.js +++ b/test/built-ins/Function/S15.3_A3_T3.js @@ -14,28 +14,28 @@ var g = Function.call(this, "return color;"); //CHECK#1 if (f() !== undefined) { - $ERROR('#1: '); + throw new Test262Error('#1: '); } var planet = "mars"; //CHECK#2 if (f() !== "mars") { - $ERROR('#2: '); + throw new Test262Error('#2: '); } //CHECK#3 try { g(); - $ERROR('#3: '); + throw new Test262Error('#3: '); } catch (e) { if (!(e instanceof ReferenceError)) - $ERROR('#3.1: '); + throw new Test262Error('#3.1: '); } this.color = "red"; //CHECK#4 if (g() !== "red") { - $ERROR('#4: '); + throw new Test262Error('#4: '); } diff --git a/test/built-ins/Function/S15.3_A3_T4.js b/test/built-ins/Function/S15.3_A3_T4.js index 769f6bbb46..c9b2ac29dc 100644 --- a/test/built-ins/Function/S15.3_A3_T4.js +++ b/test/built-ins/Function/S15.3_A3_T4.js @@ -13,12 +13,12 @@ var f = Function.call(this, "return planet;"); //CHECK#1 if (f() !== undefined) { - $ERROR('#1: '); + throw new Test262Error('#1: '); } var planet = "mars"; //CHECK#2 if (f() !== "mars") { - $ERROR('#2: '); + throw new Test262Error('#2: '); } diff --git a/test/built-ins/Function/S15.3_A3_T5.js b/test/built-ins/Function/S15.3_A3_T5.js index 753410f5c4..a57bc82ce0 100644 --- a/test/built-ins/Function/S15.3_A3_T5.js +++ b/test/built-ins/Function/S15.3_A3_T5.js @@ -16,24 +16,24 @@ var g = Function.call(this, "return this.color;"); //CHECK#1 if (f() !== undefined) { - $ERROR('#2: '); + throw new Test262Error('#2: '); } var planet = "mars"; //CHECK#2 if (f() !== "mars") { - $ERROR('#2: '); + throw new Test262Error('#2: '); } //CHECK#3 if (g() !== undefined) { - $ERROR('#3: '); + throw new Test262Error('#3: '); } this.color = "red"; //CHECK#4 if (g() !== "red") { - $ERROR('#4: '); + throw new Test262Error('#4: '); } diff --git a/test/built-ins/Function/S15.3_A3_T6.js b/test/built-ins/Function/S15.3_A3_T6.js index fa88d7e5a3..e8b83b6684 100644 --- a/test/built-ins/Function/S15.3_A3_T6.js +++ b/test/built-ins/Function/S15.3_A3_T6.js @@ -15,12 +15,12 @@ var f = Function.call(this, "return this.planet;"); //CHECK#1 if (f() !== undefined) { - $ERROR('#1: '); + throw new Test262Error('#1: '); } var planet = "mars"; //CHECK#2 if (f() !== "mars") { - $ERROR('#2: '); + throw new Test262Error('#2: '); } diff --git a/test/built-ins/Function/length/S15.3.5.1_A1_T1.js b/test/built-ins/Function/length/S15.3.5.1_A1_T1.js index 422668ad69..36ff26f106 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A1_T1.js +++ b/test/built-ins/Function/length/S15.3.5.1_A1_T1.js @@ -13,10 +13,10 @@ var f = new Function("arg1,arg2,arg3", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { - $ERROR('#1: the function has length property.'); + throw new Test262Error('#1: the function has length property.'); } //CHECK#2 if (f.length !== 3) { - $ERROR('#2: The value of the length property is usually an integer that indicates the "typical" number of arguments expected by the function'); + throw new Test262Error('#2: The value of the length property is usually an integer that indicates the "typical" number of arguments expected by the function'); } diff --git a/test/built-ins/Function/length/S15.3.5.1_A1_T2.js b/test/built-ins/Function/length/S15.3.5.1_A1_T2.js index 0ee96c1244..bd3719b756 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A1_T2.js +++ b/test/built-ins/Function/length/S15.3.5.1_A1_T2.js @@ -15,10 +15,10 @@ var f = Function("arg1,arg2,arg3", "arg4,arg5", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { - $ERROR('#1: the function has length property.'); + throw new Test262Error('#1: the function has length property.'); } //CHECK#2 if (f.length !== 5) { - $ERROR('#2: The value of the length property is usually an integer that indicates the "typical" number of arguments expected by the function'); + throw new Test262Error('#2: The value of the length property is usually an integer that indicates the "typical" number of arguments expected by the function'); } diff --git a/test/built-ins/Function/length/S15.3.5.1_A1_T3.js b/test/built-ins/Function/length/S15.3.5.1_A1_T3.js index ff5452aaaa..6c67814330 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A1_T3.js +++ b/test/built-ins/Function/length/S15.3.5.1_A1_T3.js @@ -15,10 +15,10 @@ var f = new Function("arg1,arg2,arg3", "arg1,arg2", "arg3", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { - $ERROR('#1: the function has length property.'); + throw new Test262Error('#1: the function has length property.'); } //CHECK#2 if (f.length !== 6) { - $ERROR('#2: The value of the length property is usually an integer that indicates the "typical" number of arguments expected by the function'); + throw new Test262Error('#2: The value of the length property is usually an integer that indicates the "typical" number of arguments expected by the function'); } diff --git a/test/built-ins/Function/length/S15.3.5.1_A2_T1.js b/test/built-ins/Function/length/S15.3.5.1_A2_T1.js index 2e773dda30..08ea41a6da 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A2_T1.js +++ b/test/built-ins/Function/length/S15.3.5.1_A2_T1.js @@ -13,20 +13,20 @@ var f = new Function("arg1,arg2,arg3", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { - $ERROR('#1: the function has length property.'); + throw new Test262Error('#1: the function has length property.'); } //CHECK#2 if (!delete f.length) { - $ERROR('#2: the function.length property does not have the attributes DontDelete.'); + throw new Test262Error('#2: the function.length property does not have the attributes DontDelete.'); } //CHECK#3 if (f.hasOwnProperty('length')) { - $ERROR('#3: the function.length property does not have the attributes DontDelete.'); + throw new Test262Error('#3: the function.length property does not have the attributes DontDelete.'); } //CHECK#4 if (f.length === 3) { - $ERROR('#4: the length property does not have the attributes { DontDelete }'); + throw new Test262Error('#4: the length property does not have the attributes { DontDelete }'); } diff --git a/test/built-ins/Function/length/S15.3.5.1_A2_T2.js b/test/built-ins/Function/length/S15.3.5.1_A2_T2.js index dc6f91375c..24d902eba2 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A2_T2.js +++ b/test/built-ins/Function/length/S15.3.5.1_A2_T2.js @@ -13,17 +13,17 @@ var f = Function("arg1,arg2,arg3", "arg4,arg5", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { - $ERROR('#1: the function has length property.'); + throw new Test262Error('#1: the function has length property.'); } delete f.length; //CHECK#2 if (f.hasOwnProperty('length')) { - $ERROR('#2: the function.length property does not have the attributes DontDelete.'); + throw new Test262Error('#2: the function.length property does not have the attributes DontDelete.'); } //CHECK#3 if (f.length === 5) { - $ERROR('#3: the length property does not have the attributes { DontDelete }'); + throw new Test262Error('#3: the length property does not have the attributes { DontDelete }'); } diff --git a/test/built-ins/Function/length/S15.3.5.1_A2_T3.js b/test/built-ins/Function/length/S15.3.5.1_A2_T3.js index 882152b04b..4c00cbc275 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A2_T3.js +++ b/test/built-ins/Function/length/S15.3.5.1_A2_T3.js @@ -13,17 +13,17 @@ var f = new Function("arg1,arg2,arg3", "arg1,arg2", "arg3", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { - $ERROR('#1: the function has length property.'); + throw new Test262Error('#1: the function has length property.'); } delete f.length; //CHECK#2 if (f.hasOwnProperty('length')) { - $ERROR('#2: the function.length property does not have the attributes DontDelete.'); + throw new Test262Error('#2: the function.length property does not have the attributes DontDelete.'); } //CHECK#3 if (f.length === 6) { - $ERROR('#3: the length property does not have the attributes { DontDelete }'); + throw new Test262Error('#3: the length property does not have the attributes { DontDelete }'); } diff --git a/test/built-ins/Function/length/S15.3.5.1_A3_T1.js b/test/built-ins/Function/length/S15.3.5.1_A3_T1.js index 02d981a455..9d9e29dd71 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A3_T1.js +++ b/test/built-ins/Function/length/S15.3.5.1_A3_T1.js @@ -14,7 +14,7 @@ var f = new Function("arg1,arg2,arg3", "arg4,arg5", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { - $ERROR('#1: the function has length property.'); + throw new Test262Error('#1: the function has length property.'); } var flength = f.length; @@ -23,18 +23,18 @@ verifyNotWritable(f, "length", null, function() {}); //CHECK#2 if (f.length !== flength) { - $ERROR('#2: the function.length property has the attributes ReadOnly'); + throw new Test262Error('#2: the function.length property has the attributes ReadOnly'); } //CHECK#3 try { f.length(); - $ERROR('#3: the function.length property has the attributes ReadOnly'); + throw new Test262Error('#3: the function.length property has the attributes ReadOnly'); } catch (e) { if (e instanceof Test262Error) throw e; } //CHECK#4 if (f.length !== 5) { - $ERROR('#4: the length property has the attributes { ReadOnly }'); + throw new Test262Error('#4: the length property has the attributes { ReadOnly }'); } diff --git a/test/built-ins/Function/length/S15.3.5.1_A3_T2.js b/test/built-ins/Function/length/S15.3.5.1_A3_T2.js index e6cb737b35..24ce1a5080 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A3_T2.js +++ b/test/built-ins/Function/length/S15.3.5.1_A3_T2.js @@ -14,7 +14,7 @@ var f = Function("arg1,arg2,arg3", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { - $ERROR('#1: the function has length property.'); + throw new Test262Error('#1: the function has length property.'); } var flength = f.length; @@ -23,18 +23,18 @@ verifyNotWritable(f, "length", null, function() {}); //CHECK#2 if (f.length !== flength) { - $ERROR('#2: the function.length property has the attributes ReadOnly'); + throw new Test262Error('#2: the function.length property has the attributes ReadOnly'); } //CHECK#3 try { f.length(); - $ERROR('#3: the function.length property has the attributes ReadOnly'); + throw new Test262Error('#3: the function.length property has the attributes ReadOnly'); } catch (e) { if (e instanceof Test262Error) throw e; } //CHECK#4 if (f.length !== 3) { - $ERROR('#4: the length property has the attributes { ReadOnly }'); + throw new Test262Error('#4: the length property has the attributes { ReadOnly }'); } diff --git a/test/built-ins/Function/length/S15.3.5.1_A3_T3.js b/test/built-ins/Function/length/S15.3.5.1_A3_T3.js index 818d82d638..915a408a5d 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A3_T3.js +++ b/test/built-ins/Function/length/S15.3.5.1_A3_T3.js @@ -14,7 +14,7 @@ var f = new Function("arg1,arg2,arg3", "arg1,arg2", "arg3", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { - $ERROR('#1: the function has length property.'); + throw new Test262Error('#1: the function has length property.'); } var flength = f.length; @@ -23,18 +23,18 @@ verifyNotWritable(f, "length", null, function() {}); //CHECK#2 if (f.length !== flength) { - $ERROR('#2: the function.length property has the attributes ReadOnly'); + throw new Test262Error('#2: the function.length property has the attributes ReadOnly'); } //CHECK#3 try { f.length(); - $ERROR('#3: the function.length property has the attributes ReadOnly'); + throw new Test262Error('#3: the function.length property has the attributes ReadOnly'); } catch (e) { if (e instanceof Test262Error) throw e; } //CHECK#4 if (f.length !== 6) { - $ERROR('#4: the length property has the attributes { ReadOnly }'); + throw new Test262Error('#4: the length property has the attributes { ReadOnly }'); } diff --git a/test/built-ins/Function/length/S15.3.5.1_A4_T1.js b/test/built-ins/Function/length/S15.3.5.1_A4_T1.js index 286ae58e3a..6af6f45591 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A4_T1.js +++ b/test/built-ins/Function/length/S15.3.5.1_A4_T1.js @@ -13,7 +13,7 @@ var f = new Function("arg1,arg2,arg3", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { - $ERROR('#1: the function has length property.'); + throw new Test262Error('#1: the function has length property.'); } for (var key in f) { @@ -23,5 +23,5 @@ for (var key in f) { } //CHECK#2 if (lengthenumed) { - $ERROR('#2: the length property has the attributes { DontEnum }'); + throw new Test262Error('#2: the length property has the attributes { DontEnum }'); } diff --git a/test/built-ins/Function/length/S15.3.5.1_A4_T2.js b/test/built-ins/Function/length/S15.3.5.1_A4_T2.js index 1700bcb7f0..b44b79c8e7 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A4_T2.js +++ b/test/built-ins/Function/length/S15.3.5.1_A4_T2.js @@ -13,7 +13,7 @@ var f = Function("arg1,arg2,arg3", "arg5,arg4", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { - $ERROR('#1: the function has length property.'); + throw new Test262Error('#1: the function has length property.'); } for (var key in f) { @@ -24,5 +24,5 @@ for (var key in f) { //CHECK#2 if (lengthenumed) { - $ERROR('#2: the length property has the attributes { DontEnum }'); + throw new Test262Error('#2: the length property has the attributes { DontEnum }'); } diff --git a/test/built-ins/Function/length/S15.3.5.1_A4_T3.js b/test/built-ins/Function/length/S15.3.5.1_A4_T3.js index 6cd0753d8e..13a8cbaa58 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A4_T3.js +++ b/test/built-ins/Function/length/S15.3.5.1_A4_T3.js @@ -13,7 +13,7 @@ var f = new Function("arg1,arg2,arg3", "arg1,arg2", "arg3", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { - $ERROR('#1: the function has length property.'); + throw new Test262Error('#1: the function has length property.'); } for (var key in f) { @@ -24,5 +24,5 @@ for (var key in f) { //CHECK#2 if (lengthenumed) { - $ERROR('#2: the length property has the attributes { DontEnum }'); + throw new Test262Error('#2: the length property has the attributes { DontEnum }'); } diff --git a/test/built-ins/Function/prototype/S15.3.3.1_A1.js b/test/built-ins/Function/prototype/S15.3.3.1_A1.js index f06c15489a..65a7a57e6d 100644 --- a/test/built-ins/Function/prototype/S15.3.3.1_A1.js +++ b/test/built-ins/Function/prototype/S15.3.3.1_A1.js @@ -16,14 +16,14 @@ verifyNotWritable(Function, "prototype", null, function() { //CHECK#1 if (Function.prototype !== obj) { - $ERROR('#1: the Function.prototype property has the attributes ReadOnly.'); + throw new Test262Error('#1: the Function.prototype property has the attributes ReadOnly.'); } //CHECK#2 try { if (Function.prototype() !== undefined) { - $ERROR('#2: the Function.prototype property has the attributes ReadOnly'); + throw new Test262Error('#2: the Function.prototype property has the attributes ReadOnly'); } } catch (e) { - $ERROR('#2.1: the Function.prototype property has the attributes ReadOnly: ' + e); + throw new Test262Error('#2.1: the Function.prototype property has the attributes ReadOnly: ' + e); } diff --git a/test/built-ins/Function/prototype/S15.3.3.1_A2.js b/test/built-ins/Function/prototype/S15.3.3.1_A2.js index 8642fe1d6b..793868899a 100644 --- a/test/built-ins/Function/prototype/S15.3.3.1_A2.js +++ b/test/built-ins/Function/prototype/S15.3.3.1_A2.js @@ -9,7 +9,7 @@ description: Checking if enumerating the Function.prototype property fails // CHECK#1 if (Function.propertyIsEnumerable('prototype')) { - $ERROR('#1: the Function.prototype property has the attributes DontEnum'); + throw new Test262Error('#1: the Function.prototype property has the attributes DontEnum'); } // CHECK#2 @@ -20,5 +20,5 @@ for (var p in Function) { } if (count !== 0) { - $ERROR('#2: the Function.prototype property has the attributes DontEnum'); + throw new Test262Error('#2: the Function.prototype property has the attributes DontEnum'); } diff --git a/test/built-ins/Function/prototype/S15.3.3.1_A3.js b/test/built-ins/Function/prototype/S15.3.3.1_A3.js index 79568c9e71..ff1fdef8dd 100644 --- a/test/built-ins/Function/prototype/S15.3.3.1_A3.js +++ b/test/built-ins/Function/prototype/S15.3.3.1_A3.js @@ -13,7 +13,7 @@ verifyNotConfigurable(Function, "prototype"); //CHECK#1 try { if ((delete Function.prototype) !== false) { - $ERROR('#1: Function.prototype has the attribute DontDelete'); + throw new Test262Error('#1: Function.prototype has the attribute DontDelete'); } } catch (e) { if (e instanceof Test262Error) throw e; @@ -22,5 +22,5 @@ try { //CHECK#2 if (!(Function.hasOwnProperty('prototype'))) { - $ERROR('#2: the Function.prototype property has the attributes DontDelete.'); + throw new Test262Error('#2: the Function.prototype property has the attributes DontDelete.'); } diff --git a/test/built-ins/Function/prototype/S15.3.3.1_A4.js b/test/built-ins/Function/prototype/S15.3.3.1_A4.js index 9feac6cb2a..49483e5728 100644 --- a/test/built-ins/Function/prototype/S15.3.3.1_A4.js +++ b/test/built-ins/Function/prototype/S15.3.3.1_A4.js @@ -20,5 +20,5 @@ Object.defineProperty(foo, 'prototype', { }); if (foo.prototype !== Object.getOwnPropertyDescriptor(foo, 'prototype').value) { - $ERROR("A function.prototype's descriptor lies"); + throw new Test262Error("A function.prototype's descriptor lies"); } diff --git a/test/built-ins/Function/prototype/S15.3.4_A1.js b/test/built-ins/Function/prototype/S15.3.4_A1.js index b54a90c55c..914ea6ed2d 100644 --- a/test/built-ins/Function/prototype/S15.3.4_A1.js +++ b/test/built-ins/Function/prototype/S15.3.4_A1.js @@ -10,6 +10,6 @@ description: Object.prototype.toString returns [object+[[Class]]+] ---*/ if (Object.prototype.toString.call(Function.prototype) !== "[object Function]") { - $ERROR('#2: The Function prototype object is itself a Function ' + + throw new Test262Error('#2: The Function prototype object is itself a Function ' + 'object (its [[Class]] is "Function") (15.3.4)'); } diff --git a/test/built-ins/Function/prototype/S15.3.4_A2_T1.js b/test/built-ins/Function/prototype/S15.3.4_A2_T1.js index cd8afff2f0..fb3f325d3d 100644 --- a/test/built-ins/Function/prototype/S15.3.4_A2_T1.js +++ b/test/built-ins/Function/prototype/S15.3.4_A2_T1.js @@ -12,8 +12,8 @@ description: Call Function.prototype() //CHECK#1 try { if (Function.prototype() !== undefined) { - $ERROR('#1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined'); + throw new Test262Error('#1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined'); } } catch (e) { - $ERROR('#1.1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined: ' + e); + throw new Test262Error('#1.1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined: ' + e); } diff --git a/test/built-ins/Function/prototype/S15.3.4_A2_T2.js b/test/built-ins/Function/prototype/S15.3.4_A2_T2.js index 5ddc03b77b..2f8aa12c90 100644 --- a/test/built-ins/Function/prototype/S15.3.4_A2_T2.js +++ b/test/built-ins/Function/prototype/S15.3.4_A2_T2.js @@ -12,8 +12,8 @@ description: Call Function.prototype(null,void 0) //CHECK#1 try { if (Function.prototype(null, void 0) !== undefined) { - $ERROR('#1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined'); + throw new Test262Error('#1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined'); } } catch (e) { - $ERROR('#1.1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined: ' + e); + throw new Test262Error('#1.1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined: ' + e); } diff --git a/test/built-ins/Function/prototype/S15.3.4_A2_T3.js b/test/built-ins/Function/prototype/S15.3.4_A2_T3.js index 5b4b159cd3..3967461bd8 100644 --- a/test/built-ins/Function/prototype/S15.3.4_A2_T3.js +++ b/test/built-ins/Function/prototype/S15.3.4_A2_T3.js @@ -13,8 +13,8 @@ description: Call Function.prototype(x), where x is undefined variable try { if (Function.prototype(x) !== undefined) { var x; - $ERROR('#1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined'); + throw new Test262Error('#1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined'); } } catch (e) { - $ERROR('#1.1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined: ' + e); + throw new Test262Error('#1.1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined: ' + e); } diff --git a/test/built-ins/Function/prototype/S15.3.4_A3_T1.js b/test/built-ins/Function/prototype/S15.3.4_A3_T1.js index 7f85502343..0beb02989a 100644 --- a/test/built-ins/Function/prototype/S15.3.4_A3_T1.js +++ b/test/built-ins/Function/prototype/S15.3.4_A3_T1.js @@ -10,7 +10,7 @@ description: Checking prototype of Function.prototype ---*/ if (Object.getPrototypeOf(Function.prototype) !== Object.prototype) { - $ERROR('#1: The value of the internal [[Prototype]] property of ' + + throw new Test262Error('#1: The value of the internal [[Prototype]] property of ' + 'the Function prototype object is the Object prototype ' + 'object (15.3.4)'); } diff --git a/test/built-ins/Function/prototype/S15.3.4_A3_T2.js b/test/built-ins/Function/prototype/S15.3.4_A3_T2.js index eb6eaa1aa4..10517a39c3 100644 --- a/test/built-ins/Function/prototype/S15.3.4_A3_T2.js +++ b/test/built-ins/Function/prototype/S15.3.4_A3_T2.js @@ -15,5 +15,5 @@ Object.prototype.indicator = 1; //CHECK#1 if (Function.prototype.indicator !== 1) { - $ERROR('#1: The value of the internal [[Prototype]] property of the Function prototype object is the Object prototype object (15.3.2.1)'); + throw new Test262Error('#1: The value of the internal [[Prototype]] property of the Function prototype object is the Object prototype object (15.3.2.1)'); } diff --git a/test/built-ins/Function/prototype/S15.3.4_A4.js b/test/built-ins/Function/prototype/S15.3.4_A4.js index 300f45f4de..e9ca1d5ae9 100644 --- a/test/built-ins/Function/prototype/S15.3.4_A4.js +++ b/test/built-ins/Function/prototype/S15.3.4_A4.js @@ -12,15 +12,15 @@ description: Checking valueOf property at Function.prototype //CHECK#1 if (Function.prototype.hasOwnProperty("valueOf") !== false) { - $ERROR('#1: The Function prototype object does not have a valueOf property of its own'); + throw new Test262Error('#1: The Function prototype object does not have a valueOf property of its own'); } //CHECK#2 if (typeof Function.prototype.valueOf === "undefined") { - $ERROR('#2: however, it inherits the valueOf property from the Object prototype Object'); + throw new Test262Error('#2: however, it inherits the valueOf property from the Object prototype Object'); } //CHECK#3 if (Function.prototype.valueOf !== Object.prototype.valueOf) { - $ERROR('#3: however, it inherits the valueOf property from the Object prototype Object'); + throw new Test262Error('#3: however, it inherits the valueOf property from the Object prototype Object'); } diff --git a/test/built-ins/Function/prototype/S15.3.5.2_A1_T1.js b/test/built-ins/Function/prototype/S15.3.5.2_A1_T1.js index 5a68d4a1c7..57bb8a2fae 100644 --- a/test/built-ins/Function/prototype/S15.3.5.2_A1_T1.js +++ b/test/built-ins/Function/prototype/S15.3.5.2_A1_T1.js @@ -14,7 +14,7 @@ var f = new Function("", null); //CHECK#1 if (!(f.hasOwnProperty('prototype'))) { - $ERROR('#1: the function has length property.'); + throw new Test262Error('#1: the function has length property.'); } var fproto = f.prototype; @@ -24,7 +24,7 @@ verifyNotConfigurable(f, "prototype"); //CHECK#2 try { if ((delete f.prototype) !== false) { - $ERROR('#2: the prototype property has the attributes { DontDelete }'); + throw new Test262Error('#2: the prototype property has the attributes { DontDelete }'); } } catch (e) { if (e instanceof Test262Error) throw e; @@ -33,5 +33,5 @@ try { //CHECK#3 if (f.prototype !== fproto) { - $ERROR('#3: the prototype property has the attributes { DontDelete }'); + throw new Test262Error('#3: the prototype property has the attributes { DontDelete }'); } diff --git a/test/built-ins/Function/prototype/S15.3.5.2_A1_T2.js b/test/built-ins/Function/prototype/S15.3.5.2_A1_T2.js index 6f1f2974e0..02f644d055 100644 --- a/test/built-ins/Function/prototype/S15.3.5.2_A1_T2.js +++ b/test/built-ins/Function/prototype/S15.3.5.2_A1_T2.js @@ -14,7 +14,7 @@ var f = Function(void 0, ""); //CHECK#1 if (!(f.hasOwnProperty('prototype'))) { - $ERROR('#1: the function has length property.'); + throw new Test262Error('#1: the function has length property.'); } var fproto = f.prototype; @@ -24,7 +24,7 @@ verifyNotConfigurable(f, "prototype"); //CHECK#2 try { if ((delete f.prototype) !== false) { - $ERROR('#2: the prototype property has the attributes { DontDelete }'); + throw new Test262Error('#2: the prototype property has the attributes { DontDelete }'); } } catch (e) { if (e instanceof Test262Error) throw e; @@ -33,5 +33,5 @@ try { //CHECK#3 if (f.prototype !== fproto) { - $ERROR('#3: the prototype property has the attributes { DontDelete }'); + throw new Test262Error('#3: the prototype property has the attributes { DontDelete }'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A12.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A12.js index 50ea57ee82..9ab5667089 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A12.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A12.js @@ -11,5 +11,5 @@ description: > //CHECK#1 if (Function.prototype.apply.prototype !== undefined) { - $ERROR('#1: Function.prototype.apply has not prototype property' + Function.prototype.apply.prototype); + throw new Test262Error('#1: Function.prototype.apply has not prototype property' + Function.prototype.apply.prototype); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A1_T1.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A1_T1.js index 77e0ffe083..a724f3d314 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A1_T1.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A1_T1.js @@ -22,15 +22,15 @@ var obj = new FACTORY; //CHECK#1 if (typeof obj.apply !== "function") { - $ERROR('#1: apply method accessed'); + throw new Test262Error('#1: apply method accessed'); } //CHECK#2 try { obj.apply(); - $ERROR('#2: If the object does not have a [[Call]] property, a TypeError exception is thrown'); + throw new Test262Error('#2: If the object does not have a [[Call]] property, a TypeError exception is thrown'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown'); + throw new Test262Error('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown'); } } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A1_T2.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A1_T2.js index ad2b147707..838796c9f5 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A1_T2.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A1_T2.js @@ -20,15 +20,15 @@ var obj = new FACTORY; //CHECK#1 if (typeof obj.apply !== "function") { - $ERROR('#1: apply method accessed'); + throw new Test262Error('#1: apply method accessed'); } //CHECK#2 try { obj.apply(); - $ERROR('#2: If the object does not have a [[Call]] property, a TypeError exception is thrown'); + throw new Test262Error('#2: If the object does not have a [[Call]] property, a TypeError exception is thrown'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown'); + throw new Test262Error('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown'); } } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T1.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T1.js index 5c4fa267cf..f06ac4fc61 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T1.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T1.js @@ -13,5 +13,5 @@ Function("this.field=\"strawberry\"").apply(); //CHECK#1 if (this["field"] !== "strawberry") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T10.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T10.js index 1b9d357ec0..7049eaf43a 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T10.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T10.js @@ -14,5 +14,5 @@ eval(" (function(){this.feat=1}).apply()"); //CHECK#1 if (this["feat"] !== 1) { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T2.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T2.js index 8c52f0d428..ed5ee43c60 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T2.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T2.js @@ -13,5 +13,5 @@ Function("this.field=\"green\"").apply(null); //CHECK#1 if (this["field"] !== "green") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T3.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T3.js index dea1cf99c0..e0dd2debe7 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T3.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T3.js @@ -13,5 +13,5 @@ Function("this.field=\"battle\"").apply(void 0); //CHECK#1 if (this["field"] !== "battle") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T4.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T4.js index 7b212a390d..c9a9337eed 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T4.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T4.js @@ -13,5 +13,5 @@ Function("this.field=\"oil\"").apply(undefined); //CHECK#1 if (this["field"] !== "oil") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T5.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T5.js index 2864ae8e30..7bafaac3c2 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T5.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T5.js @@ -19,10 +19,10 @@ var obj = new FACTORY; //CHECK#1 if (this["feat"] !== "in da haus") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } //CHECK#2 if (typeof obj.feat !== "undefined") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T6.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T6.js index c4fe404824..28b95566a7 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T6.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T6.js @@ -22,10 +22,10 @@ var obj = new FACTORY; //CHECK#1 if (this["feat"] !== "kamon beyba") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } //CHECK#2 if (typeof obj.feat !== "undefined") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T7.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T7.js index 1065e8d275..a3a45a1ea9 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T7.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T7.js @@ -18,5 +18,5 @@ description: > //CHECK#1 if (this["feat"] !== "in da haus") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T8.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T8.js index 94449eb37b..3d98e89938 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T8.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T8.js @@ -20,5 +20,5 @@ flags: [noStrict] //CHECK#1 if (this["feat"] !== "kamon beyba") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T9.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T9.js index 4fe65248ab..bd928c96a8 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T9.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T9.js @@ -13,5 +13,5 @@ eval(" Function(\"this.feat=1\").apply(void 0) "); //CHECK#1 if (this["feat"] !== 1) { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T1.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T1.js index 937f8cb9fa..518dd0f583 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T1.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T1.js @@ -15,10 +15,10 @@ var retobj = Function("this.touched= true; return this;").apply(obj); //CHECK#1 if (typeof obj.touched !== "undefined") { - $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } //CHECK#2 if (!(retobj["touched"])) { - $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T2.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T2.js index 79d6cf8163..84d1775874 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T2.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T2.js @@ -15,10 +15,10 @@ var retobj = new Function("this.touched= true; return this;").apply(obj); //CHECK#1 if (typeof obj.touched !== "undefined") { - $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } //CHECK#2 if (!(retobj["touched"])) { - $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T3.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T3.js index eeb07e45eb..2e7bbcd0a2 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T3.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T3.js @@ -19,10 +19,10 @@ var retobj = (function() { //CHECK#1 if (typeof obj.touched !== "undefined") { - $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } //CHECK#2 if (!(retobj["touched"])) { - $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T4.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T4.js index 527311ae9d..2384053b50 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T4.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T4.js @@ -19,12 +19,12 @@ retobj = f.apply(obj); //CHECK#1 if (typeof obj !== "undefined") { - $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } //CHECK#2 if (!(retobj["touched"])) { - $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } var obj; diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T5.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T5.js index 8d88bfdd1c..0ce4d64b7a 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T5.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T5.js @@ -19,5 +19,5 @@ f.apply(obj); //CHECK#1 if (!(obj.touched)) { - $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T6.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T6.js index ffabe93c30..ae8bad296f 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T6.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T6.js @@ -17,5 +17,5 @@ var obj = new String("soap"); //CHECK#1 if (!(obj.touched)) { - $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T7.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T7.js index f99dfe61f3..8abe9a41ac 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T7.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T7.js @@ -15,5 +15,5 @@ Function("this.touched= true;").apply(obj); //CHECK#1 if (!(obj.touched)) { - $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T8.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T8.js index 26ce5a6ec8..75b3f0bb88 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T8.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T8.js @@ -15,5 +15,5 @@ new Function("this.touched= true; return this;").apply(obj); //CHECK#1 if (!(obj.touched)) { - $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T1.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T1.js index 018dcc7bd7..d8756b51f6 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T1.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T1.js @@ -13,5 +13,5 @@ Function("a1,a2,a3", "this.shifted=a1;").apply(null, [1]); //CHECK#1 if (this["shifted"] !== 1) { - $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#1: If argArray is either an array or an arguments object, the function is passed the...'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T10.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T10.js index 7a77fd2d17..b2563b3dd2 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T10.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T10.js @@ -19,10 +19,10 @@ var obj = {}; //CHECK#1 if (obj["shifted"] !== "42") { - $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#1: If argArray is either an array or an arguments object, the function is passed the...'); } //CHECK#2 if (typeof this["shifted"] !== "undefined") { - $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#2: If argArray is either an array or an arguments object, the function is passed the...'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T2.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T2.js index f54f65d30b..34acb7e704 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T2.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T2.js @@ -13,5 +13,5 @@ new Function("a1,a2", "a3", "this.shifted=a2;").apply(null, [1, 2, 3]); //CHECK#1 if (this["shifted"] !== 2) { - $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#1: If argArray is either an array or an arguments object, the function is passed the...'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T3.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T3.js index d4ce5fc1d4..79c40ee00a 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T3.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T3.js @@ -23,10 +23,10 @@ Function(p, "a2,a3", "this.shifted=a1;").apply(obj, new Array("nine", "inch", "n //CHECK#1 if (obj["shifted"] !== "nine") { - $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#1: If argArray is either an array or an arguments object, the function is passed the...'); } //CHECK#2 if (typeof this["shifted"] !== "undefined") { - $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#2: If argArray is either an array or an arguments object, the function is passed the...'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T4.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T4.js index 9a747b4a10..ec41b8fa33 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T4.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T4.js @@ -27,10 +27,10 @@ new Function(p, p, p, "this.shifted=a3;").apply(obj, (function() { //CHECK#1 if (obj["shifted"] !== "c") { - $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#1: If argArray is either an array or an arguments object, the function is passed the...'); } //CHECK#2 if (typeof this["shifted"] !== "undefined") { - $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#2: If argArray is either an array or an arguments object, the function is passed the...'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T5.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T5.js index 44ab20da00..bd0014429c 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T5.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T5.js @@ -17,10 +17,10 @@ var obj = new FACTORY("", 1, 2); //CHECK#1 if (this["shifted"] !== "12") { - $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#1: If argArray is either an array or an arguments object, the function is passed the...'); } //CHECK#2 if (typeof obj.shifted !== "undefined") { - $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#2: If argArray is either an array or an arguments object, the function is passed the...'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T6.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T6.js index 23e9ac8ec6..2eedad51af 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T6.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T6.js @@ -17,10 +17,10 @@ var obj = new FACTORY("", 4, 2); //CHECK#1 if (obj["shifted"] !== "42") { - $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#1: If argArray is either an array or an arguments object, the function is passed the...'); } //CHECK#2 if (typeof this["shifted"] !== "undefined") { - $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#2: If argArray is either an array or an arguments object, the function is passed the...'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T7.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T7.js index 59dbd059a2..0ee6957971 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T7.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T7.js @@ -17,5 +17,5 @@ description: > //CHECK#1 if (this["shifted"] !== "12") { - $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#1: If argArray is either an array or an arguments object, the function is passed the...'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T8.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T8.js index f0c0215cd2..738eaa1fc0 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T8.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T8.js @@ -17,5 +17,5 @@ description: > //CHECK#2 if (this["shifted"] !== "42") { - $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#2: If argArray is either an array or an arguments object, the function is passed the...'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T9.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T9.js index d478bc629a..0dd3033f2b 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T9.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T9.js @@ -21,10 +21,10 @@ var obj = new FACTORY("", 1, 2); //CHECK#1 if (typeof this["shifted"] !== "undefined") { - $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#1: If argArray is either an array or an arguments object, the function is passed the...'); } //CHECK#2 if (obj.shifted !== "12") { - $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#2: If argArray is either an array or an arguments object, the function is passed the...'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T1.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T1.js index d0e3eb7d02..f41e59968a 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T1.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T1.js @@ -9,9 +9,9 @@ description: Checking if creating "new Function.prototype.apply" fails try { var obj = new Function.prototype.apply; - $ERROR('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.apply can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1.1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T2.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T2.js index a052dca72e..700a89b077 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T2.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T2.js @@ -9,9 +9,9 @@ description: Checking if creating "new Function.prototype.apply()" fails try { var obj = new Function.prototype.apply(); - $ERROR('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.apply can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1.1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T3.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T3.js index 07639d449a..79f5dc0047 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T3.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T3.js @@ -9,9 +9,9 @@ description: Checking if creating "new Function.apply" fails try { var obj = new Function.apply; - $ERROR('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.apply can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1.1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T4.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T4.js index 75eeb6534a..4b3a6b70d8 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T4.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T4.js @@ -9,9 +9,9 @@ description: Checking if creating "new (Function("this.p1=1").apply)" fails try { var obj = new(Function("this.p1=1").apply); - $ERROR('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.apply can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1.1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T5.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T5.js index c5a61d79bf..b96632cd7b 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T5.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T5.js @@ -10,9 +10,9 @@ description: Checking if creating "new Function("this.p1=1").apply" fails try { var FACTORY = Function("this.p1=1").apply; var obj = new FACTORY(); - $ERROR('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.apply can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1.1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T6.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T6.js index 94169ef9d4..aa10206203 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T6.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T6.js @@ -13,10 +13,10 @@ description: > try { var obj = new(Function("function f(){this.p1=1;};return f").apply()); } catch (e) { - $ERROR('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } //CHECK#2 if (obj.p1 !== 1) { - $ERROR('#2: Function.prototype.apply can\'t be used as [[Construct]] caller'); + throw new Test262Error('#2: Function.prototype.apply can\'t be used as [[Construct]] caller'); } diff --git a/test/built-ins/Function/prototype/bind/S15.3.4.5_A16.js b/test/built-ins/Function/prototype/bind/S15.3.4.5_A16.js index b53e5d61c5..19d337e6c2 100644 --- a/test/built-ins/Function/prototype/bind/S15.3.4.5_A16.js +++ b/test/built-ins/Function/prototype/bind/S15.3.4.5_A16.js @@ -16,11 +16,11 @@ if (typeof re === 'function') { } else { try { Function.prototype.bind.call(re, undefined); - $ERROR('#1: If IsCallable(func) is false, ' + + throw new Test262Error('#1: If IsCallable(func) is false, ' + 'then (bind should) throw a TypeError exception'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1: TypeError expected. Actual: ' + e); + throw new Test262Error('#1: TypeError expected. Actual: ' + e); } } } diff --git a/test/built-ins/Function/prototype/bind/S15.3.4.5_A3.js b/test/built-ins/Function/prototype/bind/S15.3.4.5_A3.js index 4987f5074d..8f2be67d4f 100644 --- a/test/built-ins/Function/prototype/bind/S15.3.4.5_A3.js +++ b/test/built-ins/Function/prototype/bind/S15.3.4.5_A3.js @@ -7,5 +7,5 @@ description: Function.prototype.bind must exist ---*/ if (!('bind' in Function.prototype)) { - $ERROR('Function.prototype.bind is missing'); + throw new Test262Error('Function.prototype.bind is missing'); } diff --git a/test/built-ins/Function/prototype/bind/S15.3.4.5_A4.js b/test/built-ins/Function/prototype/bind/S15.3.4.5_A4.js index 1dd42541df..f0787e2c7f 100644 --- a/test/built-ins/Function/prototype/bind/S15.3.4.5_A4.js +++ b/test/built-ins/Function/prototype/bind/S15.3.4.5_A4.js @@ -12,6 +12,6 @@ function foo() {} var b = foo.bind(33, 44); foo.apply = function() { - $ERROR("Function.prototype.bind called original's .apply method"); + throw new Test262Error("Function.prototype.bind called original's .apply method"); }; b(55, 66); diff --git a/test/built-ins/Function/prototype/bind/S15.3.4.5_A5.js b/test/built-ins/Function/prototype/bind/S15.3.4.5_A5.js index 00f22db706..707dc16a59 100644 --- a/test/built-ins/Function/prototype/bind/S15.3.4.5_A5.js +++ b/test/built-ins/Function/prototype/bind/S15.3.4.5_A5.js @@ -14,5 +14,5 @@ function construct(f, args) { } var d = construct(Date, [1957, 4, 27]); if (Object.prototype.toString.call(d) !== '[object Date]') { - $ERROR('Using the Date constructor via .bind did not create a Date.'); + throw new Test262Error('Using the Date constructor via .bind did not create a Date.'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A10.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A10.js index bf2aa724c0..2a25275ff4 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A10.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A10.js @@ -12,7 +12,7 @@ includes: [propertyHelper.js] //CHECK#1 if (!(Function.prototype.call.hasOwnProperty('length'))) { - $ERROR('#1: the Function.prototype.call has length property.'); + throw new Test262Error('#1: the Function.prototype.call has length property.'); } var obj = Function.prototype.call.length; @@ -23,5 +23,5 @@ verifyNotWritable(Function.prototype.call, "length", null, function() { //CHECK#2 if (Function.prototype.call.length !== obj) { - $ERROR('#2: the Function.prototype.call length property has the attributes ReadOnly.'); + throw new Test262Error('#2: the Function.prototype.call length property has the attributes ReadOnly.'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A11.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A11.js index 830678ae90..1d92a9de21 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A11.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A11.js @@ -11,17 +11,17 @@ description: > //CHECK#0 if (!(Function.prototype.call.hasOwnProperty('length'))) { - $ERROR('#0: the Function.prototype.call has length property.'); + throw new Test262Error('#0: the Function.prototype.call has length property.'); } // CHECK#1 if (Function.prototype.call.propertyIsEnumerable('length')) { - $ERROR('#1: the Function.prototype.call.length property has the attributes DontEnum'); + throw new Test262Error('#1: the Function.prototype.call.length property has the attributes DontEnum'); } // CHECK#2 for (var p in Function.prototype.call) { if (p === "length") - $ERROR('#2: the Function.prototype.call.length property has the attributes DontEnum'); + throw new Test262Error('#2: the Function.prototype.call.length property has the attributes DontEnum'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A12.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A12.js index dde3a6c71e..5f0c64b8f6 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A12.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A12.js @@ -11,5 +11,5 @@ description: > //CHECK#1 if (Function.prototype.call.prototype !== undefined) { - $ERROR('#1: Function.prototype.call has not prototype property' + Function.prototype.call.prototype); + throw new Test262Error('#1: Function.prototype.call has not prototype property' + Function.prototype.call.prototype); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A16.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A16.js index 383666a136..7a1f907790 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A16.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A16.js @@ -16,11 +16,11 @@ if (typeof re === 'function') { } else { try { Function.prototype.bind.call(re, undefined); - $ERROR('#1: If IsCallable(func) is false, ' + + throw new Test262Error('#1: If IsCallable(func) is false, ' + 'then (bind should) throw a TypeError exception'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1: TypeError expected. Actual: ' + e); + throw new Test262Error('#1: TypeError expected. Actual: ' + e); } } } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A1_T1.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A1_T1.js index 7d3f3dddb0..d8ea6999f6 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A1_T1.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A1_T1.js @@ -22,15 +22,15 @@ var obj = new FACTORY; //CHECK#1 if (typeof obj.call !== "function") { - $ERROR('#1: call method accessed'); + throw new Test262Error('#1: call method accessed'); } //CHECK#2 try { obj.call(); - $ERROR('#2: If the object does not have a [[Call]] property, a TypeError exception is thrown'); + throw new Test262Error('#2: If the object does not have a [[Call]] property, a TypeError exception is thrown'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown'); + throw new Test262Error('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown'); } } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A1_T2.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A1_T2.js index de04b43dd3..7d929226c7 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A1_T2.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A1_T2.js @@ -20,15 +20,15 @@ var obj = new FACTORY; //CHECK#1 if (typeof obj.call !== "function") { - $ERROR('#1: call method accessed'); + throw new Test262Error('#1: call method accessed'); } //CHECK#2 try { obj.call(); - $ERROR('#2: If the object does not have a [[Call]] property, a TypeError exception is thrown'); + throw new Test262Error('#2: If the object does not have a [[Call]] property, a TypeError exception is thrown'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown'); + throw new Test262Error('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown'); } } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A2_T1.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A2_T1.js index 17113616d3..21a3236305 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A2_T1.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A2_T1.js @@ -9,15 +9,15 @@ description: Checking Function.prototype.call.length //CHECK#1 if (typeof Function.prototype.call !== "function") { - $ERROR('#1: call method defined'); + throw new Test262Error('#1: call method defined'); } //CHECK#2 if (typeof Function.prototype.call.length === "undefined") { - $ERROR('#2: length property of call method defined'); + throw new Test262Error('#2: length property of call method defined'); } //CHECK#3 if (Function.prototype.call.length !== 1) { - $ERROR('#3: The length property of the call method is 1'); + throw new Test262Error('#3: The length property of the call method is 1'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A2_T2.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A2_T2.js index a6c9d6eade..244c528adb 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A2_T2.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A2_T2.js @@ -11,15 +11,15 @@ var f = new Function; //CHECK#1 if (typeof f.call !== "function") { - $ERROR('#1: call method accessed'); + throw new Test262Error('#1: call method accessed'); } //CHECK#2 if (typeof f.call.length === "undefined") { - $ERROR('#2: length property of call method defined'); + throw new Test262Error('#2: length property of call method defined'); } //CHECK#3 if (f.call.length !== 1) { - $ERROR('#3: The length property of the call method is 1'); + throw new Test262Error('#3: The length property of the call method is 1'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T1.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T1.js index 2dcfd1c909..9472dda5cd 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T1.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T1.js @@ -13,5 +13,5 @@ Function("this.field=\"strawberry\"").call(); //CHECK#1 if (this["field"] !== "strawberry") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T10.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T10.js index 9550c8dc82..2a97761ad6 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T10.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T10.js @@ -14,5 +14,5 @@ eval(" (function(){this.feat=1}).call()"); //CHECK#1 if (this["feat"] !== 1) { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T2.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T2.js index 1efefc12f4..ee8babac37 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T2.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T2.js @@ -13,5 +13,5 @@ Function("this.field=\"green\"").call(null); //CHECK#1 if (this["field"] !== "green") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T3.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T3.js index de6ebb593d..91cd21dae9 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T3.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T3.js @@ -13,5 +13,5 @@ Function("this.field=\"battle\"").call(void 0); //CHECK#1 if (this["field"] !== "battle") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T4.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T4.js index f27f8a0139..37d8dafc29 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T4.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T4.js @@ -13,5 +13,5 @@ Function("this.field=\"oil\"").call(undefined); //CHECK#1 if (this["field"] !== "oil") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T5.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T5.js index df370cdeee..ed0588fef4 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T5.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T5.js @@ -19,10 +19,10 @@ var obj = new FACTORY; //CHECK#1 if (this["feat"] !== "in da haus") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } //CHECK#2 if (typeof obj.feat !== "undefined") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T6.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T6.js index 297d48abf7..6d2f1bf526 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T6.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T6.js @@ -22,10 +22,10 @@ var obj = new FACTORY; //CHECK#1 if (this["feat"] !== "kamon beyba") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } //CHECK#2 if (typeof obj.feat !== "undefined") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T7.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T7.js index d6a3e721b1..132377bf22 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T7.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T7.js @@ -18,5 +18,5 @@ description: > //CHECK#1 if (this["feat"] !== "in da haus") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T8.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T8.js index 60ec21eb9c..32ecb226f0 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T8.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T8.js @@ -21,5 +21,5 @@ flags: [noStrict] //CHECK#1 if (this["feat"] !== "kamon beyba") { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T9.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T9.js index 94e0aecc72..115fb2dc76 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T9.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T9.js @@ -14,5 +14,5 @@ eval(" Function(\"this.feat=1\").call(void 0) "); //CHECK#1 if (this["feat"] !== 1) { - $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); + throw new Test262Error('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T1.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T1.js index 91db8755e3..ab7d3b72df 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T1.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T1.js @@ -15,10 +15,10 @@ var retobj = Function("this.touched= true; return this;").call(obj); //CHECK#1 if (typeof obj.touched !== "undefined") { - $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } //CHECK#2 if (!(retobj["touched"])) { - $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T2.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T2.js index 84b8fc456e..dc36ba9bef 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T2.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T2.js @@ -15,10 +15,10 @@ var retobj = new Function("this.touched= true; return this;").call(obj); //CHECK#1 if (typeof obj.touched !== "undefined") { - $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } //CHECK#2 if (!(retobj["touched"])) { - $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T3.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T3.js index b4d2167fd9..2e8fc0dd4b 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T3.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T3.js @@ -19,10 +19,10 @@ var retobj = (function() { //CHECK#1 if (typeof obj.touched !== "undefined") { - $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } //CHECK#2 if (!(retobj["touched"])) { - $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T4.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T4.js index 23fa062190..cd2ce88ef7 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T4.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T4.js @@ -19,12 +19,12 @@ var retobj = f.call(obj); //CHECK#1 if (typeof obj !== "undefined") { - $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } //CHECK#2 if (!(retobj["touched"])) { - $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } var obj; diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T5.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T5.js index 9857f09e4e..c07cd2bb1a 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T5.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T5.js @@ -19,5 +19,5 @@ f.call(obj); //CHECK#1 if (!(obj.touched)) { - $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T6.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T6.js index 7ffe1a4d65..fd26188f75 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T6.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T6.js @@ -17,5 +17,5 @@ var obj = new String("soap"); //CHECK#1 if (!(obj.touched)) { - $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T7.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T7.js index 9dc90b7caa..ad5fef8d7f 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T7.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T7.js @@ -15,5 +15,5 @@ Function("this.touched= true;").call(obj); //CHECK#1 if (!(obj.touched)) { - $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T8.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T8.js index 9955eb6d59..9176c0ae38 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T8.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T8.js @@ -15,5 +15,5 @@ new Function("this.touched= true; return this;").call(obj); //CHECK#1 if (!(obj.touched)) { - $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); + throw new Test262Error('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T1.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T1.js index 0890634757..4435e5089a 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T1.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T1.js @@ -13,15 +13,15 @@ Function("a1,a2,a3", "this.shifted=a1;").call(null, [1]); //CHECK#1 if (this["shifted"].constructor !== Array) { - $ERROR('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } //CHECK#2 if (this["shifted"].length !== 1) { - $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } //CHECK#3 if (this["shifted"][0] !== 1) { - $ERROR('#3: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#3: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T10.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T10.js index be97b1f583..cafe6ca8b5 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T10.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T10.js @@ -19,10 +19,10 @@ var obj = {}; //CHECK#1 if (obj["shifted"] !== "42") { - $ERROR('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } //CHECK#2 if (typeof this["shifted"] !== "undefined") { - $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T2.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T2.js index 5620f40771..e696a1b11e 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T2.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T2.js @@ -13,10 +13,10 @@ new Function("a1,a2", "a3", "this.shifted=a1;").call(null, [3, 2, 1]); //CHECK#1 if (this["shifted"].length !== 3) { - $ERROR('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } //CHECK#2 if ((this["shifted"][0] !== 3) || (this["shifted"][1] !== 2) || (this["shifted"][2] !== 1)) { - $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T3.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T3.js index 05368a6c2c..2748fdd25d 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T3.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T3.js @@ -25,15 +25,15 @@ Function(p, "a2,a3", "this.shifted=a1;").call(obj, new Array("nine", "inch", "na //CHECK#1 if (obj["shifted"].length !== 3) { - $ERROR('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } //CHECK#2 if ((obj["shifted"][0] !== "nine") || (obj["shifted"][1] !== "inch") || (obj["shifted"][2] !== "nails")) { - $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } //CHECK#3 if (typeof this["shifted"] !== "undefined") { - $ERROR('#3: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#3: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T4.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T4.js index 3125575141..1b3e994502 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T4.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T4.js @@ -27,10 +27,10 @@ new Function(p, p, p, "this.shifted=a3+a2+a1.length;").call(obj, (function() { //CHECK#1 if (obj["shifted"] !== "24") { - $ERROR('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } //CHECK#2 if (typeof this["shifted"] !== "undefined") { - $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T5.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T5.js index ac798300c2..6750ea4e78 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T5.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T5.js @@ -19,10 +19,10 @@ var obj = new FACTORY("", 1, 2, "A"); //CHECK#1 if (this["shifted"] !== "42") { - $ERROR('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } //CHECK#2 if (typeof obj.shifted !== "undefined") { - $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T6.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T6.js index 7956ab5acf..c22c66848b 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T6.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T6.js @@ -19,10 +19,10 @@ var obj = new FACTORY("", 4, 2, "A"); //CHECK#1 if (obj["shifted"] !== "42") { - $ERROR('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } //CHECK#2 if (typeof this["shifted"] !== "undefined") { - $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T7.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T7.js index 2c29c47251..c4ac2485b4 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T7.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T7.js @@ -17,5 +17,5 @@ description: > //CHECK#1 if (this["shifted"] !== "42") { - $ERROR('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T8.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T8.js index 1978d9acf0..beabefd3ee 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T8.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T8.js @@ -17,5 +17,5 @@ description: > //CHECK#2 if (this["shifted"] !== "42") { - $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); + throw new Test262Error('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T9.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T9.js index 99bf13b9d5..d302d6988b 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T9.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A6_T9.js @@ -21,10 +21,10 @@ var obj = new FACTORY("", 1, 2, void 0); //CHECK#1 if (typeof this["shifted"] !== "undefined") { - $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#1: If argArray is either an array or an arguments object, the function is passed the...'); } //CHECK#2 if (obj.shifted !== "42") { - $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...'); + throw new Test262Error('#2: If argArray is either an array or an arguments object, the function is passed the...'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T1.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T1.js index 92a7409b2c..36bc7917fa 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T1.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T1.js @@ -9,9 +9,9 @@ description: Checking if creating "new Function.prototype.call" fails try { var obj = new Function.prototype.call; - $ERROR('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.call can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1.1: Function.prototype.call can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T2.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T2.js index 941974210f..22cffdf82a 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T2.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T2.js @@ -10,9 +10,9 @@ description: Checking if creating "new Function.prototype.call()" fails try { var FACTORY = Function.prototype.call; var obj = new FACTORY(); - $ERROR('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.call can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1.1: Function.prototype.call can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T3.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T3.js index b2b2231007..1b8be85d4a 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T3.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T3.js @@ -9,9 +9,9 @@ description: Checking if creating "new Function.call" fails try { var obj = new Function.call; - $ERROR('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.call can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1.1: Function.prototype.call can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T4.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T4.js index 7cec40c130..2bfaff6900 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T4.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T4.js @@ -9,9 +9,9 @@ description: Checking if creating "new (Function("this.p1=1").call)" fails try { var obj = new(Function("this.p1=1").call); - $ERROR('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.call can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1.1: Function.prototype.call can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T5.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T5.js index 1482c55c3e..086fcda8f0 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T5.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T5.js @@ -10,9 +10,9 @@ description: Checking if creating "new Function("this.p1=1").call" fails try { var FACTORY = Function("this.p1=1").call; var obj = new FACTORY(); - $ERROR('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.call can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1.1: Function.prototype.call can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T6.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T6.js index 8bf0e67bb3..475e899538 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T6.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T6.js @@ -13,10 +13,10 @@ description: > try { var obj = new(Function("function f(){this.p1=1;};return f").call()); } catch (e) { - $ERROR('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); + throw new Test262Error('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); } //CHECK#2 if (obj.p1 !== 1) { - $ERROR('#2: Function.prototype.call can\'t be used as [[Construct]] caller'); + throw new Test262Error('#2: Function.prototype.call can\'t be used as [[Construct]] caller'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A9.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A9.js index 53acf78182..eb4c806654 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A9.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A9.js @@ -13,15 +13,15 @@ description: > //CHECK#0 if (!(Function.prototype.call.hasOwnProperty('length'))) { - $ERROR('#0: the Function.prototype.call has length property'); + throw new Test262Error('#0: the Function.prototype.call has length property'); } //CHECK#1 if (!delete Function.prototype.call.length) { - $ERROR('#1: The Function.prototype.call.length property does not have the attributes DontDelete'); + throw new Test262Error('#1: The Function.prototype.call.length property does not have the attributes DontDelete'); } //CHECK#2 if (Function.prototype.call.hasOwnProperty('length')) { - $ERROR('#2: The Function.prototype.call.length property does not have the attributes DontDelete'); + throw new Test262Error('#2: The Function.prototype.call.length property does not have the attributes DontDelete'); } diff --git a/test/built-ins/Function/prototype/constructor/S15.3.4.1_A1_T1.js b/test/built-ins/Function/prototype/constructor/S15.3.4.1_A1_T1.js index 685f466f98..8024311b7a 100644 --- a/test/built-ins/Function/prototype/constructor/S15.3.4.1_A1_T1.js +++ b/test/built-ins/Function/prototype/constructor/S15.3.4.1_A1_T1.js @@ -11,5 +11,5 @@ description: Checking Function.prototype.constructor //CHECK#1 if (Function.prototype.constructor !== Function) { - $ERROR('#1: The initial value of Function.prototype.constructor is the built-in Function constructor'); + throw new Test262Error('#1: The initial value of Function.prototype.constructor is the built-in Function constructor'); } diff --git a/test/built-ins/Function/prototype/toString/S15.3.4.2_A10.js b/test/built-ins/Function/prototype/toString/S15.3.4.2_A10.js index 7391b67ed7..890b5cf026 100644 --- a/test/built-ins/Function/prototype/toString/S15.3.4.2_A10.js +++ b/test/built-ins/Function/prototype/toString/S15.3.4.2_A10.js @@ -12,7 +12,7 @@ includes: [propertyHelper.js] //CHECK#1 if (!(Function.prototype.toString.hasOwnProperty('length'))) { - $ERROR('#1: the Function.prototype.toString has length property.'); + throw new Test262Error('#1: the Function.prototype.toString has length property.'); } var obj = Function.prototype.toString.length; @@ -21,5 +21,5 @@ verifyNotWritable(Function.prototype.toString, "length", null, function(){return //CHECK#2 if (Function.prototype.toString.length !== obj) { - $ERROR('#2: the Function.prototype.toString length property has the attributes ReadOnly.'); + throw new Test262Error('#2: the Function.prototype.toString length property has the attributes ReadOnly.'); } diff --git a/test/built-ins/Function/prototype/toString/S15.3.4.2_A11.js b/test/built-ins/Function/prototype/toString/S15.3.4.2_A11.js index 620234a03a..598847d71d 100644 --- a/test/built-ins/Function/prototype/toString/S15.3.4.2_A11.js +++ b/test/built-ins/Function/prototype/toString/S15.3.4.2_A11.js @@ -9,10 +9,10 @@ description: Checking Function.prototype.toString.length //CHECK#1 if (!(Function.prototype.toString.hasOwnProperty("length"))) { - $ERROR('#1: The Function.prototype.toString has the length property'); + throw new Test262Error('#1: The Function.prototype.toString has the length property'); } //CHECK#2 if (Function.prototype.toString.length !== 0) { - $ERROR('#2: The length property of the toString method is 0'); + throw new Test262Error('#2: The length property of the toString method is 0'); } diff --git a/test/built-ins/Function/prototype/toString/S15.3.4.2_A6.js b/test/built-ins/Function/prototype/toString/S15.3.4.2_A6.js index a3d4e3b160..1592e2af67 100644 --- a/test/built-ins/Function/prototype/toString/S15.3.4.2_A6.js +++ b/test/built-ins/Function/prototype/toString/S15.3.4.2_A6.js @@ -11,5 +11,5 @@ description: > //CHECK#1 if (Function.prototype.toString.prototype !== undefined) { - $ERROR('#1: Function.prototype.toString has not prototype property'+Function.prototype.toString.prototype); + throw new Test262Error('#1: Function.prototype.toString has not prototype property'+Function.prototype.toString.prototype); } diff --git a/test/built-ins/Function/prototype/toString/S15.3.4.2_A8.js b/test/built-ins/Function/prototype/toString/S15.3.4.2_A8.js index b730a6ec2f..8bc7fb80c0 100644 --- a/test/built-ins/Function/prototype/toString/S15.3.4.2_A8.js +++ b/test/built-ins/Function/prototype/toString/S15.3.4.2_A8.js @@ -11,17 +11,17 @@ description: > //CHECK#0 if (!(Function.prototype.toString.hasOwnProperty('length'))) { - $ERROR('#0: the Function.prototype.toString has length property.'); + throw new Test262Error('#0: the Function.prototype.toString has length property.'); } // CHECK#1 if (Function.prototype.toString.propertyIsEnumerable('length')) { - $ERROR('#1: the Function.prototype.toString.length property has the attributes DontEnum'); + throw new Test262Error('#1: the Function.prototype.toString.length property has the attributes DontEnum'); } // CHECK#2 for (var p in Function.prototype.toString){ if (p==="length") - $ERROR('#2: the Function.prototype.toString.length property has the attributes DontEnum'); + throw new Test262Error('#2: the Function.prototype.toString.length property has the attributes DontEnum'); } diff --git a/test/built-ins/Function/prototype/toString/S15.3.4.2_A9.js b/test/built-ins/Function/prototype/toString/S15.3.4.2_A9.js index 252f90fd9c..3390f78953 100644 --- a/test/built-ins/Function/prototype/toString/S15.3.4.2_A9.js +++ b/test/built-ins/Function/prototype/toString/S15.3.4.2_A9.js @@ -13,15 +13,15 @@ description: > //CHECK#0 if (!(Function.prototype.toString.hasOwnProperty('length'))) { - $ERROR('#0: the Function.prototype.toString has length property'); + throw new Test262Error('#0: the Function.prototype.toString has length property'); } //CHECK#1 if (!delete Function.prototype.toString.length) { - $ERROR('#1: The Function.prototype.toString.length property does not have the attributes DontDelete'); + throw new Test262Error('#1: The Function.prototype.toString.length property does not have the attributes DontDelete'); } //CHECK#2 if (Function.prototype.toString.hasOwnProperty('length')) { - $ERROR('#2: The Function.prototype.toString.length property does not have the attributes DontDelete'); + throw new Test262Error('#2: The Function.prototype.toString.length property does not have the attributes DontDelete'); }