From e662428fb4aa0fdc921a36015b9aafe0eaf19d02 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Wed, 16 Sep 2020 14:39:46 -0400 Subject: [PATCH] Replace all "valid" occurences of $ERROR with Test262Error.thrower --- test/built-ins/Promise/all/call-resolve-element-after-return.js | 2 +- test/built-ins/Promise/all/call-resolve-element-items.js | 2 +- test/built-ins/Promise/all/call-resolve-element.js | 2 +- test/built-ins/Promise/all/new-resolve-function.js | 2 +- .../built-ins/Promise/all/resolve-before-loop-exit-from-same.js | 2 +- test/built-ins/Promise/all/resolve-before-loop-exit.js | 2 +- test/built-ins/Promise/all/resolve-from-same-thenable.js | 2 +- test/built-ins/Promise/all/same-reject-function.js | 2 +- .../Promise/allSettled/call-resolve-element-after-return.js | 2 +- test/built-ins/Promise/allSettled/call-resolve-element-items.js | 2 +- test/built-ins/Promise/allSettled/call-resolve-element.js | 2 +- test/built-ins/Promise/allSettled/new-reject-function.js | 2 +- test/built-ins/Promise/allSettled/new-resolve-function.js | 2 +- .../Promise/allSettled/resolve-before-loop-exit-from-same.js | 2 +- test/built-ins/Promise/allSettled/resolve-before-loop-exit.js | 2 +- test/built-ins/Promise/allSettled/resolve-from-same-thenable.js | 2 +- test/built-ins/Promise/any/call-reject-element-after-return.js | 2 +- test/built-ins/Promise/any/call-reject-element-items.js | 2 +- test/built-ins/Promise/any/new-reject-function.js | 2 +- .../built-ins/Promise/any/resolve-before-loop-exit-from-same.js | 2 +- test/built-ins/Promise/any/resolve-before-loop-exit.js | 2 +- test/built-ins/Promise/any/resolve-from-same-thenable.js | 2 +- test/built-ins/Promise/race/resolve-from-same-thenable.js | 2 +- test/built-ins/Promise/race/same-reject-function.js | 2 +- test/built-ins/Promise/race/same-resolve-function.js | 2 +- .../Promise/resolve/resolve-from-promise-capability.js | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/test/built-ins/Promise/all/call-resolve-element-after-return.js b/test/built-ins/Promise/all/call-resolve-element-after-return.js index c644abeb88..205fc7b1ac 100644 --- a/test/built-ins/Promise/all/call-resolve-element-after-return.js +++ b/test/built-ins/Promise/all/call-resolve-element-after-return.js @@ -25,7 +25,7 @@ function Constructor(executor) { assert.sameValue(values.length, 1, "values.length"); assert.sameValue(values[0], "expectedValue", "values[0]"); } - executor(resolve, $ERROR); + executor(resolve, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/all/call-resolve-element-items.js b/test/built-ins/Promise/all/call-resolve-element-items.js index 3cf7629a46..ac7312c78d 100644 --- a/test/built-ins/Promise/all/call-resolve-element-items.js +++ b/test/built-ins/Promise/all/call-resolve-element-items.js @@ -24,7 +24,7 @@ function Constructor(executor) { assert.sameValue(values[0], "expectedValue-p1", "values[0]"); assert.sameValue(values[1], "expectedValue-p2", "values[1]"); } - executor(resolve, $ERROR); + executor(resolve, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/all/call-resolve-element.js b/test/built-ins/Promise/all/call-resolve-element.js index 37be4b02d5..1926e6a04c 100644 --- a/test/built-ins/Promise/all/call-resolve-element.js +++ b/test/built-ins/Promise/all/call-resolve-element.js @@ -23,7 +23,7 @@ function Constructor(executor) { assert.sameValue(values.length, 1, "values length"); assert.sameValue(values[0], "expectedValue", "values[0]"); } - executor(resolve, $ERROR); + executor(resolve, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/all/new-resolve-function.js b/test/built-ins/Promise/all/new-resolve-function.js index b4778a9140..83697b4e2e 100644 --- a/test/built-ins/Promise/all/new-resolve-function.js +++ b/test/built-ins/Promise/all/new-resolve-function.js @@ -18,7 +18,7 @@ info: | function resolveFunction() {} function Constructor(executor) { - executor(resolveFunction, $ERROR); + executor(resolveFunction, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/all/resolve-before-loop-exit-from-same.js b/test/built-ins/Promise/all/resolve-before-loop-exit-from-same.js index 0c8d848f29..1d5bb50f1f 100644 --- a/test/built-ins/Promise/all/resolve-before-loop-exit-from-same.js +++ b/test/built-ins/Promise/all/resolve-before-loop-exit-from-same.js @@ -37,7 +37,7 @@ function Constructor(executor) { assert.sameValue(values[1], "p2-fulfill", "values[1]"); assert.sameValue(values[2], "p3-fulfill", "values[2]"); } - executor(resolve, $ERROR); + executor(resolve, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/all/resolve-before-loop-exit.js b/test/built-ins/Promise/all/resolve-before-loop-exit.js index 3f09d3cebf..ad9ea6f915 100644 --- a/test/built-ins/Promise/all/resolve-before-loop-exit.js +++ b/test/built-ins/Promise/all/resolve-before-loop-exit.js @@ -37,7 +37,7 @@ function Constructor(executor) { assert.sameValue(values[1], "p2-fulfill", "values[1]"); assert.sameValue(values[2], "p3-fulfill", "values[2]"); } - executor(resolve, $ERROR); + executor(resolve, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/all/resolve-from-same-thenable.js b/test/built-ins/Promise/all/resolve-from-same-thenable.js index 430026ff86..40e074079c 100644 --- a/test/built-ins/Promise/all/resolve-from-same-thenable.js +++ b/test/built-ins/Promise/all/resolve-from-same-thenable.js @@ -37,7 +37,7 @@ function Constructor(executor) { assert.sameValue(values[1], "p2-fulfill", "values[1]"); assert.sameValue(values[2], "p3-fulfill", "values[2]"); } - executor(resolve, $ERROR); + executor(resolve, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/all/same-reject-function.js b/test/built-ins/Promise/all/same-reject-function.js index 9c8107532d..403db0c72b 100644 --- a/test/built-ins/Promise/all/same-reject-function.js +++ b/test/built-ins/Promise/all/same-reject-function.js @@ -16,7 +16,7 @@ info: | function rejectFunction() {} function Constructor(executor) { - executor($ERROR, rejectFunction); + executor(Test262Error.thrower, rejectFunction); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/allSettled/call-resolve-element-after-return.js b/test/built-ins/Promise/allSettled/call-resolve-element-after-return.js index cc883f4157..fd9f0c9f9c 100644 --- a/test/built-ins/Promise/allSettled/call-resolve-element-after-return.js +++ b/test/built-ins/Promise/allSettled/call-resolve-element-after-return.js @@ -27,7 +27,7 @@ function Constructor(executor) { valuesArray = values; checkSettledPromises(values, expected, 'values'); } - executor(resolve, $ERROR); + executor(resolve, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/allSettled/call-resolve-element-items.js b/test/built-ins/Promise/allSettled/call-resolve-element-items.js index eb7e8217db..5daafaa481 100644 --- a/test/built-ins/Promise/allSettled/call-resolve-element-items.js +++ b/test/built-ins/Promise/allSettled/call-resolve-element-items.js @@ -33,7 +33,7 @@ function Constructor(executor) { } ], 'values'); } - executor(resolve, $ERROR); + executor(resolve, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/allSettled/call-resolve-element.js b/test/built-ins/Promise/allSettled/call-resolve-element.js index d6cd51f24c..d8551735a0 100644 --- a/test/built-ins/Promise/allSettled/call-resolve-element.js +++ b/test/built-ins/Promise/allSettled/call-resolve-element.js @@ -29,7 +29,7 @@ function Constructor(executor) { } ], 'values'); } - executor(resolve, $ERROR); + executor(resolve, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/allSettled/new-reject-function.js b/test/built-ins/Promise/allSettled/new-reject-function.js index 2cb9428a25..06ee391e2d 100644 --- a/test/built-ins/Promise/allSettled/new-reject-function.js +++ b/test/built-ins/Promise/allSettled/new-reject-function.js @@ -17,7 +17,7 @@ features: [Promise.allSettled] function rejectFunction() {} function Constructor(executor) { - executor(rejectFunction, $ERROR); + executor(rejectFunction, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/allSettled/new-resolve-function.js b/test/built-ins/Promise/allSettled/new-resolve-function.js index eaacff1cb5..375d435d03 100644 --- a/test/built-ins/Promise/allSettled/new-resolve-function.js +++ b/test/built-ins/Promise/allSettled/new-resolve-function.js @@ -19,7 +19,7 @@ features: [Promise.allSettled] function resolveFunction() {} function Constructor(executor) { - executor(resolveFunction, $ERROR); + executor(resolveFunction, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/allSettled/resolve-before-loop-exit-from-same.js b/test/built-ins/Promise/allSettled/resolve-before-loop-exit-from-same.js index 872a4df74b..9c7bf222c7 100644 --- a/test/built-ins/Promise/allSettled/resolve-before-loop-exit-from-same.js +++ b/test/built-ins/Promise/allSettled/resolve-before-loop-exit-from-same.js @@ -47,7 +47,7 @@ function Constructor(executor) { } ], 'values'); } - executor(resolve, $ERROR); + executor(resolve, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/allSettled/resolve-before-loop-exit.js b/test/built-ins/Promise/allSettled/resolve-before-loop-exit.js index 07c443fc6d..d2264e9e7d 100644 --- a/test/built-ins/Promise/allSettled/resolve-before-loop-exit.js +++ b/test/built-ins/Promise/allSettled/resolve-before-loop-exit.js @@ -47,7 +47,7 @@ function Constructor(executor) { } ], 'values'); } - executor(resolve, $ERROR); + executor(resolve, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/allSettled/resolve-from-same-thenable.js b/test/built-ins/Promise/allSettled/resolve-from-same-thenable.js index b44a808a69..15a0b1dcf0 100644 --- a/test/built-ins/Promise/allSettled/resolve-from-same-thenable.js +++ b/test/built-ins/Promise/allSettled/resolve-from-same-thenable.js @@ -47,7 +47,7 @@ function Constructor(executor) { } ], 'values'); } - executor(resolve, $ERROR); + executor(resolve, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/any/call-reject-element-after-return.js b/test/built-ins/Promise/any/call-reject-element-after-return.js index 03b09e0e2e..fe02f2cae4 100644 --- a/test/built-ins/Promise/any/call-reject-element-after-return.js +++ b/test/built-ins/Promise/any/call-reject-element-after-return.js @@ -19,7 +19,7 @@ let callCount = 0; let errorArray; function Constructor(executor) { - executor($ERROR, (error) => { + executor(Test262Error.thrower, (error) => { callCount++; errorArray = error.errors; }); diff --git a/test/built-ins/Promise/any/call-reject-element-items.js b/test/built-ins/Promise/any/call-reject-element-items.js index 3333a2c729..60a7772565 100644 --- a/test/built-ins/Promise/any/call-reject-element-items.js +++ b/test/built-ins/Promise/any/call-reject-element-items.js @@ -25,7 +25,7 @@ function Constructor(executor) { assert.sameValue(error.errors[0], "expectedValue-p1", "error.errors[0]"); assert.sameValue(error.errors[1], "expectedValue-p2", "error.errors[1]"); } - executor($ERROR, reject); + executor(Test262Error.thrower, reject); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/any/new-reject-function.js b/test/built-ins/Promise/any/new-reject-function.js index b73cc82882..7371bf431d 100644 --- a/test/built-ins/Promise/any/new-reject-function.js +++ b/test/built-ins/Promise/any/new-reject-function.js @@ -20,7 +20,7 @@ features: [Promise.any] function rejectFunction() {} function Constructor(executor) { - executor(rejectFunction, $ERROR); + executor(rejectFunction, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/any/resolve-before-loop-exit-from-same.js b/test/built-ins/Promise/any/resolve-before-loop-exit-from-same.js index f9af8b9ed7..2ebf2d354d 100644 --- a/test/built-ins/Promise/any/resolve-before-loop-exit-from-same.js +++ b/test/built-ins/Promise/any/resolve-before-loop-exit-from-same.js @@ -46,7 +46,7 @@ function Constructor(executor) { assert.sameValue(error.errors[2], "p3-rejection", "error.errors[2] === 'p3-rejection'"); assert(error instanceof AggregateError, "error instanceof AggregateError"); } - executor($ERROR, reject); + executor(Test262Error.thrower, reject); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/any/resolve-before-loop-exit.js b/test/built-ins/Promise/any/resolve-before-loop-exit.js index 00542d2880..1b01657cfa 100644 --- a/test/built-ins/Promise/any/resolve-before-loop-exit.js +++ b/test/built-ins/Promise/any/resolve-before-loop-exit.js @@ -46,7 +46,7 @@ function Constructor(executor) { assert.sameValue(error.errors[2], "p3-rejection", "error.errors[2] === 'p3-rejection'"); assert(error instanceof AggregateError, "error instanceof AggregateError"); } - executor($ERROR, reject); + executor(Test262Error.thrower, reject); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/any/resolve-from-same-thenable.js b/test/built-ins/Promise/any/resolve-from-same-thenable.js index d8c6cdc5e0..7ed9521db9 100644 --- a/test/built-ins/Promise/any/resolve-from-same-thenable.js +++ b/test/built-ins/Promise/any/resolve-from-same-thenable.js @@ -16,7 +16,7 @@ function Constructor(executor) { callCount += 1; sequence.push(value); } - executor(resolve, $ERROR); + executor(resolve, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/race/resolve-from-same-thenable.js b/test/built-ins/Promise/race/resolve-from-same-thenable.js index 3cf1de57fa..f3e5a53a61 100644 --- a/test/built-ins/Promise/race/resolve-from-same-thenable.js +++ b/test/built-ins/Promise/race/resolve-from-same-thenable.js @@ -32,7 +32,7 @@ function Constructor(executor) { callCount += 1; sequence.push(value); } - executor(resolve, $ERROR); + executor(resolve, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/race/same-reject-function.js b/test/built-ins/Promise/race/same-reject-function.js index b67e4ff416..028c803caa 100644 --- a/test/built-ins/Promise/race/same-reject-function.js +++ b/test/built-ins/Promise/race/same-reject-function.js @@ -16,7 +16,7 @@ info: | function rejectFunction() {} function Constructor(executor) { - executor($ERROR, rejectFunction); + executor(Test262Error.thrower, rejectFunction); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/race/same-resolve-function.js b/test/built-ins/Promise/race/same-resolve-function.js index 10b6bfec6c..2119e5367a 100644 --- a/test/built-ins/Promise/race/same-resolve-function.js +++ b/test/built-ins/Promise/race/same-resolve-function.js @@ -16,7 +16,7 @@ info: | function resolveFunction() {} function Constructor(executor) { - executor(resolveFunction, $ERROR); + executor(resolveFunction, Test262Error.thrower); } Constructor.resolve = function(v) { return v; diff --git a/test/built-ins/Promise/resolve/resolve-from-promise-capability.js b/test/built-ins/Promise/resolve/resolve-from-promise-capability.js index 76d6483a58..ee67c19609 100644 --- a/test/built-ins/Promise/resolve/resolve-from-promise-capability.js +++ b/test/built-ins/Promise/resolve/resolve-from-promise-capability.js @@ -29,7 +29,7 @@ Promise.resolve.call(function(executor) { thisValue = this; args = arguments; } - executor(resolve, $ERROR); + executor(resolve, Test262Error.thrower); assert.sameValue(callCount, 0, "callCount before returning from constructor"); }, object);