chore: migrate $ERROR -> throw new Test262Error in test/language/c* (#3097)

This commit is contained in:
Rick Waldron 2021-07-21 17:02:21 -04:00 committed by GitHub
parent 582d5e57ca
commit e5fe379157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 23 deletions

View File

@ -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);
}

View File

@ -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) {

View File

@ -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';

View File

@ -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++

View File

@ -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';

View File

@ -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++