diff --git a/test/language/comments/S7.4_A5.js b/test/language/comments/S7.4_A5.js index ccc6834f23..e369d84901 100644 --- a/test/language/comments/S7.4_A5.js +++ b/test/language/comments/S7.4_A5.js @@ -27,17 +27,17 @@ for (var i1 = 0; i1 < 16; i1++) { eval("//var " + xx + "yy = -1"); if (LineTerminators !== true) { if (yy !== 0) { - $ERROR('#' + uu + ' '); + throw new Test262Error('#' + uu + ' '); errorCount++; } } else { if (yy !== -1) { - $ERROR('#' + uu + ' '); + throw new Test262Error('#' + uu + ' '); errorCount++; } } } catch (e){ - $ERROR('#' + uu + ' '); + throw new Test262Error('#' + uu + ' '); errorCount++; } count++; @@ -47,5 +47,5 @@ for (var i1 = 0; i1 < 16; i1++) { } if (errorCount > 0) { - $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count); + throw new Test262Error('Total error: ' + errorCount + ' bad Unicode character in ' + count); } diff --git a/test/language/comments/S7.4_A6.js b/test/language/comments/S7.4_A6.js index 6917164ffc..3dd7663fab 100644 --- a/test/language/comments/S7.4_A6.js +++ b/test/language/comments/S7.4_A6.js @@ -18,18 +18,18 @@ for (var indexI = 0; indexI <= 65535; indexI++) { eval("/*var " + String.fromCharCode(indexI) + "xx = 1*/"); var hex = decimalToHexString(indexI); if (xx !== 0) { - $ERROR('#' + hex + ' '); + throw new Test262Error('#' + hex + ' '); errorCount++; } } catch (e){ - $ERROR('#' + hex + ' '); + throw new Test262Error('#' + hex + ' '); errorCount++; } count++; } if (errorCount > 0) { - $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count); + throw new Test262Error('Total error: ' + errorCount + ' bad Unicode character in ' + count); } function decimalToHexString(n) { diff --git a/test/language/computed-property-names/class/accessor/getter-duplicates.js b/test/language/computed-property-names/class/accessor/getter-duplicates.js index c63c29090c..74804e2a67 100644 --- a/test/language/computed-property-names/class/accessor/getter-duplicates.js +++ b/test/language/computed-property-names/class/accessor/getter-duplicates.js @@ -15,7 +15,7 @@ assert.sameValue(new C().a, 'A', "The value of `new C().a` is `'A'`"); class C2 { get b() { - $ERROR("The first `b` getter definition in `C2` is unreachable"); + throw new Test262Error("The first `b` getter definition in `C2` is unreachable"); } get ['b']() { return 'B'; @@ -25,10 +25,10 @@ assert.sameValue(new C2().b, 'B', "The value of `new C2().b` is `'B'`"); class C3 { get c() { - $ERROR("The first `c` getter definition in `C3` is unreachable"); + throw new Test262Error("The first `c` getter definition in `C3` is unreachable"); } get ['c']() { - $ERROR("The second `c` getter definition in `C3` is unreachable"); + throw new Test262Error("The second `c` getter definition in `C3` is unreachable"); } get ['c']() { return 'C'; @@ -38,7 +38,7 @@ assert.sameValue(new C3().c, 'C', "The value of `new C3().c` is `'C'`"); class C4 { get ['d']() { - $ERROR("The first `d` getter definition in `C4` is unreachable"); + throw new Test262Error("The first `d` getter definition in `C4` is unreachable"); } get d() { return 'D'; diff --git a/test/language/computed-property-names/class/accessor/setter-duplicates.js b/test/language/computed-property-names/class/accessor/setter-duplicates.js index 239d820154..ab32f8ee46 100644 --- a/test/language/computed-property-names/class/accessor/setter-duplicates.js +++ b/test/language/computed-property-names/class/accessor/setter-duplicates.js @@ -18,7 +18,7 @@ assert.sameValue(calls, 1, "The value of `calls` is `1`, after executing `new C( calls = 0; class C2 { set b(_) { - $ERROR("The first `b` setter definition in `C2` is unreachable"); + throw new Test262Error("The first `b` setter definition in `C2` is unreachable"); } set ['b'](_) { calls++; @@ -30,10 +30,10 @@ assert.sameValue(calls, 1, "The value of `calls` is `1`, after executing `new C2 calls = 0; class C3 { set c(_) { - $ERROR("The first `c` setter definition in `C3` is unreachable"); + throw new Test262Error("The first `c` setter definition in `C3` is unreachable"); } set ['c'](_) { - $ERROR("The second `c` setter definition in `C3` is unreachable"); + throw new Test262Error("The second `c` setter definition in `C3` is unreachable"); } set ['c'](_) { calls++ @@ -45,7 +45,7 @@ assert.sameValue(calls, 1, "The value of `calls` is `1`, after executing `new C3 calls = 0; class C4 { set ['d'](_) { - $ERROR("The first `d` setter definition in `C4` is unreachable"); + throw new Test262Error("The first `d` setter definition in `C4` is unreachable"); } set d(_) { calls++ diff --git a/test/language/computed-property-names/object/accessor/getter-duplicates.js b/test/language/computed-property-names/object/accessor/getter-duplicates.js index f98c2e9b80..d4148d6bd8 100644 --- a/test/language/computed-property-names/object/accessor/getter-duplicates.js +++ b/test/language/computed-property-names/object/accessor/getter-duplicates.js @@ -15,7 +15,7 @@ assert.sameValue(A.a, 'A', "The value of `A.a` is `'A'`"); var B = { get b() { - $ERROR("The `b` getter definition in `B` is unreachable"); + throw new Test262Error("The `b` getter definition in `B` is unreachable"); }, get ['b']() { return 'B'; @@ -25,10 +25,10 @@ assert.sameValue(B.b, 'B', "The value of `B.b` is `'B'`"); var C = { get c() { - $ERROR("The `c` getter definition in `C` is unreachable"); + throw new Test262Error("The `c` getter definition in `C` is unreachable"); }, get ['c']() { - $ERROR("The `['c']` getter definition in `C` is unreachable"); + throw new Test262Error("The `['c']` getter definition in `C` is unreachable"); }, get ['c']() { return 'C'; @@ -38,7 +38,7 @@ assert.sameValue(C.c, 'C', "The value of `C.c` is `'C'`"); var D = { get ['d']() { - $ERROR("The `['d']` getter definition in `D` is unreachable"); + throw new Test262Error("The `['d']` getter definition in `D` is unreachable"); }, get d() { return 'D'; diff --git a/test/language/computed-property-names/object/accessor/setter-duplicates.js b/test/language/computed-property-names/object/accessor/setter-duplicates.js index 8302c6b7d8..09b85b43d5 100644 --- a/test/language/computed-property-names/object/accessor/setter-duplicates.js +++ b/test/language/computed-property-names/object/accessor/setter-duplicates.js @@ -18,7 +18,7 @@ assert.sameValue(calls, 1, "The value of `calls` is `1`"); calls = 0; var B = { set b(_) { - $ERROR("The `b` setter definition in `B` is unreachable"); + throw new Test262Error("The `b` setter definition in `B` is unreachable"); }, set ['b'](_) { calls++; @@ -30,10 +30,10 @@ assert.sameValue(calls, 1, "The value of `calls` is `1`"); calls = 0; var C = { set c(_) { - $ERROR("The `c` setter definition in `C` is unreachable"); + throw new Test262Error("The `c` setter definition in `C` is unreachable"); }, set ['c'](_) { - $ERROR("The first `['c']` setter definition in `C` is unreachable"); + throw new Test262Error("The first `['c']` setter definition in `C` is unreachable"); }, set ['c'](_) { calls++ @@ -45,7 +45,7 @@ assert.sameValue(calls, 1, "The value of `calls` is `1`"); calls = 0; var D = { set ['d'](_) { - $ERROR("The `['d']` setter definition in `D` is unreachable"); + throw new Test262Error("The `['d']` setter definition in `D` is unreachable"); }, set d(_) { calls++