chore: migrate $ERROR -> throw new Test262Error in test/built-ins/undefined (#3119)

This commit is contained in:
Rick Waldron 2021-07-29 14:02:41 -04:00 committed by GitHub
parent 4a125f2f4e
commit 8c3753020a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -9,15 +9,15 @@ description: Use typeof, isNaN, isFinite
// CHECK#1 // CHECK#1
if (typeof(undefined) !== "undefined") { if (typeof(undefined) !== "undefined") {
$ERROR('#1: typeof(undefined) === "undefined". Actual: ' + (typeof(undefined))); throw new Test262Error('#1: typeof(undefined) === "undefined". Actual: ' + (typeof(undefined)));
} }
// CHECK#2 // CHECK#2
if (undefined !== void 0) { if (undefined !== void 0) {
$ERROR('#2: undefined === void 0. Actual: ' + (undefined)); throw new Test262Error('#2: undefined === void 0. Actual: ' + (undefined));
} }
// CHECK#3 // CHECK#3
if (undefined !== eval("var x")) { if (undefined !== eval("var x")) {
$ERROR('#3: undefined === eval("var x"). Actual: ' + (undefined)); throw new Test262Error('#3: undefined === eval("var x"). Actual: ' + (undefined));
} }

View File

@ -10,5 +10,5 @@ flags: [noStrict]
// CHECK#1 // CHECK#1
if (delete undefined !== false) { if (delete undefined !== false) {
$ERROR('#1: delete undefined === false. Actual: ' + (delete undefined)); throw new Test262Error('#1: delete undefined === false. Actual: ' + (delete undefined));
} }

View File

@ -10,6 +10,6 @@ description: Use for-in statement
// CHECK#1 // CHECK#1
for (var prop in this) { for (var prop in this) {
if (prop === "undefined") { if (prop === "undefined") {
$ERROR('#1: The undefined is DontEnum'); throw new Test262Error('#1: The undefined is DontEnum');
} }
} }