mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 14:04:51 +02:00
Replace all "valid" occurences of $ERROR with Test262Error.thrower
This commit is contained in:
parent
8250b886b0
commit
e662428fb4
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
});
|
});
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user