Replace all "valid" occurences of $ERROR with Test262Error.thrower

This commit is contained in:
Rick Waldron 2020-09-16 14:39:46 -04:00
parent 8250b886b0
commit e662428fb4
26 changed files with 26 additions and 26 deletions

View File

@ -25,7 +25,7 @@ function Constructor(executor) {
assert.sameValue(values.length, 1, "values.length"); assert.sameValue(values.length, 1, "values.length");
assert.sameValue(values[0], "expectedValue", "values[0]"); assert.sameValue(values[0], "expectedValue", "values[0]");
} }
executor(resolve, $ERROR); executor(resolve, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -24,7 +24,7 @@ function Constructor(executor) {
assert.sameValue(values[0], "expectedValue-p1", "values[0]"); assert.sameValue(values[0], "expectedValue-p1", "values[0]");
assert.sameValue(values[1], "expectedValue-p2", "values[1]"); assert.sameValue(values[1], "expectedValue-p2", "values[1]");
} }
executor(resolve, $ERROR); executor(resolve, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -23,7 +23,7 @@ function Constructor(executor) {
assert.sameValue(values.length, 1, "values length"); assert.sameValue(values.length, 1, "values length");
assert.sameValue(values[0], "expectedValue", "values[0]"); assert.sameValue(values[0], "expectedValue", "values[0]");
} }
executor(resolve, $ERROR); executor(resolve, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -18,7 +18,7 @@ info: |
function resolveFunction() {} function resolveFunction() {}
function Constructor(executor) { function Constructor(executor) {
executor(resolveFunction, $ERROR); executor(resolveFunction, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -37,7 +37,7 @@ function Constructor(executor) {
assert.sameValue(values[1], "p2-fulfill", "values[1]"); assert.sameValue(values[1], "p2-fulfill", "values[1]");
assert.sameValue(values[2], "p3-fulfill", "values[2]"); assert.sameValue(values[2], "p3-fulfill", "values[2]");
} }
executor(resolve, $ERROR); executor(resolve, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -37,7 +37,7 @@ function Constructor(executor) {
assert.sameValue(values[1], "p2-fulfill", "values[1]"); assert.sameValue(values[1], "p2-fulfill", "values[1]");
assert.sameValue(values[2], "p3-fulfill", "values[2]"); assert.sameValue(values[2], "p3-fulfill", "values[2]");
} }
executor(resolve, $ERROR); executor(resolve, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -37,7 +37,7 @@ function Constructor(executor) {
assert.sameValue(values[1], "p2-fulfill", "values[1]"); assert.sameValue(values[1], "p2-fulfill", "values[1]");
assert.sameValue(values[2], "p3-fulfill", "values[2]"); assert.sameValue(values[2], "p3-fulfill", "values[2]");
} }
executor(resolve, $ERROR); executor(resolve, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -16,7 +16,7 @@ info: |
function rejectFunction() {} function rejectFunction() {}
function Constructor(executor) { function Constructor(executor) {
executor($ERROR, rejectFunction); executor(Test262Error.thrower, rejectFunction);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -27,7 +27,7 @@ function Constructor(executor) {
valuesArray = values; valuesArray = values;
checkSettledPromises(values, expected, 'values'); checkSettledPromises(values, expected, 'values');
} }
executor(resolve, $ERROR); executor(resolve, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -33,7 +33,7 @@ function Constructor(executor) {
} }
], 'values'); ], 'values');
} }
executor(resolve, $ERROR); executor(resolve, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -29,7 +29,7 @@ function Constructor(executor) {
} }
], 'values'); ], 'values');
} }
executor(resolve, $ERROR); executor(resolve, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -17,7 +17,7 @@ features: [Promise.allSettled]
function rejectFunction() {} function rejectFunction() {}
function Constructor(executor) { function Constructor(executor) {
executor(rejectFunction, $ERROR); executor(rejectFunction, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -19,7 +19,7 @@ features: [Promise.allSettled]
function resolveFunction() {} function resolveFunction() {}
function Constructor(executor) { function Constructor(executor) {
executor(resolveFunction, $ERROR); executor(resolveFunction, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -47,7 +47,7 @@ function Constructor(executor) {
} }
], 'values'); ], 'values');
} }
executor(resolve, $ERROR); executor(resolve, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -47,7 +47,7 @@ function Constructor(executor) {
} }
], 'values'); ], 'values');
} }
executor(resolve, $ERROR); executor(resolve, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -47,7 +47,7 @@ function Constructor(executor) {
} }
], 'values'); ], 'values');
} }
executor(resolve, $ERROR); executor(resolve, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -19,7 +19,7 @@ let callCount = 0;
let errorArray; let errorArray;
function Constructor(executor) { function Constructor(executor) {
executor($ERROR, (error) => { executor(Test262Error.thrower, (error) => {
callCount++; callCount++;
errorArray = error.errors; errorArray = error.errors;
}); });

View File

@ -25,7 +25,7 @@ function Constructor(executor) {
assert.sameValue(error.errors[0], "expectedValue-p1", "error.errors[0]"); assert.sameValue(error.errors[0], "expectedValue-p1", "error.errors[0]");
assert.sameValue(error.errors[1], "expectedValue-p2", "error.errors[1]"); assert.sameValue(error.errors[1], "expectedValue-p2", "error.errors[1]");
} }
executor($ERROR, reject); executor(Test262Error.thrower, reject);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -20,7 +20,7 @@ features: [Promise.any]
function rejectFunction() {} function rejectFunction() {}
function Constructor(executor) { function Constructor(executor) {
executor(rejectFunction, $ERROR); executor(rejectFunction, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -46,7 +46,7 @@ function Constructor(executor) {
assert.sameValue(error.errors[2], "p3-rejection", "error.errors[2] === 'p3-rejection'"); assert.sameValue(error.errors[2], "p3-rejection", "error.errors[2] === 'p3-rejection'");
assert(error instanceof AggregateError, "error instanceof AggregateError"); assert(error instanceof AggregateError, "error instanceof AggregateError");
} }
executor($ERROR, reject); executor(Test262Error.thrower, reject);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -46,7 +46,7 @@ function Constructor(executor) {
assert.sameValue(error.errors[2], "p3-rejection", "error.errors[2] === 'p3-rejection'"); assert.sameValue(error.errors[2], "p3-rejection", "error.errors[2] === 'p3-rejection'");
assert(error instanceof AggregateError, "error instanceof AggregateError"); assert(error instanceof AggregateError, "error instanceof AggregateError");
} }
executor($ERROR, reject); executor(Test262Error.thrower, reject);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -16,7 +16,7 @@ function Constructor(executor) {
callCount += 1; callCount += 1;
sequence.push(value); sequence.push(value);
} }
executor(resolve, $ERROR); executor(resolve, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -32,7 +32,7 @@ function Constructor(executor) {
callCount += 1; callCount += 1;
sequence.push(value); sequence.push(value);
} }
executor(resolve, $ERROR); executor(resolve, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -16,7 +16,7 @@ info: |
function rejectFunction() {} function rejectFunction() {}
function Constructor(executor) { function Constructor(executor) {
executor($ERROR, rejectFunction); executor(Test262Error.thrower, rejectFunction);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -16,7 +16,7 @@ info: |
function resolveFunction() {} function resolveFunction() {}
function Constructor(executor) { function Constructor(executor) {
executor(resolveFunction, $ERROR); executor(resolveFunction, Test262Error.thrower);
} }
Constructor.resolve = function(v) { Constructor.resolve = function(v) {
return v; return v;

View File

@ -29,7 +29,7 @@ Promise.resolve.call(function(executor) {
thisValue = this; thisValue = this;
args = arguments; args = arguments;
} }
executor(resolve, $ERROR); executor(resolve, Test262Error.thrower);
assert.sameValue(callCount, 0, "callCount before returning from constructor"); assert.sameValue(callCount, 0, "callCount before returning from constructor");
}, object); }, object);