mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
chore: migrate $ERROR -> throw new Test262Error in test/annexB (#3121)
This commit is contained in:
parent
5ab89bbb55
commit
2bb2256877
@ -34,21 +34,21 @@ for (let letter of invalidControls()) {
|
||||
var str = String.fromCharCode(char % 32);
|
||||
var arr = re.exec(str);
|
||||
if (str !== letter && arr !== null) {
|
||||
$ERROR(`Character ${letter} unreasonably wrapped around as a control character`);
|
||||
throw new Test262Error(`Character ${letter} unreasonably wrapped around as a control character`);
|
||||
}
|
||||
|
||||
arr = re.exec(letter);
|
||||
if (arr === null) {
|
||||
$ERROR(`Character ${letter} missing from character class ${source}`);
|
||||
throw new Test262Error(`Character ${letter} missing from character class ${source}`);
|
||||
}
|
||||
}
|
||||
arr = re.exec("\\")
|
||||
if (arr === null) {
|
||||
$ERROR(`Character \\ missing from character class ${source}`);
|
||||
throw new Test262Error(`Character \\ missing from character class ${source}`);
|
||||
}
|
||||
arr = re.exec("c")
|
||||
if (arr === null) {
|
||||
$ERROR(`Character c missing from character class ${source}`);
|
||||
throw new Test262Error(`Character c missing from character class ${source}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user