diff --git a/features.txt b/features.txt index 494a2e1698d6601db8a73da98162be5d6b353b29..6290998b2895dfeb6132d4efdc22b8583bd6a534 100644 --- a/features.txt +++ b/features.txt @@ -146,3 +146,4 @@ WeakSet # object, go here. IsHTMLDDA +CannotSuspendMainAgent diff --git a/harness/features.yml b/harness/features.yml index d08adaf646647d813800e3ea751f76ddb85610dc..b48b15e08b95b5d09068a73d0c18db0c9a177430 100644 --- a/harness/features.yml +++ b/harness/features.yml @@ -1,4 +1,5 @@ typeCoercion.js: [Symbol.toPrimitive, BigInt] testAtomics.js: [ArrayBuffer, Atomics, DataView, SharedArrayBuffer, arrow-function, let, for-of] +testBigIntTypedArray.js: [BigInt, TypedArray] testTypedArray.js: [TypedArray] isConstructor.js: [Reflect.construct] diff --git a/harness/testBigIntTypedArray.js b/harness/testBigIntTypedArray.js index 7b5d14e16bbf83d872e26e98dc177b1963b04240..9fcdc528d93839fee855d547db404413038aba06 100644 --- a/harness/testBigIntTypedArray.js +++ b/harness/testBigIntTypedArray.js @@ -8,7 +8,7 @@ description: | /** * The %TypedArray% intrinsic constructor function. */ -var TypedArray = Object.getPrototypeOf(BigInt64Array); +var TypedArray = Object.getPrototypeOf(Int8Array); /** * Calls the provided function for every typed array constructor. diff --git a/test/built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-unwrap-promise.js b/test/built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-unwrap-promise.js index d7b04c5db7de26855f30e42e16d175bd77bdf2b5..a49beecb1de4ba393534bcc1cda555c06e44f039 100644 --- a/test/built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-unwrap-promise.js +++ b/test/built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-unwrap-promise.js @@ -46,7 +46,7 @@ var obj = { }; async function* asyncg() { - yield* obj; + return yield* obj; } let iter = asyncg(); diff --git a/test/built-ins/AsyncGeneratorFunction/invoked-as-constructor-no-arguments.js b/test/built-ins/AsyncGeneratorFunction/invoked-as-constructor-no-arguments.js index 6400a8e5301ee051c9ff5fdfa9a551933ae80105..c8643ee80de087835f25fef872aab71abcca1533 100644 --- a/test/built-ins/AsyncGeneratorFunction/invoked-as-constructor-no-arguments.js +++ b/test/built-ins/AsyncGeneratorFunction/invoked-as-constructor-no-arguments.js @@ -6,6 +6,7 @@ description: > When invoked via the constructor invocation pattern without arguments, the GeneratorFunction intrinsic returns a valid async generator with an empty body. features: [async-iteration] +flags: [async] ---*/ var AsyncGeneratorFunction = Object.getPrototypeOf(async function* () {}).constructor; diff --git a/test/built-ins/AsyncGeneratorFunction/invoked-as-function-multiple-arguments.js b/test/built-ins/AsyncGeneratorFunction/invoked-as-function-multiple-arguments.js index 7e7ee7a9187e48927426ccdf10cd12fa3715eacd..f7ab6b13650d32601fc3dd54becd9a8e01008aa9 100644 --- a/test/built-ins/AsyncGeneratorFunction/invoked-as-function-multiple-arguments.js +++ b/test/built-ins/AsyncGeneratorFunction/invoked-as-function-multiple-arguments.js @@ -8,6 +8,7 @@ description: > last argument evaluated as source code and whose formal parameters are defined by the preceeding arguments. features: [async-iteration] +flags: [async] ---*/ var AsyncGeneratorFunction = Object.getPrototypeOf(async function* () {}).constructor; diff --git a/test/built-ins/AsyncGeneratorFunction/invoked-as-function-no-arguments.js b/test/built-ins/AsyncGeneratorFunction/invoked-as-function-no-arguments.js index e3b7c24f1ba36cb024282f2873305c1408116fd0..7524aa54aed6909431df3f223c8e6335a187b625 100644 --- a/test/built-ins/AsyncGeneratorFunction/invoked-as-function-no-arguments.js +++ b/test/built-ins/AsyncGeneratorFunction/invoked-as-function-no-arguments.js @@ -6,6 +6,7 @@ description: > When invoked via the function invocation pattern without arguments, the AsyncGeneratorFunction intrinsic returns a valid generator with an empty body. features: [async-iteration] +flags: [async] ---*/ var AsyncGeneratorFunction = Object.getPrototypeOf(async function* () {}).constructor; diff --git a/test/built-ins/Atomics/wait/cannot-suspend-throws.js b/test/built-ins/Atomics/wait/cannot-suspend-throws.js index c5ec687b29841d35f9505d49eb24e128a235eea2..56fb3c5125b1dc58dbe89294301a80d49f0ec388 100644 --- a/test/built-ins/Atomics/wait/cannot-suspend-throws.js +++ b/test/built-ins/Atomics/wait/cannot-suspend-throws.js @@ -14,7 +14,7 @@ info: | 6. Let B be AgentCanSuspend(). 7. If B is false, throw a TypeError exception. ... -features: [Atomics, SharedArrayBuffer, TypedArray] +features: [Atomics, SharedArrayBuffer, TypedArray, CannotSuspendMainAgent] ---*/ var sab = new SharedArrayBuffer(4); diff --git a/test/built-ins/Atomics/wait/non-int32-typedarray-throws.js b/test/built-ins/Atomics/wait/non-int32-typedarray-throws.js index 12c1203ccd93e94c0c51724755c0edcd293268ee..dc5932fb1dacc21d1f3513dde9042897153d62e8 100644 --- a/test/built-ins/Atomics/wait/non-int32-typedarray-throws.js +++ b/test/built-ins/Atomics/wait/non-int32-typedarray-throws.js @@ -3,7 +3,7 @@ /*--- esid: sec-atomics.wait -description: +description: > Throws a TypeError if typedArray arg is not an Int32Array info: | Atomics.wait( typedArray, index, value, timeout ) diff --git a/test/built-ins/Atomics/wait/undefined-index-defaults-to-zero.js b/test/built-ins/Atomics/wait/undefined-index-defaults-to-zero.js index 969adf747f2f44df950de82c353c2f196cc02572..11604f758ae2120f7b51ed5b04cbe9b818819c98 100644 --- a/test/built-ins/Atomics/wait/undefined-index-defaults-to-zero.js +++ b/test/built-ins/Atomics/wait/undefined-index-defaults-to-zero.js @@ -24,7 +24,7 @@ $262.agent.start( ` $262.agent.receiveBroadcast(function (sab) { var int32Array = new Int32Array(sab); - $262.agent.report(Atomics.wait(int32Array, undefined, 0, 10)); // undefined index => 0 + $262.agent.report(Atomics.wait(int32Array, undefined, 0, 1000)); // undefined index => 0 $262.agent.leaving(); }) `); diff --git a/test/built-ins/Atomics/wait/wait-index-value-not-equal.js b/test/built-ins/Atomics/wait/wait-index-value-not-equal.js index 797f36aff547c03745632b98e641b1ba699a6114..b40986abc99fa6ec18cd76f75b95564101f237b9 100644 --- a/test/built-ins/Atomics/wait/wait-index-value-not-equal.js +++ b/test/built-ins/Atomics/wait/wait-index-value-not-equal.js @@ -28,11 +28,9 @@ $262.agent.start( $262.agent.receiveBroadcast(function (sab) { var int32Array = new Int32Array(sab); - $262.agent.report(Atomics.wait(int32Array, 0, 44, 100)); + $262.agent.report(Atomics.wait(int32Array, 0, 44, 1000)); $262.agent.report(Atomics.wait(int32Array, 0, 251.4, 1000)); - - $262.agent.report(Atomics.wait(int32Array, 0, Infinity, 1000)); $262.agent.leaving(); }) @@ -45,7 +43,6 @@ $262.agent.broadcast(int32Array.buffer); $262.agent.sleep(200); -assert.sameValue(getReport(), "not-equal"); assert.sameValue(getReport(), "not-equal"); assert.sameValue(getReport(), "not-equal"); diff --git a/test/built-ins/Atomics/wait/was-woken-before-timeout.js b/test/built-ins/Atomics/wait/was-woken-before-timeout.js index 844dc2fe827ce6a7a7c0aa3dbabf1ff5aa06cbb8..0bf1800ba4b0397456139551055bab32f0693212 100644 --- a/test/built-ins/Atomics/wait/was-woken-before-timeout.js +++ b/test/built-ins/Atomics/wait/was-woken-before-timeout.js @@ -42,7 +42,7 @@ $262.agent.start( assert.sameValue(Atomics.wake(int32Array, 0), 1); assert.sameValue(getReport(), "ok"); - assert.sameValue(sleeping < timeout, "this test assumes it won't last for more than 20 seconds"); + assert(sleeping < timeout, "this test assumes it won't last for more than 20 seconds"); function getReport() { var r; @@ -52,4 +52,3 @@ $262.agent.start( } return r; } - \ No newline at end of file diff --git a/test/built-ins/Promise/all/iter-arg-is-string-resolve.js b/test/built-ins/Promise/all/iter-arg-is-string-resolve.js index 46bb6dde6a67cae8a7778449b1f74c72f67d8ca3..c8626ab8f5cb787440b1b486cca0b014141b4655 100644 --- a/test/built-ins/Promise/all/iter-arg-is-string-resolve.js +++ b/test/built-ins/Promise/all/iter-arg-is-string-resolve.js @@ -4,7 +4,7 @@ /*--- esid: sec-promise.all description: > - Reject when argument is a string + Resolve when argument is a string info: | ... Let iteratorRecord be GetIterator(iterable). @@ -23,11 +23,11 @@ flags: [async] ---*/ try { - Promise.all("").then(function() { - $DONE(); + Promise.all("").then(function(v) { + assert.sameValue(v.length, 0); }, function() { $DONE('The promise should be resolved, but was rejected'); }).then($DONE, $DONE); } catch (error) { - $DONE(`The promise should be rejected, but threw an exception: ${error.message}`); + $DONE(`The promise should be resolved, but threw an exception: ${error.message}`); } diff --git a/test/built-ins/Promise/all/iter-step-err-no-close.js b/test/built-ins/Promise/all/iter-step-err-no-close.js index 4e9e04b339f0438213182b412e8417280ae56f95..e288093ac1a6abf0b5ca278ae6defd604eec03af 100644 --- a/test/built-ins/Promise/all/iter-step-err-no-close.js +++ b/test/built-ins/Promise/all/iter-step-err-no-close.js @@ -37,7 +37,7 @@ Object.defineProperty(poisonedDone, 'done', { }); Object.defineProperty(poisonedDone, 'value', { get: function() { - $DONE('The `value` property should not be accessed.'); + $ERROR('The `value` property should not be accessed.'); } }); diff --git a/test/built-ins/Promise/race/iter-arg-is-string-resolve.js b/test/built-ins/Promise/race/iter-arg-is-string-resolve.js index 02490594efa67d6b80f0acece3c417f7abc532f7..7de85b7fda199b07ffd40c4b701af61974d10b47 100644 --- a/test/built-ins/Promise/race/iter-arg-is-string-resolve.js +++ b/test/built-ins/Promise/race/iter-arg-is-string-resolve.js @@ -4,7 +4,7 @@ /*--- esid: sec-promise.race description: > - Reject when argument is a string + Resolve when argument is a string info: | ... Let iteratorRecord be GetIterator(iterable). @@ -23,11 +23,11 @@ flags: [async] ---*/ try { - Promise.race("").then(function() { - $DONE(); + Promise.race("a").then(function(v) { + assert.sameValue(v, "a"); }, function() { $DONE('The promise should be resolved, but was rejected'); }).then($DONE, $DONE); } catch (error) { - $DONE(`The promise should be rejected, but threw an exception: ${error.message}`); + $DONE(`The promise should be resolved, but threw an exception: ${error.message}`); } diff --git a/test/built-ins/TypedArray/prototype/map/return-new-typedarray-conversion-operation-consistent-nan.js b/test/built-ins/TypedArray/prototype/map/return-new-typedarray-conversion-operation-consistent-nan.js index 7774273dc3b31ef8b97f820037c646c0cb43b111..e8b94a22a55b65fd9906ee0517c081c86a766f75 100644 --- a/test/built-ins/TypedArray/prototype/map/return-new-typedarray-conversion-operation-consistent-nan.js +++ b/test/built-ins/TypedArray/prototype/map/return-new-typedarray-conversion-operation-consistent-nan.js @@ -50,7 +50,7 @@ function body(FloatArray) { var i = 0; var result = sample.map(function() { - return NaNs[i++]; + return NaNs[i++](); }); sampleBytes = new Uint8Array(sample.buffer); diff --git a/test/harness/verifyProperty-value-error.js b/test/harness/verifyProperty-value-error.js index 84adbe2df4bc28b16c407bcf1d30bf971e207d07..2a97967c8f70e055461b9efd3c8b42740bed1a90 100644 --- a/test/harness/verifyProperty-value-error.js +++ b/test/harness/verifyProperty-value-error.js @@ -29,7 +29,7 @@ try { ); } - if (err.message !== 'descriptor value should be 2 Expected SameValue(«1», «0») to be true') { + if (err.message !== 'descriptor value should be 2') { $ERROR('The error thrown did not define the specified message.'); } }