chore: migrate $ERROR -> throw new Test262Error in test/annexB/*

This commit is contained in:
rwaldron 2021-07-22 16:03:48 -04:00
parent 6e2a29417a
commit d7f5a4e65c
1 changed files with 4 additions and 4 deletions

View File

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