mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 14:04:51 +02:00
chore: migrate $ERROR -> throw new Test262Error in test/language/c* (#3097)
This commit is contained in:
parent
582d5e57ca
commit
e5fe379157
@ -27,17 +27,17 @@ for (var i1 = 0; i1 < 16; i1++) {
|
|||||||
eval("//var " + xx + "yy = -1");
|
eval("//var " + xx + "yy = -1");
|
||||||
if (LineTerminators !== true) {
|
if (LineTerminators !== true) {
|
||||||
if (yy !== 0) {
|
if (yy !== 0) {
|
||||||
$ERROR('#' + uu + ' ');
|
throw new Test262Error('#' + uu + ' ');
|
||||||
errorCount++;
|
errorCount++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (yy !== -1) {
|
if (yy !== -1) {
|
||||||
$ERROR('#' + uu + ' ');
|
throw new Test262Error('#' + uu + ' ');
|
||||||
errorCount++;
|
errorCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e){
|
} catch (e){
|
||||||
$ERROR('#' + uu + ' ');
|
throw new Test262Error('#' + uu + ' ');
|
||||||
errorCount++;
|
errorCount++;
|
||||||
}
|
}
|
||||||
count++;
|
count++;
|
||||||
@ -47,5 +47,5 @@ for (var i1 = 0; i1 < 16; i1++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (errorCount > 0) {
|
if (errorCount > 0) {
|
||||||
$ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count);
|
throw new Test262Error('Total error: ' + errorCount + ' bad Unicode character in ' + count);
|
||||||
}
|
}
|
||||||
|
@ -18,18 +18,18 @@ for (var indexI = 0; indexI <= 65535; indexI++) {
|
|||||||
eval("/*var " + String.fromCharCode(indexI) + "xx = 1*/");
|
eval("/*var " + String.fromCharCode(indexI) + "xx = 1*/");
|
||||||
var hex = decimalToHexString(indexI);
|
var hex = decimalToHexString(indexI);
|
||||||
if (xx !== 0) {
|
if (xx !== 0) {
|
||||||
$ERROR('#' + hex + ' ');
|
throw new Test262Error('#' + hex + ' ');
|
||||||
errorCount++;
|
errorCount++;
|
||||||
}
|
}
|
||||||
} catch (e){
|
} catch (e){
|
||||||
$ERROR('#' + hex + ' ');
|
throw new Test262Error('#' + hex + ' ');
|
||||||
errorCount++;
|
errorCount++;
|
||||||
}
|
}
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errorCount > 0) {
|
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) {
|
function decimalToHexString(n) {
|
||||||
|
@ -15,7 +15,7 @@ assert.sameValue(new C().a, 'A', "The value of `new C().a` is `'A'`");
|
|||||||
|
|
||||||
class C2 {
|
class C2 {
|
||||||
get b() {
|
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']() {
|
get ['b']() {
|
||||||
return 'B';
|
return 'B';
|
||||||
@ -25,10 +25,10 @@ assert.sameValue(new C2().b, 'B', "The value of `new C2().b` is `'B'`");
|
|||||||
|
|
||||||
class C3 {
|
class C3 {
|
||||||
get c() {
|
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']() {
|
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']() {
|
get ['c']() {
|
||||||
return 'C';
|
return 'C';
|
||||||
@ -38,7 +38,7 @@ assert.sameValue(new C3().c, 'C', "The value of `new C3().c` is `'C'`");
|
|||||||
|
|
||||||
class C4 {
|
class C4 {
|
||||||
get ['d']() {
|
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() {
|
get d() {
|
||||||
return 'D';
|
return 'D';
|
||||||
|
@ -18,7 +18,7 @@ assert.sameValue(calls, 1, "The value of `calls` is `1`, after executing `new C(
|
|||||||
calls = 0;
|
calls = 0;
|
||||||
class C2 {
|
class C2 {
|
||||||
set b(_) {
|
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'](_) {
|
set ['b'](_) {
|
||||||
calls++;
|
calls++;
|
||||||
@ -30,10 +30,10 @@ assert.sameValue(calls, 1, "The value of `calls` is `1`, after executing `new C2
|
|||||||
calls = 0;
|
calls = 0;
|
||||||
class C3 {
|
class C3 {
|
||||||
set c(_) {
|
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'](_) {
|
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'](_) {
|
set ['c'](_) {
|
||||||
calls++
|
calls++
|
||||||
@ -45,7 +45,7 @@ assert.sameValue(calls, 1, "The value of `calls` is `1`, after executing `new C3
|
|||||||
calls = 0;
|
calls = 0;
|
||||||
class C4 {
|
class C4 {
|
||||||
set ['d'](_) {
|
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(_) {
|
set d(_) {
|
||||||
calls++
|
calls++
|
||||||
|
@ -15,7 +15,7 @@ assert.sameValue(A.a, 'A', "The value of `A.a` is `'A'`");
|
|||||||
|
|
||||||
var B = {
|
var B = {
|
||||||
get 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']() {
|
get ['b']() {
|
||||||
return 'B';
|
return 'B';
|
||||||
@ -25,10 +25,10 @@ assert.sameValue(B.b, 'B', "The value of `B.b` is `'B'`");
|
|||||||
|
|
||||||
var C = {
|
var C = {
|
||||||
get 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']() {
|
get ['c']() {
|
||||||
$ERROR("The `['c']` getter definition in `C` is unreachable");
|
throw new Test262Error("The `['c']` getter definition in `C` is unreachable");
|
||||||
},
|
},
|
||||||
get ['c']() {
|
get ['c']() {
|
||||||
return 'C';
|
return 'C';
|
||||||
@ -38,7 +38,7 @@ assert.sameValue(C.c, 'C', "The value of `C.c` is `'C'`");
|
|||||||
|
|
||||||
var D = {
|
var D = {
|
||||||
get ['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() {
|
get d() {
|
||||||
return 'D';
|
return 'D';
|
||||||
|
@ -18,7 +18,7 @@ assert.sameValue(calls, 1, "The value of `calls` is `1`");
|
|||||||
calls = 0;
|
calls = 0;
|
||||||
var B = {
|
var B = {
|
||||||
set 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'](_) {
|
set ['b'](_) {
|
||||||
calls++;
|
calls++;
|
||||||
@ -30,10 +30,10 @@ assert.sameValue(calls, 1, "The value of `calls` is `1`");
|
|||||||
calls = 0;
|
calls = 0;
|
||||||
var C = {
|
var C = {
|
||||||
set 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'](_) {
|
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'](_) {
|
set ['c'](_) {
|
||||||
calls++
|
calls++
|
||||||
@ -45,7 +45,7 @@ assert.sameValue(calls, 1, "The value of `calls` is `1`");
|
|||||||
calls = 0;
|
calls = 0;
|
||||||
var D = {
|
var D = {
|
||||||
set ['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(_) {
|
set d(_) {
|
||||||
calls++
|
calls++
|
||||||
|
Loading…
x
Reference in New Issue
Block a user