chore: migrate $ERROR -> throw new Test262Error in test/built-ins/eval

This commit is contained in:
rwaldron 2021-07-21 14:22:28 -04:00 committed by Rick Waldron
parent 826b6ae16f
commit a6a06d263a
6 changed files with 10 additions and 10 deletions

View File

@ -9,7 +9,7 @@ description: Checking use propertyIsEnumerable, for-in
//CHECK#1
if (eval.propertyIsEnumerable('length') !== false) {
$ERROR('#1: eval.propertyIsEnumerable(\'length\') === false. Actual: ' + (eval.propertyIsEnumerable('length')));
throw new Test262Error('#1: eval.propertyIsEnumerable(\'length\') === false. Actual: ' + (eval.propertyIsEnumerable('length')));
}
//CHECK#2
@ -21,5 +21,5 @@ for (p in eval) {
}
if (result !== true) {
$ERROR('#2: result = true; for (p in eval) { if (p === "length") result = false; }; result === true;');
throw new Test262Error('#2: result = true; for (p in eval) { if (p === "length") result = false; }; result === true;');
}

View File

@ -9,17 +9,17 @@ description: Checking use hasOwnProperty, delete
//CHECK#1
if (eval.hasOwnProperty('length') !== true) {
$ERROR('#1: eval.hasOwnProperty(\'length\') === true. Actual: ' + (eval.hasOwnProperty('length')));
throw new Test262Error('#1: eval.hasOwnProperty(\'length\') === true. Actual: ' + (eval.hasOwnProperty('length')));
}
delete eval.length;
//CHECK#2
if (eval.hasOwnProperty('length') !== false) {
$ERROR('#2: delete eval.length; eval.hasOwnProperty(\'length\') === false. Actual: ' + (eval.hasOwnProperty('length')));
throw new Test262Error('#2: delete eval.length; eval.hasOwnProperty(\'length\') === false. Actual: ' + (eval.hasOwnProperty('length')));
}
//CHECK#3
if (eval.length === undefined) {
$ERROR('#3: delete eval.length; eval.length !== undefined');
throw new Test262Error('#3: delete eval.length; eval.length !== undefined');
}

View File

@ -12,5 +12,5 @@ includes: [propertyHelper.js]
var x = eval.length;
verifyNotWritable(eval, "length", null, Infinity);
if (eval.length !== x) {
$ERROR('#1: x = eval.length; eval.length = Infinity; eval.length === x. Actual: ' + (eval.length));
throw new Test262Error('#1: x = eval.length; eval.length = Infinity; eval.length === x. Actual: ' + (eval.length));
}

View File

@ -9,5 +9,5 @@ description: eval.length === 1
//CHECK#1
if (eval.length !== 1) {
$ERROR('#1: eval.length === 1. Actual: ' + (eval.length));
throw new Test262Error('#1: eval.length === 1. Actual: ' + (eval.length));
}

View File

@ -13,9 +13,9 @@ description: >
try {
new eval();
$ERROR('#1.1: new eval() throw TypeError. Actual: ' + (new eval()));
throw new Test262Error('#1.1: new eval() throw TypeError. Actual: ' + (new eval()));
} catch (e) {
if ((e instanceof TypeError) !== true) {
$ERROR('#1.2: new eval() throw TypeError. Actual: ' + (e));
throw new Test262Error('#1.2: new eval() throw TypeError. Actual: ' + (e));
}
}

View File

@ -9,5 +9,5 @@ description: Checking eval.prototype
//CHECK#1
if (eval.prototype !== undefined) {
$ERROR('#1: eval.prototype === undefined. Actual: ' + (eval.prototype));
throw new Test262Error('#1: eval.prototype === undefined. Actual: ' + (eval.prototype));
}