diff --git a/harness/features.yml b/harness/features.yml index 333af083bed..f432050d79f 100644 --- a/harness/features.yml +++ b/harness/features.yml @@ -1,6 +1,5 @@ atomicsHelper: [Atomics] typeCoercion.js: [Symbol.toPrimitive, BigInt] testAtomics.js: [ArrayBuffer, Atomics, DataView, SharedArrayBuffer, Symbol, TypedArray] -testBigIntTypedArray.js: [BigInt, TypedArray] testTypedArray.js: [TypedArray] isConstructor.js: [Reflect.construct] diff --git a/harness/testBigIntTypedArray.js b/harness/testBigIntTypedArray.js deleted file mode 100644 index cc7ae7a9f06..00000000000 --- a/harness/testBigIntTypedArray.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2015 André Bargull. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -description: | - Collection of functions used to assert the correctness of BigInt TypedArray objects. -defines: - - TypedArray - - testWithBigIntTypedArrayConstructors ----*/ - -/** - * The %TypedArray% intrinsic constructor function. - */ -var TypedArray = Object.getPrototypeOf(Int8Array); - -/** - * Calls the provided function for every typed array constructor. - * - * @param {typedArrayConstructorCallback} f - the function to call for each typed array constructor. - * @param {Array} selected - An optional Array with filtered typed arrays - */ -function testWithBigIntTypedArrayConstructors(f, selected) { - /** - * Array containing every BigInt typed array constructor. - */ - var constructors = selected || [ - BigInt64Array, - BigUint64Array - ]; - - for (var i = 0; i < constructors.length; ++i) { - var constructor = constructors[i]; - try { - f(constructor); - } catch (e) { - e.message += " (Testing with " + constructor.name + ".)"; - throw e; - } - } -} diff --git a/harness/testTypedArray.js b/harness/testTypedArray.js index d831072ec85..e64eb3c3cd5 100644 --- a/harness/testTypedArray.js +++ b/harness/testTypedArray.js @@ -9,7 +9,9 @@ defines: - intArrayConstructors - typedArrayConstructors - TypedArray + - testWithAllTypedArrayConstructors - testWithTypedArrayConstructors + - testWithBigIntTypedArrayConstructors - nonAtomicsFriendlyTypedArrayConstructors - testWithAtomicsFriendlyTypedArrayConstructors - testWithNonAtomicsFriendlyTypedArrayConstructors @@ -34,45 +36,284 @@ var intArrayConstructors = nonClampedIntArrayConstructors.concat([Uint8ClampedAr // Float16Array is a newer feature // adding it to this list unconditionally would cause implementations lacking it to fail every test which uses it -if (typeof Float16Array !== 'undefined') { +if (typeof Float16Array !== "undefined") { floatArrayConstructors.push(Float16Array); } +var bigIntArrayConstructors = []; +if (typeof BigInt64Array !== "undefined") { + bigIntArrayConstructors.push(BigInt64Array); +} +if (typeof BigUint64Array !== "undefined") { + bigIntArrayConstructors.push(BigUint64Array); +} + /** * Array containing every non-bigint typed array constructor. */ - var typedArrayConstructors = floatArrayConstructors.concat(intArrayConstructors); +/** + * Array containing every typed array constructor, including those with bigint values. + */ +var allTypedArrayConstructors = typedArrayConstructors.concat(bigIntArrayConstructors); + /** * The %TypedArray% intrinsic constructor function. */ var TypedArray = Object.getPrototypeOf(Int8Array); +function isPrimitive(val) { + return !val || (typeof val !== "object" && typeof val !== "function"); +} + +function makePassthrough(TA, primitiveOrIterable) { + return primitiveOrIterable; +} + +function makeArray(TA, primitiveOrIterable) { + if (isPrimitive(primitiveOrIterable)) { + var n = Number(primitiveOrIterable); + // Only values between 0 and 2**53 - 1 inclusive can get mapped into TA contents. + if (!(n >= 0 && n < 9007199254740992)) return primitiveOrIterable; + return Array.from({ length: n }, function() { return "0"; }); + } + return Array.from(primitiveOrIterable); +} + +function makeArrayLike(TA, primitiveOrIterable) { + var arr = makeArray(TA, primitiveOrIterable); + if (isPrimitive(arr)) return arr; + var obj = { length: arr.length }; + for (var i = 0; i < obj.length; i++) obj[i] = arr[i]; + return obj; +} + +var makeIterable; +if (typeof Symbol !== "undefined" && Symbol.iterator) { + makeIterable = function makeIterable(TA, primitiveOrIterable) { + var src = makeArray(TA, primitiveOrIterable); + if (isPrimitive(src)) return src; + var obj = {}; + obj[Symbol.iterator] = function() { return src[Symbol.iterator](); }; + return obj; + }; +} + +function makeArrayBuffer(TA, primitiveOrIterable) { + var arr = makeArray(TA, primitiveOrIterable); + if (isPrimitive(arr)) return arr; + return new TA(arr).buffer; +} + +var makeResizableArrayBuffer, makeGrownArrayBuffer, makeShrunkArrayBuffer, makeImmutableArrayBuffer; +if (ArrayBuffer.prototype.resize) { + var copyIntoArrayBuffer = function(destBuffer, srcBuffer) { + var destView = new Uint8Array(destBuffer); + var srcView = new Uint8Array(srcBuffer); + for (var i = 0; i < srcView.length; i++) destView[i] = srcView[i]; + return destBuffer; + }; + + makeResizableArrayBuffer = function makeResizableArrayBuffer(TA, primitiveOrIterable) { + if (isPrimitive(primitiveOrIterable)) { + var n = Number(primitiveOrIterable) * TA.BYTES_PER_ELEMENT; + if (!(n >= 0 && n < 9007199254740992)) return primitiveOrIterable; + return new ArrayBuffer(n, { maxByteLength: n * 2 }); + } + var fixed = makeArrayBuffer(TA, primitiveOrIterable); + var byteLength = fixed.byteLength; + var resizable = new ArrayBuffer(byteLength, { maxByteLength: byteLength * 2 }); + return copyIntoArrayBuffer(resizable, fixed); + }; + + makeGrownArrayBuffer = function makeGrownArrayBuffer(TA, primitiveOrIterable) { + if (isPrimitive(primitiveOrIterable)) { + var n = Number(primitiveOrIterable) * TA.BYTES_PER_ELEMENT; + if (!(n >= 0 && n < 9007199254740992)) return primitiveOrIterable; + var grown = new ArrayBuffer(Math.floor(n / 2), { maxByteLength: n }); + grown.resize(n); + } + var fixed = makeArrayBuffer(TA, primitiveOrIterable); + var byteLength = fixed.byteLength; + var grown = new ArrayBuffer(Math.floor(byteLength / 2), { maxByteLength: byteLength }); + grown.resize(byteLength); + return copyIntoArrayBuffer(grown, fixed); + }; + + makeShrunkArrayBuffer = function makeShrunkArrayBuffer(TA, primitiveOrIterable) { + if (isPrimitive(primitiveOrIterable)) { + var n = Number(primitiveOrIterable) * TA.BYTES_PER_ELEMENT; + if (!(n >= 0 && n < 9007199254740992)) return primitiveOrIterable; + var shrunk = new ArrayBuffer(n * 2, { maxByteLength: n * 2 }); + shrunk.resize(n); + } + var fixed = makeArrayBuffer(TA, primitiveOrIterable); + var byteLength = fixed.byteLength; + var shrunk = new ArrayBuffer(byteLength * 2, { maxByteLength: byteLength * 2 }); + copyIntoArrayBuffer(shrunk, fixed); + shrunk.resize(byteLength); + return shrunk; + }; +} +if (ArrayBuffer.prototype.transferToImmutable) { + makeImmutableArrayBuffer = function makeImmutableArrayBuffer(TA, primitiveOrIterable) { + if (isPrimitive(primitiveOrIterable)) { + var n = Number(primitiveOrIterable) * TA.BYTES_PER_ELEMENT; + if (!(n >= 0 && n < 9007199254740992)) return primitiveOrIterable; + return (new ArrayBuffer(n)).transferToImmutable(); + } + var mutable = makeArrayBuffer(TA, primitiveOrIterable); + return mutable.transferToImmutable(); + }; +} + +var typedArrayCtorArgFactories = [makePassthrough, makeArray, makeArrayLike]; +if (makeIterable) typedArrayCtorArgFactories.push(makeIterable); +typedArrayCtorArgFactories.push(makeArrayBuffer); +if (makeResizableArrayBuffer) typedArrayCtorArgFactories.push(makeResizableArrayBuffer); +if (makeGrownArrayBuffer) typedArrayCtorArgFactories.push(makeGrownArrayBuffer); +if (makeShrunkArrayBuffer) typedArrayCtorArgFactories.push(makeShrunkArrayBuffer); +if (makeImmutableArrayBuffer) typedArrayCtorArgFactories.push(makeImmutableArrayBuffer); + +/** + * @typedef {"passthrough" | "arraylike" | "iterable" | "arraybuffer" | "resizable" | "immutable"} typedArrayArgFactoryFeature + */ + +/** + * @param {Function} argFactory + * @param {typedArrayArgFactoryFeature[]} features + * @returns {boolean} + */ +function ctorArgFactoryMatchesSome(argFactory, features) { + for (var i = 0; i < features.length; ++i) { + switch (features[i]) { + case "passthrough": + return argFactory === makePassthrough; + case "arraylike": + return argFactory === makeArray || argFactory === makeArrayLike; + case "iterable": + return argFactory === makeIterable; + case "arraybuffer": + return ( + argFactory === makeArrayBuffer || + argFactory === makeResizableArrayBuffer || + argFactory === makeGrownArrayBuffer || + argFactory === makeShrunkArrayBuffer || + argFactory === makeImmutableArrayBuffer + ); + case "resizable": + return ( + argFactory === makeResizableArrayBuffer || + argFactory === makeGrownArrayBuffer || + argFactory === makeShrunkArrayBuffer + ); + case "immutable": + return argFactory === makeImmutableArrayBuffer; + } + throw Test262Error("unknown feature: " + features[i]); + } +} + /** * Callback for testing a typed array constructor. * * @callback typedArrayConstructorCallback - * @param {Function} Constructor the constructor object to test with. + * @param {Function} TypedArrayConstructor the constructor object to test with + * @param {Function} [TypedArrayConstructorArgFactory] a function for making + * a TypedArrayConstructor arguments from a primitive (usually a number) or + * iterable (usually an array) */ /** - * Calls the provided function for every typed array constructor. + * Calls the provided function with (typedArrayCtor, typedArrayCtorArgFactory) + * pairs, where typedArrayCtor is Uint8Array/Int8Array/BigInt64Array/etc. and + * typedArrayCtorArgFactory is a function for mapping a primitive (usually a + * number) or iterable (usually an array) into a value suitable as the first + * argument of typedArrayCtor (an Array, arraylike, iterable, or ArrayBuffer). * - * @param {typedArrayConstructorCallback} f - the function to call for each typed array constructor. - * @param {Array} selected - An optional Array with filtered typed arrays + * @param {typedArrayConstructorCallback} f - the function to call + * @param {Array} [constructors] - an explict list of TypedArray constructors + * @param {typedArrayArgFactoryFeature[]} [includeArgFactories] - for selecting + * initial constructor argument factory functions, rather than starting with + * all argument factories + * @param {typedArrayArgFactoryFeature[]} [excludeArgFactories] - for excluding + * constructor argument factory functions, after an initial selection */ -function testWithTypedArrayConstructors(f, selected) { - var constructors = selected || typedArrayConstructors; - for (var i = 0; i < constructors.length; ++i) { - var constructor = constructors[i]; - try { - f(constructor); - } catch (e) { - e.message += " (Testing with " + constructor.name + ".)"; - throw e; +function testWithAllTypedArrayConstructors(f, constructors, includeArgFactories, excludeArgFactories) { + var ctors = constructors || allTypedArrayConstructors; + var ctorArgFactories = typedArrayCtorArgFactories; + if (includeArgFactories) { + ctorArgFactories = []; + for (var i = 0; i < typedArrayCtorArgFactories.length; ++i) { + if (ctorArgFactoryMatchesSome(typedArrayCtorArgFactories[i], includeArgFactories)) { + ctorArgFactories.push(typedArrayCtorArgFactories[i]); + } + } + } + if (excludeArgFactories) { + ctorArgFactories = ctorArgFactories.slice(); + for (var i = ctorArgFactories.length - 1; i >= 0; --i) { + if (ctorArgFactoryMatchesSome(ctorArgFactories[i], excludeArgFactories)) { + ctorArgFactories.splice(i, 1); + } } } + if (ctorArgFactories.length === 0) { + throw Test262Error("no arg factories match include " + includeArgFactories + " and exclude " + excludeArgFactories); + } + for (var k = 0; k < ctorArgFactories.length; ++k) { + var argFactory = ctorArgFactories[k]; + for (var i = 0; i < ctors.length; ++i) { + var constructor = ctors[i]; + var boundArgFactory = argFactory.bind(undefined, constructor); + try { + f(constructor, boundArgFactory); + } catch (e) { + e.message += " (Testing with " + constructor.name + " and " + argFactory.name + ".)"; + throw e; + } + } + } +} + +/** + * Calls the provided function with (typedArrayCtor, typedArrayCtorArgFactory) + * pairs, where typedArrayCtor is Uint8Array/Int8Array/BigInt64Array/etc. and + * typedArrayCtorArgFactory is a function for mapping a primitive (usually a + * number) or iterable (usually an array) into a value suitable as the first + * argument of typedArrayCtor (an Array, arraylike, iterable, or ArrayBuffer). + * + * typedArrayCtor will not be BigInt64Array or BigUint64Array unless one or both + * of those are explicitly provided. + * + * @param {typedArrayConstructorCallback} f - the function to call + * @param {Array} [constructors] - an explict list of TypedArray constructors + * @param {typedArrayArgFactoryFeature[]} [includeArgFactories] - for selecting + * initial constructor argument factory functions, rather than starting with + * all argument factories + * @param {typedArrayArgFactoryFeature[]} [excludeArgFactories] - for excluding + * constructor argument factory functions, after an initial selection + */ +function testWithTypedArrayConstructors(f, constructors, includeArgFactories, excludeArgFactories) { + var ctors = constructors || typedArrayConstructors; + testWithAllTypedArrayConstructors(f, ctors, includeArgFactories, excludeArgFactories); +} + +/** + * Calls the provided function for every BigInt typed array constructor. + * + * @param {typedArrayConstructorCallback} f - the function to call + * @param {Array} [constructors] - an explict list of TypedArray constructors + * @param {typedArrayArgFactoryFeature[]} [includeArgFactories] - for selecting + * initial constructor argument factory functions, rather than starting with + * all argument factories + * @param {typedArrayArgFactoryFeature[]} [excludeArgFactories] - for excluding + * constructor argument factory functions, after an initial selection + */ +function testWithBigIntTypedArrayConstructors(f, constructors, includeArgFactories, excludeArgFactories) { + var ctors = constructors || [BigInt64Array, BigUint64Array]; + testWithAllTypedArrayConstructors(f, ctors, includeArgFactories, excludeArgFactories); } var nonAtomicsFriendlyTypedArrayConstructors = floatArrayConstructors.concat([Uint8ClampedArray]); @@ -81,9 +322,19 @@ var nonAtomicsFriendlyTypedArrayConstructors = floatArrayConstructors.concat([Ui * * @param {typedArrayConstructorCallback} f - the function to call for each typed array constructor. * @param {Array} selected - An optional Array with filtered typed arrays + * @param {typedArrayArgFactoryFeature[]} [includeArgFactories] - for selecting + * initial constructor argument factory functions, rather than starting with + * all argument factories + * @param {typedArrayArgFactoryFeature[]} [excludeArgFactories] - for excluding + * constructor argument factory functions, after an initial selection */ -function testWithNonAtomicsFriendlyTypedArrayConstructors(f) { - testWithTypedArrayConstructors(f, nonAtomicsFriendlyTypedArrayConstructors); +function testWithNonAtomicsFriendlyTypedArrayConstructors(f, includeArgFactories, excludeArgFactories) { + testWithAllTypedArrayConstructors( + f, + nonAtomicsFriendlyTypedArrayConstructors, + includeArgFactories, + excludeArgFactories + ); } /** @@ -91,16 +342,26 @@ function testWithNonAtomicsFriendlyTypedArrayConstructors(f) { * * @param {typedArrayConstructorCallback} f - the function to call for each typed array constructor. * @param {Array} selected - An optional Array with filtered typed arrays + * @param {typedArrayArgFactoryFeature[]} [includeArgFactories] - for selecting + * initial constructor argument factory functions, rather than starting with + * all argument factories + * @param {typedArrayArgFactoryFeature[]} [excludeArgFactories] - for excluding + * constructor argument factory functions, after an initial selection */ -function testWithAtomicsFriendlyTypedArrayConstructors(f) { - testWithTypedArrayConstructors(f, [ - Int32Array, - Int16Array, - Int8Array, - Uint32Array, - Uint16Array, - Uint8Array, - ]); +function testWithAtomicsFriendlyTypedArrayConstructors(f, includeArgFactories, excludeArgFactories) { + testWithAllTypedArrayConstructors( + f, + [ + Int32Array, + Int16Array, + Int8Array, + Uint32Array, + Uint16Array, + Uint8Array, + ], + includeArgFactories, + excludeArgFactories + ); } /** @@ -127,7 +388,7 @@ function testTypedArrayConversions(byteConversionValues, fn) { } fn(TA, value, exp, initial); }); - }); + }, null, ["passthrough"]); } /** diff --git a/test/built-ins/Array/prototype/every/callbackfn-resize-arraybuffer.js b/test/built-ins/Array/prototype/every/callbackfn-resize-arraybuffer.js index 02dac1025de..30062970239 100644 --- a/test/built-ins/Array/prototype/every/callbackfn-resize-arraybuffer.js +++ b/test/built-ins/Array/prototype/every/callbackfn-resize-arraybuffer.js @@ -68,4 +68,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.sameValue(result, true, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Array/prototype/filter/callbackfn-resize-arraybuffer.js b/test/built-ins/Array/prototype/filter/callbackfn-resize-arraybuffer.js index a995ac9aa18..d5fd1cf4478 100644 --- a/test/built-ins/Array/prototype/filter/callbackfn-resize-arraybuffer.js +++ b/test/built-ins/Array/prototype/filter/callbackfn-resize-arraybuffer.js @@ -68,4 +68,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.compareArray(result, expectedElements, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Array/prototype/find/callbackfn-resize-arraybuffer.js b/test/built-ins/Array/prototype/find/callbackfn-resize-arraybuffer.js index 7ce5633dc13..faa4ee4b22b 100644 --- a/test/built-ins/Array/prototype/find/callbackfn-resize-arraybuffer.js +++ b/test/built-ins/Array/prototype/find/callbackfn-resize-arraybuffer.js @@ -70,4 +70,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.sameValue(result, undefined, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Array/prototype/findIndex/callbackfn-resize-arraybuffer.js b/test/built-ins/Array/prototype/findIndex/callbackfn-resize-arraybuffer.js index 0d63e6dc9b7..04c1d94de6a 100644 --- a/test/built-ins/Array/prototype/findIndex/callbackfn-resize-arraybuffer.js +++ b/test/built-ins/Array/prototype/findIndex/callbackfn-resize-arraybuffer.js @@ -70,4 +70,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.sameValue(result, -1, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Array/prototype/findLast/callbackfn-resize-arraybuffer.js b/test/built-ins/Array/prototype/findLast/callbackfn-resize-arraybuffer.js index 6e221dcfafb..cfac2f7940b 100644 --- a/test/built-ins/Array/prototype/findLast/callbackfn-resize-arraybuffer.js +++ b/test/built-ins/Array/prototype/findLast/callbackfn-resize-arraybuffer.js @@ -70,4 +70,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.sameValue(result, undefined, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Array/prototype/findLastIndex/callbackfn-resize-arraybuffer.js b/test/built-ins/Array/prototype/findLastIndex/callbackfn-resize-arraybuffer.js index 515db6441f3..5bece6e3ef0 100644 --- a/test/built-ins/Array/prototype/findLastIndex/callbackfn-resize-arraybuffer.js +++ b/test/built-ins/Array/prototype/findLastIndex/callbackfn-resize-arraybuffer.js @@ -70,4 +70,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.sameValue(result, -1, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Array/prototype/forEach/callbackfn-resize-arraybuffer.js b/test/built-ins/Array/prototype/forEach/callbackfn-resize-arraybuffer.js index ebd4f02b2a7..c141c4d9da0 100644 --- a/test/built-ins/Array/prototype/forEach/callbackfn-resize-arraybuffer.js +++ b/test/built-ins/Array/prototype/forEach/callbackfn-resize-arraybuffer.js @@ -66,4 +66,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.sameValue(result, undefined, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Array/prototype/map/callbackfn-resize-arraybuffer.js b/test/built-ins/Array/prototype/map/callbackfn-resize-arraybuffer.js index 0b910529851..1966bc1a785 100644 --- a/test/built-ins/Array/prototype/map/callbackfn-resize-arraybuffer.js +++ b/test/built-ins/Array/prototype/map/callbackfn-resize-arraybuffer.js @@ -72,4 +72,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.compareArray(result, expectedIndices, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Array/prototype/reduce/callbackfn-resize-arraybuffer.js b/test/built-ins/Array/prototype/reduce/callbackfn-resize-arraybuffer.js index f9d00cd691f..5f5a08bc406 100644 --- a/test/built-ins/Array/prototype/reduce/callbackfn-resize-arraybuffer.js +++ b/test/built-ins/Array/prototype/reduce/callbackfn-resize-arraybuffer.js @@ -70,4 +70,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.sameValue(result, expectedIndices[expectedIndices.length - 1], 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Array/prototype/reduceRight/callbackfn-resize-arraybuffer.js b/test/built-ins/Array/prototype/reduceRight/callbackfn-resize-arraybuffer.js index 9301c394f06..a9657993501 100644 --- a/test/built-ins/Array/prototype/reduceRight/callbackfn-resize-arraybuffer.js +++ b/test/built-ins/Array/prototype/reduceRight/callbackfn-resize-arraybuffer.js @@ -75,4 +75,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndicesGrow, 'indices (grow)'); assert.compareArray(arrays, expectedArraysGrow, 'arrays (grow)'); assert.sameValue(result, expectedIndicesGrow[expectedIndicesGrow.length - 1], 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Array/prototype/some/callbackfn-resize-arraybuffer.js b/test/built-ins/Array/prototype/some/callbackfn-resize-arraybuffer.js index 9027c252f06..c61f38044cf 100644 --- a/test/built-ins/Array/prototype/some/callbackfn-resize-arraybuffer.js +++ b/test/built-ins/Array/prototype/some/callbackfn-resize-arraybuffer.js @@ -68,4 +68,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.sameValue(result, false, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/ArrayBuffer/isView/arg-is-typedarray-buffer.js b/test/built-ins/ArrayBuffer/isView/arg-is-typedarray-buffer.js index 2e56554b5bb..884d43dbef3 100644 --- a/test/built-ins/ArrayBuffer/isView/arg-is-typedarray-buffer.js +++ b/test/built-ins/ArrayBuffer/isView/arg-is-typedarray-buffer.js @@ -15,8 +15,8 @@ features: [TypedArray] includes: [testTypedArray.js] ---*/ -testWithTypedArrayConstructors(function(ctor) { - var sample = new ctor().buffer; +testWithAllTypedArrayConstructors(function(ctor, makeCtorArg) { + var sample = new ctor(makeCtorArg(0)).buffer; assert.sameValue(ArrayBuffer.isView(sample), false); }); diff --git a/test/built-ins/ArrayBuffer/isView/arg-is-typedarray-constructor.js b/test/built-ins/ArrayBuffer/isView/arg-is-typedarray-constructor.js index 7d512ee0ad3..f04ce6a05f6 100644 --- a/test/built-ins/ArrayBuffer/isView/arg-is-typedarray-constructor.js +++ b/test/built-ins/ArrayBuffer/isView/arg-is-typedarray-constructor.js @@ -15,6 +15,6 @@ features: [TypedArray] includes: [testTypedArray.js] ---*/ -testWithTypedArrayConstructors(function(ctor) { +testWithAllTypedArrayConstructors(function(ctor) { assert.sameValue(ArrayBuffer.isView(ctor), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/ArrayBuffer/isView/arg-is-typedarray-subclass-instance.js b/test/built-ins/ArrayBuffer/isView/arg-is-typedarray-subclass-instance.js index c72c4de238c..4341f83421e 100644 --- a/test/built-ins/ArrayBuffer/isView/arg-is-typedarray-subclass-instance.js +++ b/test/built-ins/ArrayBuffer/isView/arg-is-typedarray-subclass-instance.js @@ -15,10 +15,10 @@ features: [class, TypedArray] includes: [testTypedArray.js] ---*/ -testWithTypedArrayConstructors(function(ctor) { +testWithAllTypedArrayConstructors(function(ctor, makeCtorArg) { class TA extends ctor {} - var sample = new TA(); + var sample = new TA(makeCtorArg(0)); assert(ArrayBuffer.isView(sample)); }); diff --git a/test/built-ins/ArrayBuffer/isView/arg-is-typedarray.js b/test/built-ins/ArrayBuffer/isView/arg-is-typedarray.js index 9d90ec048d3..4d6d1e69190 100644 --- a/test/built-ins/ArrayBuffer/isView/arg-is-typedarray.js +++ b/test/built-ins/ArrayBuffer/isView/arg-is-typedarray.js @@ -15,8 +15,8 @@ features: [TypedArray] includes: [testTypedArray.js] ---*/ -testWithTypedArrayConstructors(function(ctor) { - var sample = new ctor(); +testWithAllTypedArrayConstructors(function(ctor, makeCtorArg) { + var sample = new ctor(makeCtorArg(0)); assert.sameValue(ArrayBuffer.isView(sample), true); }); diff --git a/test/built-ins/ArrayBuffer/isView/invoked-as-a-fn.js b/test/built-ins/ArrayBuffer/isView/invoked-as-a-fn.js index c11b6c3f3ab..d8678e9b388 100644 --- a/test/built-ins/ArrayBuffer/isView/invoked-as-a-fn.js +++ b/test/built-ins/ArrayBuffer/isView/invoked-as-a-fn.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js] var isView = ArrayBuffer.isView; -testWithTypedArrayConstructors(function(ctor) { - var sample = new ctor(); +testWithAllTypedArrayConstructors(function(ctor, makeCtorArg) { + var sample = new ctor(makeCtorArg(0)); assert.sameValue(isView(sample), true, "instance of TypedArray"); }); diff --git a/test/built-ins/ArrayIteratorPrototype/next/detach-typedarray-in-progress.js b/test/built-ins/ArrayIteratorPrototype/next/detach-typedarray-in-progress.js index bab001a1625..f0abf09b6f1 100644 --- a/test/built-ins/ArrayIteratorPrototype/next/detach-typedarray-in-progress.js +++ b/test/built-ins/ArrayIteratorPrototype/next/detach-typedarray-in-progress.js @@ -13,8 +13,8 @@ includes: [testTypedArray.js, detachArrayBuffer.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(TA => { - var typedArray = new TA(5); +testWithAllTypedArrayConstructors((TA, makeCtorArg) => { + var typedArray = new TA(makeCtorArg(5)); var i = 0; assert.throws(TypeError, () => { for (let key of typedArray.keys()) { @@ -23,4 +23,4 @@ testWithTypedArrayConstructors(TA => { } }); assert.sameValue(i, 1); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/Atomics/add/bad-range.js b/test/built-ins/Atomics/add/bad-range.js index e01d96c7914..76994f228d4 100644 --- a/test/built-ins/Atomics/add/bad-range.js +++ b/test/built-ins/Atomics/add/bad-range.js @@ -19,4 +19,4 @@ testWithTypedArrayConstructors(function(TA) { Atomics.add(view, IdxGen(view), 10); }); }); -}, views); +}, views, ["passthrough"]); diff --git a/test/built-ins/Atomics/add/bigint/bad-range.js b/test/built-ins/Atomics/add/bigint/bad-range.js index 172fb9f50a6..afe92944f5a 100644 --- a/test/built-ins/Atomics/add/bigint/bad-range.js +++ b/test/built-ins/Atomics/add/bigint/bad-range.js @@ -4,7 +4,7 @@ esid: sec-atomics.add description: > Test range checking of Atomics.add on arrays that allow atomic operations -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ var buffer = new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 2); @@ -17,4 +17,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { Atomics.add(view, IdxGen(view), 10n); }); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/add/bigint/good-views.js b/test/built-ins/Atomics/add/bigint/good-views.js index 97644adea50..7eec7b7a9fc 100644 --- a/test/built-ins/Atomics/add/bigint/good-views.js +++ b/test/built-ins/Atomics/add/bigint/good-views.js @@ -3,7 +3,7 @@ /*--- esid: sec-atomics.add description: Test Atomics.add on arrays that allow atomic operations. -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ const sab = new SharedArrayBuffer(1024); @@ -50,4 +50,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { Atomics.store(view, Idx, 37n); assert.sameValue(Atomics.add(view, Idx, 0n), 37n, 'Atomics.add(view, Idx, 0) returns 37n'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/add/bigint/non-shared-bufferdata.js b/test/built-ins/Atomics/add/bigint/non-shared-bufferdata.js index d48682edc37..c0ed426b7af 100644 --- a/test/built-ins/Atomics/add/bigint/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/add/bigint/non-shared-bufferdata.js @@ -4,12 +4,12 @@ esid: sec-atomics.add description: > Atomics.add will operate on TA when TA.buffer is not a SharedArrayBuffer -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithBigIntTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.sameValue(Atomics.add(view, 0, 1n), 0n, 'Atomics.add(view, 0, 1n) returns 0n'); assert.sameValue(Atomics.load(view, 0), 1n, 'Atomics.load(view, 0) returns 1n'); -}); +}, null, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/add/good-views.js b/test/built-ins/Atomics/add/good-views.js index 95f60854d90..a4cec394f2a 100644 --- a/test/built-ins/Atomics/add/good-views.js +++ b/test/built-ins/Atomics/add/good-views.js @@ -51,4 +51,4 @@ testWithTypedArrayConstructors(function(TA) { Atomics.store(view, Idx, 37); assert.sameValue(Atomics.add(view, Idx, 0), 37, 'Atomics.add(view, Idx, 0) returns 37'); }); -}, views); +}, views, ["passthrough"]); diff --git a/test/built-ins/Atomics/add/non-shared-bufferdata.js b/test/built-ins/Atomics/add/non-shared-bufferdata.js index 364e7f0ac3a..ca82b20116f 100644 --- a/test/built-ins/Atomics/add/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/add/non-shared-bufferdata.js @@ -8,11 +8,9 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithAtomicsFriendlyTypedArrayConstructors(TA => { - const view = new TA( - new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4) - ); +testWithAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const view = new TA(makeCtorArg(4)); assert.sameValue(Atomics.add(view, 0, 1), 0, 'Atomics.add(view, 0, 1) returns 0'); assert.sameValue(Atomics.load(view, 0), 1, 'Atomics.load(view, 0) returns 1'); -}); +}, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/add/non-shared-int-views-throws.js b/test/built-ins/Atomics/add/non-shared-int-views-throws.js index 0a98a5e10b6..38a99ceabcb 100644 --- a/test/built-ins/Atomics/add/non-shared-int-views-throws.js +++ b/test/built-ins/Atomics/add/non-shared-int-views-throws.js @@ -8,11 +8,11 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithNonAtomicsFriendlyTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithNonAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.throws(TypeError, function() { Atomics.add(view, 0, 1); }, `Atomics.add(new ${TA.name}(buffer), 0, 1) throws TypeError`); -}); +}, ["arraybuffer"]); diff --git a/test/built-ins/Atomics/and/bad-range.js b/test/built-ins/Atomics/and/bad-range.js index 811e3941727..291272363ef 100644 --- a/test/built-ins/Atomics/and/bad-range.js +++ b/test/built-ins/Atomics/and/bad-range.js @@ -19,4 +19,4 @@ testWithTypedArrayConstructors(function(TA) { Atomics.and(view, IdxGen(view), 10); }); }); -}, views); +}, views, ["passthrough"]); diff --git a/test/built-ins/Atomics/and/bigint/bad-range.js b/test/built-ins/Atomics/and/bigint/bad-range.js index e1876ee7b9a..76cda4dee46 100644 --- a/test/built-ins/Atomics/and/bigint/bad-range.js +++ b/test/built-ins/Atomics/and/bigint/bad-range.js @@ -4,7 +4,7 @@ esid: sec-atomics.and description: > Test range checking of Atomics.and on arrays that allow atomic operations -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ const buffer = new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 2); @@ -17,4 +17,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { Atomics.and(view, IdxGen(view), 10n); }); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/and/bigint/good-views.js b/test/built-ins/Atomics/and/bigint/good-views.js index 901a836f02b..4c96b1b7720 100644 --- a/test/built-ins/Atomics/and/bigint/good-views.js +++ b/test/built-ins/Atomics/and/bigint/good-views.js @@ -3,7 +3,7 @@ /*--- esid: sec-atomics.and description: Test Atomics.and on arrays that allow atomic operations -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ const sab = new SharedArrayBuffer(1024); @@ -80,4 +80,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { Atomics.store(view, Idx, 37n); assert.sameValue(Atomics.and(view, Idx, 0n), 37n, 'Atomics.and(view, Idx, 0n) returns 37n'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/and/bigint/non-shared-bufferdata.js b/test/built-ins/Atomics/and/bigint/non-shared-bufferdata.js index cfcd7cd597c..c677e9cbcfa 100644 --- a/test/built-ins/Atomics/and/bigint/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/and/bigint/non-shared-bufferdata.js @@ -4,12 +4,12 @@ esid: sec-atomics.and description: > Atomics.and will operate on TA when TA.buffer is not a SharedArrayBuffer -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithBigIntTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.sameValue(Atomics.and(view, 0, 1n), 0n, 'Atomics.and(view, 0, 1n) returns 0n'); assert.sameValue(Atomics.load(view, 0), 0n, 'Atomics.load(view, 0) returns 0n'); -}); +}, null, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/and/good-views.js b/test/built-ins/Atomics/and/good-views.js index 59fbd736c4b..634e48b6a79 100644 --- a/test/built-ins/Atomics/and/good-views.js +++ b/test/built-ins/Atomics/and/good-views.js @@ -66,4 +66,4 @@ testWithTypedArrayConstructors(function(TA) { Atomics.store(view, Idx, 37); assert.sameValue(Atomics.and(view, Idx, 0), 37, 'Atomics.and(view, Idx, 0) returns 37'); }); -}, views); +}, views, ["passthrough"]); diff --git a/test/built-ins/Atomics/and/non-shared-bufferdata.js b/test/built-ins/Atomics/and/non-shared-bufferdata.js index aa6a6d6ca83..12fcd57a3dc 100644 --- a/test/built-ins/Atomics/and/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/and/non-shared-bufferdata.js @@ -8,11 +8,9 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithAtomicsFriendlyTypedArrayConstructors(TA => { - const view = new TA( - new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4) - ); +testWithAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const view = new TA(makeCtorArg(4)); assert.sameValue(Atomics.and(view, 0, 1), 0, 'Atomics.and(view, 0, 1) returns 0'); assert.sameValue(Atomics.load(view, 0), 0, 'Atomics.load(view, 0) returns 0'); -}); +}, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/and/non-shared-int-views-throws.js b/test/built-ins/Atomics/and/non-shared-int-views-throws.js index 8b0da10ee3f..276695f80f5 100644 --- a/test/built-ins/Atomics/and/non-shared-int-views-throws.js +++ b/test/built-ins/Atomics/and/non-shared-int-views-throws.js @@ -8,11 +8,11 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithNonAtomicsFriendlyTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithNonAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.throws(TypeError, function() { Atomics.and(view, 0, 1); }, `Atomics.and(new ${TA.name}(buffer), 0, 1) throws TypeError`); -}); +}, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/compareExchange/bad-range.js b/test/built-ins/Atomics/compareExchange/bad-range.js index 7fbd13a384e..b3d0819fc0c 100644 --- a/test/built-ins/Atomics/compareExchange/bad-range.js +++ b/test/built-ins/Atomics/compareExchange/bad-range.js @@ -19,4 +19,4 @@ testWithTypedArrayConstructors(function(TA) { Atomics.compareExchange(view, IdxGen(view), 10, 0); }); }); -}, views); +}, views, ["passthrough"]); diff --git a/test/built-ins/Atomics/compareExchange/bigint/bad-range.js b/test/built-ins/Atomics/compareExchange/bigint/bad-range.js index 1f7ec929ff9..30929cb9cb3 100644 --- a/test/built-ins/Atomics/compareExchange/bigint/bad-range.js +++ b/test/built-ins/Atomics/compareExchange/bigint/bad-range.js @@ -4,7 +4,7 @@ esid: sec-atomics.compareexchange description: > Test range checking of Atomics.compareExchange on arrays that allow atomic operations -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ const buffer = new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 2); @@ -17,4 +17,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { Atomics.compareExchange(view, IdxGen(view), 10, 0n); }); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/compareExchange/bigint/good-views.js b/test/built-ins/Atomics/compareExchange/bigint/good-views.js index 38bf6e2b9ee..8f069b8f94f 100644 --- a/test/built-ins/Atomics/compareExchange/bigint/good-views.js +++ b/test/built-ins/Atomics/compareExchange/bigint/good-views.js @@ -3,7 +3,7 @@ /*--- esid: sec-atomics.compareexchange description: Test Atomics.compareExchange on arrays that allow atomic operations. -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ const sab = new SharedArrayBuffer(1024); @@ -88,4 +88,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { 'Atomics.compareExchange(view, Idx, 37n, 0n) returns 37n' ); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/compareExchange/bigint/non-shared-bufferdata.js b/test/built-ins/Atomics/compareExchange/bigint/non-shared-bufferdata.js index 6c7eb7496cf..3322221da8c 100644 --- a/test/built-ins/Atomics/compareExchange/bigint/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/compareExchange/bigint/non-shared-bufferdata.js @@ -4,12 +4,12 @@ esid: sec-atomics.compareexchange description: > Atomics.compareExchange will operate on TA when TA.buffer is not a SharedArrayBuffer -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithBigIntTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.sameValue(Atomics.compareExchange(view, 0, 0n, 1n), 0n, 'Atomics.compareExchange(view, 0, 0n, 1n) returns 0n'); assert.sameValue(Atomics.load(view, 0), 1n, 'Atomics.load(view, 0) returns 1n'); -}); +}, null, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/compareExchange/good-views.js b/test/built-ins/Atomics/compareExchange/good-views.js index 99a55768041..03e7c0220e7 100644 --- a/test/built-ins/Atomics/compareExchange/good-views.js +++ b/test/built-ins/Atomics/compareExchange/good-views.js @@ -71,4 +71,4 @@ testWithTypedArrayConstructors(function(TA) { 'Atomics.compareExchange(view, Idx, 37, 0) returns 37' ); }); -}, views); +}, views, ["passthrough"]); diff --git a/test/built-ins/Atomics/compareExchange/non-shared-bufferdata.js b/test/built-ins/Atomics/compareExchange/non-shared-bufferdata.js index ace4b93e092..e808423814e 100644 --- a/test/built-ins/Atomics/compareExchange/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/compareExchange/non-shared-bufferdata.js @@ -8,11 +8,9 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithAtomicsFriendlyTypedArrayConstructors(TA => { - const view = new TA( - new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4) - ); +testWithAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const view = new TA(makeCtorArg(4)); assert.sameValue(Atomics.compareExchange(view, 0, 0, 1), 0, 'Atomics.compareExchange(view, 0, 0, 1) returns 0'); assert.sameValue(Atomics.load(view, 0), 1, 'Atomics.load(view, 0) returns 1'); -}); +}, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/compareExchange/non-shared-int-views-throws.js b/test/built-ins/Atomics/compareExchange/non-shared-int-views-throws.js index 706a18c66cd..9a95a7813fb 100644 --- a/test/built-ins/Atomics/compareExchange/non-shared-int-views-throws.js +++ b/test/built-ins/Atomics/compareExchange/non-shared-int-views-throws.js @@ -8,11 +8,11 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithNonAtomicsFriendlyTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithNonAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.throws(TypeError, function() { Atomics.compareExchange(view, 0, 0, 0); }, `Atomics.compareExchange(new ${TA.name}(buffer), 0, 0, 0) throws TypeError`); -}); +}, ["arraybuffer"]); diff --git a/test/built-ins/Atomics/exchange/bad-range.js b/test/built-ins/Atomics/exchange/bad-range.js index a7f47b0bf25..4f1e7b88539 100644 --- a/test/built-ins/Atomics/exchange/bad-range.js +++ b/test/built-ins/Atomics/exchange/bad-range.js @@ -19,4 +19,4 @@ testWithTypedArrayConstructors(function(TA) { Atomics.exchange(view, IdxGen(view), 10, 0); }); }); -}, views); +}, views, ["passthrough"]); diff --git a/test/built-ins/Atomics/exchange/bigint/bad-range.js b/test/built-ins/Atomics/exchange/bigint/bad-range.js index 8fbf0985493..706e3a94fa4 100644 --- a/test/built-ins/Atomics/exchange/bigint/bad-range.js +++ b/test/built-ins/Atomics/exchange/bigint/bad-range.js @@ -4,7 +4,7 @@ esid: sec-atomics.exchange description: > Test range checking of Atomics.exchange on arrays that allow atomic operations -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ var buffer = new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 2); @@ -17,4 +17,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { Atomics.exchange(view, IdxGen(view), 10n, 0n); }); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/exchange/bigint/good-views.js b/test/built-ins/Atomics/exchange/bigint/good-views.js index 4d1b1494159..66f203f5e5b 100644 --- a/test/built-ins/Atomics/exchange/bigint/good-views.js +++ b/test/built-ins/Atomics/exchange/bigint/good-views.js @@ -3,7 +3,7 @@ /*--- esid: sec-atomics.exchange description: Test Atomics.exchange on arrays that allow atomic operations. -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ const sab = new SharedArrayBuffer(1024); @@ -68,4 +68,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { 'Atomics.exchange(view, Idx, 0n) returns 37n' ); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/exchange/bigint/non-shared-bufferdata.js b/test/built-ins/Atomics/exchange/bigint/non-shared-bufferdata.js index 21582471a2c..1257b4e8828 100644 --- a/test/built-ins/Atomics/exchange/bigint/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/exchange/bigint/non-shared-bufferdata.js @@ -4,12 +4,12 @@ esid: sec-atomics.exchange description: > Atomics.exchange will operate on TA when TA.buffer is not a SharedArrayBuffer -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithBigIntTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.sameValue(Atomics.exchange(view, 0, 1n), 0n, 'Atomics.exchange(view, 0, 1n) returns 0n'); assert.sameValue(Atomics.load(view, 0), 1n, 'Atomics.load(view, 0) returns 1n'); -}); +}, null, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/exchange/good-views.js b/test/built-ins/Atomics/exchange/good-views.js index 90b635d893b..9a3783b1adc 100644 --- a/test/built-ins/Atomics/exchange/good-views.js +++ b/test/built-ins/Atomics/exchange/good-views.js @@ -52,4 +52,4 @@ testWithTypedArrayConstructors(function(TA) { Atomics.store(view, Idx, 37); assert.sameValue(Atomics.exchange(view, Idx, 0), 37, 'Atomics.exchange(view, Idx, 0) returns 37'); }); -}, views); +}, views, ["passthrough"]); diff --git a/test/built-ins/Atomics/exchange/non-shared-bufferdata.js b/test/built-ins/Atomics/exchange/non-shared-bufferdata.js index d0694dab228..de36d4fd17e 100644 --- a/test/built-ins/Atomics/exchange/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/exchange/non-shared-bufferdata.js @@ -8,11 +8,9 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithAtomicsFriendlyTypedArrayConstructors(TA => { - const view = new TA( - new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4) - ); +testWithAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const view = new TA(makeCtorArg(4)); assert.sameValue(Atomics.exchange(view, 0, 1), 0, 'Atomics.exchange(view, 0, 1) returns 0'); assert.sameValue(Atomics.load(view, 0), 1, 'Atomics.load(view, 0) returns 1'); -}); +}, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/exchange/non-shared-int-views-throws.js b/test/built-ins/Atomics/exchange/non-shared-int-views-throws.js index 9af064ca9d1..e5a6394765a 100644 --- a/test/built-ins/Atomics/exchange/non-shared-int-views-throws.js +++ b/test/built-ins/Atomics/exchange/non-shared-int-views-throws.js @@ -8,10 +8,10 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithNonAtomicsFriendlyTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithNonAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.throws(TypeError, function() { Atomics.exchange(view, 0, 1); }, `Atomics.exchange(new ${TA.name}(buffer), 0, 1) throws TypeError`); -}); +}, ["arraybuffer"]); diff --git a/test/built-ins/Atomics/exchange/nonshared-int-views.js b/test/built-ins/Atomics/exchange/nonshared-int-views.js index ed4ffce40b9..3b8549a6ab2 100644 --- a/test/built-ins/Atomics/exchange/nonshared-int-views.js +++ b/test/built-ins/Atomics/exchange/nonshared-int-views.js @@ -9,11 +9,11 @@ includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithNonAtomicsFriendlyTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithNonAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.throws(TypeError, function() { Atomics.exchange(view, 0, 0); }, `Atomics.exchange(new ${TA.name}(buffer), 0, 0) throws TypeError`); -}); +}, ["arraybuffer"]); diff --git a/test/built-ins/Atomics/isLockFree/bigint/expected-return-value.js b/test/built-ins/Atomics/isLockFree/bigint/expected-return-value.js index 09377b3de18..3a2f7cbc8d2 100644 --- a/test/built-ins/Atomics/isLockFree/bigint/expected-return-value.js +++ b/test/built-ins/Atomics/isLockFree/bigint/expected-return-value.js @@ -19,7 +19,7 @@ info: | 7. Return false. features: [Atomics, BigInt, SharedArrayBuffer, TypedArray] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { @@ -30,6 +30,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { observed, 'Atomics.isLockFree(TA.BYTES_PER_ELEMENT) returns the value of `observed` (Atomics.isLockFree(TA.BYTES_PER_ELEMENT))' ); -}); - - +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/load/bad-range.js b/test/built-ins/Atomics/load/bad-range.js index 3a3fecbf7a4..5c2e37c8067 100644 --- a/test/built-ins/Atomics/load/bad-range.js +++ b/test/built-ins/Atomics/load/bad-range.js @@ -19,4 +19,4 @@ testWithTypedArrayConstructors(function(TA) { Atomics.load(view, IdxGen(view)); }); }); -}, views); +}, views, ["passthrough"]); diff --git a/test/built-ins/Atomics/load/bigint/bad-range.js b/test/built-ins/Atomics/load/bigint/bad-range.js index beec25b810e..b05f1b94cc0 100644 --- a/test/built-ins/Atomics/load/bigint/bad-range.js +++ b/test/built-ins/Atomics/load/bigint/bad-range.js @@ -5,7 +5,7 @@ esid: sec-atomics.load description: > Test range checking of Atomics.load on arrays that allow atomic operations -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ @@ -18,4 +18,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { Atomics.load(view, IdxGen(view)); }); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/load/bigint/good-views.js b/test/built-ins/Atomics/load/bigint/good-views.js index 497061084c9..1c216f83fa6 100644 --- a/test/built-ins/Atomics/load/bigint/good-views.js +++ b/test/built-ins/Atomics/load/bigint/good-views.js @@ -3,7 +3,7 @@ /*--- esid: sec-atomics.load description: Test Atomics.load on arrays that allow atomic operations. -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ const sab = new SharedArrayBuffer(1024); @@ -45,4 +45,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { Atomics.store(view, Idx, 37n); assert.sameValue(Atomics.load(view, Idx), 37n, 'Atomics.load(view, Idx) returns 37n'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/load/bigint/non-shared-bufferdata.js b/test/built-ins/Atomics/load/bigint/non-shared-bufferdata.js index a3f94dbe61d..1966e511e01 100644 --- a/test/built-ins/Atomics/load/bigint/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/load/bigint/non-shared-bufferdata.js @@ -4,11 +4,11 @@ esid: sec-atomics.load description: > Atomics.load will operate on TA when TA.buffer is not a SharedArrayBuffer -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithBigIntTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.sameValue(Atomics.load(view, 0), 0n, 'Atomics.load(view, 0) returns 0n'); -}); +}, null, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/load/good-views.js b/test/built-ins/Atomics/load/good-views.js index 69b3d281300..5615801dcff 100644 --- a/test/built-ins/Atomics/load/good-views.js +++ b/test/built-ins/Atomics/load/good-views.js @@ -43,4 +43,4 @@ testWithTypedArrayConstructors(function(TA) { Atomics.store(view, Idx, 37); assert.sameValue(Atomics.load(view, Idx), 37, 'Atomics.load(view, Idx) returns 37'); }); -}, views); +}, views, ["passthrough"]); diff --git a/test/built-ins/Atomics/load/non-shared-bufferdata.js b/test/built-ins/Atomics/load/non-shared-bufferdata.js index 8f1828b2743..5636b44be38 100644 --- a/test/built-ins/Atomics/load/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/load/non-shared-bufferdata.js @@ -8,10 +8,8 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithAtomicsFriendlyTypedArrayConstructors(TA => { - const view = new TA( - new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4) - ); +testWithAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const view = new TA(makeCtorArg(4)); assert.sameValue(Atomics.load(view, 0), 0, 'Atomics.load(view, 0) returns 0'); -}); +}, null, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/load/non-shared-int-views-throws.js b/test/built-ins/Atomics/load/non-shared-int-views-throws.js index 4ee7c8e3dc8..ca3cbb5ea5b 100644 --- a/test/built-ins/Atomics/load/non-shared-int-views-throws.js +++ b/test/built-ins/Atomics/load/non-shared-int-views-throws.js @@ -8,10 +8,10 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithNonAtomicsFriendlyTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithNonAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.throws(TypeError, function() { Atomics.load(view, 0); }, `Atomics.load(new ${TA.name}(buffer), 0) throws TypeError`); -}); +}, ["arraybuffer"]); diff --git a/test/built-ins/Atomics/or/bad-range.js b/test/built-ins/Atomics/or/bad-range.js index c221f203f17..1910e157ba5 100644 --- a/test/built-ins/Atomics/or/bad-range.js +++ b/test/built-ins/Atomics/or/bad-range.js @@ -19,4 +19,4 @@ testWithTypedArrayConstructors(function(TA) { Atomics.or(view, IdxGen(view), 10); }); }); -}, views); +}, views, ["passthrough"]); diff --git a/test/built-ins/Atomics/or/bigint/bad-range.js b/test/built-ins/Atomics/or/bigint/bad-range.js index 99c34e6c620..356464c1a3f 100644 --- a/test/built-ins/Atomics/or/bigint/bad-range.js +++ b/test/built-ins/Atomics/or/bigint/bad-range.js @@ -4,7 +4,7 @@ esid: sec-atomics.or description: > Test range checking of Atomics.or on arrays that allow atomic operations -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ var buffer = new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 2); @@ -17,4 +17,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { Atomics.or(view, IdxGen(view), 10n); }); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/or/bigint/good-views.js b/test/built-ins/Atomics/or/bigint/good-views.js index 1d0f1e73aaa..60a3403aeef 100644 --- a/test/built-ins/Atomics/or/bigint/good-views.js +++ b/test/built-ins/Atomics/or/bigint/good-views.js @@ -3,7 +3,7 @@ /*--- esid: sec-atomics.or description: Test Atomics.or on arrays that allow atomic operations -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ const sab = new SharedArrayBuffer(1024); @@ -94,4 +94,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { Atomics.store(view, Idx, 37n); assert.sameValue(Atomics.or(view, Idx, 0n), 37n, 'Atomics.or(view, Idx, 0n) returns 37n'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/or/bigint/non-shared-bufferdata.js b/test/built-ins/Atomics/or/bigint/non-shared-bufferdata.js index 8e68d14da8f..f5cd4acac7e 100644 --- a/test/built-ins/Atomics/or/bigint/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/or/bigint/non-shared-bufferdata.js @@ -4,12 +4,12 @@ esid: sec-atomics.or description: > Atomics.or will operate on TA when TA.buffer is not a SharedArrayBuffer -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithBigIntTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.sameValue(Atomics.or(view, 0, 1n), 0n, 'Atomics.or(view, 0, 1n) returns 0n'); assert.sameValue(Atomics.load(view, 0), 1n, 'Atomics.load(view, 0) returns 1n'); -}); +}, null, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/or/good-views.js b/test/built-ins/Atomics/or/good-views.js index bea292a310f..0f2cb4038e0 100644 --- a/test/built-ins/Atomics/or/good-views.js +++ b/test/built-ins/Atomics/or/good-views.js @@ -78,4 +78,4 @@ testWithTypedArrayConstructors(function(TA) { Atomics.store(view, Idx, 37); assert.sameValue(Atomics.or(view, Idx, 0), 37, 'Atomics.or(view, Idx, 0) returns 37'); }); -}, views); +}, views, ["passthrough"]); diff --git a/test/built-ins/Atomics/or/non-shared-bufferdata.js b/test/built-ins/Atomics/or/non-shared-bufferdata.js index d1ad8cac953..8bfc4a13f7a 100644 --- a/test/built-ins/Atomics/or/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/or/non-shared-bufferdata.js @@ -8,11 +8,9 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithAtomicsFriendlyTypedArrayConstructors(TA => { - const view = new TA( - new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4) - ); +testWithAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const view = new TA(makeCtorArg(4)); assert.sameValue(Atomics.or(view, 0, 1), 0, 'Atomics.or(view, 0, 1) returns 0'); assert.sameValue(Atomics.load(view, 0), 1, 'Atomics.load(view, 0) returns 1'); -}); +}, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/or/non-shared-int-views-throws.js b/test/built-ins/Atomics/or/non-shared-int-views-throws.js index 8915a25a944..2ac148e8cee 100644 --- a/test/built-ins/Atomics/or/non-shared-int-views-throws.js +++ b/test/built-ins/Atomics/or/non-shared-int-views-throws.js @@ -8,11 +8,11 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithNonAtomicsFriendlyTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithNonAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.throws(TypeError, function() { Atomics.or(view, 0, 1); }, `Atomics.or(new ${TA.name}(buffer), 0, 1) throws TypeError`); -}); +}, ["arraybuffer"]); diff --git a/test/built-ins/Atomics/store/bad-range.js b/test/built-ins/Atomics/store/bad-range.js index 4449f85dcd3..29f6167cca8 100644 --- a/test/built-ins/Atomics/store/bad-range.js +++ b/test/built-ins/Atomics/store/bad-range.js @@ -19,4 +19,4 @@ testWithTypedArrayConstructors(function(TA) { Atomics.store(view, IdxGen(view), 10); }); }); -}, views); +}, views, ["passthrough"]); diff --git a/test/built-ins/Atomics/store/bigint/bad-range.js b/test/built-ins/Atomics/store/bigint/bad-range.js index 068b95b31c8..e1408f87e9f 100644 --- a/test/built-ins/Atomics/store/bigint/bad-range.js +++ b/test/built-ins/Atomics/store/bigint/bad-range.js @@ -4,7 +4,7 @@ esid: sec-atomics.store description: > Test range checking of Atomics.store on arrays that allow atomic operations -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ const buffer = new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 2); @@ -17,4 +17,4 @@ testWithBigIntTypedArrayConstructors(TA => { Atomics.store(view, IdxGen(view), 10n); }); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/store/bigint/good-views.js b/test/built-ins/Atomics/store/bigint/good-views.js index ccd3f168d49..edd5d489137 100644 --- a/test/built-ins/Atomics/store/bigint/good-views.js +++ b/test/built-ins/Atomics/store/bigint/good-views.js @@ -3,7 +3,7 @@ /*--- esid: sec-atomics.store description: Test Atomics.store on arrays that allow atomic operations. -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ // Make it interesting - use non-zero byteOffsets and non-zero indexes. @@ -49,4 +49,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { Atomics.store(view, Idx, 37n); assert.sameValue(Atomics.load(view, Idx), 37n, 'Atomics.load(view, Idx) returns 37n'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/store/bigint/non-shared-bufferdata.js b/test/built-ins/Atomics/store/bigint/non-shared-bufferdata.js index 254640ef70e..03a68db18e0 100644 --- a/test/built-ins/Atomics/store/bigint/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/store/bigint/non-shared-bufferdata.js @@ -4,12 +4,12 @@ esid: sec-atomics.store description: > Atomics.store will operate on TA when TA.buffer is not a SharedArrayBuffer -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithBigIntTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.sameValue(Atomics.store(view, 0, 1n), 1n, 'Atomics.store(view, 0, 1n) returns 1n'); assert.sameValue(Atomics.load(view, 0), 1n, 'Atomics.load(view, 0) returns 1n'); -}); +}, null, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/store/good-views.js b/test/built-ins/Atomics/store/good-views.js index f84c83ce7ed..2b2b341d61a 100644 --- a/test/built-ins/Atomics/store/good-views.js +++ b/test/built-ins/Atomics/store/good-views.js @@ -51,7 +51,7 @@ testWithTypedArrayConstructors(function(TA) { Atomics.store(view, Idx, 37); assert.sameValue(Atomics.load(view, Idx), 37, 'Atomics.load(view, Idx) returns 37'); }); -}, views); +}, views, ["passthrough"]); function ToInteger(v) { v = +v; diff --git a/test/built-ins/Atomics/store/non-shared-bufferdata.js b/test/built-ins/Atomics/store/non-shared-bufferdata.js index 9a4ce03e656..680e3fc41c1 100644 --- a/test/built-ins/Atomics/store/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/store/non-shared-bufferdata.js @@ -8,11 +8,9 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithAtomicsFriendlyTypedArrayConstructors(TA => { - const view = new TA( - new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4) - ); +testWithAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const view = new TA(makeCtorArg(4)); assert.sameValue(Atomics.store(view, 0, 1), 1, 'Atomics.store(view, 0, 1) returns 1'); assert.sameValue(Atomics.load(view, 0), 1, 'Atomics.load(view, 0) returns 1'); -}); +}, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/store/non-shared-int-views-throws.js b/test/built-ins/Atomics/store/non-shared-int-views-throws.js index 35198c6a00a..38f622059e4 100644 --- a/test/built-ins/Atomics/store/non-shared-int-views-throws.js +++ b/test/built-ins/Atomics/store/non-shared-int-views-throws.js @@ -8,11 +8,11 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithNonAtomicsFriendlyTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithNonAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.throws(TypeError, function() { Atomics.store(view, 0, 1); }, `Atomics.store(new ${TA.name}(buffer), 0, 1) throws TypeError`); -}); +}, ["arraybuffer"]); diff --git a/test/built-ins/Atomics/sub/bad-range.js b/test/built-ins/Atomics/sub/bad-range.js index 15eabc048a1..a3e6e17f9e8 100644 --- a/test/built-ins/Atomics/sub/bad-range.js +++ b/test/built-ins/Atomics/sub/bad-range.js @@ -19,4 +19,4 @@ testWithTypedArrayConstructors(function(TA) { Atomics.sub(view, IdxGen(view), 10); }); }); -}, views); +}, views, ["passthrough"]); diff --git a/test/built-ins/Atomics/sub/bigint/bad-range.js b/test/built-ins/Atomics/sub/bigint/bad-range.js index 920eba9631c..4661b26cdd4 100644 --- a/test/built-ins/Atomics/sub/bigint/bad-range.js +++ b/test/built-ins/Atomics/sub/bigint/bad-range.js @@ -4,7 +4,7 @@ esid: sec-atomics.sub description: > Test range checking of Atomics.sub on arrays that allow atomic operations -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ const buffer = new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 2); @@ -17,4 +17,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { Atomics.sub(view, IdxGen(view), 10n); }); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/sub/bigint/good-views.js b/test/built-ins/Atomics/sub/bigint/good-views.js index 719d4eb6340..e474d9658fb 100644 --- a/test/built-ins/Atomics/sub/bigint/good-views.js +++ b/test/built-ins/Atomics/sub/bigint/good-views.js @@ -3,7 +3,7 @@ /*--- esid: sec-atomics.sub description: Test Atomics.sub on arrays that allow atomic operations -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ // Make it interesting - use non-zero byteOffsets and non-zero indexes. @@ -54,4 +54,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { Atomics.store(view, Idx, 37n); assert.sameValue(Atomics.sub(view, Idx, 0n), 37n, 'Atomics.sub(view, Idx, 0n) returns 37n'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/sub/bigint/non-shared-bufferdata.js b/test/built-ins/Atomics/sub/bigint/non-shared-bufferdata.js index 5da25106af3..7fffa5fd179 100644 --- a/test/built-ins/Atomics/sub/bigint/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/sub/bigint/non-shared-bufferdata.js @@ -4,13 +4,13 @@ esid: sec-atomics.sub description: > Atomics.sub will operate on TA when TA.buffer is not a SharedArrayBuffer -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithBigIntTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.sameValue(Atomics.store(view, 0, 1n), 1n, 'Atomics.store(view, 0, 1n) returns 1n'); assert.sameValue(Atomics.sub(view, 0, 1n), 1n, 'Atomics.sub(view, 0, 1n) returns 1n'); assert.sameValue(Atomics.load(view, 0), 0n, 'Atomics.load(view, 0) returns 0n'); -}); +}, null, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/sub/good-views.js b/test/built-ins/Atomics/sub/good-views.js index a13b7d15e8e..5a5b03baad8 100644 --- a/test/built-ins/Atomics/sub/good-views.js +++ b/test/built-ins/Atomics/sub/good-views.js @@ -51,4 +51,4 @@ testWithTypedArrayConstructors(function(TA) { Atomics.store(view, Idx, 37); assert.sameValue(Atomics.sub(view, Idx, 0), 37, 'Atomics.sub(view, Idx, 0) returns 37'); }); -}, views); +}, views, ["passthrough"]); diff --git a/test/built-ins/Atomics/sub/non-shared-bufferdata.js b/test/built-ins/Atomics/sub/non-shared-bufferdata.js index 500f49baa3c..40c91a2cd70 100644 --- a/test/built-ins/Atomics/sub/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/sub/non-shared-bufferdata.js @@ -8,12 +8,10 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithAtomicsFriendlyTypedArrayConstructors(TA => { - const view = new TA( - new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4) - ); +testWithAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const view = new TA(makeCtorArg(4)); assert.sameValue(Atomics.store(view, 0, 1), 1, 'Atomics.store(view, 0, 1) returns 1'); assert.sameValue(Atomics.sub(view, 0, 1), 1, 'Atomics.sub(view, 0, 1) returns 1'); assert.sameValue(Atomics.load(view, 0), 0, 'Atomics.load(view, 0) returns 0'); -}); +}, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/sub/non-shared-int-views-throws.js b/test/built-ins/Atomics/sub/non-shared-int-views-throws.js index e0cbe55ef31..86ae6d6ae90 100644 --- a/test/built-ins/Atomics/sub/non-shared-int-views-throws.js +++ b/test/built-ins/Atomics/sub/non-shared-int-views-throws.js @@ -8,11 +8,11 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithNonAtomicsFriendlyTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(16); +testWithNonAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.throws(TypeError, function() { Atomics.sub(view, 0, 1); }, `Atomics.sub(new ${TA.name}(buffer), 0, 1) throws TypeError`); -}); +}, ["arraybuffer"]); diff --git a/test/built-ins/Atomics/xor/bad-range.js b/test/built-ins/Atomics/xor/bad-range.js index 0de01cbd9cd..d1e7aa5e9b7 100644 --- a/test/built-ins/Atomics/xor/bad-range.js +++ b/test/built-ins/Atomics/xor/bad-range.js @@ -19,4 +19,4 @@ testWithTypedArrayConstructors(function(TA) { Atomics.xor(view, IdxGen(view), 0); }); }); -}, views); +}, views, ["passthrough"]); diff --git a/test/built-ins/Atomics/xor/bigint/bad-range.js b/test/built-ins/Atomics/xor/bigint/bad-range.js index 5436347fe35..5828d988874 100644 --- a/test/built-ins/Atomics/xor/bigint/bad-range.js +++ b/test/built-ins/Atomics/xor/bigint/bad-range.js @@ -5,7 +5,7 @@ esid: sec-atomics.xor description: > Test range checking of Atomics.xor on arrays that allow atomic operations -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ @@ -18,4 +18,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { Atomics.xor(view, IdxGen(view), 10); }); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/xor/bigint/good-views.js b/test/built-ins/Atomics/xor/bigint/good-views.js index 59df4d9bb4a..9c84f791d0d 100644 --- a/test/built-ins/Atomics/xor/bigint/good-views.js +++ b/test/built-ins/Atomics/xor/bigint/good-views.js @@ -3,7 +3,7 @@ /*--- esid: sec-atomics.xor description: Test Atomics.xor on arrays that allow atomic operations -includes: [testAtomics.js, testBigIntTypedArray.js] +includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray] ---*/ // Make it interesting - use non-zero byteOffsets and non-zero indexes. @@ -99,4 +99,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { Atomics.store(view, Idx, 37n); assert.sameValue(Atomics.xor(view, Idx, 0n), 37n, 'Atomics.xor(view, Idx, 0n) returns 37n'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Atomics/xor/bigint/non-shared-bufferdata.js b/test/built-ins/Atomics/xor/bigint/non-shared-bufferdata.js index d8ce71761c5..74b768bc9b8 100644 --- a/test/built-ins/Atomics/xor/bigint/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/xor/bigint/non-shared-bufferdata.js @@ -4,12 +4,12 @@ esid: sec-atomics.xor description: > Atomics.xor will operate on TA when TA.buffer is not a SharedArrayBuffer -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithBigIntTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.sameValue(Atomics.xor(view, 0, 1n), 0n, 'Atomics.xor(view, 0, 1n) returns 0n'); assert.sameValue(Atomics.load(view, 0), 1n, 'Atomics.load(view, 0) returns 1n'); -}); +}, null, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/xor/good-views.js b/test/built-ins/Atomics/xor/good-views.js index 74198415fe5..459c64e0086 100644 --- a/test/built-ins/Atomics/xor/good-views.js +++ b/test/built-ins/Atomics/xor/good-views.js @@ -79,4 +79,4 @@ testWithTypedArrayConstructors(function(TA) { Atomics.store(view, Idx, 37); assert.sameValue(Atomics.xor(view, Idx, 0), 37, 'Atomics.xor(view, Idx, 0) returns 37'); }); -}, views); +}, views, ["passthrough"]); diff --git a/test/built-ins/Atomics/xor/non-shared-bufferdata.js b/test/built-ins/Atomics/xor/non-shared-bufferdata.js index 512cfeaaa36..ca5e3bb7315 100644 --- a/test/built-ins/Atomics/xor/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/xor/non-shared-bufferdata.js @@ -8,11 +8,9 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithAtomicsFriendlyTypedArrayConstructors(TA => { - const view = new TA( - new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4) - ); +testWithAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const view = new TA(makeCtorArg(4)); assert.sameValue(Atomics.xor(view, 0, 1), 0, 'Atomics.xor(view, 0, 1) returns 0'); assert.sameValue(Atomics.load(view, 0), 1, 'Atomics.load(view, 0) returns 1'); -}); +}, ["arraybuffer"], ["immutable"]); diff --git a/test/built-ins/Atomics/xor/non-shared-int-views-throws.js b/test/built-ins/Atomics/xor/non-shared-int-views-throws.js index 46e37d1ab41..e80a63687d1 100644 --- a/test/built-ins/Atomics/xor/non-shared-int-views-throws.js +++ b/test/built-ins/Atomics/xor/non-shared-int-views-throws.js @@ -8,11 +8,11 @@ description: > includes: [testTypedArray.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -testWithNonAtomicsFriendlyTypedArrayConstructors(TA => { - const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); +testWithNonAtomicsFriendlyTypedArrayConstructors((TA, makeCtorArg) => { + const buffer = makeCtorArg(4); const view = new TA(buffer); assert.throws(TypeError, function() { Atomics.xor(view, 0, 1); }, `Atomics.xor(new ${TA.name}(buffer), 0, 1) throws TypeError`); -}); +}, ["arraybuffer"]); diff --git a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/detached-buffer.js index 3bfba344096..e08e84c6c07 100644 --- a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/detached-buffer.js @@ -10,7 +10,7 @@ info: | 4. Let name be the value of O's [[TypedArrayName]] internal slot. 5. Assert: name is a String value. 6. Return name. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, Symbol.toStringTag, TypedArray] ---*/ @@ -18,4 +18,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(1); $DETACHBUFFER(sample.buffer); assert.sameValue(sample[Symbol.toStringTag], TA.name); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/invoked-as-accessor.js b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/invoked-as-accessor.js index e2852b8f39b..3989a0ed15f 100644 --- a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/invoked-as-accessor.js +++ b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/invoked-as-accessor.js @@ -11,7 +11,7 @@ info: | ... 3. If O does not have a [[TypedArrayName]] internal slot, return undefined. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.toStringTag, TypedArray] ---*/ diff --git a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/invoked-as-func.js b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/invoked-as-func.js index 33aa05daca7..23bd5c468a3 100644 --- a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/invoked-as-func.js +++ b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/invoked-as-func.js @@ -9,7 +9,7 @@ info: | 1. Let O be the this value. 2. If Type(O) is not Object, return undefined. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.toStringTag, TypedArray] ---*/ diff --git a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/length.js b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/length.js index c1c2df63292..e8b0cb8575a 100644 --- a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/length.js +++ b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/length.js @@ -19,7 +19,7 @@ info: | Unless otherwise specified, the length property of a built-in Function object has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. -includes: [propertyHelper.js, testBigIntTypedArray.js] +includes: [propertyHelper.js, testTypedArray.js] features: [BigInt, Symbol.toStringTag] ---*/ diff --git a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/name.js b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/name.js index 96c6069c935..677bd60b93a 100644 --- a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/name.js +++ b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/name.js @@ -16,7 +16,7 @@ info: | Unless otherwise specified, the name property of a built-in Function object, if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. -includes: [propertyHelper.js, testBigIntTypedArray.js] +includes: [propertyHelper.js, testTypedArray.js] features: [BigInt, Symbol.toStringTag] ---*/ diff --git a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/prop-desc.js b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/prop-desc.js index 23f76220b58..4390a2ea1e3 100644 --- a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/prop-desc.js +++ b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/prop-desc.js @@ -13,7 +13,7 @@ info: | This property has the attributes { [[Enumerable]]: false, [[Configurable]]: true }. -includes: [propertyHelper.js, testBigIntTypedArray.js] +includes: [propertyHelper.js, testTypedArray.js] features: [BigInt, Symbol.toStringTag] ---*/ diff --git a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/return-typedarrayname.js b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/return-typedarrayname.js index 80a3116b87c..1cd8e47c902 100644 --- a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/return-typedarrayname.js +++ b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/return-typedarrayname.js @@ -11,11 +11,11 @@ info: | 4. Let name be the value of O's [[TypedArrayName]] internal slot. 5. Assert: name is a String value. 6. Return name. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.toStringTag, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { var ta = new TA(); assert.sameValue(ta[Symbol.toStringTag], TA.name, "property value"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/this-has-no-typedarrayname-internal.js b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/this-has-no-typedarrayname-internal.js index 9414c2d00c0..428776e205f 100644 --- a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/this-has-no-typedarrayname-internal.js +++ b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/this-has-no-typedarrayname-internal.js @@ -11,7 +11,7 @@ info: | ... 3. If O does not have a [[TypedArrayName]] internal slot, return undefined. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.toStringTag, DataView, TypedArray] ---*/ diff --git a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/this-is-not-object.js b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/this-is-not-object.js index 1ae3cf29236..2386a2f03d2 100644 --- a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/this-is-not-object.js +++ b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/this-is-not-object.js @@ -9,7 +9,7 @@ info: | 1. Let O be the this value. 2. If Type(O) is not Object, return undefined. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, Symbol.toStringTag, TypedArray] ---*/ diff --git a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/detached-buffer.js b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/detached-buffer.js index a4d51218ddb..f24e7147f11 100644 --- a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/detached-buffer.js @@ -18,4 +18,4 @@ testWithTypedArrayConstructors(function(TA) { var sample = new TA(1); $DETACHBUFFER(sample.buffer); assert.sameValue(sample[Symbol.toStringTag], TA.name); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/return-typedarrayname.js b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/return-typedarrayname.js index 7c6be3c188e..b16a10837ad 100644 --- a/test/built-ins/TypedArray/prototype/Symbol.toStringTag/return-typedarrayname.js +++ b/test/built-ins/TypedArray/prototype/Symbol.toStringTag/return-typedarrayname.js @@ -18,4 +18,4 @@ features: [Symbol.toStringTag, TypedArray] testWithTypedArrayConstructors(function(TA) { var ta = new TA(); assert.sameValue(ta[Symbol.toStringTag], TA.name, "property value"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/at/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/at/BigInt/return-abrupt-from-this-out-of-bounds.js index 7549a7dc632..3a69d90626d 100644 --- a/test/built-ins/TypedArray/prototype/at/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/at/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.at description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, TypedArray.prototype.at, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.at(0); throw new Test262Error('at completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/at/index-argument-tointeger.js b/test/built-ins/TypedArray/prototype/at/index-argument-tointeger.js index fe59b228709..f1fa8e7a586 100644 --- a/test/built-ins/TypedArray/prototype/at/index-argument-tointeger.js +++ b/test/built-ins/TypedArray/prototype/at/index-argument-tointeger.js @@ -18,7 +18,7 @@ assert.sameValue( 'The value of `typeof TypedArray.prototype.at` is "function"' ); -testWithTypedArrayConstructors(TA => { +testWithTypedArrayConstructors((TA, makeCtorArg) => { assert.sameValue(typeof TA.prototype.at, 'function', 'The value of `typeof TA.prototype.at` is "function"'); let valueOfCallCount = 0; let index = { @@ -28,7 +28,7 @@ testWithTypedArrayConstructors(TA => { } }; - let a = new TA([0,1,2,3]); + let a = new TA(makeCtorArg([0,1,2,3])); assert.sameValue(a.at(index), 1, 'a.at({valueOf() {valueOfCallCount++; return 1;}}) must return 1'); assert.sameValue(valueOfCallCount, 1, 'The value of `valueOfCallCount` is 1'); diff --git a/test/built-ins/TypedArray/prototype/at/index-non-numeric-argument-tointeger-invalid.js b/test/built-ins/TypedArray/prototype/at/index-non-numeric-argument-tointeger-invalid.js index d13441851f2..3f943403ae7 100644 --- a/test/built-ins/TypedArray/prototype/at/index-non-numeric-argument-tointeger-invalid.js +++ b/test/built-ins/TypedArray/prototype/at/index-non-numeric-argument-tointeger-invalid.js @@ -18,9 +18,9 @@ assert.sameValue( 'The value of `typeof TypedArray.prototype.at` is "function"' ); -testWithTypedArrayConstructors(TA => { +testWithTypedArrayConstructors((TA, makeCtorArg) => { assert.sameValue(typeof TA.prototype.at, 'function', 'The value of `typeof TA.prototype.at` is "function"'); - let a = new TA([0,1,2,3]); + let a = new TA(makeCtorArg([0,1,2,3])); assert.throws(TypeError, () => { a.at(Symbol()); diff --git a/test/built-ins/TypedArray/prototype/at/index-non-numeric-argument-tointeger.js b/test/built-ins/TypedArray/prototype/at/index-non-numeric-argument-tointeger.js index 066d57f86c6..039120f83ad 100644 --- a/test/built-ins/TypedArray/prototype/at/index-non-numeric-argument-tointeger.js +++ b/test/built-ins/TypedArray/prototype/at/index-non-numeric-argument-tointeger.js @@ -18,10 +18,10 @@ assert.sameValue( 'The value of `typeof TypedArray.prototype.at` is "function"' ); -testWithTypedArrayConstructors(TA => { +testWithTypedArrayConstructors((TA, makeCtorArg) => { assert.sameValue(typeof TA.prototype.at, 'function', 'The value of `typeof TA.prototype.at` is "function"'); - let a = new TA([0,1,2,3]); + let a = new TA(makeCtorArg([0,1,2,3])); assert.sameValue(a.at(false), 0, 'a.at(false) must return 0'); assert.sameValue(a.at(null), 0, 'a.at(null) must return 0'); diff --git a/test/built-ins/TypedArray/prototype/at/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/at/return-abrupt-from-this-out-of-bounds.js index 4ff8b83c8f8..da06cec8946 100644 --- a/test/built-ins/TypedArray/prototype/at/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/at/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.at(0); throw new Test262Error('at completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/at/return-abrupt-from-this.js b/test/built-ins/TypedArray/prototype/at/return-abrupt-from-this.js index 7772a5a7151..442f645af53 100644 --- a/test/built-ins/TypedArray/prototype/at/return-abrupt-from-this.js +++ b/test/built-ins/TypedArray/prototype/at/return-abrupt-from-this.js @@ -37,4 +37,4 @@ testWithTypedArrayConstructors(TA => { assert.throws(TypeError, () => { TA.prototype.at.call(null); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/at/returns-item-relative-index.js b/test/built-ins/TypedArray/prototype/at/returns-item-relative-index.js index 1d3d83bdb00..1c503b46f5a 100644 --- a/test/built-ins/TypedArray/prototype/at/returns-item-relative-index.js +++ b/test/built-ins/TypedArray/prototype/at/returns-item-relative-index.js @@ -27,8 +27,8 @@ assert.sameValue( 'The value of `typeof TypedArray.prototype.at` is "function"' ); -testWithTypedArrayConstructors(TA => { - let a = new TA([1, 2, 3, 4, 5]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + let a = new TA(makeCtorArg([1, 2, 3, 4, 5])); assert.sameValue(a.at(0), 1, 'a.at(0) must return 1'); assert.sameValue(a.at(-1), 5, 'a.at(-1) must return 5'); assert.sameValue(a.at(-2), 4, 'a.at(-2) must return 4'); diff --git a/test/built-ins/TypedArray/prototype/at/returns-item.js b/test/built-ins/TypedArray/prototype/at/returns-item.js index 09704b9a6cb..2ec12f0f800 100644 --- a/test/built-ins/TypedArray/prototype/at/returns-item.js +++ b/test/built-ins/TypedArray/prototype/at/returns-item.js @@ -27,9 +27,9 @@ assert.sameValue( 'The value of `typeof TypedArray.prototype.at` is "function"' ); -testWithTypedArrayConstructors(TA => { +testWithTypedArrayConstructors((TA, makeCtorArg) => { assert.sameValue(typeof TA.prototype.at, 'function', 'The value of `typeof TA.prototype.at` is "function"'); - let a = new TA([1, 2, 3, 4]); + let a = new TA(makeCtorArg([1, 2, 3, 4])); assert.sameValue(a.at(0), 1, 'a.at(0) must return 1'); assert.sameValue(a.at(1), 2, 'a.at(1) must return 2'); diff --git a/test/built-ins/TypedArray/prototype/at/returns-undefined-for-holes-in-sparse-arrays.js b/test/built-ins/TypedArray/prototype/at/returns-undefined-for-holes-in-sparse-arrays.js index 2930f9419f2..1b502515088 100644 --- a/test/built-ins/TypedArray/prototype/at/returns-undefined-for-holes-in-sparse-arrays.js +++ b/test/built-ins/TypedArray/prototype/at/returns-undefined-for-holes-in-sparse-arrays.js @@ -27,8 +27,8 @@ assert.sameValue( 'The value of `typeof TypedArray.prototype.at` is "function"' ); -testWithTypedArrayConstructors(TA => { - let a = new TA([0, 1, , 3, 4, , 6]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + let a = new TA(makeCtorArg([0, 1, , 3, 4, , 6])); let filler = 0; if (TA.name.startsWith('Float')) { filler = NaN; diff --git a/test/built-ins/TypedArray/prototype/at/returns-undefined-for-out-of-range-index.js b/test/built-ins/TypedArray/prototype/at/returns-undefined-for-out-of-range-index.js index 1be439d7f9b..524a0654d34 100644 --- a/test/built-ins/TypedArray/prototype/at/returns-undefined-for-out-of-range-index.js +++ b/test/built-ins/TypedArray/prototype/at/returns-undefined-for-out-of-range-index.js @@ -18,9 +18,9 @@ assert.sameValue( 'The value of `typeof TypedArray.prototype.at` is "function"' ); -testWithTypedArrayConstructors(TA => { +testWithTypedArrayConstructors((TA, makeCtorArg) => { assert.sameValue(typeof TA.prototype.at, 'function', 'The value of `typeof TA.prototype.at` is "function"'); - let a = new TA([]); + let a = new TA(makeCtorArg([])); assert.sameValue(a.at(-2), undefined, 'a.at(-2) must return undefined'); // wrap around the end assert.sameValue(a.at(0), undefined, 'a.at(0) must return undefined'); diff --git a/test/built-ins/TypedArray/prototype/buffer/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/buffer/BigInt/detached-buffer.js index 585ed726430..deb168fb340 100644 --- a/test/built-ins/TypedArray/prototype/buffer/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/buffer/BigInt/detached-buffer.js @@ -9,7 +9,7 @@ info: | ... 4. Let buffer be the value of O's [[ViewedArrayBuffer]] internal slot. 5. Return buffer. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -18,4 +18,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(buffer, 0, 1); $DETACHBUFFER(sample.buffer); assert.sameValue(sample.buffer, buffer); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/buffer/BigInt/return-buffer.js b/test/built-ins/TypedArray/prototype/buffer/BigInt/return-buffer.js index 5d9969f0efa..037d36237c7 100644 --- a/test/built-ins/TypedArray/prototype/buffer/BigInt/return-buffer.js +++ b/test/built-ins/TypedArray/prototype/buffer/BigInt/return-buffer.js @@ -10,7 +10,7 @@ info: | ... 4. Let buffer be the value of O's [[ViewedArrayBuffer]] internal slot. 5. Return buffer. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -19,4 +19,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var ta = new TA(buffer); assert.sameValue(ta.buffer, buffer); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/buffer/detached-buffer.js b/test/built-ins/TypedArray/prototype/buffer/detached-buffer.js index 1c8a16c3337..1aa7e028c7c 100644 --- a/test/built-ins/TypedArray/prototype/buffer/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/buffer/detached-buffer.js @@ -18,4 +18,4 @@ testWithTypedArrayConstructors(function(TA) { var sample = new TA(buffer, 0, 1); $DETACHBUFFER(sample.buffer); assert.sameValue(sample.buffer, buffer); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/buffer/return-buffer.js b/test/built-ins/TypedArray/prototype/buffer/return-buffer.js index fe01f785b75..a80c1e072ea 100644 --- a/test/built-ins/TypedArray/prototype/buffer/return-buffer.js +++ b/test/built-ins/TypedArray/prototype/buffer/return-buffer.js @@ -19,4 +19,4 @@ testWithTypedArrayConstructors(function(TA) { var ta = new TA(buffer); assert.sameValue(ta.buffer, buffer); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/buffer/this-inherits-typedarray.js b/test/built-ins/TypedArray/prototype/buffer/this-inherits-typedarray.js index 82fc954423f..66021b2eba6 100644 --- a/test/built-ins/TypedArray/prototype/buffer/this-inherits-typedarray.js +++ b/test/built-ins/TypedArray/prototype/buffer/this-inherits-typedarray.js @@ -22,8 +22,8 @@ var getter = Object.getOwnPropertyDescriptor( TypedArrayPrototype, "buffer" ).get; -testWithTypedArrayConstructors(TA => { - var typedArray = new TA(5); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + var typedArray = new TA(makeCtorArg(5)); var o = {}; Object.setPrototypeOf(o, typedArray); assert.throws(TypeError, function() { diff --git a/test/built-ins/TypedArray/prototype/byteLength/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/byteLength/BigInt/detached-buffer.js index 16cfcd4343c..08c330cb5f0 100644 --- a/test/built-ins/TypedArray/prototype/byteLength/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/byteLength/BigInt/detached-buffer.js @@ -10,7 +10,7 @@ info: | 4. Let buffer be the value of O's [[ViewedArrayBuffer]] internal slot. 5. If IsDetachedBuffer(buffer) is true, return 0. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -18,4 +18,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(1); $DETACHBUFFER(sample.buffer); assert.sameValue(sample.byteLength, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/byteLength/BigInt/resizable-array-buffer-auto.js b/test/built-ins/TypedArray/prototype/byteLength/BigInt/resizable-array-buffer-auto.js index b0136eadb18..e1ed38b61b3 100644 --- a/test/built-ins/TypedArray/prototype/byteLength/BigInt/resizable-array-buffer-auto.js +++ b/test/built-ins/TypedArray/prototype/byteLength/BigInt/resizable-array-buffer-auto.js @@ -5,7 +5,7 @@ esid: sec-get-%typedarray%.prototype.byteoffset description: | reset to 0 if the underlying ArrayBuffer is resized beyond the boundary of the dynamically-sized TypedArray instance -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, resizable-arraybuffer] ---*/ @@ -57,4 +57,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { } catch (_) {} assert.sameValue(array.byteLength, expected, "following shrink (out of bounds)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/byteLength/BigInt/resizable-array-buffer-fixed.js b/test/built-ins/TypedArray/prototype/byteLength/BigInt/resizable-array-buffer-fixed.js index 50876536cdb..943757854cc 100644 --- a/test/built-ins/TypedArray/prototype/byteLength/BigInt/resizable-array-buffer-fixed.js +++ b/test/built-ins/TypedArray/prototype/byteLength/BigInt/resizable-array-buffer-fixed.js @@ -5,7 +5,7 @@ esid: sec-get-%typedarray%.prototype.bytelength description: | reset to 0 if the underlying ArrayBuffer is resized beyond the boundary of the fixed-sized TypedArray instance -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, resizable-arraybuffer] ---*/ @@ -43,4 +43,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { } assert.sameValue(array.byteLength, expected, "following shrink (out of bounds)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/byteLength/BigInt/return-bytelength.js b/test/built-ins/TypedArray/prototype/byteLength/BigInt/return-bytelength.js index 381bc7c2d87..b1b4e634d01 100644 --- a/test/built-ins/TypedArray/prototype/byteLength/BigInt/return-bytelength.js +++ b/test/built-ins/TypedArray/prototype/byteLength/BigInt/return-bytelength.js @@ -10,15 +10,15 @@ info: | ... 6. Let size be the value of O's [[ByteLength]] internal slot. 7. Return size. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var bytesPerElement = TA.BYTES_PER_ELEMENT; var ta1 = new TA(); assert.sameValue(ta1.byteLength, 0); - var ta2 = new TA(42); + var ta2 = new TA(makeCtorArg(42)); assert.sameValue(ta2.byteLength, 42 * bytesPerElement); }); diff --git a/test/built-ins/TypedArray/prototype/byteLength/detached-buffer.js b/test/built-ins/TypedArray/prototype/byteLength/detached-buffer.js index 292cf4dbd03..029ef7137e1 100644 --- a/test/built-ins/TypedArray/prototype/byteLength/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/byteLength/detached-buffer.js @@ -18,4 +18,4 @@ testWithTypedArrayConstructors(function(TA) { var sample = new TA(1); $DETACHBUFFER(sample.buffer); assert.sameValue(sample.byteLength, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/byteLength/resizable-array-buffer-auto.js b/test/built-ins/TypedArray/prototype/byteLength/resizable-array-buffer-auto.js index ff52a012e87..d737f210a9e 100644 --- a/test/built-ins/TypedArray/prototype/byteLength/resizable-array-buffer-auto.js +++ b/test/built-ins/TypedArray/prototype/byteLength/resizable-array-buffer-auto.js @@ -57,4 +57,4 @@ testWithTypedArrayConstructors(function(TA) { } catch (_) {} assert.sameValue(array.byteLength, expected, "following shrink (out of bounds)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/byteLength/resizable-array-buffer-fixed.js b/test/built-ins/TypedArray/prototype/byteLength/resizable-array-buffer-fixed.js index 7f612dc4226..5f41084e621 100644 --- a/test/built-ins/TypedArray/prototype/byteLength/resizable-array-buffer-fixed.js +++ b/test/built-ins/TypedArray/prototype/byteLength/resizable-array-buffer-fixed.js @@ -43,4 +43,4 @@ testWithTypedArrayConstructors(function(TA) { } assert.sameValue(array.byteLength, expected, "following shrink (out of bounds)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/byteLength/return-bytelength.js b/test/built-ins/TypedArray/prototype/byteLength/return-bytelength.js index 51e0556a76f..5ad60b781a1 100644 --- a/test/built-ins/TypedArray/prototype/byteLength/return-bytelength.js +++ b/test/built-ins/TypedArray/prototype/byteLength/return-bytelength.js @@ -14,11 +14,11 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var bytesPerElement = TA.BYTES_PER_ELEMENT; var ta1 = new TA(); assert.sameValue(ta1.byteLength, 0); - var ta2 = new TA(42); + var ta2 = new TA(makeCtorArg(42)); assert.sameValue(ta2.byteLength, 42 * bytesPerElement); }); diff --git a/test/built-ins/TypedArray/prototype/byteOffset/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/byteOffset/BigInt/detached-buffer.js index 74710e488c6..036c4cbbb50 100644 --- a/test/built-ins/TypedArray/prototype/byteOffset/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/byteOffset/BigInt/detached-buffer.js @@ -10,7 +10,7 @@ info: | 4. Let buffer be the value of O's [[ViewedArrayBuffer]] internal slot. 5. If IsDetachedBuffer(buffer) is true, return 0. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -19,4 +19,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(buffer, 8, 1); $DETACHBUFFER(sample.buffer); assert.sameValue(sample.byteOffset, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/byteOffset/BigInt/resizable-array-buffer-auto.js b/test/built-ins/TypedArray/prototype/byteOffset/BigInt/resizable-array-buffer-auto.js index 08cc15cbfd2..cfb7e6ef33b 100644 --- a/test/built-ins/TypedArray/prototype/byteOffset/BigInt/resizable-array-buffer-auto.js +++ b/test/built-ins/TypedArray/prototype/byteOffset/BigInt/resizable-array-buffer-auto.js @@ -5,7 +5,7 @@ esid: sec-get-%typedarray%.prototype.byteoffset description: | reset to 0 if the underlying ArrayBuffer is resized beyond the boundary of the dynamically-sized TypedArray instance -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, resizable-arraybuffer] ---*/ @@ -53,4 +53,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { } catch (_) {} assert.sameValue(array.byteOffset, expected, "following shrink (out of bounds)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/byteOffset/BigInt/resizable-array-buffer-fixed.js b/test/built-ins/TypedArray/prototype/byteOffset/BigInt/resizable-array-buffer-fixed.js index 1972c4b7b38..88a6c4d13ec 100644 --- a/test/built-ins/TypedArray/prototype/byteOffset/BigInt/resizable-array-buffer-fixed.js +++ b/test/built-ins/TypedArray/prototype/byteOffset/BigInt/resizable-array-buffer-fixed.js @@ -5,7 +5,7 @@ esid: sec-get-%typedarray%.prototype.byteoffset description: | reset to 0 if the underlying ArrayBuffer is resized beyond the boundary of the fixed-sized TypedArray instance -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, resizable-arraybuffer] ---*/ @@ -43,4 +43,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { } assert.sameValue(array.byteOffset, expected, "following shrink (out of bounds)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/byteOffset/BigInt/return-byteoffset.js b/test/built-ins/TypedArray/prototype/byteOffset/BigInt/return-byteoffset.js index 5799aea5912..2a53ba897a8 100644 --- a/test/built-ins/TypedArray/prototype/byteOffset/BigInt/return-byteoffset.js +++ b/test/built-ins/TypedArray/prototype/byteOffset/BigInt/return-byteoffset.js @@ -10,7 +10,7 @@ info: | ... 6. Let offset be the value of O's [[ByteOffset]] internal slot. 7. Return size. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -28,4 +28,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(buffer2, offset); var ta3 = new TA(sample); assert.sameValue(ta3.byteOffset, 0, "TA(typedArray)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/byteOffset/detached-buffer.js b/test/built-ins/TypedArray/prototype/byteOffset/detached-buffer.js index dc518a1fdaa..0c1114403dc 100644 --- a/test/built-ins/TypedArray/prototype/byteOffset/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/byteOffset/detached-buffer.js @@ -19,4 +19,4 @@ testWithTypedArrayConstructors(function(TA) { var sample = new TA(buffer, 8, 1); $DETACHBUFFER(sample.buffer); assert.sameValue(sample.byteOffset, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-auto.js b/test/built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-auto.js index e8aa74c0079..98a55e80266 100644 --- a/test/built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-auto.js +++ b/test/built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-auto.js @@ -53,4 +53,4 @@ testWithTypedArrayConstructors(function(TA) { } catch (_) {} assert.sameValue(array.byteOffset, expected, "following shrink (out of bounds)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-fixed.js b/test/built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-fixed.js index 9a9161686c7..cd17262b478 100644 --- a/test/built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-fixed.js +++ b/test/built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-fixed.js @@ -43,4 +43,4 @@ testWithTypedArrayConstructors(function(TA) { } assert.sameValue(array.byteOffset, expected, "following shrink (out of bounds)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/byteOffset/return-byteoffset.js b/test/built-ins/TypedArray/prototype/byteOffset/return-byteoffset.js index 44502e06e46..50f22d50fe2 100644 --- a/test/built-ins/TypedArray/prototype/byteOffset/return-byteoffset.js +++ b/test/built-ins/TypedArray/prototype/byteOffset/return-byteoffset.js @@ -28,4 +28,4 @@ testWithTypedArrayConstructors(function(TA) { var sample = new TA(buffer2, offset); var ta3 = new TA(sample); assert.sameValue(ta3.byteOffset, 0, "TA(typedArray)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-end.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-end.js index 6060fab6e4f..50ff90fc4b3 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-end.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-end.js @@ -22,14 +22,14 @@ info: | 7. If end is undefined, let relativeEnd be len; else let relativeEnd be ? ToInteger(end). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(1, 0, null), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(1, 0, null), [0n, 1n, 2n, 3n] ), 'null value coerced to 0' @@ -37,7 +37,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(1, 0, NaN), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(1, 0, NaN), [0n, 1n, 2n, 3n] ), 'NaN value coerced to 0' @@ -45,7 +45,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(1, 0, false), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(1, 0, false), [0n, 1n, 2n, 3n] ), 'false value coerced to 0' @@ -53,7 +53,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(1, 0, true), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(1, 0, true), [0n, 0n, 2n, 3n] ), 'true value coerced to 1' @@ -61,7 +61,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(1, 0, '-2'), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(1, 0, '-2'), [0n, 0n, 1n, 3n] ), 'string "-2" value coerced to integer -2' @@ -69,9 +69,9 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(1, 0, -2.5), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(1, 0, -2.5), [0n, 0n, 1n, 3n] ), 'float -2.5 value coerced to integer -2' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-start.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-start.js index 6cd12a381ae..4a7c6cbcba6 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-start.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-start.js @@ -21,14 +21,14 @@ info: | ... 5. Let relativeStart be ? ToInteger(start). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(1, undefined), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(1, undefined), [0n, 0n, 1n, 2n] ), 'undefined value coerced to 0' @@ -36,7 +36,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(1, false), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(1, false), [0n, 0n, 1n, 2n] ), 'false value coerced to 0' @@ -44,7 +44,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(1, NaN), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(1, NaN), [0n, 0n, 1n, 2n] ), 'NaN value coerced to 0' @@ -52,7 +52,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(1, null), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(1, null), [0n, 0n, 1n, 2n] ), 'null value coerced to 0' @@ -60,7 +60,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(0, true), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(0, true), [1n, 2n, 3n, 3n] ), 'true value coerced to 1' @@ -68,7 +68,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(0, '1'), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(0, '1'), [1n, 2n, 3n, 3n] ), 'string "1" value coerced to 1' @@ -76,7 +76,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(1, 0.5), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(1, 0.5), [0n, 0n, 1n, 2n] ), '0.5 float value coerced to integer 0' @@ -84,9 +84,9 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(0, 1.5), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(0, 1.5), [1n, 2n, 3n, 3n] ), '1.5 float value coerced to integer 1' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-target.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-target.js index 92d409a46eb..4551963f7f9 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-target.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-target.js @@ -21,14 +21,14 @@ info: | ... 3. Let relativeTarget be ? ToInteger(target). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(undefined, 1), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(undefined, 1), [1n, 2n, 3n, 3n] ), 'undefined value coerced to 0' @@ -36,7 +36,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(false, 1), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(false, 1), [1n, 2n, 3n, 3n] ), 'false value coerced to 0' @@ -44,7 +44,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(NaN, 1), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(NaN, 1), [1n, 2n, 3n, 3n] ), 'NaN value coerced to 0' @@ -52,7 +52,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(null, 1), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(null, 1), [1n, 2n, 3n, 3n] ), 'null value coerced to 0' @@ -60,7 +60,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(true, 0), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(true, 0), [0n, 0n, 1n, 2n] ), 'true value coerced to 1' @@ -68,7 +68,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin('1', 0), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin('1', 0), [0n, 0n, 1n, 2n] ), 'string "1" value coerced to 1' @@ -76,7 +76,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(0.5, 1), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(0.5, 1), [1n, 2n, 3n, 3n] ), '0.5 float value coerced to integer 0' @@ -84,9 +84,9 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(1.5, 0), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(1.5, 0), [0n, 0n, 1n, 2n] ), '1.5 float value coerced to integer 1' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/detached-buffer.js index 0014ea674fe..75e1622c505 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -31,4 +31,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.copyWithin(obj, obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/get-length-ignores-length-prop.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/get-length-ignores-length-prop.js index 0de142b6093..c433e971836 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/get-length-ignores-length-prop.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/get-length-ignores-length-prop.js @@ -21,7 +21,7 @@ info: | 1. Let O be ? ToObject(this value). 2. Let len be ? ToLength(? Get(O, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -46,4 +46,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(sample.copyWithin(0, 0), sample); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-end.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-end.js index 78a8c9c9a6f..a00b5a4c1bd 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-end.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-end.js @@ -24,14 +24,14 @@ info: | 8. If relativeEnd < 0, let final be max((len + relativeEnd), 0); else let final be min(relativeEnd, len). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(0, 1, -1), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(0, 1, -1), [1n, 2n, 2n, 3n] ), '[0, 1, 2, 3].copyWithin(0, 1, -1) -> [1, 2, 2, 3]' @@ -39,7 +39,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(2, 0, -1), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n])).copyWithin(2, 0, -1), [0n, 1n, 0n, 1n, 2n] ), '[0, 1, 2, 3, 4].copyWithin(2, 0, -1) -> [0, 1, 0, 1, 2]' @@ -47,7 +47,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(1, 2, -2), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n])).copyWithin(1, 2, -2), [0n, 2n, 2n, 3n, 4n] ), '[0, 1, 2, 3, 4].copyWithin(1, 2, -2) -> [0, 2, 2, 3, 4]' @@ -55,7 +55,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(0, -2, -1), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(0, -2, -1), [2n, 1n, 2n, 3n] ), '[0, 1, 2, 3].copyWithin(0, -2, -1) -> [2, 1, 2, 3]' @@ -63,7 +63,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(2, -2, -1), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n])).copyWithin(2, -2, -1), [0n, 1n, 3n, 3n, 4n] ), '[0, 1, 2, 3, 4].copyWithin(2, -2, 1) -> [0, 1, 3, 3, 4]' @@ -71,7 +71,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(-3, -2, -1), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(-3, -2, -1), [0n, 2n, 2n, 3n] ), '[0, 1, 2, 3].copyWithin(-3, -2, -1) -> [0, 2, 2, 3]' @@ -79,7 +79,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(-2, -3, -1), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n])).copyWithin(-2, -3, -1), [0n, 1n, 2n, 2n, 3n] ), '[0, 1, 2, 3, 4].copyWithin(-2, -3, -1) -> [0, 1, 2, 2, 3]' @@ -87,9 +87,9 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(-5, -2, -1), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n])).copyWithin(-5, -2, -1), [3n, 1n, 2n, 3n, 4n] ), '[0, 1, 2, 3, 4].copyWithin(-5, -2, -1) -> [3, 1, 2, 3, 4]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-end.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-end.js index ae130982436..4877a16671f 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-end.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-end.js @@ -24,14 +24,14 @@ info: | 8. If relativeEnd < 0, let final be max((len + relativeEnd), 0); else let final be min(relativeEnd, len). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(0, 1, -10), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(0, 1, -10), [0n, 1n, 2n, 3n] ), '[0, 1, 2, 3].copyWithin(0, 1, -10) -> [0, 1, 2, 3]' @@ -39,7 +39,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(0, 1, -Infinity), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n])).copyWithin(0, 1, -Infinity), [1n, 2n, 3n, 4n, 5n] ), '[1, 2, 3, 4, 5].copyWithin(0, 1, -Infinity) -> [1, 2, 3, 4, 5]' @@ -47,7 +47,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(0, -2, -10), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(0, -2, -10), [0n, 1n, 2n, 3n] ), '[0, 1, 2, 3].copyWithin(0, -2, -10) -> [0, 1, 2, 3]' @@ -55,7 +55,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(0, -2, -Infinity), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n])).copyWithin(0, -2, -Infinity), [1n, 2n, 3n, 4n, 5n] ), '[1, 2, 3, 4, 5].copyWithin(0, -2, -Infinity) -> [1, 2, 3, 4, 5]' @@ -63,7 +63,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(0, -9, -10), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(0, -9, -10), [0n, 1n, 2n, 3n] ), '[0, 1, 2, 3].copyWithin(0, -9, -10) -> [0, 1, 2, 3]' @@ -71,7 +71,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(0, -9, -Infinity), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n])).copyWithin(0, -9, -Infinity), [1n, 2n, 3n, 4n, 5n] ), '[1, 2, 3, 4, 5].copyWithin(0, -9, -Infinity) -> [1, 2, 3, 4, 5]' @@ -79,7 +79,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(-3, -2, -10), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(-3, -2, -10), [0n, 1n, 2n, 3n] ), '[0, 1, 2, 3].copyWithin(-3, -2, -10) -> [0, 1, 2, 3]' @@ -87,7 +87,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(-3, -2, -Infinity), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n])).copyWithin(-3, -2, -Infinity), [1n, 2n, 3n, 4n, 5n] ), '[1, 2, 3, 4, 5].copyWithin(-3, -2, -Infinity) -> [1, 2, 3, 4, 5]' @@ -95,7 +95,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(-7, -8, -9), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(-7, -8, -9), [0n, 1n, 2n, 3n] ), '[0, 1, 2, 3].copyWithin(-7, -8, -9) -> [0, 1, 2, 3]' @@ -103,9 +103,9 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(-7, -8, -Infinity), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n])).copyWithin(-7, -8, -Infinity), [1n, 2n, 3n, 4n, 5n] ), '[1, 2, 3, 4, 5].copyWithin(-7, -8, -Infinity) -> [1, 2, 3, 4, 5]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-start.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-start.js index 06ec98f34d2..cbfc985e94a 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-start.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-start.js @@ -22,14 +22,14 @@ info: | 6. If relativeStart < 0, let from be max((len + relativeStart), 0); else let from be min(relativeStart, len). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(0, -10), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(0, -10), [0n, 1n, 2n, 3n] ), '[0, 1, 2, 3]).copyWithin(0, -10) -> [0, 1, 2, 3]' @@ -37,7 +37,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(0, -Infinity), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n])).copyWithin(0, -Infinity), [1n, 2n, 3n, 4n, 5n] ), '[1, 2, 3, 4, 5]).copyWithin(0, -Infinity) -> [1, 2, 3, 4, 5]' @@ -45,7 +45,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(2, -10), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n])).copyWithin(2, -10), [0n, 1n, 0n, 1n, 2n] ), '[0, 1, 2, 3, 4]).copyWithin(2, -2) -> [0, 1, 0, 1, 2]' @@ -53,7 +53,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(2, -Infinity), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n])).copyWithin(2, -Infinity), [1n, 2n, 1n, 2n, 3n] ), '[1, 2, 3, 4, 5]).copyWithin(2, -Infinity) -> [1, 2, 1, 2, 3]' @@ -61,7 +61,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(10, -10), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n])).copyWithin(10, -10), [0n, 1n, 2n, 3n, 4n] ), '[0, 1, 2, 3, 4]).copyWithin(10, -10) -> [0, 1, 2, 3, 4]' @@ -69,7 +69,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(10, -Infinity), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n])).copyWithin(10, -Infinity), [1n, 2n, 3n, 4n, 5n] ), '[1, 2, 3, 4, 5]).copyWithin(10, -Infinity) -> [1, 2, 3, 4, 5]' @@ -77,7 +77,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(-9, -10), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(-9, -10), [0n, 1n, 2n, 3n] ), '[0, 1, 2, 3].copyWithin(-9, -10) -> [0, 1, 2, 3]' @@ -85,9 +85,9 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(-9, -Infinity), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n])).copyWithin(-9, -Infinity), [1n, 2n, 3n, 4n, 5n] ), '[1, 2, 3, 4, 5].copyWithin(-9, -Infinity) -> [1, 2, 3, 4, 5]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-target.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-target.js index 91e2b0e5b8a..2f1ca8b608a 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-target.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-target.js @@ -22,14 +22,14 @@ info: | 4. If relativeTarget < 0, let to be max((len + relativeTarget), 0); else let to be min(relativeTarget, len). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(-10, 0), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(-10, 0), [0n, 1n, 2n, 3n] ), '[0, 1, 2, 3].copyWithin(-10, 0) -> [0, 1, 2, 3]' @@ -37,7 +37,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(-Infinity, 0), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n])).copyWithin(-Infinity, 0), [1n, 2n, 3n, 4n, 5n] ), '[1, 2, 3, 4, 5].copyWithin(-Infinity, 0) -> [1, 2, 3, 4, 5]' @@ -45,7 +45,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(-10, 2), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n])).copyWithin(-10, 2), [2n, 3n, 4n, 3n, 4n] ), '[0, 1, 2, 3, 4].copyWithin(-10, 2) -> [2, 3, 4, 3, 4]' @@ -53,9 +53,9 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(-Infinity, 2), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n])).copyWithin(-Infinity, 2), [3n, 4n, 5n, 4n, 5n] ), '[1, 2, 3, 4, 5].copyWithin(-Infinity, 2) -> [3, 4, 5, 4, 5]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-start.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-start.js index 36d5f22263f..8ceb36225dc 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-start.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-start.js @@ -22,14 +22,14 @@ info: | 6. If relativeStart < 0, let from be max((len + relativeStart), 0); else let from be min(relativeStart, len). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(0, -1), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(0, -1), [3n, 1n, 2n, 3n] ), '[0, 1, 2, 3].copyWithin(0, -1) -> [3, 1, 2, 3]' @@ -37,7 +37,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(2, -2), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n])).copyWithin(2, -2), [0n, 1n, 3n, 4n, 4n] ), '[0, 1, 2, 3, 4].copyWithin(2, -2) -> [0, 1, 3, 4, 4]' @@ -45,7 +45,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(1, -2), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n])).copyWithin(1, -2), [0n, 3n, 4n, 3n, 4n] ), '[0, 1, 2, 3, 4].copyWithin(1, -2) -> [0, 3, 4, 3, 4]' @@ -53,7 +53,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(-1, -2), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(-1, -2), [0n, 1n, 2n, 2n] ), '[0, 1, 2, 3].copyWithin(-1, -2) -> [ 0, 1, 2, 2 ]' @@ -61,7 +61,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(-2, -3), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n])).copyWithin(-2, -3), [0n, 1n, 2n, 2n, 3n] ), '[0, 1, 2, 3, 4].copyWithin(-2, -3) -> [0, 1, 2, 2, 3]' @@ -69,9 +69,9 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(-5, -2), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n])).copyWithin(-5, -2), [3n, 4n, 2n, 3n, 4n] ), '[0, 1, 2, 3, 4].copyWithin(-5, -2) -> [3, 4, 2, 3, 4]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-target.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-target.js index ec6adaedb39..defdb9f9c22 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-target.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-target.js @@ -22,14 +22,14 @@ info: | 4. If relativeTarget < 0, let to be max((len + relativeTarget), 0); else let to be min(relativeTarget, len). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(-1, 0), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(-1, 0), [0n, 1n, 2n, 0n] ), '[0, 1, 2, 3].copyWithin(-1, 0) -> [0, 1, 2, 0]' @@ -37,7 +37,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(-2, 2), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n])).copyWithin(-2, 2), [0n, 1n, 2n, 2n, 3n] ), '[0, 1, 2, 3, 4].copyWithin(-2, 2) -> [0, 1, 2, 2, 3]' @@ -45,9 +45,9 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(-1, 2), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(-1, 2), [0n, 1n, 2n, 2n] ), '[0, 1, 2, 3].copyWithin(-1, 2) -> [0, 1, 2, 2]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-end.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-end.js index 16d68d51b72..5de4974df74 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-end.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-end.js @@ -15,14 +15,14 @@ info: | source data. ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(0, 1, 6), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(0, 1, 6), [1n, 2n, 3n, 3n] ), '[0, 1, 2, 3].copyWithin(0, 1, 6) -> [1, 2, 3, 3]' @@ -30,7 +30,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(0, 1, Infinity), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n])).copyWithin(0, 1, Infinity), [2n, 3n, 4n, 5n, 5n] ), '[1, 2, 3, 4, 5].copyWithin(0, 1, Infinity) -> [2, 3, 4, 5, 5]' @@ -38,7 +38,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n, 5n]).copyWithin(1, 3, 6), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n, 5n])).copyWithin(1, 3, 6), [0n, 3n, 4n, 5n, 4n, 5n] ), '[0, 1, 2, 3, 4, 5].copyWithin(1, 3, 6) -> [0, 3, 4, 5, 4, 5]' @@ -46,9 +46,9 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(1, 3, Infinity), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n])).copyWithin(1, 3, Infinity), [1n, 4n, 5n, 4n, 5n] ), '[1, 2, 3, 4, 5].copyWithin(1, 3, Infinity) -> [1, 4, 5, 4, 5]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-target-and-start.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-target-and-start.js index fcb6034914f..32a7d4b2b4a 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-target-and-start.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-target-and-start.js @@ -15,21 +15,21 @@ info: | source data. ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n, 5n]).copyWithin(6, 0), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n, 5n])).copyWithin(6, 0), [0n, 1n, 2n, 3n, 4n, 5n] ) ); assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(Infinity, 0), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n])).copyWithin(Infinity, 0), [1n, 2n, 3n, 4n, 5n] ), '[1, 2, 3, 4, 5].copyWithin(Infinity, 0) -> [1, 2, 3, 4, 5]' @@ -37,14 +37,14 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n, 5n]).copyWithin(0, 6), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n, 5n])).copyWithin(0, 6), [0n, 1n, 2n, 3n, 4n, 5n] ) ); assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(0, Infinity), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n])).copyWithin(0, Infinity), [1n, 2n, 3n, 4n, 5n] ), '[1, 2, 3, 4, 5].copyWithin(0, Infinity) -> [1, 2, 3, 4, 5]' @@ -52,23 +52,23 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n, 5n]).copyWithin(6, 6), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n, 5n])).copyWithin(6, 6), [0n, 1n, 2n, 3n, 4n, 5n] ) ); assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n, 5n]).copyWithin(10, 10), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n, 5n])).copyWithin(10, 10), [0n, 1n, 2n, 3n, 4n, 5n] ) ); assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(Infinity, Infinity), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n])).copyWithin(Infinity, Infinity), [1n, 2n, 3n, 4n, 5n] ), '[1, 2, 3, 4, 5].copyWithin(Infinity, Infinity) -> [1, 2, 3, 4, 5]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-and-start.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-and-start.js index 27385c45ecb..3b36bb3e42d 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-and-start.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-and-start.js @@ -15,36 +15,36 @@ info: | source data. ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n, 6n]).copyWithin(0, 0), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n, 6n])).copyWithin(0, 0), [1n, 2n, 3n, 4n, 5n, 6n] ) ); assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n, 6n]).copyWithin(0, 2), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n, 6n])).copyWithin(0, 2), [3n, 4n, 5n, 6n, 5n, 6n] ) ); assert( compareArray( - new TA([1n, 2n, 3n, 4n, 5n, 6n]).copyWithin(3, 0), + new TA(makeCtorArg([1n, 2n, 3n, 4n, 5n, 6n])).copyWithin(3, 0), [1n, 2n, 3n, 1n, 2n, 3n] ) ); assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n, 5n]).copyWithin(1, 4), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n, 5n])).copyWithin(1, 4), [0n, 4n, 5n, 3n, 4n, 5n] ) ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-start-and-end.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-start-and-end.js index befa6e7523c..9605fee5a05 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-start-and-end.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-start-and-end.js @@ -15,14 +15,14 @@ info: | source data. ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(0, 0, 0), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(0, 0, 0), [0n, 1n, 2n, 3n] ), '[0, 1, 2, 3].copyWithin(0, 0, 0) -> [0, 1, 2, 3]' @@ -30,7 +30,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(0, 0, 2), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(0, 0, 2), [0n, 1n, 2n, 3n] ), '[0, 1, 2, 3].copyWithin(0, 0, 2) -> [0, 1, 2, 3]' @@ -38,7 +38,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(0, 1, 2), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(0, 1, 2), [1n, 1n, 2n, 3n] ), '[0, 1, 2, 3].copyWithin(0, 1, 2) -> [1, 1, 2, 3]' @@ -57,7 +57,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { */ assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(1, 0, 2), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(1, 0, 2), [0n, 0n, 1n, 3n] ), '[0, 1, 2, 3].copyWithin(1, 0, 2) -> [0, 0, 1, 3]' @@ -65,9 +65,9 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n, 4n, 5n]).copyWithin(1, 3, 5), + new TA(makeCtorArg([0n, 1n, 2n, 3n, 4n, 5n])).copyWithin(1, 3, 5), [0n, 3n, 4n, 3n, 4n, 5n] ), '[0, 1, 2, 3, 4, 5].copyWithin(1, 3, 5) -> [0, 3, 4, 3, 4, 5]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-end-is-symbol.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-end-is-symbol.js index cb06fdfda34..73ee9bde7a8 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-end-is-symbol.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-end-is-symbol.js @@ -22,7 +22,7 @@ info: | 7. If end is undefined, let relativeEnd be len; else let relativeEnd be ? ToInteger(end). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -33,4 +33,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.copyWithin(0, 0, s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-end.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-end.js index 6e7a39fb419..91ddf11c5f3 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-end.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-end.js @@ -22,7 +22,7 @@ info: | 7. If end is undefined, let relativeEnd be len; else let relativeEnd be ? ToInteger(end). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.copyWithin(0, 0, o1); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-start-is-symbol.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-start-is-symbol.js index d0b8b75f13c..915c0ec6d56 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-start-is-symbol.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-start-is-symbol.js @@ -21,7 +21,7 @@ info: | ... 5. Let relativeStart be ? ToInteger(start). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -32,4 +32,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.copyWithin(0, s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-start.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-start.js index a8bb5d5b5ec..2cae99c67e5 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-start.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-start.js @@ -21,7 +21,7 @@ info: | ... 5. Let relativeStart be ? ToInteger(start). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -42,4 +42,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.copyWithin(0, o, err); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-target-is-symbol.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-target-is-symbol.js index 305e9234e80..927e25f20e2 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-target-is-symbol.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-target-is-symbol.js @@ -21,7 +21,7 @@ info: | ... 3. Let relativeTarget be ? ToInteger(target). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -32,4 +32,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.copyWithin(s, 0); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-target.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-target.js index 76d035b0abc..ac2984d2cf0 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-target.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-target.js @@ -21,7 +21,7 @@ info: | ... 3. Let relativeTarget be ? ToInteger(target). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.copyWithin(o); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-this-out-of-bounds.js index 12e79ef3fc9..fe69f12eb28 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.copywithin description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.copyWithin(0, 0); throw new Test262Error('copyWithin completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-this.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-this.js index 2e5c40fa429..5a3155113c3 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-this.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-this.js @@ -19,18 +19,18 @@ info: | 22.1.3.3 Array.prototype.copyWithin (target, start [ , end ] ) 13. Return O. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample1 = new TA(); var result1 = sample1.copyWithin(0, 0); assert.sameValue(result1, sample1); - var sample2 = new TA([1n, 2n, 3n]); + var sample2 = new TA(makeCtorArg([1n, 2n, 3n])); var result2 = sample2.copyWithin(1, 0); assert.sameValue(result2, sample2); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/undefined-end.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/undefined-end.js index 360d3125f40..ed9199a9503 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/undefined-end.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/undefined-end.js @@ -22,14 +22,14 @@ info: | 7. If end is undefined, let relativeEnd be len; else let relativeEnd be ? ToInteger(end). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(0, 1, undefined), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(0, 1, undefined), [1n, 2n, 3n, 3n] ), '[0, 1, 2, 3].copyWithin(0, 1, undefined) -> [1, 2, 3]' @@ -37,9 +37,9 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0n, 1n, 2n, 3n]).copyWithin(0, 1), + new TA(makeCtorArg([0n, 1n, 2n, 3n])).copyWithin(0, 1), [1n, 2n, 3n, 3n] ), '[0, 1, 2, 3].copyWithin(0, 1) -> [1, 2, 3, 3]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/bit-precision.js b/test/built-ins/TypedArray/prototype/copyWithin/bit-precision.js index 9cc36e87a5d..e50187441c5 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/bit-precision.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/bit-precision.js @@ -16,7 +16,7 @@ includes: [nans.js, compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -function body(FloatArray) { +testWithTypedArrayConstructors(function body(FloatArray) { var subject = new FloatArray(NaNs.length * 2); NaNs.forEach(function(v, i) { @@ -39,6 +39,4 @@ function body(FloatArray) { ); assert(compareArray(originalBytes, copiedBytes)); -} - -testWithTypedArrayConstructors(body, floatArrayConstructors); +}, floatArrayConstructors); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/byteoffset.js b/test/built-ins/TypedArray/prototype/copyWithin/byteoffset.js index 2bcdab7a944..8bb96b6fc30 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/byteoffset.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/byteoffset.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var ta = new TA([0, 1, 2, 3]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var ta = new TA(makeCtorArg([0, 1, 2, 3])); assert.compareArray( new TA(ta.buffer, TA.BYTES_PER_ELEMENT).copyWithin(2, 0), [1, 2, 1], @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { [0, 1, 2, 1], 'underlying arraybuffer should have been updated' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-end-detached-prototype.js b/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-end-detached-prototype.js index a979d0dbc26..fcbfa18978d 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-end-detached-prototype.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-end-detached-prototype.js @@ -37,4 +37,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function(){ ta.copyWithin(0, 100, {valueOf : detachAndReturnIndex}); }, "should throw TypeError as array is detached"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-end-detached.js b/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-end-detached.js index 380e10ee210..ef49765ebe4 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-end-detached.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-end-detached.js @@ -35,4 +35,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function(){ ta.copyWithin(0, 100, {valueOf : detachAndReturnIndex}); }, "should throw TypeError as array is detached"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-end.js b/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-end.js index 225f52cea7c..a8c2157f50e 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-end.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-end.js @@ -26,10 +26,10 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(1, 0, null), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(1, 0, null), [0, 1, 2, 3] ), 'null value coerced to 0' @@ -37,7 +37,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(1, 0, NaN), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(1, 0, NaN), [0, 1, 2, 3] ), 'NaN value coerced to 0' @@ -45,7 +45,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(1, 0, false), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(1, 0, false), [0, 1, 2, 3] ), 'false value coerced to 0' @@ -53,7 +53,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(1, 0, true), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(1, 0, true), [0, 0, 2, 3] ), 'true value coerced to 1' @@ -61,7 +61,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(1, 0, '-2'), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(1, 0, '-2'), [0, 0, 1, 3] ), 'string "-2" value coerced to integer -2' @@ -69,9 +69,9 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(1, 0, -2.5), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(1, 0, -2.5), [0, 0, 1, 3] ), 'float -2.5 value coerced to integer -2' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-start-detached.js b/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-start-detached.js index 8e49a92ad87..01cc87d9366 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-start-detached.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-start-detached.js @@ -35,4 +35,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function(){ ta.copyWithin(0, {valueOf : detachAndReturnIndex}, 1000); }, "should throw TypeError as array is detached"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-start.js b/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-start.js index 45aa223aa6d..92aa33c9cd1 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-start.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-start.js @@ -25,10 +25,10 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(1, undefined), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(1, undefined), [0, 0, 1, 2] ), 'undefined value coerced to 0' @@ -36,7 +36,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(1, false), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(1, false), [0, 0, 1, 2] ), 'false value coerced to 0' @@ -44,7 +44,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(1, NaN), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(1, NaN), [0, 0, 1, 2] ), 'NaN value coerced to 0' @@ -52,7 +52,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(1, null), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(1, null), [0, 0, 1, 2] ), 'null value coerced to 0' @@ -60,7 +60,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(0, true), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(0, true), [1, 2, 3, 3] ), 'true value coerced to 1' @@ -68,7 +68,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(0, '1'), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(0, '1'), [1, 2, 3, 3] ), 'string "1" value coerced to 1' @@ -76,7 +76,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(1, 0.5), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(1, 0.5), [0, 0, 1, 2] ), '0.5 float value coerced to integer 0' @@ -84,9 +84,9 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(0, 1.5), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(0, 1.5), [1, 2, 3, 3] ), '1.5 float value coerced to integer 1' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-target.js b/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-target.js index 58813a6e65a..8e3239903f9 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-target.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-target.js @@ -25,10 +25,10 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(undefined, 1), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(undefined, 1), [1, 2, 3, 3] ), 'undefined value coerced to 0' @@ -36,7 +36,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(false, 1), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(false, 1), [1, 2, 3, 3] ), 'false value coerced to 0' @@ -44,7 +44,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(NaN, 1), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(NaN, 1), [1, 2, 3, 3] ), 'NaN value coerced to 0' @@ -52,7 +52,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(null, 1), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(null, 1), [1, 2, 3, 3] ), 'null value coerced to 0' @@ -60,7 +60,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(true, 0), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(true, 0), [0, 0, 1, 2] ), 'true value coerced to 1' @@ -68,7 +68,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin('1', 0), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin('1', 0), [0, 0, 1, 2] ), 'string "1" value coerced to 1' @@ -76,7 +76,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(0.5, 1), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(0.5, 1), [1, 2, 3, 3] ), '0.5 float value coerced to integer 0' @@ -84,7 +84,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(1.5, 0), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(1.5, 0), [0, 0, 1, 2] ), '1.5 float value coerced to integer 1' @@ -92,9 +92,9 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin({}, 1), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin({}, 1), [1, 2, 3, 3] ), 'object value coerced to integer 0' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/detached-buffer.js b/test/built-ins/TypedArray/prototype/copyWithin/detached-buffer.js index 8e781ec91ef..7c1aa1b6937 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/detached-buffer.js @@ -31,4 +31,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.copyWithin(obj, obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/get-length-ignores-length-prop.js b/test/built-ins/TypedArray/prototype/copyWithin/get-length-ignores-length-prop.js index 852ccfbd994..fdf6b8ba442 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/get-length-ignores-length-prop.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/get-length-ignores-length-prop.js @@ -46,4 +46,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(sample.copyWithin(0, 0), sample); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/negative-end.js b/test/built-ins/TypedArray/prototype/copyWithin/negative-end.js index cc97dacf1c7..3d18750139e 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/negative-end.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/negative-end.js @@ -28,10 +28,10 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(0, 1, -1), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(0, 1, -1), [1, 2, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, 1, -1) -> [1, 2, 2, 3]' @@ -39,7 +39,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3, 4]).copyWithin(2, 0, -1), + new TA(makeCtorArg([0, 1, 2, 3, 4])).copyWithin(2, 0, -1), [0, 1, 0, 1, 2] ), '[0, 1, 2, 3, 4].copyWithin(2, 0, -1) -> [0, 1, 0, 1, 2]' @@ -47,7 +47,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3, 4]).copyWithin(1, 2, -2), + new TA(makeCtorArg([0, 1, 2, 3, 4])).copyWithin(1, 2, -2), [0, 2, 2, 3, 4] ), '[0, 1, 2, 3, 4].copyWithin(1, 2, -2) -> [0, 2, 2, 3, 4]' @@ -55,7 +55,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(0, -2, -1), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(0, -2, -1), [2, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, -2, -1) -> [2, 1, 2, 3]' @@ -63,7 +63,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3, 4]).copyWithin(2, -2, -1), + new TA(makeCtorArg([0, 1, 2, 3, 4])).copyWithin(2, -2, -1), [0, 1, 3, 3, 4] ), '[0, 1, 2, 3, 4].copyWithin(2, -2, 1) -> [0, 1, 3, 3, 4]' @@ -71,7 +71,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(-3, -2, -1), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(-3, -2, -1), [0, 2, 2, 3] ), '[0, 1, 2, 3].copyWithin(-3, -2, -1) -> [0, 2, 2, 3]' @@ -79,7 +79,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3, 4]).copyWithin(-2, -3, -1), + new TA(makeCtorArg([0, 1, 2, 3, 4])).copyWithin(-2, -3, -1), [0, 1, 2, 2, 3] ), '[0, 1, 2, 3, 4].copyWithin(-2, -3, -1) -> [0, 1, 2, 2, 3]' @@ -87,9 +87,9 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3, 4]).copyWithin(-5, -2, -1), + new TA(makeCtorArg([0, 1, 2, 3, 4])).copyWithin(-5, -2, -1), [3, 1, 2, 3, 4] ), '[0, 1, 2, 3, 4].copyWithin(-5, -2, -1) -> [3, 1, 2, 3, 4]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/negative-out-of-bounds-end.js b/test/built-ins/TypedArray/prototype/copyWithin/negative-out-of-bounds-end.js index 6f77a75cd2b..24e6955e39d 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/negative-out-of-bounds-end.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/negative-out-of-bounds-end.js @@ -28,10 +28,10 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(0, 1, -10), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(0, 1, -10), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, 1, -10) -> [0, 1, 2, 3]' @@ -39,7 +39,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1, 2, 3, 4, 5]).copyWithin(0, 1, -Infinity), + new TA(makeCtorArg([1, 2, 3, 4, 5])).copyWithin(0, 1, -Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(0, 1, -Infinity) -> [1, 2, 3, 4, 5]' @@ -47,7 +47,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(0, -2, -10), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(0, -2, -10), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, -2, -10) -> [0, 1, 2, 3]' @@ -55,7 +55,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1, 2, 3, 4, 5]).copyWithin(0, -2, -Infinity), + new TA(makeCtorArg([1, 2, 3, 4, 5])).copyWithin(0, -2, -Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(0, -2, -Infinity) -> [1, 2, 3, 4, 5]' @@ -63,7 +63,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(0, -9, -10), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(0, -9, -10), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, -9, -10) -> [0, 1, 2, 3]' @@ -71,7 +71,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1, 2, 3, 4, 5]).copyWithin(0, -9, -Infinity), + new TA(makeCtorArg([1, 2, 3, 4, 5])).copyWithin(0, -9, -Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(0, -9, -Infinity) -> [1, 2, 3, 4, 5]' @@ -79,7 +79,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(-3, -2, -10), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(-3, -2, -10), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(-3, -2, -10) -> [0, 1, 2, 3]' @@ -87,7 +87,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1, 2, 3, 4, 5]).copyWithin(-3, -2, -Infinity), + new TA(makeCtorArg([1, 2, 3, 4, 5])).copyWithin(-3, -2, -Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(-3, -2, -Infinity) -> [1, 2, 3, 4, 5]' @@ -95,7 +95,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(-7, -8, -9), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(-7, -8, -9), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(-7, -8, -9) -> [0, 1, 2, 3]' @@ -103,9 +103,9 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1, 2, 3, 4, 5]).copyWithin(-7, -8, -Infinity), + new TA(makeCtorArg([1, 2, 3, 4, 5])).copyWithin(-7, -8, -Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(-7, -8, -Infinity) -> [1, 2, 3, 4, 5]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/negative-out-of-bounds-start.js b/test/built-ins/TypedArray/prototype/copyWithin/negative-out-of-bounds-start.js index 456f3ed44fa..5ef955bd0a9 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/negative-out-of-bounds-start.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/negative-out-of-bounds-start.js @@ -26,10 +26,10 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(0, -10), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(0, -10), [0, 1, 2, 3] ), '[0, 1, 2, 3]).copyWithin(0, -10) -> [0, 1, 2, 3]' @@ -37,7 +37,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1, 2, 3, 4, 5]).copyWithin(0, -Infinity), + new TA(makeCtorArg([1, 2, 3, 4, 5])).copyWithin(0, -Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5]).copyWithin(0, -Infinity) -> [1, 2, 3, 4, 5]' @@ -45,7 +45,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3, 4]).copyWithin(2, -10), + new TA(makeCtorArg([0, 1, 2, 3, 4])).copyWithin(2, -10), [0, 1, 0, 1, 2] ), '[0, 1, 2, 3, 4]).copyWithin(2, -2) -> [0, 1, 0, 1, 2]' @@ -53,7 +53,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1, 2, 3, 4, 5]).copyWithin(2, -Infinity), + new TA(makeCtorArg([1, 2, 3, 4, 5])).copyWithin(2, -Infinity), [1, 2, 1, 2, 3] ), '[1, 2, 3, 4, 5]).copyWithin(2, -Infinity) -> [1, 2, 1, 2, 3]' @@ -61,7 +61,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3, 4]).copyWithin(10, -10), + new TA(makeCtorArg([0, 1, 2, 3, 4])).copyWithin(10, -10), [0, 1, 2, 3, 4] ), '[0, 1, 2, 3, 4]).copyWithin(10, -10) -> [0, 1, 2, 3, 4]' @@ -69,7 +69,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1, 2, 3, 4, 5]).copyWithin(10, -Infinity), + new TA(makeCtorArg([1, 2, 3, 4, 5])).copyWithin(10, -Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5]).copyWithin(10, -Infinity) -> [1, 2, 3, 4, 5]' @@ -77,7 +77,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(-9, -10), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(-9, -10), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(-9, -10) -> [0, 1, 2, 3]' @@ -85,9 +85,9 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1, 2, 3, 4, 5]).copyWithin(-9, -Infinity), + new TA(makeCtorArg([1, 2, 3, 4, 5])).copyWithin(-9, -Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(-9, -Infinity) -> [1, 2, 3, 4, 5]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/negative-out-of-bounds-target.js b/test/built-ins/TypedArray/prototype/copyWithin/negative-out-of-bounds-target.js index 2ec06c368f4..34690c59db0 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/negative-out-of-bounds-target.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/negative-out-of-bounds-target.js @@ -26,10 +26,10 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(-10, 0), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(-10, 0), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(-10, 0) -> [0, 1, 2, 3]' @@ -37,7 +37,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1, 2, 3, 4, 5]).copyWithin(-Infinity, 0), + new TA(makeCtorArg([1, 2, 3, 4, 5])).copyWithin(-Infinity, 0), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(-Infinity, 0) -> [1, 2, 3, 4, 5]' @@ -45,7 +45,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3, 4]).copyWithin(-10, 2), + new TA(makeCtorArg([0, 1, 2, 3, 4])).copyWithin(-10, 2), [2, 3, 4, 3, 4] ), '[0, 1, 2, 3, 4].copyWithin(-10, 2) -> [2, 3, 4, 3, 4]' @@ -53,9 +53,9 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1, 2, 3, 4, 5]).copyWithin(-Infinity, 2), + new TA(makeCtorArg([1, 2, 3, 4, 5])).copyWithin(-Infinity, 2), [3, 4, 5, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(-Infinity, 2) -> [3, 4, 5, 4, 5]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/negative-start.js b/test/built-ins/TypedArray/prototype/copyWithin/negative-start.js index 4035db6c24a..eacbcd9687b 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/negative-start.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/negative-start.js @@ -26,10 +26,10 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(0, -1), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(0, -1), [3, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, -1) -> [3, 1, 2, 3]' @@ -37,7 +37,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3, 4]).copyWithin(2, -2), + new TA(makeCtorArg([0, 1, 2, 3, 4])).copyWithin(2, -2), [0, 1, 3, 4, 4] ), '[0, 1, 2, 3, 4].copyWithin(2, -2) -> [0, 1, 3, 4, 4]' @@ -45,7 +45,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3, 4]).copyWithin(1, -2), + new TA(makeCtorArg([0, 1, 2, 3, 4])).copyWithin(1, -2), [0, 3, 4, 3, 4] ), '[0, 1, 2, 3, 4].copyWithin(1, -2) -> [0, 3, 4, 3, 4]' @@ -53,7 +53,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(-1, -2), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(-1, -2), [0, 1, 2, 2] ), '[0, 1, 2, 3].copyWithin(-1, -2) -> [ 0, 1, 2, 2 ]' @@ -61,7 +61,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3, 4]).copyWithin(-2, -3), + new TA(makeCtorArg([0, 1, 2, 3, 4])).copyWithin(-2, -3), [0, 1, 2, 2, 3] ), '[0, 1, 2, 3, 4].copyWithin(-2, -3) -> [0, 1, 2, 2, 3]' @@ -69,9 +69,9 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3, 4]).copyWithin(-5, -2), + new TA(makeCtorArg([0, 1, 2, 3, 4])).copyWithin(-5, -2), [3, 4, 2, 3, 4] ), '[0, 1, 2, 3, 4].copyWithin(-5, -2) -> [3, 4, 2, 3, 4]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/negative-target.js b/test/built-ins/TypedArray/prototype/copyWithin/negative-target.js index f6cde1f61eb..a3e12b60a3b 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/negative-target.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/negative-target.js @@ -26,10 +26,10 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(-1, 0), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(-1, 0), [0, 1, 2, 0] ), '[0, 1, 2, 3].copyWithin(-1, 0) -> [0, 1, 2, 0]' @@ -37,7 +37,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3, 4]).copyWithin(-2, 2), + new TA(makeCtorArg([0, 1, 2, 3, 4])).copyWithin(-2, 2), [0, 1, 2, 2, 3] ), '[0, 1, 2, 3, 4].copyWithin(-2, 2) -> [0, 1, 2, 2, 3]' @@ -45,9 +45,9 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(-1, 2), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(-1, 2), [0, 1, 2, 2] ), '[0, 1, 2, 3].copyWithin(-1, 2) -> [0, 1, 2, 2]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/non-negative-out-of-bounds-end.js b/test/built-ins/TypedArray/prototype/copyWithin/non-negative-out-of-bounds-end.js index f37b8a02bbd..0cd078665ef 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/non-negative-out-of-bounds-end.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/non-negative-out-of-bounds-end.js @@ -19,10 +19,10 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(0, 1, 6), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(0, 1, 6), [1, 2, 3, 3] ), '[0, 1, 2, 3].copyWithin(0, 1, 6) -> [1, 2, 3, 3]' @@ -30,7 +30,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1, 2, 3, 4, 5]).copyWithin(0, 1, Infinity), + new TA(makeCtorArg([1, 2, 3, 4, 5])).copyWithin(0, 1, Infinity), [2, 3, 4, 5, 5] ), '[1, 2, 3, 4, 5].copyWithin(0, 1, Infinity) -> [2, 3, 4, 5, 5]' @@ -38,7 +38,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3, 4, 5]).copyWithin(1, 3, 6), + new TA(makeCtorArg([0, 1, 2, 3, 4, 5])).copyWithin(1, 3, 6), [0, 3, 4, 5, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(1, 3, 6) -> [0, 3, 4, 5, 4, 5]' @@ -46,9 +46,9 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([1, 2, 3, 4, 5]).copyWithin(1, 3, Infinity), + new TA(makeCtorArg([1, 2, 3, 4, 5])).copyWithin(1, 3, Infinity), [1, 4, 5, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(1, 3, Infinity) -> [1, 4, 5, 4, 5]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/non-negative-out-of-bounds-target-and-start.js b/test/built-ins/TypedArray/prototype/copyWithin/non-negative-out-of-bounds-target-and-start.js index 3862d7b7d28..1ef8740a1ac 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/non-negative-out-of-bounds-target-and-start.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/non-negative-out-of-bounds-target-and-start.js @@ -19,17 +19,17 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0, 1, 2, 3, 4, 5]).copyWithin(6, 0), + new TA(makeCtorArg([0, 1, 2, 3, 4, 5])).copyWithin(6, 0), [0, 1, 2, 3, 4, 5] ) ); assert( compareArray( - new TA([1, 2, 3, 4, 5]).copyWithin(Infinity, 0), + new TA(makeCtorArg([1, 2, 3, 4, 5])).copyWithin(Infinity, 0), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(Infinity, 0) -> [1, 2, 3, 4, 5]' @@ -37,14 +37,14 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3, 4, 5]).copyWithin(0, 6), + new TA(makeCtorArg([0, 1, 2, 3, 4, 5])).copyWithin(0, 6), [0, 1, 2, 3, 4, 5] ) ); assert( compareArray( - new TA([1, 2, 3, 4, 5]).copyWithin(0, Infinity), + new TA(makeCtorArg([1, 2, 3, 4, 5])).copyWithin(0, Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(0, Infinity) -> [1, 2, 3, 4, 5]' @@ -52,23 +52,23 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3, 4, 5]).copyWithin(6, 6), + new TA(makeCtorArg([0, 1, 2, 3, 4, 5])).copyWithin(6, 6), [0, 1, 2, 3, 4, 5] ) ); assert( compareArray( - new TA([0, 1, 2, 3, 4, 5]).copyWithin(10, 10), + new TA(makeCtorArg([0, 1, 2, 3, 4, 5])).copyWithin(10, 10), [0, 1, 2, 3, 4, 5] ) ); assert( compareArray( - new TA([1, 2, 3, 4, 5]).copyWithin(Infinity, Infinity), + new TA(makeCtorArg([1, 2, 3, 4, 5])).copyWithin(Infinity, Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(Infinity, Infinity) -> [1, 2, 3, 4, 5]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/non-negative-target-and-start.js b/test/built-ins/TypedArray/prototype/copyWithin/non-negative-target-and-start.js index 0cfd34c5ec4..db6cc87defb 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/non-negative-target-and-start.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/non-negative-target-and-start.js @@ -19,32 +19,32 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([1, 2, 3, 4, 5, 6]).copyWithin(0, 0), + new TA(makeCtorArg([1, 2, 3, 4, 5, 6])).copyWithin(0, 0), [1, 2, 3, 4, 5, 6] ) ); assert( compareArray( - new TA([1, 2, 3, 4, 5, 6]).copyWithin(0, 2), + new TA(makeCtorArg([1, 2, 3, 4, 5, 6])).copyWithin(0, 2), [3, 4, 5, 6, 5, 6] ) ); assert( compareArray( - new TA([1, 2, 3, 4, 5, 6]).copyWithin(3, 0), + new TA(makeCtorArg([1, 2, 3, 4, 5, 6])).copyWithin(3, 0), [1, 2, 3, 1, 2, 3] ) ); assert( compareArray( - new TA([0, 1, 2, 3, 4, 5]).copyWithin(1, 4), + new TA(makeCtorArg([0, 1, 2, 3, 4, 5])).copyWithin(1, 4), [0, 4, 5, 3, 4, 5] ) ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/non-negative-target-start-and-end.js b/test/built-ins/TypedArray/prototype/copyWithin/non-negative-target-start-and-end.js index 5ce98d35e78..c81708208e7 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/non-negative-target-start-and-end.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/non-negative-target-start-and-end.js @@ -19,10 +19,10 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(0, 0, 0), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(0, 0, 0), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, 0, 0) -> [0, 1, 2, 3]' @@ -30,7 +30,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(0, 0, 2), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(0, 0, 2), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, 0, 2) -> [0, 1, 2, 3]' @@ -38,7 +38,7 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(0, 1, 2), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(0, 1, 2), [1, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, 1, 2) -> [1, 1, 2, 3]' @@ -57,7 +57,7 @@ testWithTypedArrayConstructors(function(TA) { */ assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(1, 0, 2), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(1, 0, 2), [0, 0, 1, 3] ), '[0, 1, 2, 3].copyWithin(1, 0, 2) -> [0, 0, 1, 3]' @@ -65,9 +65,9 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3, 4, 5]).copyWithin(1, 3, 5), + new TA(makeCtorArg([0, 1, 2, 3, 4, 5])).copyWithin(1, 3, 5), [0, 3, 4, 3, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(1, 3, 5) -> [0, 3, 4, 3, 4, 5]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-end-is-symbol.js b/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-end-is-symbol.js index 2f935bf9350..ce76b90db28 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-end-is-symbol.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-end-is-symbol.js @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.copyWithin(0, 0, s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-end.js b/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-end.js index eeb3d825632..8ce6a9f601a 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-end.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-end.js @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.copyWithin(0, 0, o1); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-start-is-symbol.js b/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-start-is-symbol.js index c508e66be30..9fe2f2849e1 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-start-is-symbol.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-start-is-symbol.js @@ -32,4 +32,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.copyWithin(0, s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-start.js b/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-start.js index 08e24b260b7..b726df0c1f9 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-start.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-start.js @@ -42,4 +42,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.copyWithin(0, o, err); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-target-is-symbol.js b/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-target-is-symbol.js index 9c8acb9878f..1aac7608a1b 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-target-is-symbol.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-target-is-symbol.js @@ -32,4 +32,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.copyWithin(s, 0); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-target.js b/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-target.js index ba9a4b2f267..9e3fb26583a 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-target.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-target.js @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.copyWithin(o); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-this-out-of-bounds.js index cab2f56819a..dd8466ca192 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.copyWithin(0, 0); throw new Test262Error('copyWithin completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/return-this.js b/test/built-ins/TypedArray/prototype/copyWithin/return-this.js index 2ecaa197411..42eb83172a5 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/return-this.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/return-this.js @@ -23,14 +23,14 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample1 = new TA(); var result1 = sample1.copyWithin(0, 0); assert.sameValue(result1, sample1); - var sample2 = new TA([1, 2, 3]); + var sample2 = new TA(makeCtorArg([1, 2, 3])); var result2 = sample2.copyWithin(1, 0); assert.sameValue(result2, sample2); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/copyWithin/undefined-end.js b/test/built-ins/TypedArray/prototype/copyWithin/undefined-end.js index 67287880613..0c491bf2c65 100644 --- a/test/built-ins/TypedArray/prototype/copyWithin/undefined-end.js +++ b/test/built-ins/TypedArray/prototype/copyWithin/undefined-end.js @@ -26,10 +26,10 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(0, 1, undefined), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(0, 1, undefined), [1, 2, 3, 3] ), '[0, 1, 2, 3].copyWithin(0, 1, undefined) -> [1, 2, 3]' @@ -37,9 +37,9 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray( - new TA([0, 1, 2, 3]).copyWithin(0, 1), + new TA(makeCtorArg([0, 1, 2, 3])).copyWithin(0, 1), [1, 2, 3, 3] ), '[0, 1, 2, 3].copyWithin(0, 1) -> [1, 2, 3, 3]' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/entries/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/entries/BigInt/detached-buffer.js index ead1ec4bf86..381f1b7f8d2 100644 --- a/test/built-ins/TypedArray/prototype/entries/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/entries/BigInt/detached-buffer.js @@ -14,7 +14,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -24,4 +24,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.entries(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/entries/BigInt/iter-prototype.js b/test/built-ins/TypedArray/prototype/entries/BigInt/iter-prototype.js index 40e4f8f5ff1..debd6abf72f 100644 --- a/test/built-ins/TypedArray/prototype/entries/BigInt/iter-prototype.js +++ b/test/built-ins/TypedArray/prototype/entries/BigInt/iter-prototype.js @@ -10,14 +10,14 @@ info: | ... 3. Return CreateArrayIterator(O, "key+value"). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.iterator, TypedArray] ---*/ var ArrayIteratorProto = Object.getPrototypeOf([][Symbol.iterator]()); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([0n, 42n, 64n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0n, 42n, 64n])); var iter = sample.entries(); assert.sameValue(Object.getPrototypeOf(iter), ArrayIteratorProto); diff --git a/test/built-ins/TypedArray/prototype/entries/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/entries/BigInt/return-abrupt-from-this-out-of-bounds.js index 1bf20c4973b..121f1a505ed 100644 --- a/test/built-ins/TypedArray/prototype/entries/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/entries/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.entries description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.entries(); throw new Test262Error('entries completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/entries/BigInt/return-itor.js b/test/built-ins/TypedArray/prototype/entries/BigInt/return-itor.js index b5e3a5f0246..2fb2e7c5f47 100644 --- a/test/built-ins/TypedArray/prototype/entries/BigInt/return-itor.js +++ b/test/built-ins/TypedArray/prototype/entries/BigInt/return-itor.js @@ -8,12 +8,12 @@ info: | ... 3. Return CreateArrayIterator(O, "key+value"). -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA([0n, 42n, 64n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg([0n, 42n, 64n])); var itor = typedArray.entries(); var next = itor.next(); diff --git a/test/built-ins/TypedArray/prototype/entries/detached-buffer.js b/test/built-ins/TypedArray/prototype/entries/detached-buffer.js index 7201488603f..87415a6eade 100644 --- a/test/built-ins/TypedArray/prototype/entries/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/entries/detached-buffer.js @@ -24,4 +24,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.entries(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/entries/iter-prototype.js b/test/built-ins/TypedArray/prototype/entries/iter-prototype.js index 0fae10faf73..1d7ded121d2 100644 --- a/test/built-ins/TypedArray/prototype/entries/iter-prototype.js +++ b/test/built-ins/TypedArray/prototype/entries/iter-prototype.js @@ -16,8 +16,8 @@ features: [Symbol.iterator, TypedArray] var ArrayIteratorProto = Object.getPrototypeOf([][Symbol.iterator]()); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([0, 42, 64]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0, 42, 64])); var iter = sample.entries(); assert.sameValue(Object.getPrototypeOf(iter), ArrayIteratorProto); diff --git a/test/built-ins/TypedArray/prototype/entries/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/entries/return-abrupt-from-this-out-of-bounds.js index 12666642aa4..2f39d3d7b2c 100644 --- a/test/built-ins/TypedArray/prototype/entries/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/entries/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.entries(); throw new Test262Error('entries completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/entries/return-itor.js b/test/built-ins/TypedArray/prototype/entries/return-itor.js index a3da9e9f942..217f3e37069 100644 --- a/test/built-ins/TypedArray/prototype/entries/return-itor.js +++ b/test/built-ins/TypedArray/prototype/entries/return-itor.js @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { next = itor.next(); assert.sameValue(next.value, undefined); assert.sameValue(next.done, true); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-with-thisarg.js b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-with-thisarg.js index 18ee7110660..75de2c05922 100644 --- a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-with-thisarg.js +++ b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-with-thisarg.js @@ -21,12 +21,12 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var results = []; var thisArg = ["test262", 0, "ecma262", 0]; diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-without-thisarg.js b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-without-thisarg.js index 2a69123a210..613f2783444 100644 --- a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-without-thisarg.js +++ b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-without-thisarg.js @@ -21,12 +21,12 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-detachbuffer.js b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-detachbuffer.js index a2618c4dcf5..1b66fb608c7 100644 --- a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-detachbuffer.js +++ b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-detachbuffer.js @@ -21,7 +21,7 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [detachArrayBuffer.js, testBigIntTypedArray.js] +includes: [detachArrayBuffer.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -38,4 +38,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-no-interaction-over-non-integer.js b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-no-interaction-over-non-integer.js index 1a838503d00..e6bad7c4d12 100644 --- a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-no-interaction-over-non-integer.js +++ b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-no-interaction-over-non-integer.js @@ -14,12 +14,12 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([7n, 8n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7n, 8n])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-not-callable-throws.js b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-not-callable-throws.js index 49827a5ca6e..b5a422f3e56 100644 --- a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-not-callable-throws.js @@ -16,12 +16,12 @@ info: | ... 3. If IsCallable(callbackfn) is false, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.throws(TypeError, function() { sample.every(); diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-not-called-on-empty.js b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-not-called-on-empty.js index 07c599fd71d..ac79c980aab 100644 --- a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-not-called-on-empty.js +++ b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-not-called-on-empty.js @@ -21,7 +21,7 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -33,4 +33,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-return-does-not-change-instance.js index a6396cd4dd1..f885daa4617 100644 --- a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-return-does-not-change-instance.js +++ b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-return-does-not-change-instance.js @@ -21,12 +21,12 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n])); sample.every(function() { return 43; diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-returns-abrupt.js b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-returns-abrupt.js index d165d7be7e7..5799f3c7b5c 100644 --- a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-returns-abrupt.js +++ b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-returns-abrupt.js @@ -20,12 +20,12 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); assert.throws(Test262Error, function() { sample.every(function() { diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-set-value-during-interaction.js b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-set-value-during-interaction.js index 74ce8659e73..86e6ca013d5 100644 --- a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-set-value-during-interaction.js +++ b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-set-value-during-interaction.js @@ -21,12 +21,12 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect.set, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var newVal = 0n; sample.every(function(val, i) { @@ -55,4 +55,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(sample[0], 7n, "changed values after iteration [0] == 7"); assert.sameValue(sample[1], 1n, "changed values after iteration [1] == 1"); assert.sameValue(sample[2], 2n, "changed values after iteration [2] == 2"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-this.js b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-this.js index 589cfec3045..0d7c22d3f98 100644 --- a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-this.js +++ b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-this.js @@ -23,15 +23,15 @@ info: | ... ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ var expected = (function() { return this; })(); var thisArg = {}; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var results1 = []; diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/every/BigInt/detached-buffer.js index 5c622dc6ada..bb784071f31 100644 --- a/test/built-ins/TypedArray/prototype/every/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/every/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.every(callbackfn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/every/BigInt/get-length-uses-internal-arraylength.js index 1dc89c06cc7..f2140015d6e 100644 --- a/test/built-ins/TypedArray/prototype/every/BigInt/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/every/BigInt/get-length-uses-internal-arraylength.js @@ -16,7 +16,7 @@ info: | 1. Let O be ? ToObject(this value). 2. Let len be ? ToLength(? Get(O, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -30,8 +30,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); var calls = 0; Object.defineProperty(TA.prototype, "length", desc); @@ -44,4 +44,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(getCalls, 0, "ignores length properties"); assert.sameValue(calls, 2, "iterations are not affected by custom length"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/every/BigInt/return-abrupt-from-this-out-of-bounds.js index aec5a1d7e8c..f0a254948c4 100644 --- a/test/built-ins/TypedArray/prototype/every/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/every/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.every description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.every(() => {}); throw new Test262Error('every completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/returns-false-if-any-cb-returns-false.js b/test/built-ins/TypedArray/prototype/every/BigInt/returns-false-if-any-cb-returns-false.js index 8271e51097c..e83f81bfc19 100644 --- a/test/built-ins/TypedArray/prototype/every/BigInt/returns-false-if-any-cb-returns-false.js +++ b/test/built-ins/TypedArray/prototype/every/BigInt/returns-false-if-any-cb-returns-false.js @@ -16,12 +16,12 @@ info: | ... 7. Return true. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(42); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(42)); [ false, diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/returns-true-if-every-cb-returns-true.js b/test/built-ins/TypedArray/prototype/every/BigInt/returns-true-if-every-cb-returns-true.js index 761b8784b21..9f3422fff36 100644 --- a/test/built-ins/TypedArray/prototype/every/BigInt/returns-true-if-every-cb-returns-true.js +++ b/test/built-ins/TypedArray/prototype/every/BigInt/returns-true-if-every-cb-returns-true.js @@ -16,7 +16,7 @@ info: | ... 7. Return true. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -43,4 +43,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(called, sample.length, "callbackfn called for each index"); assert.sameValue(result, true, "return is true"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/every/BigInt/values-are-not-cached.js index 7eb35f7410e..0431e4febd0 100644 --- a/test/built-ins/TypedArray/prototype/every/BigInt/values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/every/BigInt/values-are-not-cached.js @@ -22,12 +22,12 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); sample.every(function(v, i) { if (i < sample.length - 1) { @@ -39,4 +39,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { ); return true; }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/every/callbackfn-arguments-with-thisarg.js b/test/built-ins/TypedArray/prototype/every/callbackfn-arguments-with-thisarg.js index 548fa2602a6..c13b2e9ef00 100644 --- a/test/built-ins/TypedArray/prototype/every/callbackfn-arguments-with-thisarg.js +++ b/test/built-ins/TypedArray/prototype/every/callbackfn-arguments-with-thisarg.js @@ -25,8 +25,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var results = []; var thisArg = ["test262", 0, "ecma262", 0]; diff --git a/test/built-ins/TypedArray/prototype/every/callbackfn-arguments-without-thisarg.js b/test/built-ins/TypedArray/prototype/every/callbackfn-arguments-without-thisarg.js index 5c3a7468900..b3ee4f87cc0 100644 --- a/test/built-ins/TypedArray/prototype/every/callbackfn-arguments-without-thisarg.js +++ b/test/built-ins/TypedArray/prototype/every/callbackfn-arguments-without-thisarg.js @@ -25,8 +25,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/every/callbackfn-detachbuffer.js b/test/built-ins/TypedArray/prototype/every/callbackfn-detachbuffer.js index 4357585aaf8..3ca47cde6b9 100644 --- a/test/built-ins/TypedArray/prototype/every/callbackfn-detachbuffer.js +++ b/test/built-ins/TypedArray/prototype/every/callbackfn-detachbuffer.js @@ -38,4 +38,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/every/callbackfn-no-interaction-over-non-integer.js b/test/built-ins/TypedArray/prototype/every/callbackfn-no-interaction-over-non-integer.js index cfd6aa77eea..488c4d07a7b 100644 --- a/test/built-ins/TypedArray/prototype/every/callbackfn-no-interaction-over-non-integer.js +++ b/test/built-ins/TypedArray/prototype/every/callbackfn-no-interaction-over-non-integer.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([7, 8]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7, 8])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/every/callbackfn-not-callable-throws.js b/test/built-ins/TypedArray/prototype/every/callbackfn-not-callable-throws.js index 9b118c48fcd..ec8f0c98815 100644 --- a/test/built-ins/TypedArray/prototype/every/callbackfn-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/every/callbackfn-not-callable-throws.js @@ -20,8 +20,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.throws(TypeError, function() { sample.every(); diff --git a/test/built-ins/TypedArray/prototype/every/callbackfn-not-called-on-empty.js b/test/built-ins/TypedArray/prototype/every/callbackfn-not-called-on-empty.js index 8200a073cf3..055c5065ca6 100644 --- a/test/built-ins/TypedArray/prototype/every/callbackfn-not-called-on-empty.js +++ b/test/built-ins/TypedArray/prototype/every/callbackfn-not-called-on-empty.js @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/every/callbackfn-resize.js b/test/built-ins/TypedArray/prototype/every/callbackfn-resize.js index 8dcba21cd32..5dc14605620 100644 --- a/test/built-ins/TypedArray/prototype/every/callbackfn-resize.js +++ b/test/built-ins/TypedArray/prototype/every/callbackfn-resize.js @@ -70,4 +70,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.sameValue(result, true, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/every/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/every/callbackfn-return-does-not-change-instance.js index 5eeb597c999..425459bb36e 100644 --- a/test/built-ins/TypedArray/prototype/every/callbackfn-return-does-not-change-instance.js +++ b/test/built-ins/TypedArray/prototype/every/callbackfn-return-does-not-change-instance.js @@ -25,8 +25,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42])); sample.every(function() { return 43; diff --git a/test/built-ins/TypedArray/prototype/every/callbackfn-returns-abrupt.js b/test/built-ins/TypedArray/prototype/every/callbackfn-returns-abrupt.js index 5d03e4f1553..205ac017ab1 100644 --- a/test/built-ins/TypedArray/prototype/every/callbackfn-returns-abrupt.js +++ b/test/built-ins/TypedArray/prototype/every/callbackfn-returns-abrupt.js @@ -24,8 +24,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); assert.throws(Test262Error, function() { sample.every(function() { diff --git a/test/built-ins/TypedArray/prototype/every/callbackfn-set-value-during-interaction.js b/test/built-ins/TypedArray/prototype/every/callbackfn-set-value-during-interaction.js index 3b8f537e144..5d3e01448e5 100644 --- a/test/built-ins/TypedArray/prototype/every/callbackfn-set-value-during-interaction.js +++ b/test/built-ins/TypedArray/prototype/every/callbackfn-set-value-during-interaction.js @@ -25,8 +25,8 @@ includes: [testTypedArray.js] features: [Reflect.set, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var newVal = 0; sample.every(function(val, i) { @@ -55,4 +55,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(sample[0], 7, "changed values after iteration [0] == 7"); assert.sameValue(sample[1], 1, "changed values after iteration [1] == 1"); assert.sameValue(sample[2], 2, "changed values after iteration [2] == 2"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/every/callbackfn-this.js b/test/built-ins/TypedArray/prototype/every/callbackfn-this.js index a3e62feb857..e511f2bd274 100644 --- a/test/built-ins/TypedArray/prototype/every/callbackfn-this.js +++ b/test/built-ins/TypedArray/prototype/every/callbackfn-this.js @@ -30,8 +30,8 @@ features: [TypedArray] var expected = (function() { return this; })(); var thisArg = {}; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var results1 = []; diff --git a/test/built-ins/TypedArray/prototype/every/detached-buffer.js b/test/built-ins/TypedArray/prototype/every/detached-buffer.js index cdec265ce2b..b5d535f691d 100644 --- a/test/built-ins/TypedArray/prototype/every/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/every/detached-buffer.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.every(callbackfn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/every/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/every/get-length-uses-internal-arraylength.js index e7bbae8fcd6..7472e81efd5 100644 --- a/test/built-ins/TypedArray/prototype/every/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/every/get-length-uses-internal-arraylength.js @@ -30,8 +30,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); var calls = 0; Object.defineProperty(TA.prototype, "length", desc); @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(getCalls, 0, "ignores length properties"); assert.sameValue(calls, 2, "iterations are not affected by custom length"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/every/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/every/return-abrupt-from-this-out-of-bounds.js index da5f281786a..1b08e7d1667 100644 --- a/test/built-ins/TypedArray/prototype/every/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/every/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.every(() => {}); throw new Test262Error('every completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/every/returns-false-if-any-cb-returns-false.js b/test/built-ins/TypedArray/prototype/every/returns-false-if-any-cb-returns-false.js index 63cbe4d6b1f..2441891d5c4 100644 --- a/test/built-ins/TypedArray/prototype/every/returns-false-if-any-cb-returns-false.js +++ b/test/built-ins/TypedArray/prototype/every/returns-false-if-any-cb-returns-false.js @@ -20,8 +20,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(42); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(42)); [ false, diff --git a/test/built-ins/TypedArray/prototype/every/returns-true-if-every-cb-returns-true.js b/test/built-ins/TypedArray/prototype/every/returns-true-if-every-cb-returns-true.js index 84bdfc8ce73..f00d93d546b 100644 --- a/test/built-ins/TypedArray/prototype/every/returns-true-if-every-cb-returns-true.js +++ b/test/built-ins/TypedArray/prototype/every/returns-true-if-every-cb-returns-true.js @@ -43,4 +43,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(called, sample.length, "callbackfn called for each index"); assert.sameValue(result, true, "return is true"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/every/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/every/values-are-not-cached.js index d9afa33bb70..f61fc01acf5 100644 --- a/test/built-ins/TypedArray/prototype/every/values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/every/values-are-not-cached.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); sample.every(function(v, i) { if (i < sample.length - 1) { @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(function(TA) { ); return true; }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/coerced-indexes.js b/test/built-ins/TypedArray/prototype/fill/BigInt/coerced-indexes.js index 5467a89cd3e..e6e797f4808 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/coerced-indexes.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/coerced-indexes.js @@ -27,78 +27,78 @@ info: | 5. If end is undefined, let relativeEnd be len; else let relativeEnd be ? ToInteger(end). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( - compareArray(new TA([0n, 0n]).fill(1n, undefined), [1n, 1n]), + compareArray(new TA(makeCtorArg([0n, 0n])).fill(1n, undefined), [1n, 1n]), '`undefined` start coerced to 0' ); assert( - compareArray(new TA([0n, 0n]).fill(1n, 0, undefined), [1n, 1n]), + compareArray(new TA(makeCtorArg([0n, 0n])).fill(1n, 0, undefined), [1n, 1n]), 'If end is undefined, let relativeEnd be len' ); assert( - compareArray(new TA([0n, 0n]).fill(1n, null), [1n, 1n]), + compareArray(new TA(makeCtorArg([0n, 0n])).fill(1n, null), [1n, 1n]), '`null` start coerced to 0' ); assert( - compareArray(new TA([0n, 0n]).fill(1n, 0, null), [0n, 0n]), + compareArray(new TA(makeCtorArg([0n, 0n])).fill(1n, 0, null), [0n, 0n]), '`null` end coerced to 0' ); assert( - compareArray(new TA([0n, 0n]).fill(1n, true), [0n, 1n]), + compareArray(new TA(makeCtorArg([0n, 0n])).fill(1n, true), [0n, 1n]), '`true` start coerced to 1' ); assert( - compareArray(new TA([0n, 0n]).fill(1n, 0, true), [1n, 0n]), + compareArray(new TA(makeCtorArg([0n, 0n])).fill(1n, 0, true), [1n, 0n]), '`true` end coerced to 1' ); assert( - compareArray(new TA([0n, 0n]).fill(1n, false), [1n, 1n]), + compareArray(new TA(makeCtorArg([0n, 0n])).fill(1n, false), [1n, 1n]), '`false` start coerced to 0' ); assert( - compareArray(new TA([0n, 0n]).fill(1n, 0, false), [0n, 0n]), + compareArray(new TA(makeCtorArg([0n, 0n])).fill(1n, 0, false), [0n, 0n]), '`false` end coerced to 0' ); assert( - compareArray(new TA([0n, 0n]).fill(1n, NaN), [1n, 1n]), + compareArray(new TA(makeCtorArg([0n, 0n])).fill(1n, NaN), [1n, 1n]), '`NaN` start coerced to 0' ); assert( - compareArray(new TA([0n, 0n]).fill(1n, 0, NaN), [0n, 0n]), + compareArray(new TA(makeCtorArg([0n, 0n])).fill(1n, 0, NaN), [0n, 0n]), '`NaN` end coerced to 0' ); assert( - compareArray(new TA([0n, 0n]).fill(1n, '1'), [0n, 1n]), + compareArray(new TA(makeCtorArg([0n, 0n])).fill(1n, '1'), [0n, 1n]), 'string start coerced' ); assert( - compareArray(new TA([0n, 0n]).fill(1n, 0, '1'), [1n, 0n]), + compareArray(new TA(makeCtorArg([0n, 0n])).fill(1n, 0, '1'), [1n, 0n]), 'string end coerced' ); assert( - compareArray(new TA([0n, 0n]).fill(1n, 1.5), [0n, 1n]), + compareArray(new TA(makeCtorArg([0n, 0n])).fill(1n, 1.5), [0n, 1n]), 'start as a float number coerced' ); assert( - compareArray(new TA([0n, 0n]).fill(1n, 0, 1.5), [1n, 0n]), + compareArray(new TA(makeCtorArg([0n, 0n])).fill(1n, 0, 1.5), [1n, 0n]), 'end as a float number coerced' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/fill/BigInt/detached-buffer.js index 96e7980aca6..c9492dc3187 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -31,4 +31,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.fill(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-once.js b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-once.js index 47033ccce6a..4f3647f9a6b 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-once.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-once.js @@ -11,12 +11,12 @@ info: | 3. If O.[[TypedArrayName]] is "BigUint64Array" or "BigInt64Array", let value be ? ToBigInt(value). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var n = 1n; sample.fill({ valueOf() { return n++; } }); @@ -24,5 +24,5 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(n, 2n, "additional unexpected ToBigInt() calls"); assert.sameValue(sample[0], 1n, "incorrect ToNumber result in index 0"); assert.sameValue(sample[1], 1n, "incorrect ToNumber result in index 1"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-custom-start-and-end.js b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-custom-start-and-end.js index a981ab00bd3..78cbcf8e3bc 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-custom-start-and-end.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-custom-start-and-end.js @@ -29,14 +29,14 @@ info: | 6. If relativeEnd < 0, let final be max((len + relativeEnd), 0); else let final be min(relativeEnd, len). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - assert(compareArray(new TA([0n, 0n, 0n]).fill(8n, 1, 2), [0n, 8n, 0n])); - assert(compareArray(new TA([0n, 0n, 0n, 0n, 0n]).fill(8n, -3, 4), [0n, 0n, 8n, 8n, 0n])); - assert(compareArray(new TA([0n, 0n, 0n, 0n, 0n]).fill(8n, -2, -1), [0n, 0n, 0n, 8n, 0n])); - assert(compareArray(new TA([0n, 0n, 0n, 0n, 0n]).fill(8n, -1, -3), [0n, 0n, 0n, 0n, 0n])); - assert(compareArray(new TA([0n, 0n, 0n, 0n, 0n]).fill(8n, 1, 3), [0n, 8n, 8n, 0n, 0n])); -}); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + assert(compareArray(new TA(makeCtorArg([0n, 0n, 0n])).fill(8n, 1, 2), [0n, 8n, 0n])); + assert(compareArray(new TA(makeCtorArg([0n, 0n, 0n, 0n, 0n])).fill(8n, -3, 4), [0n, 0n, 8n, 8n, 0n])); + assert(compareArray(new TA(makeCtorArg([0n, 0n, 0n, 0n, 0n])).fill(8n, -2, -1), [0n, 0n, 0n, 8n, 0n])); + assert(compareArray(new TA(makeCtorArg([0n, 0n, 0n, 0n, 0n])).fill(8n, -1, -3), [0n, 0n, 0n, 0n, 0n])); + assert(compareArray(new TA(makeCtorArg([0n, 0n, 0n, 0n, 0n])).fill(8n, 1, 3), [0n, 8n, 8n, 0n, 0n])); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-non-numeric-throw.js b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-non-numeric-throw.js index 85bb513be71..298117a683b 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-non-numeric-throw.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-non-numeric-throw.js @@ -43,14 +43,14 @@ info: | Return NormalCompletion(undefined). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42n]); + sample = new TA(makeCtorArg([42n])); assert.throws(TypeError, function() { sample.fill(undefined); @@ -64,4 +64,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.fill("nonsense"); }, "abrupt completion from string"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-non-numeric.js b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-non-numeric.js index 2b73da24e87..6b7cb72ae1a 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-non-numeric.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-non-numeric.js @@ -42,26 +42,26 @@ info: | Perform SetValueInBuffer(buffer, indexedPosition, elementType, numValue, true, Unordered). Return NormalCompletion(undefined). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42n]); + sample = new TA(makeCtorArg([42n])); sample.fill(false); assert.sameValue(sample[0], 0n, "false => 0"); - sample = new TA([42n]); + sample = new TA(makeCtorArg([42n])); sample.fill(true); assert.sameValue(sample[0], 1n, "true => 1"); - sample = new TA([42n]); + sample = new TA(makeCtorArg([42n])); sample.fill("7"); assert.sameValue(sample[0], 7n, "string conversion"); - sample = new TA([42n]); + sample = new TA(makeCtorArg([42n])); sample.fill({ toString: function() { return "1"; @@ -72,7 +72,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(sample[0], 7n, "object valueOf conversion before toString"); - sample = new TA([42n]); + sample = new TA(makeCtorArg([42n])); sample.fill({ toString: function() { return "7"; @@ -80,4 +80,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(sample[0], 7n, "object toString when valueOf is absent"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-end.js b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-end.js index a4cac9ffb44..52eaf2dc7a5 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-end.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-end.js @@ -26,28 +26,28 @@ info: | 6. If relativeEnd < 0, let final be max((len + relativeEnd), 0); else let final be min(relativeEnd, len). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( - compareArray(new TA([0n, 0n, 0n]).fill(8n, 0, 1), [8n, 0n, 0n]), + compareArray(new TA(makeCtorArg([0n, 0n, 0n])).fill(8n, 0, 1), [8n, 0n, 0n]), "Fill elements from custom end position" ); assert( - compareArray(new TA([0n, 0n, 0n]).fill(8n, 0, -1), [8n, 8n, 0n]), + compareArray(new TA(makeCtorArg([0n, 0n, 0n])).fill(8n, 0, -1), [8n, 8n, 0n]), "negative end sets final position to max((length + relativeEnd), 0)" ); assert( - compareArray(new TA([0n, 0n, 0n]).fill(8n, 0, 5), [8n, 8n, 8n]), + compareArray(new TA(makeCtorArg([0n, 0n, 0n])).fill(8n, 0, 5), [8n, 8n, 8n]), "end position is never higher than of length" ); assert( - compareArray(new TA([0n, 0n, 0n]).fill(8n, 0, -4), [0n, 0n, 0n]), + compareArray(new TA(makeCtorArg([0n, 0n, 0n])).fill(8n, 0, -4), [0n, 0n, 0n]), "end position is 0 when (len + relativeEnd) < 0" ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-start.js b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-start.js index 790d1a5f269..f645d9c0caa 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-start.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-start.js @@ -24,28 +24,28 @@ info: | 4. If relativeStart < 0, let k be max((len + relativeStart), 0); else let k be min(relativeStart, len). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( - compareArray(new TA([0n, 0n, 0n]).fill(8n, 1), [0n, 8n, 8n]), + compareArray(new TA(makeCtorArg([0n, 0n, 0n])).fill(8n, 1), [0n, 8n, 8n]), "Fill elements from custom start position" ); assert( - compareArray(new TA([0n, 0n, 0n]).fill(8n, 4), [0n, 0n, 0n]), + compareArray(new TA(makeCtorArg([0n, 0n, 0n])).fill(8n, 4), [0n, 0n, 0n]), "start position is never higher than length" ); assert( - compareArray(new TA([0n, 0n, 0n]).fill(8n, -1), [0n, 0n, 8n]), + compareArray(new TA(makeCtorArg([0n, 0n, 0n])).fill(8n, -1), [0n, 0n, 8n]), "start < 0 sets initial position to max((len + relativeStart), 0)" ); assert( - compareArray(new TA([0n, 0n, 0n]).fill(8n, -5), [8n, 8n, 8n]), + compareArray(new TA(makeCtorArg([0n, 0n, 0n])).fill(8n, -5), [8n, 8n, 8n]), "start position is 0 when (len + relativeStart) < 0" ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-symbol-throws.js b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-symbol-throws.js index 50cb0d55010..988601ba2a7 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-symbol-throws.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-symbol-throws.js @@ -43,16 +43,16 @@ info: | Return NormalCompletion(undefined). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ var s = Symbol('1'); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(TypeError, function() { sample.fill(s); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values.js b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values.js index ec390d28bb2..773a407b311 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values.js @@ -24,11 +24,11 @@ info: | 7. Repeat, while k < final a. Let Pk be ! ToString(k). b. Perform ? Set(O, Pk, value, true). -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( new TA().fill(8n), @@ -38,7 +38,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { ); assert( - compareArray(new TA([0n, 0n, 0n]).fill(8n), [8n, 8n, 8n]), + compareArray(new TA(makeCtorArg([0n, 0n, 0n])).fill(8n), [8n, 8n, 8n]), "Default start and end indexes are 0 and this.length" ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/get-length-ignores-length-prop.js b/test/built-ins/TypedArray/prototype/fill/BigInt/get-length-ignores-length-prop.js index ec7637bc56d..33c92ae070e 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/get-length-ignores-length-prop.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/get-length-ignores-length-prop.js @@ -23,7 +23,7 @@ info: | 1. Let O be ? ToObject(this value). 2. Let len be ? ToLength(? Get(O, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -33,14 +33,14 @@ Object.defineProperty(TypedArray.prototype, "length", { } }); -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { Object.defineProperty(TA.prototype, "length", { get: function() { throw new Test262Error(); } }); - var sample = new TA(1); + var sample = new TA(makeCtorArg(1)); Object.defineProperty(sample, "length", { get: function() { throw new Test262Error(); @@ -48,4 +48,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(sample.fill(1n, 0), sample); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-end-as-symbol.js b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-end-as-symbol.js index 69ad955b68f..71a12c08d4e 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-end-as-symbol.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-end-as-symbol.js @@ -24,7 +24,7 @@ info: | 5. If end is undefined, let relativeEnd be len; else let relativeEnd be ? ToInteger(end). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -35,4 +35,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.fill(1n, 0, end); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-end.js b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-end.js index 9dd7dd55356..712cedf1f8a 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-end.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-end.js @@ -24,7 +24,7 @@ info: | 5. If end is undefined, let relativeEnd be len; else let relativeEnd be ? ToInteger(end). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -39,4 +39,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.fill(1n, 0, end); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-set-value.js b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-set-value.js index 875600bd163..f3a6af18dcf 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-set-value.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-set-value.js @@ -43,12 +43,12 @@ info: | Return NormalCompletion(undefined). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n])); var obj = { valueOf: function() { throw new Test262Error(); @@ -58,4 +58,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.fill(obj); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-start-as-symbol.js b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-start-as-symbol.js index 73c24178676..e696a35a120 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-start-as-symbol.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-start-as-symbol.js @@ -23,7 +23,7 @@ info: | ... 3. Let relativeStart be ? ToInteger(start). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -34,4 +34,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.fill(1n, start); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-start.js b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-start.js index c5731f2f52b..362bf4327a5 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-start.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-start.js @@ -23,7 +23,7 @@ info: | ... 3. Let relativeStart be ? ToInteger(start). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -38,4 +38,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.fill(1n, start); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-this-out-of-bounds.js index 22641385484..801989e177e 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.fill description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.fill(0n); throw new Test262Error('fill completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/return-this.js b/test/built-ins/TypedArray/prototype/fill/BigInt/return-this.js index 83895854f90..c7225384d31 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/return-this.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/return-this.js @@ -4,17 +4,17 @@ esid: sec-%typedarray%.prototype.fill description: > Returns `this`. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample1 = new TA(); var result1 = sample1.fill(1n); assert.sameValue(result1, sample1); - var sample2 = new TA(42); + var sample2 = new TA(makeCtorArg(42)); var result2 = sample2.fill(7n); assert.sameValue(result2, sample2); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/coerced-end-detach.js b/test/built-ins/TypedArray/prototype/fill/coerced-end-detach.js index 32af1d527b2..1f358d3703c 100644 --- a/test/built-ins/TypedArray/prototype/fill/coerced-end-detach.js +++ b/test/built-ins/TypedArray/prototype/fill/coerced-end-detach.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.fill(0x77, 0, {valueOf: detachAndReturnIndex}); }, "Detachment when coercing end should throw TypeError"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/fill/coerced-indexes.js b/test/built-ins/TypedArray/prototype/fill/coerced-indexes.js index 2d512bae5c0..c6834011dd0 100644 --- a/test/built-ins/TypedArray/prototype/fill/coerced-indexes.js +++ b/test/built-ins/TypedArray/prototype/fill/coerced-indexes.js @@ -31,74 +31,74 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( - compareArray(new TA([0, 0]).fill(1, undefined), [1, 1]), + compareArray(new TA(makeCtorArg([0, 0])).fill(1, undefined), [1, 1]), '`undefined` start coerced to 0' ); assert( - compareArray(new TA([0, 0]).fill(1, 0, undefined), [1, 1]), + compareArray(new TA(makeCtorArg([0, 0])).fill(1, 0, undefined), [1, 1]), 'If end is undefined, let relativeEnd be len' ); assert( - compareArray(new TA([0, 0]).fill(1, null), [1, 1]), + compareArray(new TA(makeCtorArg([0, 0])).fill(1, null), [1, 1]), '`null` start coerced to 0' ); assert( - compareArray(new TA([0, 0]).fill(1, 0, null), [0, 0]), + compareArray(new TA(makeCtorArg([0, 0])).fill(1, 0, null), [0, 0]), '`null` end coerced to 0' ); assert( - compareArray(new TA([0, 0]).fill(1, true), [0, 1]), + compareArray(new TA(makeCtorArg([0, 0])).fill(1, true), [0, 1]), '`true` start coerced to 1' ); assert( - compareArray(new TA([0, 0]).fill(1, 0, true), [1, 0]), + compareArray(new TA(makeCtorArg([0, 0])).fill(1, 0, true), [1, 0]), '`true` end coerced to 1' ); assert( - compareArray(new TA([0, 0]).fill(1, false), [1, 1]), + compareArray(new TA(makeCtorArg([0, 0])).fill(1, false), [1, 1]), '`false` start coerced to 0' ); assert( - compareArray(new TA([0, 0]).fill(1, 0, false), [0, 0]), + compareArray(new TA(makeCtorArg([0, 0])).fill(1, 0, false), [0, 0]), '`false` end coerced to 0' ); assert( - compareArray(new TA([0, 0]).fill(1, NaN), [1, 1]), + compareArray(new TA(makeCtorArg([0, 0])).fill(1, NaN), [1, 1]), '`NaN` start coerced to 0' ); assert( - compareArray(new TA([0, 0]).fill(1, 0, NaN), [0, 0]), + compareArray(new TA(makeCtorArg([0, 0])).fill(1, 0, NaN), [0, 0]), '`NaN` end coerced to 0' ); assert( - compareArray(new TA([0, 0]).fill(1, '1'), [0, 1]), + compareArray(new TA(makeCtorArg([0, 0])).fill(1, '1'), [0, 1]), 'string start coerced' ); assert( - compareArray(new TA([0, 0]).fill(1, 0, '1'), [1, 0]), + compareArray(new TA(makeCtorArg([0, 0])).fill(1, 0, '1'), [1, 0]), 'string end coerced' ); assert( - compareArray(new TA([0, 0]).fill(1, 1.5), [0, 1]), + compareArray(new TA(makeCtorArg([0, 0])).fill(1, 1.5), [0, 1]), 'start as a float number coerced' ); assert( - compareArray(new TA([0, 0]).fill(1, 0, 1.5), [1, 0]), + compareArray(new TA(makeCtorArg([0, 0])).fill(1, 0, 1.5), [1, 0]), 'end as a float number coerced' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/coerced-start-detach.js b/test/built-ins/TypedArray/prototype/fill/coerced-start-detach.js index 4d067672a73..64b51882aee 100644 --- a/test/built-ins/TypedArray/prototype/fill/coerced-start-detach.js +++ b/test/built-ins/TypedArray/prototype/fill/coerced-start-detach.js @@ -26,4 +26,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.fill(0x77, {valueOf: detachAndReturnIndex}, 10); }, "Detachment when coercing start should throw TypeError"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/fill/coerced-value-detach.js b/test/built-ins/TypedArray/prototype/fill/coerced-value-detach.js index ae2c2aed148..8a83b5e5943 100644 --- a/test/built-ins/TypedArray/prototype/fill/coerced-value-detach.js +++ b/test/built-ins/TypedArray/prototype/fill/coerced-value-detach.js @@ -26,4 +26,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.fill({valueOf: detachAndReturnIndex}, 0, 10); }, "Detachment when coercing value should throw TypeError"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/fill/detached-buffer.js b/test/built-ins/TypedArray/prototype/fill/detached-buffer.js index b28f3bdd03c..9bbe7d0d7b9 100644 --- a/test/built-ins/TypedArray/prototype/fill/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/fill/detached-buffer.js @@ -31,4 +31,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.fill(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/fill/fill-values-conversion-once.js b/test/built-ins/TypedArray/prototype/fill/fill-values-conversion-once.js index f5e1bd6b7e9..8617c5811b9 100644 --- a/test/built-ins/TypedArray/prototype/fill/fill-values-conversion-once.js +++ b/test/built-ins/TypedArray/prototype/fill/fill-values-conversion-once.js @@ -14,8 +14,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var n = 1; sample.fill({ valueOf() { return n++; } }); @@ -23,5 +23,5 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(n, 2, "additional unexpected ToNumber() calls"); assert.sameValue(sample[0], 1, "incorrect ToNumber result in index 0"); assert.sameValue(sample[1], 1, "incorrect ToNumber result in index 1"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/fill-values-conversion-operations-consistent-nan.js b/test/built-ins/TypedArray/prototype/fill/fill-values-conversion-operations-consistent-nan.js index 7cacc2d6e69..2558a013da0 100644 --- a/test/built-ins/TypedArray/prototype/fill/fill-values-conversion-operations-consistent-nan.js +++ b/test/built-ins/TypedArray/prototype/fill/fill-values-conversion-operations-consistent-nan.js @@ -72,9 +72,9 @@ includes: [nans.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(FA) { +testWithTypedArrayConstructors(function(FA, makeCtorArg) { var precision = floatTypedArrayConstructorPrecision(FA); - var samples = new FA(3); + var samples = new FA(makeCtorArg(3)); var controls, idx, aNaN; for (idx = 0; idx < NaNs.length; ++idx) { @@ -98,4 +98,4 @@ testWithTypedArrayConstructors(function(FA) { ); } } -}, floatArrayConstructors); +}, floatArrayConstructors, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/fill-values-custom-start-and-end.js b/test/built-ins/TypedArray/prototype/fill/fill-values-custom-start-and-end.js index 2a332b54f43..9371e6f13f8 100644 --- a/test/built-ins/TypedArray/prototype/fill/fill-values-custom-start-and-end.js +++ b/test/built-ins/TypedArray/prototype/fill/fill-values-custom-start-and-end.js @@ -33,10 +33,10 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - assert(compareArray(new TA([0, 0, 0]).fill(8, 1, 2), [0, 8, 0])); - assert(compareArray(new TA([0, 0, 0, 0, 0]).fill(8, -3, 4), [0, 0, 8, 8, 0])); - assert(compareArray(new TA([0, 0, 0, 0, 0]).fill(8, -2, -1), [0, 0, 0, 8, 0])); - assert(compareArray(new TA([0, 0, 0, 0, 0]).fill(8, -1, -3), [0, 0, 0, 0, 0])); - assert(compareArray(new TA([0, 0, 0, 0, 0]).fill(8, 1, 3), [0, 8, 8, 0, 0])); -}); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + assert(compareArray(new TA(makeCtorArg([0, 0, 0])).fill(8, 1, 2), [0, 8, 0])); + assert(compareArray(new TA(makeCtorArg([0, 0, 0, 0, 0])).fill(8, -3, 4), [0, 0, 8, 8, 0])); + assert(compareArray(new TA(makeCtorArg([0, 0, 0, 0, 0])).fill(8, -2, -1), [0, 0, 0, 8, 0])); + assert(compareArray(new TA(makeCtorArg([0, 0, 0, 0, 0])).fill(8, -1, -3), [0, 0, 0, 0, 0])); + assert(compareArray(new TA(makeCtorArg([0, 0, 0, 0, 0])).fill(8, 1, 3), [0, 8, 8, 0, 0])); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/fill-values-non-numeric.js b/test/built-ins/TypedArray/prototype/fill/fill-values-non-numeric.js index be7ce96f093..e544c946944 100644 --- a/test/built-ins/TypedArray/prototype/fill/fill-values-non-numeric.js +++ b/test/built-ins/TypedArray/prototype/fill/fill-values-non-numeric.js @@ -47,26 +47,26 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42]); + sample = new TA(makeCtorArg([42])); sample.fill(null); assert.sameValue(sample[0], 0, "null => 0"); - sample = new TA([42]); + sample = new TA(makeCtorArg([42])); sample.fill(false); assert.sameValue(sample[0], 0, "false => 0"); - sample = new TA([42]); + sample = new TA(makeCtorArg([42])); sample.fill(true); assert.sameValue(sample[0], 1, "true => 1"); - sample = new TA([42]); + sample = new TA(makeCtorArg([42])); sample.fill("7"); assert.sameValue(sample[0], 7, "string conversion"); - sample = new TA([42]); + sample = new TA(makeCtorArg([42])); sample.fill({ toString: function() { return "1"; @@ -77,11 +77,11 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(sample[0], 7, "object valueOf conversion before toString"); - sample = new TA([42]); + sample = new TA(makeCtorArg([42])); sample.fill({ toString: function() { return "7"; } }); assert.sameValue(sample[0], 7, "object toString when valueOf is absent"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/fill-values-relative-end.js b/test/built-ins/TypedArray/prototype/fill/fill-values-relative-end.js index 4926fdb57ae..f5a2e63147d 100644 --- a/test/built-ins/TypedArray/prototype/fill/fill-values-relative-end.js +++ b/test/built-ins/TypedArray/prototype/fill/fill-values-relative-end.js @@ -30,24 +30,24 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( - compareArray(new TA([0, 0, 0]).fill(8, 0, 1), [8, 0, 0]), + compareArray(new TA(makeCtorArg([0, 0, 0])).fill(8, 0, 1), [8, 0, 0]), "Fill elements from custom end position" ); assert( - compareArray(new TA([0, 0, 0]).fill(8, 0, -1), [8, 8, 0]), + compareArray(new TA(makeCtorArg([0, 0, 0])).fill(8, 0, -1), [8, 8, 0]), "negative end sets final position to max((length + relativeEnd), 0)" ); assert( - compareArray(new TA([0, 0, 0]).fill(8, 0, 5), [8, 8, 8]), + compareArray(new TA(makeCtorArg([0, 0, 0])).fill(8, 0, 5), [8, 8, 8]), "end position is never higher than of length" ); assert( - compareArray(new TA([0, 0, 0]).fill(8, 0, -4), [0, 0, 0]), + compareArray(new TA(makeCtorArg([0, 0, 0])).fill(8, 0, -4), [0, 0, 0]), "end position is 0 when (len + relativeEnd) < 0" ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/fill-values-relative-start.js b/test/built-ins/TypedArray/prototype/fill/fill-values-relative-start.js index cb89c951fd4..3af094a5750 100644 --- a/test/built-ins/TypedArray/prototype/fill/fill-values-relative-start.js +++ b/test/built-ins/TypedArray/prototype/fill/fill-values-relative-start.js @@ -28,24 +28,24 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( - compareArray(new TA([0, 0, 0]).fill(8, 1), [0, 8, 8]), + compareArray(new TA(makeCtorArg([0, 0, 0])).fill(8, 1), [0, 8, 8]), "Fill elements from custom start position" ); assert( - compareArray(new TA([0, 0, 0]).fill(8, 4), [0, 0, 0]), + compareArray(new TA(makeCtorArg([0, 0, 0])).fill(8, 4), [0, 0, 0]), "start position is never higher than length" ); assert( - compareArray(new TA([0, 0, 0]).fill(8, -1), [0, 0, 8]), + compareArray(new TA(makeCtorArg([0, 0, 0])).fill(8, -1), [0, 0, 8]), "start < 0 sets initial position to max((len + relativeStart), 0)" ); assert( - compareArray(new TA([0, 0, 0]).fill(8, -5), [8, 8, 8]), + compareArray(new TA(makeCtorArg([0, 0, 0])).fill(8, -5), [8, 8, 8]), "start position is 0 when (len + relativeStart) < 0" ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/fill-values-symbol-throws.js b/test/built-ins/TypedArray/prototype/fill/fill-values-symbol-throws.js index d903770c112..a42844db792 100644 --- a/test/built-ins/TypedArray/prototype/fill/fill-values-symbol-throws.js +++ b/test/built-ins/TypedArray/prototype/fill/fill-values-symbol-throws.js @@ -49,10 +49,10 @@ features: [Symbol, TypedArray] var s = Symbol('1'); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(TypeError, function() { sample.fill(s); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/fill-values.js b/test/built-ins/TypedArray/prototype/fill/fill-values.js index 7d0faa44f38..30cedcccb28 100644 --- a/test/built-ins/TypedArray/prototype/fill/fill-values.js +++ b/test/built-ins/TypedArray/prototype/fill/fill-values.js @@ -28,7 +28,7 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert( compareArray( new TA().fill(8), @@ -38,7 +38,7 @@ testWithTypedArrayConstructors(function(TA) { ); assert( - compareArray(new TA([0, 0, 0]).fill(8), [8, 8, 8]), + compareArray(new TA(makeCtorArg([0, 0, 0])).fill(8), [8, 8, 8]), "Default start and end indexes are 0 and this.length" ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/get-length-ignores-length-prop.js b/test/built-ins/TypedArray/prototype/fill/get-length-ignores-length-prop.js index 3d5a2340aff..f18673a18cd 100644 --- a/test/built-ins/TypedArray/prototype/fill/get-length-ignores-length-prop.js +++ b/test/built-ins/TypedArray/prototype/fill/get-length-ignores-length-prop.js @@ -33,14 +33,14 @@ Object.defineProperty(TypedArray.prototype, "length", { } }); -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { Object.defineProperty(TA.prototype, "length", { get: function() { throw new Test262Error(); } }); - var sample = new TA(1); + var sample = new TA(makeCtorArg(1)); Object.defineProperty(sample, "length", { get: function() { throw new Test262Error(); @@ -48,4 +48,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(sample.fill(1, 0), sample); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-end-as-symbol.js b/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-end-as-symbol.js index f1a27370b4d..8c6a62b155f 100644 --- a/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-end-as-symbol.js +++ b/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-end-as-symbol.js @@ -35,4 +35,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.fill(1, 0, end); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-end.js b/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-end.js index 14646ab64cf..db9d08a09c0 100644 --- a/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-end.js +++ b/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-end.js @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.fill(1, 0, end); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-set-value.js b/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-set-value.js index 0b38f0dc84b..ca68ae49c0f 100644 --- a/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-set-value.js +++ b/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-set-value.js @@ -47,8 +47,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42])); var obj = { valueOf: function() { throw new Test262Error(); @@ -58,4 +58,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.fill(obj); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-start-as-symbol.js b/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-start-as-symbol.js index e50be1feaef..bfbbfc3dfac 100644 --- a/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-start-as-symbol.js +++ b/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-start-as-symbol.js @@ -34,4 +34,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.fill(1, start); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-start.js b/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-start.js index d55177f7280..0b10cf6b336 100644 --- a/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-start.js +++ b/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-start.js @@ -38,4 +38,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.fill(1, start); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-this-out-of-bounds.js index 1604aadd4ee..6352a890947 100644 --- a/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.fill(0); throw new Test262Error('fill completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/fill/return-this.js b/test/built-ins/TypedArray/prototype/fill/return-this.js index 95ce81f93c4..5f1b1603ee0 100644 --- a/test/built-ins/TypedArray/prototype/fill/return-this.js +++ b/test/built-ins/TypedArray/prototype/fill/return-this.js @@ -8,13 +8,13 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample1 = new TA(); var result1 = sample1.fill(1); assert.sameValue(result1, sample1); - var sample2 = new TA(42); + var sample2 = new TA(makeCtorArg(42)); var result2 = sample2.fill(7); assert.sameValue(result2, sample2); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/arraylength-internal.js b/test/built-ins/TypedArray/prototype/filter/BigInt/arraylength-internal.js index ecd36aa8adb..08ca9dd6dbe 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/arraylength-internal.js @@ -9,7 +9,7 @@ info: | ... 3. Let len be the value of O's [[ArrayLength]] internal slot. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -23,8 +23,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(4); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(4)); var calls = 0; Object.defineProperty(TA.prototype, "length", desc); @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(getCalls, 0, "ignores length properties"); assert.sameValue(calls, 4, "interactions are not affected by custom length"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-with-thisarg.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-with-thisarg.js index 2d32a8a782b..3b9559ff325 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-with-thisarg.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-with-thisarg.js @@ -12,12 +12,12 @@ info: | ... c. Let selected be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var results = []; var thisArg = ["test262", 0, "ecma262", 0]; diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-without-thisarg.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-without-thisarg.js index 5c9d91b6dde..be46c4b5fc3 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-without-thisarg.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-without-thisarg.js @@ -12,12 +12,12 @@ info: | ... c. Let selected be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-called-before-ctor.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-called-before-ctor.js index 56c07c040e2..f26d2183136 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-called-before-ctor.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-called-before-ctor.js @@ -13,7 +13,7 @@ info: | ... 10. Let A be ? TypedArraySpeciesCreate(O, « captured »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-called-before-species.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-called-before-species.js index e99e1b71540..948af79ddba 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-called-before-species.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-called-before-species.js @@ -13,7 +13,7 @@ info: | ... 10. Let A be ? TypedArraySpeciesCreate(O, « captured »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-detachbuffer.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-detachbuffer.js index 346830325ba..04fb2e917cf 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-detachbuffer.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-detachbuffer.js @@ -14,7 +14,7 @@ info: | b. Let kValue be ? Get(O, Pk). c. Let selected be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [detachArrayBuffer.js, testBigIntTypedArray.js] +includes: [detachArrayBuffer.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -34,4 +34,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-no-iteration-over-non-integer.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-no-iteration-over-non-integer.js index 2162cbe16f7..9b73da31d24 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-no-iteration-over-non-integer.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-no-iteration-over-non-integer.js @@ -12,12 +12,12 @@ info: | ... c. Let selected be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([7n, 8n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7n, 8n])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-not-callable-throws.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-not-callable-throws.js index 6d2c4a71a87..32d8e54a99d 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-not-callable-throws.js @@ -9,12 +9,12 @@ info: | ... 4. If IsCallable(callbackfn) is false, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(4); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(4)); assert.throws(TypeError, function() { sample.filter(); diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-not-called-on-empty.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-not-called-on-empty.js index 47cc032e079..2b8effd4189 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-not-called-on-empty.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-not-called-on-empty.js @@ -12,7 +12,7 @@ info: | ... c. Let selected be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -24,4 +24,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-return-does-not-change-instance.js index 4ace9cecc78..c4beeb4eed7 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-return-does-not-change-instance.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-return-does-not-change-instance.js @@ -4,14 +4,12 @@ esid: sec-%typedarray%.prototype.filter description: > The callbackfn return does not change the instance -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample1 = new TA(3); - - sample1[1] = 1n; +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg(["0", "1", "0"])); sample1.filter(function() { return 42; diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-returns-abrupt.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-returns-abrupt.js index 411b5ef8c51..1edbc3ab3a8 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-returns-abrupt.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-returns-abrupt.js @@ -12,12 +12,12 @@ info: | ... c. Let selected be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); assert.throws(Test262Error, function() { sample.filter(function() { diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-set-value-during-iteration.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-set-value-during-iteration.js index dbf09b798ff..84a490a6ece 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-set-value-during-iteration.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-set-value-during-iteration.js @@ -12,12 +12,12 @@ info: | ... c. Let selected be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect.set, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var newVal = 0n; sample.filter(function(val, i) { @@ -44,4 +44,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(sample[0], 7n, "changed values after interaction [0] == 7"); assert.sameValue(sample[1], 1n, "changed values after interaction [1] == 1"); assert.sameValue(sample[2], 2n, "changed values after interaction [2] == 2"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-this.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-this.js index fc7e0bccb52..a779542b20d 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-this.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-this.js @@ -14,15 +14,15 @@ info: | ... c. Let selected be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ var expected = (function() { return this; })(); var thisArg = {}; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var results1 = []; diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/filter/BigInt/detached-buffer.js index 19539b599d4..808fec19215 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.filter(callbackfn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/result-does-not-share-buffer.js b/test/built-ins/TypedArray/prototype/filter/BigInt/result-does-not-share-buffer.js index 70c11fca31d..4cfe9332ca1 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/result-does-not-share-buffer.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/result-does-not-share-buffer.js @@ -11,12 +11,12 @@ info: | 10. Let A be ? TypedArraySpeciesCreate(O, « captured »). ... 13. Return A. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n])); var result; result = sample.filter(function() { return true; }); diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/result-empty-callbackfn-returns-false.js b/test/built-ins/TypedArray/prototype/filter/BigInt/result-empty-callbackfn-returns-false.js index 34058a260b0..c1285003c21 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/result-empty-callbackfn-returns-false.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/result-empty-callbackfn-returns-false.js @@ -12,12 +12,12 @@ info: | a. Perform ! Set(A, ! ToString(n), e, true). b. Increment n by 1. 13. Return A. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); [ false, diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/result-full-callbackfn-returns-true.js b/test/built-ins/TypedArray/prototype/filter/BigInt/result-full-callbackfn-returns-true.js index b539ca2eca9..105ba38b7be 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/result-full-callbackfn-returns-true.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/result-full-callbackfn-returns-true.js @@ -12,12 +12,12 @@ info: | a. Perform ! Set(A, ! ToString(n), e, true). b. Increment n by 1. 13. Return A. -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n])); [ true, diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/filter/BigInt/return-abrupt-from-this-out-of-bounds.js index 490e8e1ad59..750d6398bcd 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.filter description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.filter(() => {}); throw new Test262Error('filter completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-destination-resizable.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-destination-resizable.js index 74da0daf464..fb058bb5825 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-destination-resizable.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-destination-resizable.js @@ -23,7 +23,7 @@ info: | a. If the value of newTypedArray's [[ArrayLength]] internal slot < argumentList[0], throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray, resizable-arraybuffer] ---*/ @@ -37,4 +37,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { ta.filter(() => true); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-abrupt.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-abrupt.js index ea71fee8986..4c28865f292 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-abrupt.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-abrupt.js @@ -22,12 +22,12 @@ info: | 2. Let C be ? Get(O, "constructor"). 3. If C is undefined, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); Object.defineProperty(sample, "constructor", { get: function() { diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-inherited.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-inherited.js index 7de9e3d6931..bf6cfb03409 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-inherited.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-inherited.js @@ -22,12 +22,12 @@ info: | 2. Let C be ? Get(O, "constructor"). 3. If C is undefined, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); var calls = 0; var result; @@ -61,4 +61,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { 7, "result.constructor triggers the inherited accessor property" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-returns-throws.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-returns-throws.js index 52fb99998af..c48bcdb887f 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-returns-throws.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-returns-throws.js @@ -24,14 +24,14 @@ info: | 3. If C is undefined, return defaultConstructor. 4. If Type(C) is not Object, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ var callbackfn = function() { return true; }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); sample.constructor = 42; assert.throws(TypeError, function() { diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor.js index 2fa985b265c..ca3ebfb42d8 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor.js @@ -22,12 +22,12 @@ info: | 2. Let C be ? Get(O, "constructor"). 3. If C is undefined, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); var calls = 0; var result; diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-abrupt.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-abrupt.js index eb585beb703..6b8b50d7142 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-abrupt.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-abrupt.js @@ -24,12 +24,12 @@ info: | ... 5. Let S be ? Get(C, @@species). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-invocation.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-invocation.js index 5b3f2af2b18..333e5d1e9f8 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-invocation.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-invocation.js @@ -32,12 +32,12 @@ info: | 3. If argumentList is a List of a single Number, then ... 4. Return newTypedArray. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 42n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 42n, 42n])); var result, ctorThis; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js index d6ae1e206a6..1810e5b44a1 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js @@ -23,7 +23,7 @@ info: | a. If the value of newTypedArray's [[ArrayLength]] internal slot < argumentList[0], throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray, resizable-arraybuffer] ---*/ @@ -39,4 +39,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.filter(() => { return true; }); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-length-throws.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-length-throws.js index 80b0ea9f978..1853f80934f 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-length-throws.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-length-throws.js @@ -23,12 +23,12 @@ info: | a. If the value of newTypedArray's [[ArrayLength]] internal slot < argumentList[0], throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; sample.constructor[Symbol.species] = function() { diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-length.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-length.js index 38af74b53b1..126b014f868 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-length.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-length.js @@ -23,12 +23,12 @@ info: | a. If the value of newTypedArray's [[ArrayLength]] internal slot < argumentList[0], throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var customCount, result; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js index fe301ac8f63..560dc4cfe77 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js @@ -32,12 +32,12 @@ info: | 3. If argumentList is a List of a single Number, then ... 4. Return newTypedArray. -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n])); var otherTA = TA === BigInt64Array ? BigUint64Array : BigInt64Array; var other = new otherTA([1n, 0n, 1n]); var result; diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-throws.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-throws.js index ae5d33183be..55401462839 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-throws.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-throws.js @@ -30,12 +30,12 @@ info: | 1. Let newTypedArray be ? Construct(constructor, argumentList). 2. Perform ? ValidateTypedArray(newTypedArray). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; sample.constructor[Symbol.species] = Array; diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor.js index 4e4da9bee0e..927e58c833a 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor.js @@ -32,12 +32,12 @@ info: | 3. If argumentList is a List of a single Number, then ... 4. Return newTypedArray. -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n])); var calls = 0; var other, result; diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-returns-throws.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-returns-throws.js index 12a76cdda38..e562b041f8a 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-returns-throws.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-returns-throws.js @@ -25,12 +25,12 @@ info: | 7. If IsConstructor(S) is true, return S. 8. Throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-use-default-ctor.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-use-default-ctor.js index 9ecb72b056e..63b9f97e11a 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-use-default-ctor.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-use-default-ctor.js @@ -23,12 +23,12 @@ info: | 5. Let S be ? Get(C, @@species). 6. If S is either undefined or null, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var result; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species.js index 04e413a381b..73d629b0497 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species.js @@ -24,12 +24,12 @@ info: | ... 5. Let S be ? Get(C, @@species). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var calls = 0; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/filter/BigInt/values-are-not-cached.js index d2a982a3120..5ba4cb58b28 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/values-are-not-cached.js @@ -12,12 +12,12 @@ info: | ... c. Let selected be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); sample.filter(function(v, i) { if (i < sample.length - 1) { @@ -28,4 +28,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { v, 42n, "method does not cache values before callbackfn calls" ); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/values-are-set.js b/test/built-ins/TypedArray/prototype/filter/BigInt/values-are-set.js index 49c65cacf96..37683236483 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/values-are-set.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/values-are-set.js @@ -12,12 +12,12 @@ info: | a. Perform ! Set(A, ! ToString(n), e, true). b. Increment n by 1. 13. Return A. -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([41n, 1n, 42n, 7n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([41n, 1n, 42n, 7n])); var result; result = sample.filter(function() { return true; }); diff --git a/test/built-ins/TypedArray/prototype/filter/arraylength-internal.js b/test/built-ins/TypedArray/prototype/filter/arraylength-internal.js index 7ca266e714c..88e33b597cf 100644 --- a/test/built-ins/TypedArray/prototype/filter/arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/filter/arraylength-internal.js @@ -23,8 +23,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(4); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(4)); var calls = 0; Object.defineProperty(TA.prototype, "length", desc); @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(getCalls, 0, "ignores length properties"); assert.sameValue(calls, 4, "interactions are not affected by custom length"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/filter/callbackfn-arguments-with-thisarg.js b/test/built-ins/TypedArray/prototype/filter/callbackfn-arguments-with-thisarg.js index ea90d12a05b..26d274d87c6 100644 --- a/test/built-ins/TypedArray/prototype/filter/callbackfn-arguments-with-thisarg.js +++ b/test/built-ins/TypedArray/prototype/filter/callbackfn-arguments-with-thisarg.js @@ -16,8 +16,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var results = []; var thisArg = ["test262", 0, "ecma262", 0]; diff --git a/test/built-ins/TypedArray/prototype/filter/callbackfn-arguments-without-thisarg.js b/test/built-ins/TypedArray/prototype/filter/callbackfn-arguments-without-thisarg.js index 557107c93f5..238f917e28e 100644 --- a/test/built-ins/TypedArray/prototype/filter/callbackfn-arguments-without-thisarg.js +++ b/test/built-ins/TypedArray/prototype/filter/callbackfn-arguments-without-thisarg.js @@ -16,8 +16,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/filter/callbackfn-detachbuffer.js b/test/built-ins/TypedArray/prototype/filter/callbackfn-detachbuffer.js index 92eff63ff31..638438e219d 100644 --- a/test/built-ins/TypedArray/prototype/filter/callbackfn-detachbuffer.js +++ b/test/built-ins/TypedArray/prototype/filter/callbackfn-detachbuffer.js @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/filter/callbackfn-no-iteration-over-non-integer.js b/test/built-ins/TypedArray/prototype/filter/callbackfn-no-iteration-over-non-integer.js index 6a9c5d282a8..af2fe0857b6 100644 --- a/test/built-ins/TypedArray/prototype/filter/callbackfn-no-iteration-over-non-integer.js +++ b/test/built-ins/TypedArray/prototype/filter/callbackfn-no-iteration-over-non-integer.js @@ -16,8 +16,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([7, 8]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7, 8])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/filter/callbackfn-not-callable-throws.js b/test/built-ins/TypedArray/prototype/filter/callbackfn-not-callable-throws.js index 0bbae485403..bd96ed05442 100644 --- a/test/built-ins/TypedArray/prototype/filter/callbackfn-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/filter/callbackfn-not-callable-throws.js @@ -13,8 +13,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(4); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(4)); assert.throws(TypeError, function() { sample.filter(); diff --git a/test/built-ins/TypedArray/prototype/filter/callbackfn-not-called-on-empty.js b/test/built-ins/TypedArray/prototype/filter/callbackfn-not-called-on-empty.js index d28f5218383..8adf0021807 100644 --- a/test/built-ins/TypedArray/prototype/filter/callbackfn-not-called-on-empty.js +++ b/test/built-ins/TypedArray/prototype/filter/callbackfn-not-called-on-empty.js @@ -24,4 +24,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/filter/callbackfn-resize.js b/test/built-ins/TypedArray/prototype/filter/callbackfn-resize.js index 339af37913d..47ac447ce94 100644 --- a/test/built-ins/TypedArray/prototype/filter/callbackfn-resize.js +++ b/test/built-ins/TypedArray/prototype/filter/callbackfn-resize.js @@ -73,4 +73,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.compareArray(result, expectedElements, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/filter/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/filter/callbackfn-return-does-not-change-instance.js index 7d377629614..3d09210fd25 100644 --- a/test/built-ins/TypedArray/prototype/filter/callbackfn-return-does-not-change-instance.js +++ b/test/built-ins/TypedArray/prototype/filter/callbackfn-return-does-not-change-instance.js @@ -8,10 +8,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample1 = new TA(3); - - sample1[1] = 1; +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg(["0", "1", "0"])); sample1.filter(function() { return 42; diff --git a/test/built-ins/TypedArray/prototype/filter/callbackfn-returns-abrupt.js b/test/built-ins/TypedArray/prototype/filter/callbackfn-returns-abrupt.js index c3931a28191..05885996b8f 100644 --- a/test/built-ins/TypedArray/prototype/filter/callbackfn-returns-abrupt.js +++ b/test/built-ins/TypedArray/prototype/filter/callbackfn-returns-abrupt.js @@ -16,8 +16,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); assert.throws(Test262Error, function() { sample.filter(function() { diff --git a/test/built-ins/TypedArray/prototype/filter/callbackfn-set-value-during-iteration.js b/test/built-ins/TypedArray/prototype/filter/callbackfn-set-value-during-iteration.js index 97c4ae7d35c..e5188e0cc5e 100644 --- a/test/built-ins/TypedArray/prototype/filter/callbackfn-set-value-during-iteration.js +++ b/test/built-ins/TypedArray/prototype/filter/callbackfn-set-value-during-iteration.js @@ -16,8 +16,8 @@ includes: [testTypedArray.js] features: [Reflect.set, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var newVal = 0; sample.filter(function(val, i) { @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(sample[0], 7, "changed values after interaction [0] == 7"); assert.sameValue(sample[1], 1, "changed values after interaction [1] == 1"); assert.sameValue(sample[2], 2, "changed values after interaction [2] == 2"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/filter/callbackfn-this.js b/test/built-ins/TypedArray/prototype/filter/callbackfn-this.js index 1fc599c7c97..030fb17becf 100644 --- a/test/built-ins/TypedArray/prototype/filter/callbackfn-this.js +++ b/test/built-ins/TypedArray/prototype/filter/callbackfn-this.js @@ -21,8 +21,8 @@ features: [TypedArray] var expected = (function() { return this; })(); var thisArg = {}; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var results1 = []; diff --git a/test/built-ins/TypedArray/prototype/filter/detached-buffer.js b/test/built-ins/TypedArray/prototype/filter/detached-buffer.js index 711dbee7867..5f25343417c 100644 --- a/test/built-ins/TypedArray/prototype/filter/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/filter/detached-buffer.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.filter(callbackfn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/filter/result-does-not-share-buffer.js b/test/built-ins/TypedArray/prototype/filter/result-does-not-share-buffer.js index bbd292d14fd..84072099fd2 100644 --- a/test/built-ins/TypedArray/prototype/filter/result-does-not-share-buffer.js +++ b/test/built-ins/TypedArray/prototype/filter/result-does-not-share-buffer.js @@ -15,8 +15,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42])); var result; result = sample.filter(function() { return true; }); diff --git a/test/built-ins/TypedArray/prototype/filter/result-empty-callbackfn-returns-false.js b/test/built-ins/TypedArray/prototype/filter/result-empty-callbackfn-returns-false.js index de558f97e77..10eaf79a820 100644 --- a/test/built-ins/TypedArray/prototype/filter/result-empty-callbackfn-returns-false.js +++ b/test/built-ins/TypedArray/prototype/filter/result-empty-callbackfn-returns-false.js @@ -16,8 +16,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); [ false, diff --git a/test/built-ins/TypedArray/prototype/filter/result-full-callbackfn-returns-true.js b/test/built-ins/TypedArray/prototype/filter/result-full-callbackfn-returns-true.js index f46bf483dae..ebc7a8fa5c7 100644 --- a/test/built-ins/TypedArray/prototype/filter/result-full-callbackfn-returns-true.js +++ b/test/built-ins/TypedArray/prototype/filter/result-full-callbackfn-returns-true.js @@ -16,8 +16,8 @@ includes: [testTypedArray.js, compareArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42])); [ true, diff --git a/test/built-ins/TypedArray/prototype/filter/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/filter/return-abrupt-from-this-out-of-bounds.js index 0655bdabeb0..f68ed78e8d3 100644 --- a/test/built-ins/TypedArray/prototype/filter/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/filter/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.filter(() => {}); throw new Test262Error('filter completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/filter/speciesctor-destination-resizable.js b/test/built-ins/TypedArray/prototype/filter/speciesctor-destination-resizable.js index 2358f656eee..aa8fb3eee7c 100644 --- a/test/built-ins/TypedArray/prototype/filter/speciesctor-destination-resizable.js +++ b/test/built-ins/TypedArray/prototype/filter/speciesctor-destination-resizable.js @@ -37,4 +37,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { ta.filter(() => true); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-ctor-abrupt.js b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-ctor-abrupt.js index 6f9099eaecc..66a5a7fed5c 100644 --- a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-ctor-abrupt.js +++ b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-ctor-abrupt.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); Object.defineProperty(sample, "constructor", { get: function() { diff --git a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-ctor-inherited.js b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-ctor-inherited.js index 9db63a8eb16..75ebb8cc09b 100644 --- a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-ctor-inherited.js +++ b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-ctor-inherited.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); var calls = 0; var result; @@ -61,4 +61,4 @@ testWithTypedArrayConstructors(function(TA) { 7, "result.constructor triggers the inherited accessor property" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-ctor-returns-throws.js b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-ctor-returns-throws.js index a63bd2e5336..af682e51278 100644 --- a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-ctor-returns-throws.js +++ b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-ctor-returns-throws.js @@ -30,8 +30,8 @@ features: [Symbol, TypedArray] var callbackfn = function() { return true; }; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); sample.constructor = 42; assert.throws(TypeError, function() { diff --git a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-ctor.js b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-ctor.js index 6308fe92ffd..44256cf3173 100644 --- a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-ctor.js +++ b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-ctor.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); var calls = 0; var result; diff --git a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-abrupt.js b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-abrupt.js index 858dd0fa73d..eaafc254e25 100644 --- a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-abrupt.js +++ b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-abrupt.js @@ -28,8 +28,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-invocation.js b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-invocation.js index ad8313a26a3..7fab02ebf7b 100644 --- a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-invocation.js +++ b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-invocation.js @@ -36,8 +36,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 42, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 42, 42])); var result, ctorThis; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js index 92cfa4aeb05..2ab41578718 100644 --- a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js +++ b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.filter(() => { return true; }); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-length-throws.js b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-length-throws.js index 35f48124c18..e791abd9a24 100644 --- a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-length-throws.js +++ b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-length-throws.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; sample.constructor[Symbol.species] = function() { diff --git a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-length.js b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-length.js index 35228670dd3..d77f6f46e26 100644 --- a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-length.js +++ b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-length.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var customCount, result; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-returns-another-instance.js b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-returns-another-instance.js index 79547878b12..ccad1c26296 100644 --- a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-returns-another-instance.js +++ b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-returns-another-instance.js @@ -36,8 +36,8 @@ includes: [testTypedArray.js, compareArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40])); var otherTA = TA === Int8Array ? Int16Array : Int8Array; var other = new otherTA([1, 0, 1]); var result; diff --git a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-throws.js b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-throws.js index 825c7ebcbca..1685bf9d670 100644 --- a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-throws.js +++ b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor-throws.js @@ -34,8 +34,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; sample.constructor[Symbol.species] = Array; diff --git a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor.js b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor.js index 28e12b13522..ab88ce6b526 100644 --- a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor.js +++ b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-custom-ctor.js @@ -36,8 +36,8 @@ includes: [testTypedArray.js, compareArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42])); var calls = 0; var other, result; diff --git a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-returns-throws.js b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-returns-throws.js index 572eae085c4..f82ca5ebec0 100644 --- a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-returns-throws.js +++ b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-returns-throws.js @@ -29,8 +29,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-use-default-ctor.js b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-use-default-ctor.js index 863012f2052..fea098f202d 100644 --- a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-use-default-ctor.js +++ b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species-use-default-ctor.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var result; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species.js b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species.js index 33abab59654..6efc9149b7b 100644 --- a/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species.js +++ b/test/built-ins/TypedArray/prototype/filter/speciesctor-get-species.js @@ -28,8 +28,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var calls = 0; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/filter/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/filter/values-are-not-cached.js index 1b24d310e53..e27bf951f0a 100644 --- a/test/built-ins/TypedArray/prototype/filter/values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/filter/values-are-not-cached.js @@ -16,8 +16,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); sample.filter(function(v, i) { if (i < sample.length - 1) { @@ -28,4 +28,4 @@ testWithTypedArrayConstructors(function(TA) { v, 42, "method does not cache values before callbackfn calls" ); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/filter/values-are-set.js b/test/built-ins/TypedArray/prototype/filter/values-are-set.js index c9f16b8df1d..d3bcb4e3cd2 100644 --- a/test/built-ins/TypedArray/prototype/filter/values-are-set.js +++ b/test/built-ins/TypedArray/prototype/filter/values-are-set.js @@ -16,8 +16,8 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([41, 1, 42, 7]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([41, 1, 42, 7])); var result; result = sample.filter(function() { return true; }); diff --git a/test/built-ins/TypedArray/prototype/find/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/find/BigInt/detached-buffer.js index f3cfaeb3e21..da8daa539db 100644 --- a/test/built-ins/TypedArray/prototype/find/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/find/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.find(predicate); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/find/BigInt/get-length-ignores-length-prop.js b/test/built-ins/TypedArray/prototype/find/BigInt/get-length-ignores-length-prop.js index ebdbdf05ee4..a58f2381183 100644 --- a/test/built-ins/TypedArray/prototype/find/BigInt/get-length-ignores-length-prop.js +++ b/test/built-ins/TypedArray/prototype/find/BigInt/get-length-ignores-length-prop.js @@ -21,7 +21,7 @@ info: | ... 2. Let len be ? ToLength(? Get(O, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -31,14 +31,14 @@ Object.defineProperty(TypedArray.prototype, "length", { } }); -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { Object.defineProperty(TA.prototype, "length", { get: function() { throw new Test262Error(); } }); - var sample = new TA([42n]); + var sample = new TA(makeCtorArg([42n])); Object.defineProperty(sample, "length", { get: function() { @@ -51,4 +51,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.find(function() { return true; }), 42n ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-changes-value.js b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-changes-value.js index 86be70f0592..867eed774e3 100644 --- a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-changes-value.js +++ b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-changes-value.js @@ -25,16 +25,16 @@ info: | ... c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var arr = [1n, 2n, 3n]; var sample; var result; - sample = new TA(3); + sample = new TA(makeCtorArg(3)); sample.find(function(val, i) { sample[i] = arr[i]; @@ -75,4 +75,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { return true; }); assert.sameValue(result, 1n, "find() returns previous found value"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-parameters.js b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-parameters.js index 8fc8c558b07..0f568c68a5f 100644 --- a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-parameters.js +++ b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-parameters.js @@ -25,12 +25,12 @@ info: | ... c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([39n, 2n, 62n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([39n, 2n, 62n])); var results = []; var result; diff --git a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-this-non-strict.js b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-this-non-strict.js index 882bd21af60..5d8c427e571 100644 --- a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-this-non-strict.js +++ b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-this-non-strict.js @@ -26,14 +26,14 @@ info: | c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). ... flags: [noStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ var T = this; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var result; sample.find(function() { diff --git a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-this-strict.js b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-this-strict.js index b7ce4535d4a..3c4296b2b6f 100644 --- a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-this-strict.js +++ b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-this-strict.js @@ -26,12 +26,12 @@ info: | c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). ... flags: [onlyStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var result; sample.find(function() { diff --git a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-is-not-callable-throws.js b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-is-not-callable-throws.js index b579dfa11d2..e33cc3646dd 100644 --- a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-is-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-is-not-callable-throws.js @@ -21,7 +21,7 @@ info: | ... 3. If IsCallable(predicate) is false, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -63,4 +63,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.find(/./); }, "regexp"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-may-detach-buffer.js b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-may-detach-buffer.js index 49f713555ad..65720dc5e21 100644 --- a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-may-detach-buffer.js +++ b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-may-detach-buffer.js @@ -38,7 +38,7 @@ info: | Let buffer be the value of O's [[ViewedArrayBuffer]] internal slot. If IsDetachedBuffer(buffer) is true, return undefined. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -54,4 +54,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-not-called-on-empty-array.js b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-not-called-on-empty-array.js index 230aff544a8..152d92f52fb 100644 --- a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-not-called-on-empty-array.js +++ b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-not-called-on-empty-array.js @@ -23,7 +23,7 @@ info: | ... c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -46,4 +46,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { undefined, "find returns undefined when predicate is not called" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/find/BigInt/return-abrupt-from-predicate-call.js b/test/built-ins/TypedArray/prototype/find/BigInt/return-abrupt-from-predicate-call.js index 0f693f4a23d..71ae2a2ea90 100644 --- a/test/built-ins/TypedArray/prototype/find/BigInt/return-abrupt-from-predicate-call.js +++ b/test/built-ins/TypedArray/prototype/find/BigInt/return-abrupt-from-predicate-call.js @@ -23,12 +23,12 @@ info: | ... c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var predicate = function() { throw new Test262Error(); diff --git a/test/built-ins/TypedArray/prototype/find/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/find/BigInt/return-abrupt-from-this-out-of-bounds.js index d600fdba1a2..2d2afb1e707 100644 --- a/test/built-ins/TypedArray/prototype/find/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/find/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.find description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.find(() => {}); throw new Test262Error('find completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/find/BigInt/return-found-value-predicate-result-is-true.js b/test/built-ins/TypedArray/prototype/find/BigInt/return-found-value-predicate-result-is-true.js index 32ea9abd1bf..69de3a0d71f 100644 --- a/test/built-ins/TypedArray/prototype/find/BigInt/return-found-value-predicate-result-is-true.js +++ b/test/built-ins/TypedArray/prototype/find/BigInt/return-found-value-predicate-result-is-true.js @@ -24,12 +24,12 @@ info: | c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). d. If testResult is true, return kValue. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([39n, 2n, 62n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([39n, 2n, 62n])); var called, result; called = 0; diff --git a/test/built-ins/TypedArray/prototype/find/BigInt/return-undefined-if-predicate-returns-false-value.js b/test/built-ins/TypedArray/prototype/find/BigInt/return-undefined-if-predicate-returns-false-value.js index 2c8e2d1c3a3..82b1d05d5c2 100644 --- a/test/built-ins/TypedArray/prototype/find/BigInt/return-undefined-if-predicate-returns-false-value.js +++ b/test/built-ins/TypedArray/prototype/find/BigInt/return-undefined-if-predicate-returns-false-value.js @@ -24,12 +24,12 @@ info: | c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). ... 7. Return undefined. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var called = 0; var result = sample.find(function() { diff --git a/test/built-ins/TypedArray/prototype/find/callbackfn-resize.js b/test/built-ins/TypedArray/prototype/find/callbackfn-resize.js index af875ef252c..c41ac9fd663 100644 --- a/test/built-ins/TypedArray/prototype/find/callbackfn-resize.js +++ b/test/built-ins/TypedArray/prototype/find/callbackfn-resize.js @@ -70,4 +70,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.sameValue(result, undefined, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/find/detached-buffer.js b/test/built-ins/TypedArray/prototype/find/detached-buffer.js index c8429ed3195..c37bd6962f7 100644 --- a/test/built-ins/TypedArray/prototype/find/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/find/detached-buffer.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.find(predicate); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/find/get-length-ignores-length-prop.js b/test/built-ins/TypedArray/prototype/find/get-length-ignores-length-prop.js index 4c5905ee191..1848a2d603b 100644 --- a/test/built-ins/TypedArray/prototype/find/get-length-ignores-length-prop.js +++ b/test/built-ins/TypedArray/prototype/find/get-length-ignores-length-prop.js @@ -31,14 +31,14 @@ Object.defineProperty(TypedArray.prototype, "length", { } }); -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { Object.defineProperty(TA.prototype, "length", { get: function() { throw new Test262Error(); } }); - var sample = new TA([42]); + var sample = new TA(makeCtorArg([42])); Object.defineProperty(sample, "length", { get: function() { @@ -51,4 +51,4 @@ testWithTypedArrayConstructors(function(TA) { sample.find(function() { return true; }), 42 ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/find/predicate-call-changes-value.js b/test/built-ins/TypedArray/prototype/find/predicate-call-changes-value.js index 0b8baa4ba49..1e717cac11e 100644 --- a/test/built-ins/TypedArray/prototype/find/predicate-call-changes-value.js +++ b/test/built-ins/TypedArray/prototype/find/predicate-call-changes-value.js @@ -29,12 +29,12 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var arr = [1, 2, 3]; var sample; var result; - sample = new TA(3); + sample = new TA(makeCtorArg(3)); sample.find(function(val, i) { sample[i] = arr[i]; @@ -75,4 +75,4 @@ testWithTypedArrayConstructors(function(TA) { return true; }); assert.sameValue(result, 1, "find() returns previous found value"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/find/predicate-call-parameters.js b/test/built-ins/TypedArray/prototype/find/predicate-call-parameters.js index 7d364c09127..f80241eb9b0 100644 --- a/test/built-ins/TypedArray/prototype/find/predicate-call-parameters.js +++ b/test/built-ins/TypedArray/prototype/find/predicate-call-parameters.js @@ -29,8 +29,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([39, 2, 62]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([39, 2, 62])); var results = []; var result; diff --git a/test/built-ins/TypedArray/prototype/find/predicate-call-this-non-strict.js b/test/built-ins/TypedArray/prototype/find/predicate-call-this-non-strict.js index 3246908b61e..099725b3647 100644 --- a/test/built-ins/TypedArray/prototype/find/predicate-call-this-non-strict.js +++ b/test/built-ins/TypedArray/prototype/find/predicate-call-this-non-strict.js @@ -32,8 +32,8 @@ features: [TypedArray] var T = this; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var result; sample.find(function() { diff --git a/test/built-ins/TypedArray/prototype/find/predicate-call-this-strict.js b/test/built-ins/TypedArray/prototype/find/predicate-call-this-strict.js index 22ed01f7703..4c8759898ba 100644 --- a/test/built-ins/TypedArray/prototype/find/predicate-call-this-strict.js +++ b/test/built-ins/TypedArray/prototype/find/predicate-call-this-strict.js @@ -30,8 +30,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var result; sample.find(function() { diff --git a/test/built-ins/TypedArray/prototype/find/predicate-is-not-callable-throws.js b/test/built-ins/TypedArray/prototype/find/predicate-is-not-callable-throws.js index f470ad927fb..d041ec58791 100644 --- a/test/built-ins/TypedArray/prototype/find/predicate-is-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/find/predicate-is-not-callable-throws.js @@ -63,4 +63,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.find(/./); }, "regexp"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/find/predicate-may-detach-buffer.js b/test/built-ins/TypedArray/prototype/find/predicate-may-detach-buffer.js index cf216e41629..80a70f9dad5 100644 --- a/test/built-ins/TypedArray/prototype/find/predicate-may-detach-buffer.js +++ b/test/built-ins/TypedArray/prototype/find/predicate-may-detach-buffer.js @@ -54,4 +54,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/find/predicate-not-called-on-empty-array.js b/test/built-ins/TypedArray/prototype/find/predicate-not-called-on-empty-array.js index 304c5da965e..9dd1e94ab02 100644 --- a/test/built-ins/TypedArray/prototype/find/predicate-not-called-on-empty-array.js +++ b/test/built-ins/TypedArray/prototype/find/predicate-not-called-on-empty-array.js @@ -46,4 +46,4 @@ testWithTypedArrayConstructors(function(TA) { undefined, "find returns undefined when predicate is not called" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/find/return-abrupt-from-predicate-call.js b/test/built-ins/TypedArray/prototype/find/return-abrupt-from-predicate-call.js index 1c99c9ef7cb..5bf00800eb8 100644 --- a/test/built-ins/TypedArray/prototype/find/return-abrupt-from-predicate-call.js +++ b/test/built-ins/TypedArray/prototype/find/return-abrupt-from-predicate-call.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var predicate = function() { throw new Test262Error(); diff --git a/test/built-ins/TypedArray/prototype/find/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/find/return-abrupt-from-this-out-of-bounds.js index 821607f192c..210556ab31d 100644 --- a/test/built-ins/TypedArray/prototype/find/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/find/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.find(() => {}); throw new Test262Error('find completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/find/return-found-value-predicate-result-is-true.js b/test/built-ins/TypedArray/prototype/find/return-found-value-predicate-result-is-true.js index 304b48355b8..64114a65078 100644 --- a/test/built-ins/TypedArray/prototype/find/return-found-value-predicate-result-is-true.js +++ b/test/built-ins/TypedArray/prototype/find/return-found-value-predicate-result-is-true.js @@ -28,8 +28,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([39, 2, 62]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([39, 2, 62])); var called, result; called = 0; diff --git a/test/built-ins/TypedArray/prototype/find/return-undefined-if-predicate-returns-false-value.js b/test/built-ins/TypedArray/prototype/find/return-undefined-if-predicate-returns-false-value.js index 2a59dc0a4b8..a2262b9c61f 100644 --- a/test/built-ins/TypedArray/prototype/find/return-undefined-if-predicate-returns-false-value.js +++ b/test/built-ins/TypedArray/prototype/find/return-undefined-if-predicate-returns-false-value.js @@ -28,8 +28,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var called = 0; var result = sample.find(function() { diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/detached-buffer.js index f8e8ed4496a..a3fbcbd99c2 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.findIndex(predicate); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/get-length-ignores-length-prop.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/get-length-ignores-length-prop.js index d4287dfbdaf..4721165760d 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/get-length-ignores-length-prop.js +++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/get-length-ignores-length-prop.js @@ -19,7 +19,7 @@ info: | ... 2. Let len be ? ToLength(? Get(O, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -29,14 +29,14 @@ Object.defineProperty(TypedArray.prototype, "length", { } }); -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { Object.defineProperty(TA.prototype, "length", { get: function() { throw new Test262Error(); } }); - var sample = new TA([42n]); + var sample = new TA(makeCtorArg([42n])); Object.defineProperty(sample, "length", { get: function() { @@ -49,4 +49,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.findIndex(function() { return true; }), 0 ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-changes-value.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-changes-value.js index 2fa76032374..636cdd225db 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-changes-value.js +++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-changes-value.js @@ -21,16 +21,16 @@ info: | ... c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var arr = [10n, 20n, 30n]; var sample; var result; - sample = new TA(3); + sample = new TA(makeCtorArg(3)); sample.findIndex(function(val, i) { sample[i] = arr[i]; @@ -64,4 +64,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { return val === 7n; }); assert.sameValue(result, -1, "value not found - changed after call"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-parameters.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-parameters.js index 1025bbb24f3..d7551c64780 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-parameters.js +++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-parameters.js @@ -23,12 +23,12 @@ info: | ... c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([39n, 2n, 62n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([39n, 2n, 62n])); var results = []; var result; diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-this-non-strict.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-this-non-strict.js index 3c1d4b9f2da..594c0b3c7d6 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-this-non-strict.js +++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-this-non-strict.js @@ -24,14 +24,14 @@ info: | c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). ... flags: [noStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ var T = this; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var result; sample.findIndex(function() { diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-this-strict.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-this-strict.js index af6ce6a7372..030b5365511 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-this-strict.js +++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-this-strict.js @@ -24,12 +24,12 @@ info: | c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). ... flags: [onlyStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var result; sample.findIndex(function() { diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-is-not-callable-throws.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-is-not-callable-throws.js index c8a101d05c9..c7fd1178996 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-is-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-is-not-callable-throws.js @@ -19,7 +19,7 @@ info: | ... 3. If IsCallable(predicate) is false, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -60,5 +60,5 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.findIndex(/./); }, "/./"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-may-detach-buffer.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-may-detach-buffer.js index bfb837d23f9..831bccbf988 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-may-detach-buffer.js +++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-may-detach-buffer.js @@ -30,7 +30,7 @@ info: | 3. Let buffer be the value of O's [[ViewedArrayBuffer]] internal slot. 4. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -45,4 +45,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { loops++; }); assert.sameValue(loops, 2, "predicate is called once"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-not-called-on-empty-array.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-not-called-on-empty-array.js index a08e80ef5da..e60ad6ae102 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-not-called-on-empty-array.js +++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-not-called-on-empty-array.js @@ -22,7 +22,7 @@ info: | c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). ... 7. Return -1. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -45,4 +45,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { result, -1, "returns -1 on an empty instance" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-abrupt-from-predicate-call.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-abrupt-from-predicate-call.js index 49405f3c562..ccb9a74d8a9 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-abrupt-from-predicate-call.js +++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-abrupt-from-predicate-call.js @@ -22,7 +22,7 @@ info: | ... c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -30,8 +30,8 @@ var predicate = function() { throw new Test262Error(); }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(Test262Error, function() { sample.findIndex(predicate); }); diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-abrupt-from-this-out-of-bounds.js index baa8df142d3..65cefb7484b 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.findindex description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.findIndex(() => {}); throw new Test262Error('findIndex completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-index-predicate-result-is-true.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-index-predicate-result-is-true.js index 25e26d80888..9692bdd445d 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-index-predicate-result-is-true.js +++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-index-predicate-result-is-true.js @@ -23,12 +23,12 @@ info: | c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). d. If testResult is true, return k. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([39n, 3n, 9n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([39n, 3n, 9n])); var called = 0; var result = sample.findIndex(function() { diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-negative-one-if-predicate-returns-false-value.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-negative-one-if-predicate-returns-false-value.js index fcf5d800c7f..6f9916b755a 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-negative-one-if-predicate-returns-false-value.js +++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-negative-one-if-predicate-returns-false-value.js @@ -22,12 +22,12 @@ info: | c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). ... 7. Return -1. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([1n, 2n, 3n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1n, 2n, 3n])); var called = 0; var result = sample.findIndex(function() { diff --git a/test/built-ins/TypedArray/prototype/findIndex/callbackfn-resize.js b/test/built-ins/TypedArray/prototype/findIndex/callbackfn-resize.js index 935cb8d492e..2041af673a4 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/callbackfn-resize.js +++ b/test/built-ins/TypedArray/prototype/findIndex/callbackfn-resize.js @@ -70,4 +70,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.sameValue(result, -1, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findIndex/detached-buffer.js b/test/built-ins/TypedArray/prototype/findIndex/detached-buffer.js index 692e3ad5952..5d79ae9af8b 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/findIndex/detached-buffer.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.findIndex(predicate); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findIndex/get-length-ignores-length-prop.js b/test/built-ins/TypedArray/prototype/findIndex/get-length-ignores-length-prop.js index 89b8815c5f5..6d0ef0edef1 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/get-length-ignores-length-prop.js +++ b/test/built-ins/TypedArray/prototype/findIndex/get-length-ignores-length-prop.js @@ -29,14 +29,14 @@ Object.defineProperty(TypedArray.prototype, "length", { } }); -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { Object.defineProperty(TA.prototype, "length", { get: function() { throw new Test262Error(); } }); - var sample = new TA([42]); + var sample = new TA(makeCtorArg([42])); Object.defineProperty(sample, "length", { get: function() { @@ -49,4 +49,4 @@ testWithTypedArrayConstructors(function(TA) { sample.findIndex(function() { return true; }), 0 ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findIndex/predicate-call-changes-value.js b/test/built-ins/TypedArray/prototype/findIndex/predicate-call-changes-value.js index 2843859a09f..2a7fc69297a 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/predicate-call-changes-value.js +++ b/test/built-ins/TypedArray/prototype/findIndex/predicate-call-changes-value.js @@ -25,12 +25,12 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var arr = [10, 20, 30]; var sample; var result; - sample = new TA(3); + sample = new TA(makeCtorArg(3)); sample.findIndex(function(val, i) { sample[i] = arr[i]; @@ -64,4 +64,4 @@ testWithTypedArrayConstructors(function(TA) { return val === 7; }); assert.sameValue(result, -1, "value not found - changed after call"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/findIndex/predicate-call-parameters.js b/test/built-ins/TypedArray/prototype/findIndex/predicate-call-parameters.js index 5483cc49aa6..c38c12cafd2 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/predicate-call-parameters.js +++ b/test/built-ins/TypedArray/prototype/findIndex/predicate-call-parameters.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([39, 2, 62]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([39, 2, 62])); var results = []; var result; diff --git a/test/built-ins/TypedArray/prototype/findIndex/predicate-call-this-non-strict.js b/test/built-ins/TypedArray/prototype/findIndex/predicate-call-this-non-strict.js index 5f6086b8f64..b83dcb9b38b 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/predicate-call-this-non-strict.js +++ b/test/built-ins/TypedArray/prototype/findIndex/predicate-call-this-non-strict.js @@ -30,8 +30,8 @@ features: [TypedArray] var T = this; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var result; sample.findIndex(function() { diff --git a/test/built-ins/TypedArray/prototype/findIndex/predicate-call-this-strict.js b/test/built-ins/TypedArray/prototype/findIndex/predicate-call-this-strict.js index 96ef4609855..fff94ca9a50 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/predicate-call-this-strict.js +++ b/test/built-ins/TypedArray/prototype/findIndex/predicate-call-this-strict.js @@ -28,8 +28,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var result; sample.findIndex(function() { diff --git a/test/built-ins/TypedArray/prototype/findIndex/predicate-is-not-callable-throws.js b/test/built-ins/TypedArray/prototype/findIndex/predicate-is-not-callable-throws.js index 872c4ffe884..07e07caf7b1 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/predicate-is-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/findIndex/predicate-is-not-callable-throws.js @@ -60,5 +60,5 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.findIndex(/./); }, "/./"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findIndex/predicate-may-detach-buffer.js b/test/built-ins/TypedArray/prototype/findIndex/predicate-may-detach-buffer.js index efd5ad04fc3..fca55d59895 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/predicate-may-detach-buffer.js +++ b/test/built-ins/TypedArray/prototype/findIndex/predicate-may-detach-buffer.js @@ -42,4 +42,4 @@ testWithTypedArrayConstructors(function(TA) { loops++; }); assert.sameValue(loops, 2, "predicate is called once"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findIndex/predicate-not-called-on-empty-array.js b/test/built-ins/TypedArray/prototype/findIndex/predicate-not-called-on-empty-array.js index e6a4abb4a63..7a3ec2a004e 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/predicate-not-called-on-empty-array.js +++ b/test/built-ins/TypedArray/prototype/findIndex/predicate-not-called-on-empty-array.js @@ -45,4 +45,4 @@ testWithTypedArrayConstructors(function(TA) { result, -1, "returns -1 on an empty instance" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findIndex/return-abrupt-from-predicate-call.js b/test/built-ins/TypedArray/prototype/findIndex/return-abrupt-from-predicate-call.js index 1b01c82217e..4eb753e8e35 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/return-abrupt-from-predicate-call.js +++ b/test/built-ins/TypedArray/prototype/findIndex/return-abrupt-from-predicate-call.js @@ -30,8 +30,8 @@ var predicate = function() { throw new Test262Error(); }; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(Test262Error, function() { sample.findIndex(predicate); }); diff --git a/test/built-ins/TypedArray/prototype/findIndex/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/findIndex/return-abrupt-from-this-out-of-bounds.js index 1a21e024c25..85c4cf3f43a 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/findIndex/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.findIndex(() => {}); throw new Test262Error('findIndex completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findIndex/return-index-predicate-result-is-true.js b/test/built-ins/TypedArray/prototype/findIndex/return-index-predicate-result-is-true.js index 498e9ac3e25..561b4ddb08a 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/return-index-predicate-result-is-true.js +++ b/test/built-ins/TypedArray/prototype/findIndex/return-index-predicate-result-is-true.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([39, 3, 9]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([39, 3, 9])); var called = 0; var result = sample.findIndex(function() { diff --git a/test/built-ins/TypedArray/prototype/findIndex/return-negative-one-if-predicate-returns-false-value.js b/test/built-ins/TypedArray/prototype/findIndex/return-negative-one-if-predicate-returns-false-value.js index 76bda3ca05c..b311f61196c 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/return-negative-one-if-predicate-returns-false-value.js +++ b/test/built-ins/TypedArray/prototype/findIndex/return-negative-one-if-predicate-returns-false-value.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([1, 2, 3]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1, 2, 3])); var called = 0; var result = sample.findIndex(function() { diff --git a/test/built-ins/TypedArray/prototype/findLast/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/findLast/BigInt/detached-buffer.js index 436a2d08b48..ce76155d122 100644 --- a/test/built-ins/TypedArray/prototype/findLast/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/findLast/BigInt/detached-buffer.js @@ -13,7 +13,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ @@ -27,4 +27,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.findLast(predicate); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLast/BigInt/get-length-ignores-length-prop.js b/test/built-ins/TypedArray/prototype/findLast/BigInt/get-length-ignores-length-prop.js index 5b32d293e9b..852fe678bff 100644 --- a/test/built-ins/TypedArray/prototype/findLast/BigInt/get-length-ignores-length-prop.js +++ b/test/built-ins/TypedArray/prototype/findLast/BigInt/get-length-ignores-length-prop.js @@ -10,7 +10,7 @@ info: | ... 3. Let len be O.[[ArrayLength]]. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ @@ -20,14 +20,14 @@ Object.defineProperty(TypedArray.prototype, "length", { } }); -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { Object.defineProperty(TA.prototype, "length", { get: function() { throw new Test262Error(); } }); - var sample = new TA([42n]); + var sample = new TA(makeCtorArg([42n])); Object.defineProperty(sample, "length", { get: function() { @@ -40,4 +40,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.findLast(function() { return true; }), 42n ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-changes-value.js b/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-changes-value.js index 9c4496c7627..dbacb1c19d1 100644 --- a/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-changes-value.js +++ b/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-changes-value.js @@ -13,16 +13,16 @@ info: | ... c. Let testResult be ! ToBoolean(? Call(predicate, thisArg, « kValue, 𝔽(k), O »)). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var arr = [1n, 2n, 3n]; var sample; var result; - sample = new TA(3); + sample = new TA(makeCtorArg(3)); sample.findLast(function(val, i) { sample[i] = arr[i]; @@ -63,4 +63,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { return true; }); assert.sameValue(result, 3n, "findLast() returns previous found value"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-parameters.js b/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-parameters.js index 271e4e35c42..4ad5720d975 100644 --- a/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-parameters.js +++ b/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-parameters.js @@ -12,12 +12,12 @@ info: | ... c. Let testResult be ! ToBoolean(? Call(predicate, thisArg, « kValue, 𝔽(k), O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([39n, 2n, 62n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([39n, 2n, 62n])); var results = []; var result; diff --git a/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-this-non-strict.js b/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-this-non-strict.js index 9fb2641036e..2f052de5650 100644 --- a/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-this-non-strict.js +++ b/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-this-non-strict.js @@ -12,14 +12,14 @@ info: | c. Let testResult be ! ToBoolean(? Call(predicate, thisArg, « kValue, 𝔽(k), O »)). ... flags: [noStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ var T = this; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var result; sample.findLast(function() { diff --git a/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-this-strict.js b/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-this-strict.js index a19f10ddf87..e666df067b8 100644 --- a/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-this-strict.js +++ b/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-this-strict.js @@ -12,12 +12,12 @@ info: | c. Let testResult be ! ToBoolean(? Call(predicate, thisArg, « kValue, 𝔽(k), O »)). ... flags: [onlyStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var result; sample.findLast(function() { diff --git a/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-is-not-callable-throws.js b/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-is-not-callable-throws.js index d5f0955a484..9d4251a9be7 100644 --- a/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-is-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-is-not-callable-throws.js @@ -10,7 +10,7 @@ info: | ... 4. If IsCallable(predicate) is false, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ @@ -52,4 +52,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.findLast(/./); }, "regexp"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-may-detach-buffer.js b/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-may-detach-buffer.js index 52239bc2f2c..6cd3e204a61 100644 --- a/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-may-detach-buffer.js +++ b/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-may-detach-buffer.js @@ -20,7 +20,7 @@ info: | Let buffer be the value of O's [[ViewedArrayBuffer]] internal slot. If IsDetachedBuffer(buffer) is true, return undefined. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-not-called-on-empty-array.js b/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-not-called-on-empty-array.js index da182c5a273..0ac503c7136 100644 --- a/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-not-called-on-empty-array.js +++ b/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-not-called-on-empty-array.js @@ -11,7 +11,7 @@ info: | ... c. Let testResult be ! ToBoolean(? Call(predicate, thisArg, « kValue, 𝔽(k), O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ @@ -34,4 +34,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { undefined, "findLast returns undefined when predicate is not called" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLast/BigInt/return-abrupt-from-predicate-call.js b/test/built-ins/TypedArray/prototype/findLast/BigInt/return-abrupt-from-predicate-call.js index 99eda5d6171..5c27e43f077 100644 --- a/test/built-ins/TypedArray/prototype/findLast/BigInt/return-abrupt-from-predicate-call.js +++ b/test/built-ins/TypedArray/prototype/findLast/BigInt/return-abrupt-from-predicate-call.js @@ -11,12 +11,12 @@ info: | ... c. Let testResult be ! ToBoolean(? Call(predicate, thisArg, « kValue, 𝔽(k), O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var predicate = function() { throw new Test262Error(); diff --git a/test/built-ins/TypedArray/prototype/findLast/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/findLast/BigInt/return-abrupt-from-this-out-of-bounds.js index 6fcbcaa15f0..b979b9e00ac 100644 --- a/test/built-ins/TypedArray/prototype/findLast/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/findLast/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.findlast description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, array-find-from-last, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.findLast(() => {}); throw new Test262Error('findLast completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLast/BigInt/return-found-value-predicate-result-is-true.js b/test/built-ins/TypedArray/prototype/findLast/BigInt/return-found-value-predicate-result-is-true.js index ef27e1d588e..5cc2e0d512b 100644 --- a/test/built-ins/TypedArray/prototype/findLast/BigInt/return-found-value-predicate-result-is-true.js +++ b/test/built-ins/TypedArray/prototype/findLast/BigInt/return-found-value-predicate-result-is-true.js @@ -12,12 +12,12 @@ info: | c. Let testResult be ! ToBoolean(? Call(predicate, thisArg, « kValue, 𝔽(k), O »)). d. If testResult is true, return kValue. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray, array-find-from-last] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([39n, 2n, 62n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([39n, 2n, 62n])); var called, result; called = 0; diff --git a/test/built-ins/TypedArray/prototype/findLast/BigInt/return-undefined-if-predicate-returns-false-value.js b/test/built-ins/TypedArray/prototype/findLast/BigInt/return-undefined-if-predicate-returns-false-value.js index cf614120af7..9c393162b7e 100644 --- a/test/built-ins/TypedArray/prototype/findLast/BigInt/return-undefined-if-predicate-returns-false-value.js +++ b/test/built-ins/TypedArray/prototype/findLast/BigInt/return-undefined-if-predicate-returns-false-value.js @@ -13,12 +13,12 @@ info: | c. Let testResult be ! ToBoolean(? Call(predicate, thisArg, « kValue, 𝔽(k), O »)). ... 7. Return undefined. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray, array-find-from-last] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var called = 0; var result = sample.findLast(function() { diff --git a/test/built-ins/TypedArray/prototype/findLast/callbackfn-resize.js b/test/built-ins/TypedArray/prototype/findLast/callbackfn-resize.js index 5048442bf40..aa5a6bd0eda 100644 --- a/test/built-ins/TypedArray/prototype/findLast/callbackfn-resize.js +++ b/test/built-ins/TypedArray/prototype/findLast/callbackfn-resize.js @@ -70,4 +70,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.sameValue(result, undefined, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLast/detached-buffer.js b/test/built-ins/TypedArray/prototype/findLast/detached-buffer.js index 41141d0c6b9..fa0f8b6af81 100644 --- a/test/built-ins/TypedArray/prototype/findLast/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/findLast/detached-buffer.js @@ -27,4 +27,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.findLast(predicate); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLast/get-length-ignores-length-prop.js b/test/built-ins/TypedArray/prototype/findLast/get-length-ignores-length-prop.js index f75482c2d44..b428a5e9db9 100644 --- a/test/built-ins/TypedArray/prototype/findLast/get-length-ignores-length-prop.js +++ b/test/built-ins/TypedArray/prototype/findLast/get-length-ignores-length-prop.js @@ -19,14 +19,14 @@ Object.defineProperty(TypedArray.prototype, "length", { } }); -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { Object.defineProperty(TA.prototype, "length", { get: function() { throw new Test262Error(); } }); - var sample = new TA([42]); + var sample = new TA(makeCtorArg([42])); Object.defineProperty(sample, "length", { get: function() { @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(function(TA) { sample.findLast(function() { return true; }), 42 ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLast/predicate-call-changes-value.js b/test/built-ins/TypedArray/prototype/findLast/predicate-call-changes-value.js index 7fc08ab8c66..20c188a5fc5 100644 --- a/test/built-ins/TypedArray/prototype/findLast/predicate-call-changes-value.js +++ b/test/built-ins/TypedArray/prototype/findLast/predicate-call-changes-value.js @@ -17,12 +17,12 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray, array-find-from-last] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var arr = [1, 2, 3]; var sample; var result; - sample = new TA(3); + sample = new TA(makeCtorArg(3)); sample.findLast(function(val, i) { sample[i] = arr[i]; @@ -63,4 +63,4 @@ testWithTypedArrayConstructors(function(TA) { return true; }); assert.sameValue(result, 3, "findLast() returns previous found value"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/findLast/predicate-call-parameters.js b/test/built-ins/TypedArray/prototype/findLast/predicate-call-parameters.js index df93b2ea2aa..30b6d345acf 100644 --- a/test/built-ins/TypedArray/prototype/findLast/predicate-call-parameters.js +++ b/test/built-ins/TypedArray/prototype/findLast/predicate-call-parameters.js @@ -16,8 +16,8 @@ includes: [testTypedArray.js] features: [TypedArray, array-find-from-last] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([39, 2, 62]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([39, 2, 62])); var results = []; var result; diff --git a/test/built-ins/TypedArray/prototype/findLast/predicate-call-this-non-strict.js b/test/built-ins/TypedArray/prototype/findLast/predicate-call-this-non-strict.js index 41c078cbe16..a95722c73ad 100644 --- a/test/built-ins/TypedArray/prototype/findLast/predicate-call-this-non-strict.js +++ b/test/built-ins/TypedArray/prototype/findLast/predicate-call-this-non-strict.js @@ -18,8 +18,8 @@ features: [TypedArray, array-find-from-last] var T = this; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var result; sample.findLast(function() { diff --git a/test/built-ins/TypedArray/prototype/findLast/predicate-call-this-strict.js b/test/built-ins/TypedArray/prototype/findLast/predicate-call-this-strict.js index 60368d90e7a..070fc222330 100644 --- a/test/built-ins/TypedArray/prototype/findLast/predicate-call-this-strict.js +++ b/test/built-ins/TypedArray/prototype/findLast/predicate-call-this-strict.js @@ -16,8 +16,8 @@ includes: [testTypedArray.js] features: [TypedArray, array-find-from-last] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var result; sample.findLast(function() { diff --git a/test/built-ins/TypedArray/prototype/findLast/predicate-is-not-callable-throws.js b/test/built-ins/TypedArray/prototype/findLast/predicate-is-not-callable-throws.js index 2e3b6cb298d..abfa53835f5 100644 --- a/test/built-ins/TypedArray/prototype/findLast/predicate-is-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/findLast/predicate-is-not-callable-throws.js @@ -52,4 +52,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.findLast(/./); }, "regexp"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLast/predicate-may-detach-buffer.js b/test/built-ins/TypedArray/prototype/findLast/predicate-may-detach-buffer.js index 4ee9782bbba..45f2f837142 100644 --- a/test/built-ins/TypedArray/prototype/findLast/predicate-may-detach-buffer.js +++ b/test/built-ins/TypedArray/prototype/findLast/predicate-may-detach-buffer.js @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLast/predicate-not-called-on-empty-array.js b/test/built-ins/TypedArray/prototype/findLast/predicate-not-called-on-empty-array.js index 115c7761d62..9d804b4c348 100644 --- a/test/built-ins/TypedArray/prototype/findLast/predicate-not-called-on-empty-array.js +++ b/test/built-ins/TypedArray/prototype/findLast/predicate-not-called-on-empty-array.js @@ -34,4 +34,4 @@ testWithTypedArrayConstructors(function(TA) { undefined, "findLast returns undefined when predicate is not called" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLast/return-abrupt-from-predicate-call.js b/test/built-ins/TypedArray/prototype/findLast/return-abrupt-from-predicate-call.js index 358f63c5393..5127f7e200f 100644 --- a/test/built-ins/TypedArray/prototype/findLast/return-abrupt-from-predicate-call.js +++ b/test/built-ins/TypedArray/prototype/findLast/return-abrupt-from-predicate-call.js @@ -15,8 +15,8 @@ includes: [testTypedArray.js] features: [TypedArray, array-find-from-last] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var predicate = function() { throw new Test262Error(); diff --git a/test/built-ins/TypedArray/prototype/findLast/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/findLast/return-abrupt-from-this-out-of-bounds.js index 5dc3aee8fa1..05270100700 100644 --- a/test/built-ins/TypedArray/prototype/findLast/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/findLast/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.findLast(() => {}); throw new Test262Error('findLast completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLast/return-found-value-predicate-result-is-true.js b/test/built-ins/TypedArray/prototype/findLast/return-found-value-predicate-result-is-true.js index 70bf03037be..fe1363b97a7 100644 --- a/test/built-ins/TypedArray/prototype/findLast/return-found-value-predicate-result-is-true.js +++ b/test/built-ins/TypedArray/prototype/findLast/return-found-value-predicate-result-is-true.js @@ -16,8 +16,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray, array-find-from-last] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([39, 2, 62]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([39, 2, 62])); var called, result; called = 0; diff --git a/test/built-ins/TypedArray/prototype/findLast/return-undefined-if-predicate-returns-false-value.js b/test/built-ins/TypedArray/prototype/findLast/return-undefined-if-predicate-returns-false-value.js index bedf00f2bcc..1f7429ae89d 100644 --- a/test/built-ins/TypedArray/prototype/findLast/return-undefined-if-predicate-returns-false-value.js +++ b/test/built-ins/TypedArray/prototype/findLast/return-undefined-if-predicate-returns-false-value.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray, array-find-from-last] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var called = 0; var result = sample.findLast(function() { diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/detached-buffer.js index 5487ecf73c2..75684bc023e 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.findLastIndex(predicate); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/get-length-ignores-length-prop.js b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/get-length-ignores-length-prop.js index 57ccdf17f41..c82b401a63f 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/get-length-ignores-length-prop.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/get-length-ignores-length-prop.js @@ -10,7 +10,7 @@ info: | ... 3. Let len be O.[[ArrayLength]]. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ @@ -20,14 +20,14 @@ Object.defineProperty(TypedArray.prototype, "length", { } }); -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { Object.defineProperty(TA.prototype, "length", { get: function() { throw new Test262Error(); } }); - var sample = new TA([42n]); + var sample = new TA(makeCtorArg([42n])); Object.defineProperty(sample, "length", { get: function() { @@ -40,4 +40,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.findLastIndex(function() { return true; }), 0 ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-changes-value.js b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-changes-value.js index 6fe27a8b5b3..e42b60edf5f 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-changes-value.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-changes-value.js @@ -12,16 +12,16 @@ info: | ... c. Let testResult be ! ToBoolean(? Call(predicate, thisArg, « kValue, 𝔽(k), O »)). ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var arr = [10n, 20n, 30n]; var sample; var result; - sample = new TA(3); + sample = new TA(makeCtorArg(3)); sample.findLastIndex(function(val, i) { sample[i] = arr[i]; @@ -55,4 +55,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { return val === 7n; }); assert.sameValue(result, -1, "value not found - changed after call"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-parameters.js b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-parameters.js index 6856b65f20c..a6ac12471ca 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-parameters.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-parameters.js @@ -13,12 +13,12 @@ info: | ... c. Let testResult be ! ToBoolean(? Call(predicate, thisArg, « kValue, 𝔽(k), O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([39n, 2n, 62n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([39n, 2n, 62n])); var results = []; var result; diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-this-non-strict.js b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-this-non-strict.js index 5a87c6b7688..e9f025331f7 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-this-non-strict.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-this-non-strict.js @@ -14,14 +14,14 @@ info: | c. Let testResult be ! ToBoolean(? Call(predicate, thisArg, « kValue, 𝔽(k), O »)). ... flags: [noStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ var T = this; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var result; sample.findLastIndex(function() { diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-this-strict.js b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-this-strict.js index c4f7d52a55e..c2e424d9d44 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-this-strict.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-this-strict.js @@ -14,12 +14,12 @@ info: | c. Let testResult be ! ToBoolean(? Call(predicate, thisArg, « kValue, 𝔽(k), O »)). ... flags: [onlyStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var result; sample.findLastIndex(function() { diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-is-not-callable-throws.js b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-is-not-callable-throws.js index e842bea8d0c..ef0a4f17012 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-is-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-is-not-callable-throws.js @@ -10,7 +10,7 @@ info: | ... 4. If IsCallable(predicate) is false, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ @@ -51,5 +51,5 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.findLastIndex(/./); }, "/./"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-may-detach-buffer.js b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-may-detach-buffer.js index b41019cc7bc..252923f21c8 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-may-detach-buffer.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-may-detach-buffer.js @@ -19,7 +19,7 @@ info: | Let buffer be the value of O's [[ViewedArrayBuffer]] internal slot. If IsDetachedBuffer(buffer) is true, return undefined. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ @@ -34,4 +34,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { loops++; }); assert.sameValue(loops, 2, "predicate is called once"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-not-called-on-empty-array.js b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-not-called-on-empty-array.js index c79420d4ba5..774c57eb08e 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-not-called-on-empty-array.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-not-called-on-empty-array.js @@ -13,7 +13,7 @@ info: | c. Let testResult be ! ToBoolean(? Call(predicate, thisArg, « kValue, 𝔽(k), O »)). ... 7. Return -1. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { result, -1, "returns -1 on an empty instance" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-abrupt-from-predicate-call.js b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-abrupt-from-predicate-call.js index 18463791ea8..8cea5a48961 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-abrupt-from-predicate-call.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-abrupt-from-predicate-call.js @@ -13,7 +13,7 @@ info: | ... c. Let testResult be ! ToBoolean(? Call(predicate, thisArg, « kValue, 𝔽(k), O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ @@ -21,8 +21,8 @@ var predicate = function() { throw new Test262Error(); }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(Test262Error, function() { sample.findLastIndex(predicate); }); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-abrupt-from-this-out-of-bounds.js index 3a1119f6ddc..3392541dc7c 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.findlastindex description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, array-find-from-last, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.findLastIndex(() => {}); throw new Test262Error('findLastIndex completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-index-predicate-result-is-true.js b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-index-predicate-result-is-true.js index 87d14f59b84..7f87d66853f 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-index-predicate-result-is-true.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-index-predicate-result-is-true.js @@ -14,12 +14,12 @@ info: | c. Let testResult be ! ToBoolean(? Call(predicate, thisArg, « kValue, 𝔽(k), O »)). d. If testResult is true, return 𝔽(k). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray, array-find-from-last] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([39n, 3n, 9n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([39n, 3n, 9n])); var called = 0; var result = sample.findLastIndex(function() { diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-negative-one-if-predicate-returns-false-value.js b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-negative-one-if-predicate-returns-false-value.js index 904966fb488..be3c40f6cd5 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-negative-one-if-predicate-returns-false-value.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-negative-one-if-predicate-returns-false-value.js @@ -14,12 +14,12 @@ info: | c. Let testResult be ! ToBoolean(? Call(predicate, thisArg, « kValue, 𝔽(k), O »)). ... 7. Return -1𝔽. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, array-find-from-last] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([1n, 2n, 3n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1n, 2n, 3n])); var called = 0; var result = sample.findLastIndex(function() { diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/callbackfn-resize.js b/test/built-ins/TypedArray/prototype/findLastIndex/callbackfn-resize.js index c00ba1967d9..6c660a419a8 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/callbackfn-resize.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/callbackfn-resize.js @@ -70,4 +70,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.sameValue(result, -1, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/detached-buffer.js b/test/built-ins/TypedArray/prototype/findLastIndex/detached-buffer.js index bc4d0344c17..f2e9c00f1bd 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/detached-buffer.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.findLastIndex(predicate); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/get-length-ignores-length-prop.js b/test/built-ins/TypedArray/prototype/findLastIndex/get-length-ignores-length-prop.js index 7017a91aa80..94c3671dc35 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/get-length-ignores-length-prop.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/get-length-ignores-length-prop.js @@ -20,14 +20,14 @@ Object.defineProperty(TypedArray.prototype, "length", { } }); -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { Object.defineProperty(TA.prototype, "length", { get: function() { throw new Test262Error(); } }); - var sample = new TA([42]); + var sample = new TA(makeCtorArg([42])); Object.defineProperty(sample, "length", { get: function() { @@ -40,4 +40,4 @@ testWithTypedArrayConstructors(function(TA) { sample.findLastIndex(function() { return true; }), 0 ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-changes-value.js b/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-changes-value.js index 5449cc1ba09..93e98e4e010 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-changes-value.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-changes-value.js @@ -16,12 +16,12 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray, array-find-from-last] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var arr = [10, 20, 30]; var sample; var result; - sample = new TA(3); + sample = new TA(makeCtorArg(3)); sample.findLastIndex(function(val, i) { sample[i] = arr[i]; @@ -55,4 +55,4 @@ testWithTypedArrayConstructors(function(TA) { return val === 7; }); assert.sameValue(result, -1, "value not found - changed after call"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-parameters.js b/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-parameters.js index 3b9d5a6e22d..d0ab7fcbfb9 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-parameters.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-parameters.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js] features: [TypedArray, array-find-from-last] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([39, 2, 62]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([39, 2, 62])); var results = []; var result; diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-this-non-strict.js b/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-this-non-strict.js index 5cbfaa30852..73df9d7113b 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-this-non-strict.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-this-non-strict.js @@ -20,8 +20,8 @@ features: [TypedArray, array-find-from-last] var T = this; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var result; sample.findLastIndex(function() { diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-this-strict.js b/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-this-strict.js index 9679ca642d1..49823d3077b 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-this-strict.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-this-strict.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [TypedArray, array-find-from-last] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); var result; sample.findLastIndex(function() { diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/predicate-is-not-callable-throws.js b/test/built-ins/TypedArray/prototype/findLastIndex/predicate-is-not-callable-throws.js index 9558dce212d..ec7ecacf88a 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/predicate-is-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/predicate-is-not-callable-throws.js @@ -51,5 +51,5 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.findLastIndex(/./); }, "/./"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/predicate-may-detach-buffer.js b/test/built-ins/TypedArray/prototype/findLastIndex/predicate-may-detach-buffer.js index a1e536465a6..147f64162e1 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/predicate-may-detach-buffer.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/predicate-may-detach-buffer.js @@ -34,4 +34,4 @@ testWithTypedArrayConstructors(function(TA) { loops++; }); assert.sameValue(loops, 2, "predicate is called once"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/predicate-not-called-on-empty-array.js b/test/built-ins/TypedArray/prototype/findLastIndex/predicate-not-called-on-empty-array.js index 66c00b9ca8f..18d6c80db1b 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/predicate-not-called-on-empty-array.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/predicate-not-called-on-empty-array.js @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { result, -1, "returns -1 on an empty instance" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/return-abrupt-from-predicate-call.js b/test/built-ins/TypedArray/prototype/findLastIndex/return-abrupt-from-predicate-call.js index 9610fec98ff..cf3ecfb84ab 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/return-abrupt-from-predicate-call.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/return-abrupt-from-predicate-call.js @@ -21,8 +21,8 @@ var predicate = function() { throw new Test262Error(); }; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(Test262Error, function() { sample.findLastIndex(predicate); }); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/findLastIndex/return-abrupt-from-this-out-of-bounds.js index b2f3c11f056..afa746ec460 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.findLastIndex(() => {}); throw new Test262Error('findLastIndex completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/return-index-predicate-result-is-true.js b/test/built-ins/TypedArray/prototype/findLastIndex/return-index-predicate-result-is-true.js index 9bbe02627e4..18c2f71ca34 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/return-index-predicate-result-is-true.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/return-index-predicate-result-is-true.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray, array-find-from-last] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([39, 3, 9]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([39, 3, 9])); var called = 0; var result = sample.findLastIndex(function() { diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/return-negative-one-if-predicate-returns-false-value.js b/test/built-ins/TypedArray/prototype/findLastIndex/return-negative-one-if-predicate-returns-false-value.js index 32d3c825819..46c54b5f48a 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/return-negative-one-if-predicate-returns-false-value.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/return-negative-one-if-predicate-returns-false-value.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [TypedArray, array-find-from-last] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([1, 2, 3]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1, 2, 3])); var called = 0; var result = sample.findLastIndex(function() { diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/arraylength-internal.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/arraylength-internal.js index c5d14f29ef6..fbe8544d5f3 100644 --- a/test/built-ins/TypedArray/prototype/forEach/BigInt/arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/arraylength-internal.js @@ -11,12 +11,12 @@ info: | algorithm as Array.prototype.forEach as defined in 22.1.3.10 except that the this object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of "length" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample1 = new TA(42); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg(42)); var loop = 0; Object.defineProperty(sample1, "length", {value: 1}); @@ -27,7 +27,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(loop, 42, "data descriptor"); - var sample2 = new TA(7); + var sample2 = new TA(makeCtorArg(7)); loop = 0; Object.defineProperty(sample2, "length", { @@ -43,5 +43,5 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(loop, 7, "accessor descriptor"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-with-thisarg.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-with-thisarg.js index 07478cadfcc..40acae626e0 100644 --- a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-with-thisarg.js +++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-with-thisarg.js @@ -21,12 +21,12 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Perform ? Call(callbackfn, T, « kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var results = []; var thisArg = ["test262", 0, "ecma262", 0]; diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-without-thisarg.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-without-thisarg.js index 6b6bdec5ce8..c525dc13858 100644 --- a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-without-thisarg.js +++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-without-thisarg.js @@ -21,12 +21,12 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Perform ? Call(callbackfn, T, « kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-detachbuffer.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-detachbuffer.js index bc8e60c2794..cfb457f8072 100644 --- a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-detachbuffer.js +++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-detachbuffer.js @@ -21,7 +21,7 @@ info: | ... ii. Perform ? Call(callbackfn, T, « kValue, k, O »). ... -includes: [detachArrayBuffer.js, testBigIntTypedArray.js] +includes: [detachArrayBuffer.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -37,4 +37,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-is-not-callable.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-is-not-callable.js index 2198725107e..5468e21072a 100644 --- a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-is-not-callable.js +++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-is-not-callable.js @@ -17,12 +17,12 @@ info: | ... 3. If IsCallable(callbackfn) is false, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); assert.throws(TypeError, function() { sample.forEach(); diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-no-interaction-over-non-integer.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-no-interaction-over-non-integer.js index 9edd63e0980..759c770e930 100644 --- a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-no-interaction-over-non-integer.js +++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-no-interaction-over-non-integer.js @@ -15,12 +15,12 @@ info: | ... ii. Perform ? Call(callbackfn, T, « kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([7n, 8n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7n, 8n])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-not-called-on-empty.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-not-called-on-empty.js index f81f5ac40c8..72e719d82a2 100644 --- a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-not-called-on-empty.js +++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-not-called-on-empty.js @@ -21,7 +21,7 @@ info: | ... ii. Perform ? Call(callbackfn, T, « kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -33,4 +33,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-return-does-not-change-instance.js index 341a7decd47..40c068dbfe0 100644 --- a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-return-does-not-change-instance.js +++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-return-does-not-change-instance.js @@ -11,14 +11,12 @@ info: | algorithm as Array.prototype.forEach as defined in 22.1.3.10 except that the this object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of "length" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample1 = new TA(3); - - sample1[1] = 1n; +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg(["0", "1", "0"])); sample1.forEach(function() { return 42; diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-returns-abrupt.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-returns-abrupt.js index fb9c58a2012..7fd2a97647d 100644 --- a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-returns-abrupt.js +++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-returns-abrupt.js @@ -21,12 +21,12 @@ info: | ... ii. Perform ? Call(callbackfn, T, « kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); assert.throws(Test262Error, function() { sample.forEach(function() { diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-set-value-during-interaction.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-set-value-during-interaction.js index 13bd7fb011d..68c2937d56a 100644 --- a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-set-value-during-interaction.js +++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-set-value-during-interaction.js @@ -12,12 +12,12 @@ info: | algorithm as Array.prototype.forEach as defined in 22.1.3.10 except that the this object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of "length" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect.set, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var newVal = 0n; sample.forEach(function(val, i) { @@ -44,4 +44,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(sample[0], 7n, "changed values after iteration [0] == 7"); assert.sameValue(sample[1], 1n, "changed values after iteration [1] == 1"); assert.sameValue(sample[2], 2n, "changed values after iteration [2] == 2"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-this.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-this.js index df900d1250e..6cdd1408bbe 100644 --- a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-this.js +++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-this.js @@ -23,15 +23,15 @@ info: | ... ii. Perform ? Call(callbackfn, T, « kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ var expected = (function() { return this; })(); var thisArg = {}; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var results1 = []; diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/detached-buffer.js index fe196e0cb9e..b8acbcc4b28 100644 --- a/test/built-ins/TypedArray/prototype/forEach/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.forEach(callbackfn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/return-abrupt-from-this-out-of-bounds.js index 90b49a5f74d..1f0bf59a797 100644 --- a/test/built-ins/TypedArray/prototype/forEach/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.foreach description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.forEach(() => {}); throw new Test262Error('forEach completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/returns-undefined.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/returns-undefined.js index 467825d2779..c730d7c172d 100644 --- a/test/built-ins/TypedArray/prototype/forEach/BigInt/returns-undefined.js +++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/returns-undefined.js @@ -11,12 +11,12 @@ info: | algorithm as Array.prototype.forEach as defined in 22.1.3.10 except that the this object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of "length" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample1 = new TA(42); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg(42)); var result1 = sample1.forEach(function() { return 42; @@ -24,7 +24,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(result1, undefined, "result1"); - var sample2 = new TA(1); + var sample2 = new TA(makeCtorArg(1)); var result2 = sample2.forEach(function() { return null; }); diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/values-are-not-cached.js index 1fcc724f810..81208159c8c 100644 --- a/test/built-ins/TypedArray/prototype/forEach/BigInt/values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/values-are-not-cached.js @@ -12,12 +12,12 @@ info: | algorithm as Array.prototype.forEach as defined in 22.1.3.10 except that the this object's [[ArrayLength]] internal slot is accessed in place of performing a [[Get]] of "length" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); sample.forEach(function(v, i) { if (i < sample.length - 1) { @@ -28,4 +28,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { v, 42n, "method does not cache values before callbackfn calls" ); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/forEach/arraylength-internal.js b/test/built-ins/TypedArray/prototype/forEach/arraylength-internal.js index d387ae038dc..ba7e08bf46b 100644 --- a/test/built-ins/TypedArray/prototype/forEach/arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/forEach/arraylength-internal.js @@ -15,8 +15,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample1 = new TA(42); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg(42)); var loop = 0; Object.defineProperty(sample1, "length", {value: 1}); @@ -27,7 +27,7 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(loop, 42, "data descriptor"); - var sample2 = new TA(7); + var sample2 = new TA(makeCtorArg(7)); loop = 0; Object.defineProperty(sample2, "length", { @@ -43,5 +43,5 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(loop, 7, "accessor descriptor"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/forEach/callbackfn-arguments-with-thisarg.js b/test/built-ins/TypedArray/prototype/forEach/callbackfn-arguments-with-thisarg.js index 13ae208be2a..fb3e8c2a6bf 100644 --- a/test/built-ins/TypedArray/prototype/forEach/callbackfn-arguments-with-thisarg.js +++ b/test/built-ins/TypedArray/prototype/forEach/callbackfn-arguments-with-thisarg.js @@ -25,8 +25,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var results = []; var thisArg = ["test262", 0, "ecma262", 0]; diff --git a/test/built-ins/TypedArray/prototype/forEach/callbackfn-arguments-without-thisarg.js b/test/built-ins/TypedArray/prototype/forEach/callbackfn-arguments-without-thisarg.js index 1255dbf2b91..2b9649361e2 100644 --- a/test/built-ins/TypedArray/prototype/forEach/callbackfn-arguments-without-thisarg.js +++ b/test/built-ins/TypedArray/prototype/forEach/callbackfn-arguments-without-thisarg.js @@ -25,8 +25,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/forEach/callbackfn-detachbuffer.js b/test/built-ins/TypedArray/prototype/forEach/callbackfn-detachbuffer.js index 2d2936d4eb9..d2a8a31d7ea 100644 --- a/test/built-ins/TypedArray/prototype/forEach/callbackfn-detachbuffer.js +++ b/test/built-ins/TypedArray/prototype/forEach/callbackfn-detachbuffer.js @@ -37,4 +37,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/forEach/callbackfn-is-not-callable.js b/test/built-ins/TypedArray/prototype/forEach/callbackfn-is-not-callable.js index e18e96d81fc..0329c584faa 100644 --- a/test/built-ins/TypedArray/prototype/forEach/callbackfn-is-not-callable.js +++ b/test/built-ins/TypedArray/prototype/forEach/callbackfn-is-not-callable.js @@ -21,8 +21,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); assert.throws(TypeError, function() { sample.forEach(); diff --git a/test/built-ins/TypedArray/prototype/forEach/callbackfn-no-interaction-over-non-integer.js b/test/built-ins/TypedArray/prototype/forEach/callbackfn-no-interaction-over-non-integer.js index 4056d65f487..22ec2afdfd6 100644 --- a/test/built-ins/TypedArray/prototype/forEach/callbackfn-no-interaction-over-non-integer.js +++ b/test/built-ins/TypedArray/prototype/forEach/callbackfn-no-interaction-over-non-integer.js @@ -19,8 +19,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([7, 8]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7, 8])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/forEach/callbackfn-not-called-on-empty.js b/test/built-ins/TypedArray/prototype/forEach/callbackfn-not-called-on-empty.js index dec156b66d7..c039fff8dd4 100644 --- a/test/built-ins/TypedArray/prototype/forEach/callbackfn-not-called-on-empty.js +++ b/test/built-ins/TypedArray/prototype/forEach/callbackfn-not-called-on-empty.js @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/forEach/callbackfn-resize.js b/test/built-ins/TypedArray/prototype/forEach/callbackfn-resize.js index 50d8b93795f..c1ac2dcf27a 100644 --- a/test/built-ins/TypedArray/prototype/forEach/callbackfn-resize.js +++ b/test/built-ins/TypedArray/prototype/forEach/callbackfn-resize.js @@ -68,4 +68,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.sameValue(result, undefined, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/forEach/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/forEach/callbackfn-return-does-not-change-instance.js index 19584f11235..b0c0e5d7f7f 100644 --- a/test/built-ins/TypedArray/prototype/forEach/callbackfn-return-does-not-change-instance.js +++ b/test/built-ins/TypedArray/prototype/forEach/callbackfn-return-does-not-change-instance.js @@ -15,10 +15,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample1 = new TA(3); - - sample1[1] = 1; +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg(["0", "1", "0"])); sample1.forEach(function() { return 42; diff --git a/test/built-ins/TypedArray/prototype/forEach/callbackfn-returns-abrupt.js b/test/built-ins/TypedArray/prototype/forEach/callbackfn-returns-abrupt.js index e9f95ad9893..71b427d97a2 100644 --- a/test/built-ins/TypedArray/prototype/forEach/callbackfn-returns-abrupt.js +++ b/test/built-ins/TypedArray/prototype/forEach/callbackfn-returns-abrupt.js @@ -25,8 +25,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); assert.throws(Test262Error, function() { sample.forEach(function() { diff --git a/test/built-ins/TypedArray/prototype/forEach/callbackfn-set-value-during-interaction.js b/test/built-ins/TypedArray/prototype/forEach/callbackfn-set-value-during-interaction.js index 8cae0a4c58d..a218c7e9345 100644 --- a/test/built-ins/TypedArray/prototype/forEach/callbackfn-set-value-during-interaction.js +++ b/test/built-ins/TypedArray/prototype/forEach/callbackfn-set-value-during-interaction.js @@ -16,8 +16,8 @@ includes: [testTypedArray.js] features: [Reflect.set, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var newVal = 0; sample.forEach(function(val, i) { @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(sample[0], 7, "changed values after iteration [0] == 7"); assert.sameValue(sample[1], 1, "changed values after iteration [1] == 1"); assert.sameValue(sample[2], 2, "changed values after iteration [2] == 2"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/forEach/callbackfn-this.js b/test/built-ins/TypedArray/prototype/forEach/callbackfn-this.js index 926a219bcd2..b72812c7eb9 100644 --- a/test/built-ins/TypedArray/prototype/forEach/callbackfn-this.js +++ b/test/built-ins/TypedArray/prototype/forEach/callbackfn-this.js @@ -30,8 +30,8 @@ features: [TypedArray] var expected = (function() { return this; })(); var thisArg = {}; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var results1 = []; diff --git a/test/built-ins/TypedArray/prototype/forEach/detached-buffer.js b/test/built-ins/TypedArray/prototype/forEach/detached-buffer.js index 1642aca64af..9415d549606 100644 --- a/test/built-ins/TypedArray/prototype/forEach/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/forEach/detached-buffer.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.forEach(callbackfn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/forEach/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/forEach/return-abrupt-from-this-out-of-bounds.js index 970aba1a545..3df93df3da3 100644 --- a/test/built-ins/TypedArray/prototype/forEach/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/forEach/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.forEach(() => {}); throw new Test262Error('forEach completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/forEach/returns-undefined.js b/test/built-ins/TypedArray/prototype/forEach/returns-undefined.js index a9fc9f4d4d6..4be3ebd4a72 100644 --- a/test/built-ins/TypedArray/prototype/forEach/returns-undefined.js +++ b/test/built-ins/TypedArray/prototype/forEach/returns-undefined.js @@ -15,8 +15,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample1 = new TA(42); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg(42)); var result1 = sample1.forEach(function() { return 42; @@ -24,7 +24,7 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(result1, undefined, "result1"); - var sample2 = new TA(1); + var sample2 = new TA(makeCtorArg(1)); var result2 = sample2.forEach(function() { return null; }); diff --git a/test/built-ins/TypedArray/prototype/forEach/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/forEach/values-are-not-cached.js index 10b31135622..4d69907917b 100644 --- a/test/built-ins/TypedArray/prototype/forEach/values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/forEach/values-are-not-cached.js @@ -16,8 +16,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); sample.forEach(function(v, i) { if (i < sample.length - 1) { @@ -28,4 +28,4 @@ testWithTypedArrayConstructors(function(TA) { v, 42, "method does not cache values before callbackfn calls" ); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer-during-fromIndex-returns-false-for-zero.js b/test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer-during-fromIndex-returns-false-for-zero.js index 286a0e4e367..c45405bf86d 100644 --- a/test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer-during-fromIndex-returns-false-for-zero.js +++ b/test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer-during-fromIndex-returns-false-for-zero.js @@ -29,7 +29,7 @@ info: | Set k to k + 1. Return false. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -43,4 +43,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }; assert.sameValue(sample.includes(0n, fromIndex), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer-during-fromIndex-returns-true-for-undefined.js b/test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer-during-fromIndex-returns-true-for-undefined.js index 329985324f7..9b79efad06b 100644 --- a/test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer-during-fromIndex-returns-true-for-undefined.js +++ b/test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer-during-fromIndex-returns-true-for-undefined.js @@ -30,7 +30,7 @@ info: | Set k to k + 1. Return false. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -44,4 +44,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }; assert.sameValue(sample.includes(undefined, fromIndex), true); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer.js index 0239cca34aa..8944bbed0a0 100644 --- a/test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.includes(0n); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-equal-or-greater-length-returns-false.js b/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-equal-or-greater-length-returns-false.js index a36d4d415b6..314de5302cb 100644 --- a/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-equal-or-greater-length-returns-false.js +++ b/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-equal-or-greater-length-returns-false.js @@ -23,14 +23,14 @@ info: | 7. Repeat, while k < len ... 8. Return false. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA(42); + sample = new TA(makeCtorArg(42)); assert.sameValue(sample.includes(0n, 42), false); assert.sameValue(sample.includes(0n, 43), false); }); diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-infinity.js b/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-infinity.js index 56dd735154c..ab13c06d995 100644 --- a/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-infinity.js +++ b/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-infinity.js @@ -25,12 +25,12 @@ info: | 7. Repeat, while k < len ... 8. Return false. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 43n, 41n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 43n, 41n])); assert.sameValue( sample.includes(43n, Infinity), diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-minus-zero.js b/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-minus-zero.js index 83ee261a78a..cd8fe7cfb68 100644 --- a/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-minus-zero.js +++ b/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-minus-zero.js @@ -20,14 +20,14 @@ info: | ... 7. Repeat, while k < len ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42n, 43n]); + sample = new TA(makeCtorArg([42n, 43n])); assert.sameValue(sample.includes(42n, -0), true, "-0 [0]"); assert.sameValue(sample.includes(43n, -0), true, "-0 [1]"); assert.sameValue(sample.includes(44n, -0), false, "-0 [2]"); diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/includes/BigInt/get-length-uses-internal-arraylength.js index 2117ea212fa..9bbc20a07d8 100644 --- a/test/built-ins/TypedArray/prototype/includes/BigInt/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/includes/BigInt/get-length-uses-internal-arraylength.js @@ -17,17 +17,17 @@ info: | ... 2. Let len be ? ToLength(? Get(O, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ Object.defineProperty(TypedArray.prototype, "length", {value: 0}); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([7n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7n])); Object.defineProperty(TA.prototype, "length", {value: 0}); Object.defineProperty(sample, "length", {value: 0}); assert.sameValue(sample.includes(7n), true); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/length-zero-returns-false.js b/test/built-ins/TypedArray/prototype/includes/BigInt/length-zero-returns-false.js index 1ceaa37bc91..af723ed08f8 100644 --- a/test/built-ins/TypedArray/prototype/includes/BigInt/length-zero-returns-false.js +++ b/test/built-ins/TypedArray/prototype/includes/BigInt/length-zero-returns-false.js @@ -18,7 +18,7 @@ info: | 2. Let len be ? ToLength(? Get(O, "length")). 3. If len is 0, return false. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.includes(0n, fromIndex), false, "length is checked before ToInteger(fromIndex)" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-from-this-out-of-bounds.js index 1d675373903..7ff5b70282d 100644 --- a/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.includes description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.includes(0n); throw new Test262Error('includes completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex-symbol.js b/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex-symbol.js index 0625bfbcf03..c547ada563e 100644 --- a/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex-symbol.js +++ b/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex-symbol.js @@ -18,14 +18,14 @@ info: | 4. Let n be ? ToInteger(fromIndex). (If fromIndex is undefined, this step produces the value 0.) ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ var fromIndex = Symbol("1"); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([7n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7n])); assert.throws(TypeError, function() { sample.includes(7n, fromIndex); diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex.js index 1013df57eb0..f2e56dacff3 100644 --- a/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex.js +++ b/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex.js @@ -18,7 +18,7 @@ info: | 4. Let n be ? ToInteger(fromIndex). (If fromIndex is undefined, this step produces the value 0.) ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -28,8 +28,8 @@ var fromIndex = { } }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([7n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7n])); assert.throws(Test262Error, function() { sample.includes(7n, fromIndex); diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/search-found-returns-true.js b/test/built-ins/TypedArray/prototype/includes/BigInt/search-found-returns-true.js index 3d1140a0ad2..0673e4d15b2 100644 --- a/test/built-ins/TypedArray/prototype/includes/BigInt/search-found-returns-true.js +++ b/test/built-ins/TypedArray/prototype/includes/BigInt/search-found-returns-true.js @@ -25,12 +25,12 @@ info: | b. If SameValueZero(searchElement, elementK) is true, return true. c. Increase k by 1. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 42n, 41n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 42n, 41n])); assert.sameValue(sample.includes(42n), true, "includes(42)"); assert.sameValue(sample.includes(43n), true, "includes(43)"); assert.sameValue(sample.includes(43n, 1), true, "includes(43, 1)"); diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/search-not-found-returns-false.js b/test/built-ins/TypedArray/prototype/includes/BigInt/search-not-found-returns-false.js index 9d4673e8c50..96619748dab 100644 --- a/test/built-ins/TypedArray/prototype/includes/BigInt/search-not-found-returns-false.js +++ b/test/built-ins/TypedArray/prototype/includes/BigInt/search-not-found-returns-false.js @@ -25,14 +25,14 @@ info: | b. If SameValueZero(searchElement, elementK) is true, return true. c. Increase k by 1. 8. Return false. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42n, 43n, 42n, 41n]); + sample = new TA(makeCtorArg([42n, 43n, 42n, 41n])); assert.sameValue(sample.includes(44n), false, "includes(44)"); assert.sameValue(sample.includes(43n, 2), false, "includes(43, 2)"); assert.sameValue(sample.includes(42n, 3), false, "includes(42, 3)"); diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/includes/BigInt/tointeger-fromindex.js index 4c5872be6ea..a2ddd1c0981 100644 --- a/test/built-ins/TypedArray/prototype/includes/BigInt/tointeger-fromindex.js +++ b/test/built-ins/TypedArray/prototype/includes/BigInt/tointeger-fromindex.js @@ -25,7 +25,7 @@ info: | b. If SameValueZero(searchElement, elementK) is true, return true. c. Increase k by 1. 8. Return false. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -35,10 +35,10 @@ var obj = { } }; -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42n, 43n]); + sample = new TA(makeCtorArg([42n, 43n])); assert.sameValue(sample.includes(42n, "1"), false, "string [0]"); assert.sameValue(sample.includes(43n, "1"), true, "string [1]"); diff --git a/test/built-ins/TypedArray/prototype/includes/detached-buffer-during-fromIndex-returns-false-for-zero.js b/test/built-ins/TypedArray/prototype/includes/detached-buffer-during-fromIndex-returns-false-for-zero.js index 6ac449e9a17..c8cac5d0dde 100644 --- a/test/built-ins/TypedArray/prototype/includes/detached-buffer-during-fromIndex-returns-false-for-zero.js +++ b/test/built-ins/TypedArray/prototype/includes/detached-buffer-during-fromIndex-returns-false-for-zero.js @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA) { }; assert.sameValue(sample.includes(0, fromIndex), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/includes/detached-buffer-during-fromIndex-returns-true-for-undefined.js b/test/built-ins/TypedArray/prototype/includes/detached-buffer-during-fromIndex-returns-true-for-undefined.js index e524e28759f..de8a5f95249 100644 --- a/test/built-ins/TypedArray/prototype/includes/detached-buffer-during-fromIndex-returns-true-for-undefined.js +++ b/test/built-ins/TypedArray/prototype/includes/detached-buffer-during-fromIndex-returns-true-for-undefined.js @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA) { }; assert.sameValue(sample.includes(undefined, fromIndex), true); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/includes/detached-buffer.js b/test/built-ins/TypedArray/prototype/includes/detached-buffer.js index 74ee7fab1b1..864871778c7 100644 --- a/test/built-ins/TypedArray/prototype/includes/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/includes/detached-buffer.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.includes(0); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/includes/fromIndex-equal-or-greater-length-returns-false.js b/test/built-ins/TypedArray/prototype/includes/fromIndex-equal-or-greater-length-returns-false.js index 8b4e4be671d..98a94aae758 100644 --- a/test/built-ins/TypedArray/prototype/includes/fromIndex-equal-or-greater-length-returns-false.js +++ b/test/built-ins/TypedArray/prototype/includes/fromIndex-equal-or-greater-length-returns-false.js @@ -27,10 +27,10 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA(42); + sample = new TA(makeCtorArg(42)); assert.sameValue(sample.includes(0, 42), false); assert.sameValue(sample.includes(0, 43), false); }); diff --git a/test/built-ins/TypedArray/prototype/includes/fromIndex-infinity.js b/test/built-ins/TypedArray/prototype/includes/fromIndex-infinity.js index b9af6be5058..05f77499352 100644 --- a/test/built-ins/TypedArray/prototype/includes/fromIndex-infinity.js +++ b/test/built-ins/TypedArray/prototype/includes/fromIndex-infinity.js @@ -29,8 +29,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 43, 41]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 43, 41])); assert.sameValue( sample.includes(43, Infinity), diff --git a/test/built-ins/TypedArray/prototype/includes/fromIndex-minus-zero.js b/test/built-ins/TypedArray/prototype/includes/fromIndex-minus-zero.js index be2fedf7c29..791c0a81dfb 100644 --- a/test/built-ins/TypedArray/prototype/includes/fromIndex-minus-zero.js +++ b/test/built-ins/TypedArray/prototype/includes/fromIndex-minus-zero.js @@ -24,10 +24,10 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42, 43]); + sample = new TA(makeCtorArg([42, 43])); assert.sameValue(sample.includes(42, -0), true, "-0 [0]"); assert.sameValue(sample.includes(43, -0), true, "-0 [1]"); assert.sameValue(sample.includes(44, -0), false, "-0 [2]"); diff --git a/test/built-ins/TypedArray/prototype/includes/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/includes/get-length-uses-internal-arraylength.js index eb10a80bd07..72082866cc4 100644 --- a/test/built-ins/TypedArray/prototype/includes/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/includes/get-length-uses-internal-arraylength.js @@ -23,11 +23,11 @@ features: [TypedArray] Object.defineProperty(TypedArray.prototype, "length", {value: 0}); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([7]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7])); Object.defineProperty(TA.prototype, "length", {value: 0}); Object.defineProperty(sample, "length", {value: 0}); assert.sameValue(sample.includes(7), true); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/includes/length-zero-returns-false.js b/test/built-ins/TypedArray/prototype/includes/length-zero-returns-false.js index a922a98b7a9..0bafd9f9f2a 100644 --- a/test/built-ins/TypedArray/prototype/includes/length-zero-returns-false.js +++ b/test/built-ins/TypedArray/prototype/includes/length-zero-returns-false.js @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { sample.includes(0, fromIndex), false, "length is checked before ToInteger(fromIndex)" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/includes/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/includes/return-abrupt-from-this-out-of-bounds.js index ef72514b70d..3d97cbc085e 100644 --- a/test/built-ins/TypedArray/prototype/includes/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/includes/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.includes(0); throw new Test262Error('includes completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/includes/return-abrupt-tointeger-fromindex-symbol.js b/test/built-ins/TypedArray/prototype/includes/return-abrupt-tointeger-fromindex-symbol.js index 5e5364d5bdb..58228e2089c 100644 --- a/test/built-ins/TypedArray/prototype/includes/return-abrupt-tointeger-fromindex-symbol.js +++ b/test/built-ins/TypedArray/prototype/includes/return-abrupt-tointeger-fromindex-symbol.js @@ -24,8 +24,8 @@ features: [Symbol, TypedArray] var fromIndex = Symbol("1"); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([7]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7])); assert.throws(TypeError, function() { sample.includes(7, fromIndex); diff --git a/test/built-ins/TypedArray/prototype/includes/return-abrupt-tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/includes/return-abrupt-tointeger-fromindex.js index b17b6e34328..1d48b13bcdc 100644 --- a/test/built-ins/TypedArray/prototype/includes/return-abrupt-tointeger-fromindex.js +++ b/test/built-ins/TypedArray/prototype/includes/return-abrupt-tointeger-fromindex.js @@ -28,8 +28,8 @@ var fromIndex = { } }; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([7]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7])); assert.throws(Test262Error, function() { sample.includes(7, fromIndex); diff --git a/test/built-ins/TypedArray/prototype/includes/samevaluezero.js b/test/built-ins/TypedArray/prototype/includes/samevaluezero.js index c7acea1cc68..53cf9e62c27 100644 --- a/test/built-ins/TypedArray/prototype/includes/samevaluezero.js +++ b/test/built-ins/TypedArray/prototype/includes/samevaluezero.js @@ -24,8 +24,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 0, 1, undefined]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 0, 1, undefined])); assert.sameValue(sample.includes(), false, "no arg"); assert.sameValue(sample.includes(undefined), false, "undefined"); assert.sameValue(sample.includes("42"), false, "'42'"); @@ -38,7 +38,7 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(sample.includes(""), false, "empty string"); }); -testWithTypedArrayConstructors(function(FloatArray) { - var sample = new FloatArray([42, 0, 1, undefined, NaN]); +testWithTypedArrayConstructors(function(FloatArray, makeCtorArg) { + var sample = new FloatArray(makeCtorArg([42, 0, 1, undefined, NaN])); assert.sameValue(sample.includes(NaN), true, "NaN"); }, floatArrayConstructors); diff --git a/test/built-ins/TypedArray/prototype/includes/search-found-returns-true.js b/test/built-ins/TypedArray/prototype/includes/search-found-returns-true.js index e77ace2609b..43170c7b665 100644 --- a/test/built-ins/TypedArray/prototype/includes/search-found-returns-true.js +++ b/test/built-ins/TypedArray/prototype/includes/search-found-returns-true.js @@ -29,8 +29,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 42, 41]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 42, 41])); assert.sameValue(sample.includes(42), true, "includes(42)"); assert.sameValue(sample.includes(43), true, "includes(43)"); assert.sameValue(sample.includes(43, 1), true, "includes(43, 1)"); diff --git a/test/built-ins/TypedArray/prototype/includes/search-not-found-returns-false.js b/test/built-ins/TypedArray/prototype/includes/search-not-found-returns-false.js index 4000cd39b6c..61402531a8a 100644 --- a/test/built-ins/TypedArray/prototype/includes/search-not-found-returns-false.js +++ b/test/built-ins/TypedArray/prototype/includes/search-not-found-returns-false.js @@ -29,10 +29,10 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42, 43, 42, 41]); + sample = new TA(makeCtorArg([42, 43, 42, 41])); assert.sameValue(sample.includes(44), false, "includes(44)"); assert.sameValue(sample.includes(43, 2), false, "includes(43, 2)"); assert.sameValue(sample.includes(42, 3), false, "includes(42, 3)"); diff --git a/test/built-ins/TypedArray/prototype/includes/search-undefined-after-shrinking-buffer-index-is-oob.js b/test/built-ins/TypedArray/prototype/includes/search-undefined-after-shrinking-buffer-index-is-oob.js index 8d59d04e1cc..4de13d20cf8 100644 --- a/test/built-ins/TypedArray/prototype/includes/search-undefined-after-shrinking-buffer-index-is-oob.js +++ b/test/built-ins/TypedArray/prototype/includes/search-undefined-after-shrinking-buffer-index-is-oob.js @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(TA => { assert.sameValue(result, false); assert.sameValue(ta.length, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/includes/search-undefined-after-shrinking-buffer.js b/test/built-ins/TypedArray/prototype/includes/search-undefined-after-shrinking-buffer.js index d91d8245bf5..1e529cd1fd6 100644 --- a/test/built-ins/TypedArray/prototype/includes/search-undefined-after-shrinking-buffer.js +++ b/test/built-ins/TypedArray/prototype/includes/search-undefined-after-shrinking-buffer.js @@ -41,4 +41,4 @@ testWithTypedArrayConstructors(TA => { assert.sameValue(result, true); assert.sameValue(ta.length, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/includes/searchelement-not-integer.js b/test/built-ins/TypedArray/prototype/includes/searchelement-not-integer.js index 56830b1298a..f01191e2090 100644 --- a/test/built-ins/TypedArray/prototype/includes/searchelement-not-integer.js +++ b/test/built-ins/TypedArray/prototype/includes/searchelement-not-integer.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(10); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(10)); function throwFunc(){ throw Test262Error() return 0; diff --git a/test/built-ins/TypedArray/prototype/includes/tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/includes/tointeger-fromindex.js index 9a2be979f34..265b8e05032 100644 --- a/test/built-ins/TypedArray/prototype/includes/tointeger-fromindex.js +++ b/test/built-ins/TypedArray/prototype/includes/tointeger-fromindex.js @@ -35,10 +35,10 @@ var obj = { } }; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42, 43]); + sample = new TA(makeCtorArg([42, 43])); assert.sameValue(sample.includes(42, "1"), false, "string [0]"); assert.sameValue(sample.includes(43, "1"), true, "string [1]"); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js index b147acc92e1..bb1774ee0bd 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js @@ -32,7 +32,7 @@ info: | Set k to k + 1. Return -1F. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -46,4 +46,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }; assert.sameValue(sample.indexOf(undefined, fromIndex), -1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js index b357ad216b8..1b877af2548 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js @@ -32,7 +32,7 @@ info: | Set k to k + 1. Return -1F. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -46,4 +46,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }; assert.sameValue(sample.indexOf(0n, fromIndex), -1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer.js index 757baf77c7c..acc7a76616a 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.indexOf(0n); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-equal-or-greater-length-returns-minus-one.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-equal-or-greater-length-returns-minus-one.js index a7bc3e50a0e..62e363494c1 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-equal-or-greater-length-returns-minus-one.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-equal-or-greater-length-returns-minus-one.js @@ -17,14 +17,14 @@ info: | 4. Let n be ? ToInteger(fromIndex). (If fromIndex is undefined, this step produces the value 0.) ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA(42); + sample = new TA(makeCtorArg(42)); assert.sameValue(sample.indexOf(0n, 42), -1); assert.sameValue(sample.indexOf(0n, 43), -1); }); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-infinity.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-infinity.js index 07bcd38a430..76ebca3a798 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-infinity.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-infinity.js @@ -27,12 +27,12 @@ info: | searchElement === elementK. iii. If same is true, return k. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 43n, 41n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 43n, 41n])); assert.sameValue(sample.indexOf(43n, Infinity), -1, "indexOf(43, Infinity)"); assert.sameValue(sample.indexOf(43n, -Infinity), 1, "indexOf(43, -Infinity)"); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-minus-zero.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-minus-zero.js index 90dc45150d9..812a7df659b 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-minus-zero.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-minus-zero.js @@ -17,14 +17,14 @@ info: | 6. If n ≥ 0, then a. If n is -0, let k be +0; else let k be n. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42n, 43n]); + sample = new TA(makeCtorArg([42n, 43n])); assert.sameValue(sample.indexOf(42n, -0), 0, "-0 [0]"); assert.sameValue(sample.indexOf(43n, -0), 1, "-0 [1]"); }); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/get-length-uses-internal-arraylength.js index 9c386b222f9..4ee82551145 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/get-length-uses-internal-arraylength.js @@ -16,17 +16,17 @@ info: | ... 2. Let len be ? ToLength(? Get(O, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ Object.defineProperty(TypedArray.prototype, "length", {value: 0}); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([7n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7n])); Object.defineProperty(TA.prototype, "length", {value: 0}); Object.defineProperty(sample, "length", {value: 0}); assert.sameValue(sample.indexOf(7n), 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/length-zero-returns-minus-one.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/length-zero-returns-minus-one.js index 2c679e49145..b43eaff9a32 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/length-zero-returns-minus-one.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/length-zero-returns-minus-one.js @@ -17,7 +17,7 @@ info: | 2. Let len be ? ToLength(? Get(O, "length")). 3. If len is 0, return -1. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -34,4 +34,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.indexOf(0n, fromIndex), -1, "length is checked before ToInteger(fromIndex)" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/no-arg.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/no-arg.js index 7e50fd370f2..a01d0d9d0b6 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/no-arg.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/no-arg.js @@ -16,14 +16,14 @@ info: | [...] 10. Return -1. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var ta1 = new TA(); assert.sameValue(ta1.indexOf(), -1); - var ta2 = new TA([0n, 1n, 2n]); + var ta2 = new TA(makeCtorArg([0n, 1n, 2n])); assert.sameValue(ta2.indexOf(), -1); }); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-from-this-out-of-bounds.js index 0b6a3389e0f..91eef820fdc 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.indexof description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.indexOf(0n); throw new Test262Error('indexOf completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-tointeger-fromindex-symbol.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-tointeger-fromindex-symbol.js index a4e3dfccbc1..5b995e3c2c5 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-tointeger-fromindex-symbol.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-tointeger-fromindex-symbol.js @@ -17,14 +17,14 @@ info: | 4. Let n be ? ToInteger(fromIndex). (If fromIndex is undefined, this step produces the value 0.) ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ var fromIndex = Symbol("1"); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(TypeError, function() { sample.indexOf(7n, fromIndex); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-tointeger-fromindex.js index f5063efa061..2788d43edf7 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-tointeger-fromindex.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-tointeger-fromindex.js @@ -17,7 +17,7 @@ info: | 4. Let n be ? ToInteger(fromIndex). (If fromIndex is undefined, this step produces the value 0.) ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -27,8 +27,8 @@ var fromIndex = { } }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(Test262Error, function() { sample.indexOf(7n, fromIndex); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/search-found-returns-index.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/search-found-returns-index.js index 484e16f5c71..4be9213892d 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/search-found-returns-index.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/search-found-returns-index.js @@ -27,12 +27,12 @@ info: | searchElement === elementK. iii. If same is true, return k. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 42n, 41n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 42n, 41n])); assert.sameValue(sample.indexOf(42n), 0, "indexOf(42)"); assert.sameValue(sample.indexOf(43n), 1, "indexOf(43)"); assert.sameValue(sample.indexOf(43n, 1), 1, "indexOf(43, 1)"); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/search-not-found-returns-minus-one.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/search-not-found-returns-minus-one.js index 2ef363213e3..64927f9dd8e 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/search-not-found-returns-minus-one.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/search-not-found-returns-minus-one.js @@ -21,14 +21,14 @@ info: | b. If k < 0, let k be 0. ... 9. Return -1. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42n, 43n, 42n, 41n]); + sample = new TA(makeCtorArg([42n, 43n, 42n, 41n])); assert.sameValue(sample.indexOf(44n), -1, "indexOf(44)"); assert.sameValue(sample.indexOf(43n, 2), -1, "indexOf(43, 2)"); assert.sameValue(sample.indexOf(42n, 3), -1, "indexOf(42, 3)"); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/tointeger-fromindex.js index dd62589c571..3cabb146037 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/tointeger-fromindex.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/tointeger-fromindex.js @@ -17,7 +17,7 @@ info: | 4. Let n be ? ToInteger(fromIndex). (If fromIndex is undefined, this step produces the value 0.) ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -27,10 +27,10 @@ var obj = { } }; -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42n, 43n]); + sample = new TA(makeCtorArg([42n, 43n])); assert.sameValue(sample.indexOf(42n, "1"), -1, "string [0]"); assert.sameValue(sample.indexOf(43n, "1"), 1, "string [1]"); diff --git a/test/built-ins/TypedArray/prototype/indexOf/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js b/test/built-ins/TypedArray/prototype/indexOf/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js index afc2df938d4..c05fc647ad2 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js +++ b/test/built-ins/TypedArray/prototype/indexOf/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js @@ -46,4 +46,4 @@ testWithTypedArrayConstructors(function(TA) { }; assert.sameValue(sample.indexOf(undefined, fromIndex), -1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/indexOf/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js b/test/built-ins/TypedArray/prototype/indexOf/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js index 4dc25bf11b6..fd044fbd3f5 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js +++ b/test/built-ins/TypedArray/prototype/indexOf/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js @@ -46,4 +46,4 @@ testWithTypedArrayConstructors(function(TA) { }; assert.sameValue(sample.indexOf(0, fromIndex), -1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/indexOf/detached-buffer.js b/test/built-ins/TypedArray/prototype/indexOf/detached-buffer.js index e7de290625b..573ddc0c800 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/indexOf/detached-buffer.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.indexOf(0); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/indexOf/fromIndex-equal-or-greater-length-returns-minus-one.js b/test/built-ins/TypedArray/prototype/indexOf/fromIndex-equal-or-greater-length-returns-minus-one.js index 5c96b94d633..591c541a470 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/fromIndex-equal-or-greater-length-returns-minus-one.js +++ b/test/built-ins/TypedArray/prototype/indexOf/fromIndex-equal-or-greater-length-returns-minus-one.js @@ -21,10 +21,10 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA(42); + sample = new TA(makeCtorArg(42)); assert.sameValue(sample.indexOf(0, 42), -1); assert.sameValue(sample.indexOf(0, 43), -1); }); diff --git a/test/built-ins/TypedArray/prototype/indexOf/fromIndex-infinity.js b/test/built-ins/TypedArray/prototype/indexOf/fromIndex-infinity.js index a048138c0e6..5fd0c39f942 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/fromIndex-infinity.js +++ b/test/built-ins/TypedArray/prototype/indexOf/fromIndex-infinity.js @@ -31,8 +31,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 43, 41]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 43, 41])); assert.sameValue(sample.indexOf(43, Infinity), -1, "indexOf(43, Infinity)"); assert.sameValue(sample.indexOf(43, -Infinity), 1, "indexOf(43, -Infinity)"); diff --git a/test/built-ins/TypedArray/prototype/indexOf/fromIndex-minus-zero.js b/test/built-ins/TypedArray/prototype/indexOf/fromIndex-minus-zero.js index 3e4dfae8f95..e1a0b87e0c4 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/fromIndex-minus-zero.js +++ b/test/built-ins/TypedArray/prototype/indexOf/fromIndex-minus-zero.js @@ -21,10 +21,10 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42, 43]); + sample = new TA(makeCtorArg([42, 43])); assert.sameValue(sample.indexOf(42, -0), 0, "-0 [0]"); assert.sameValue(sample.indexOf(43, -0), 1, "-0 [1]"); }); diff --git a/test/built-ins/TypedArray/prototype/indexOf/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/indexOf/get-length-uses-internal-arraylength.js index 2703a0519b6..52b8c43f4c1 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/indexOf/get-length-uses-internal-arraylength.js @@ -22,11 +22,11 @@ features: [TypedArray] Object.defineProperty(TypedArray.prototype, "length", {value: 0}); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([7]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7])); Object.defineProperty(TA.prototype, "length", {value: 0}); Object.defineProperty(sample, "length", {value: 0}); assert.sameValue(sample.indexOf(7), 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/indexOf/length-zero-returns-minus-one.js b/test/built-ins/TypedArray/prototype/indexOf/length-zero-returns-minus-one.js index 69914804065..53a8c4fca40 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/length-zero-returns-minus-one.js +++ b/test/built-ins/TypedArray/prototype/indexOf/length-zero-returns-minus-one.js @@ -34,4 +34,4 @@ testWithTypedArrayConstructors(function(TA) { sample.indexOf(0, fromIndex), -1, "length is checked before ToInteger(fromIndex)" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/indexOf/no-arg.js b/test/built-ins/TypedArray/prototype/indexOf/no-arg.js index 66bdedfb7a5..34eb88e925e 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/no-arg.js +++ b/test/built-ins/TypedArray/prototype/indexOf/no-arg.js @@ -20,10 +20,10 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var ta1 = new TA(); assert.sameValue(ta1.indexOf(), -1); - var ta2 = new TA([0, 1, 2]); + var ta2 = new TA(makeCtorArg([0, 1, 2])); assert.sameValue(ta2.indexOf(), -1); }); diff --git a/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-from-this-out-of-bounds.js index 9d656680cd8..fe078964fd9 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.indexOf(0); throw new Test262Error('indexOf completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-tointeger-fromindex-symbol.js b/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-tointeger-fromindex-symbol.js index f90cabc4ada..ccda72bb176 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-tointeger-fromindex-symbol.js +++ b/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-tointeger-fromindex-symbol.js @@ -23,8 +23,8 @@ features: [Symbol, TypedArray] var fromIndex = Symbol("1"); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(TypeError, function() { sample.indexOf(7, fromIndex); diff --git a/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-tointeger-fromindex.js index 0e969ae119f..4c15bb3b881 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-tointeger-fromindex.js +++ b/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-tointeger-fromindex.js @@ -27,8 +27,8 @@ var fromIndex = { } }; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(Test262Error, function() { sample.indexOf(7, fromIndex); diff --git a/test/built-ins/TypedArray/prototype/indexOf/search-found-returns-index.js b/test/built-ins/TypedArray/prototype/indexOf/search-found-returns-index.js index 48500c1a85b..4d5ad887e7e 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/search-found-returns-index.js +++ b/test/built-ins/TypedArray/prototype/indexOf/search-found-returns-index.js @@ -31,8 +31,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 42, 41]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 42, 41])); assert.sameValue(sample.indexOf(42), 0, "indexOf(42)"); assert.sameValue(sample.indexOf(43), 1, "indexOf(43)"); assert.sameValue(sample.indexOf(43, 1), 1, "indexOf(43, 1)"); diff --git a/test/built-ins/TypedArray/prototype/indexOf/search-not-found-returns-minus-one.js b/test/built-ins/TypedArray/prototype/indexOf/search-not-found-returns-minus-one.js index ee8f513dc86..b51ba39872b 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/search-not-found-returns-minus-one.js +++ b/test/built-ins/TypedArray/prototype/indexOf/search-not-found-returns-minus-one.js @@ -25,10 +25,10 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42, 43, 42, 41]); + sample = new TA(makeCtorArg([42, 43, 42, 41])); assert.sameValue(sample.indexOf(44), -1, "indexOf(44)"); assert.sameValue(sample.indexOf(43, 2), -1, "indexOf(43, 2)"); assert.sameValue(sample.indexOf(42, 3), -1, "indexOf(42, 3)"); diff --git a/test/built-ins/TypedArray/prototype/indexOf/strict-comparison.js b/test/built-ins/TypedArray/prototype/indexOf/strict-comparison.js index 5a7883f9703..e5940138e76 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/strict-comparison.js +++ b/test/built-ins/TypedArray/prototype/indexOf/strict-comparison.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 0, 1, undefined, NaN]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 0, 1, undefined, NaN])); assert.sameValue(sample.indexOf("42"), -1, "'42'"); assert.sameValue(sample.indexOf([42]), -1, "[42]"); assert.sameValue(sample.indexOf(42.0), 0, "42.0"); diff --git a/test/built-ins/TypedArray/prototype/indexOf/tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/indexOf/tointeger-fromindex.js index f733d249cec..681a631b477 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/tointeger-fromindex.js +++ b/test/built-ins/TypedArray/prototype/indexOf/tointeger-fromindex.js @@ -27,10 +27,10 @@ var obj = { } }; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42, 43]); + sample = new TA(makeCtorArg([42, 43])); assert.sameValue(sample.indexOf(42, "1"), -1, "string [0]"); assert.sameValue(sample.indexOf(43, "1"), 1, "string [1]"); diff --git a/test/built-ins/TypedArray/prototype/join/BigInt/custom-separator-result-from-tostring-on-each-simple-value.js b/test/built-ins/TypedArray/prototype/join/BigInt/custom-separator-result-from-tostring-on-each-simple-value.js index df053b194ee..57cf6fc6d75 100644 --- a/test/built-ins/TypedArray/prototype/join/BigInt/custom-separator-result-from-tostring-on-each-simple-value.js +++ b/test/built-ins/TypedArray/prototype/join/BigInt/custom-separator-result-from-tostring-on-each-simple-value.js @@ -25,12 +25,12 @@ info: | let next be ? ToString(element). d. Let R be a String value produced by concatenating S and next. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([1n, 0n, 2n, 3n, 42n, 127n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1n, 0n, 2n, 3n, 42n, 127n])); var result; diff --git a/test/built-ins/TypedArray/prototype/join/BigInt/detached-buffer-during-fromIndex-returns-single-comma.js b/test/built-ins/TypedArray/prototype/join/BigInt/detached-buffer-during-fromIndex-returns-single-comma.js index 7b1e6e67a1b..a84d1452159 100644 --- a/test/built-ins/TypedArray/prototype/join/BigInt/detached-buffer-during-fromIndex-returns-single-comma.js +++ b/test/built-ins/TypedArray/prototype/join/BigInt/detached-buffer-during-fromIndex-returns-single-comma.js @@ -25,7 +25,7 @@ info: | Set k to k + 1. Return R. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -39,4 +39,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }; assert.sameValue(sample.join(separator), ',,'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/join/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/join/BigInt/detached-buffer.js index e4c91a54097..c5b584c31eb 100644 --- a/test/built-ins/TypedArray/prototype/join/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/join/BigInt/detached-buffer.js @@ -14,7 +14,7 @@ info: | Perform ? ValidateTypedArray(O). ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -30,4 +30,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, () => { sample.join(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/join/BigInt/empty-instance-empty-string.js b/test/built-ins/TypedArray/prototype/join/BigInt/empty-instance-empty-string.js index a7103a83e83..c0638c4de87 100644 --- a/test/built-ins/TypedArray/prototype/join/BigInt/empty-instance-empty-string.js +++ b/test/built-ins/TypedArray/prototype/join/BigInt/empty-instance-empty-string.js @@ -17,7 +17,7 @@ info: | 4. Let sep be ? ToString(separator). 5. If len is zero, return the empty String. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -26,4 +26,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(sample.join(), ""); assert.sameValue(sample.join("test262"), ""); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/join/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/join/BigInt/get-length-uses-internal-arraylength.js index 87e785727c3..5a972ddec0c 100644 --- a/test/built-ins/TypedArray/prototype/join/BigInt/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/join/BigInt/get-length-uses-internal-arraylength.js @@ -18,7 +18,7 @@ info: | ... 5. If len is zero, return the empty String. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -32,8 +32,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); Object.defineProperty(TA.prototype, "length", desc); Object.defineProperty(sample, "length", desc); @@ -42,4 +42,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(getCalls, 0, "ignores length properties"); assert.notSameValue(result, "", "result is not affected but custom length 0"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/join/BigInt/result-from-tostring-on-each-simple-value.js b/test/built-ins/TypedArray/prototype/join/BigInt/result-from-tostring-on-each-simple-value.js index ca80064ec16..8506edf00af 100644 --- a/test/built-ins/TypedArray/prototype/join/BigInt/result-from-tostring-on-each-simple-value.js +++ b/test/built-ins/TypedArray/prototype/join/BigInt/result-from-tostring-on-each-simple-value.js @@ -24,12 +24,12 @@ info: | let next be ? ToString(element). d. Let R be a String value produced by concatenating S and next. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([1n, 0n, 2n, 3n, 42n, 127n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1n, 0n, 2n, 3n, 42n, 127n])); var result = sample.join(); diff --git a/test/built-ins/TypedArray/prototype/join/BigInt/return-abrupt-from-separator-symbol.js b/test/built-ins/TypedArray/prototype/join/BigInt/return-abrupt-from-separator-symbol.js index fe27585b253..0bfcc1b17a9 100644 --- a/test/built-ins/TypedArray/prototype/join/BigInt/return-abrupt-from-separator-symbol.js +++ b/test/built-ins/TypedArray/prototype/join/BigInt/return-abrupt-from-separator-symbol.js @@ -17,7 +17,7 @@ info: | 4. Let sep be ? ToString(separator). 5. If len is zero, return the empty String. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.join(s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/join/BigInt/return-abrupt-from-separator.js b/test/built-ins/TypedArray/prototype/join/BigInt/return-abrupt-from-separator.js index beb8d16b0d8..7ea61bd4dea 100644 --- a/test/built-ins/TypedArray/prototype/join/BigInt/return-abrupt-from-separator.js +++ b/test/built-ins/TypedArray/prototype/join/BigInt/return-abrupt-from-separator.js @@ -17,7 +17,7 @@ info: | 4. Let sep be ? ToString(separator). 5. If len is zero, return the empty String. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -33,4 +33,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.join(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/join/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/join/BigInt/return-abrupt-from-this-out-of-bounds.js index feffc7f0865..0e212df8c21 100644 --- a/test/built-ins/TypedArray/prototype/join/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/join/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.join description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.join(','); throw new Test262Error('join completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/join/custom-separator-result-from-tostring-on-each-simple-value.js b/test/built-ins/TypedArray/prototype/join/custom-separator-result-from-tostring-on-each-simple-value.js index 694f81db088..60fbdce1744 100644 --- a/test/built-ins/TypedArray/prototype/join/custom-separator-result-from-tostring-on-each-simple-value.js +++ b/test/built-ins/TypedArray/prototype/join/custom-separator-result-from-tostring-on-each-simple-value.js @@ -29,8 +29,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([1, 0, 2, 3, 42, 127]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1, 0, 2, 3, 42, 127])); var result; diff --git a/test/built-ins/TypedArray/prototype/join/custom-separator-result-from-tostring-on-each-value.js b/test/built-ins/TypedArray/prototype/join/custom-separator-result-from-tostring-on-each-value.js index 94caedf65a4..d89d65b5c60 100644 --- a/test/built-ins/TypedArray/prototype/join/custom-separator-result-from-tostring-on-each-value.js +++ b/test/built-ins/TypedArray/prototype/join/custom-separator-result-from-tostring-on-each-value.js @@ -132,4 +132,4 @@ testWithTypedArrayConstructors(function(TA) { }).join(separator); result = sample.join(separator); assert.sameValue(result, expected, "using: " + separator); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/join/detached-buffer-during-fromIndex-returns-single-comma.js b/test/built-ins/TypedArray/prototype/join/detached-buffer-during-fromIndex-returns-single-comma.js index e1edd3a5196..c44a154e086 100644 --- a/test/built-ins/TypedArray/prototype/join/detached-buffer-during-fromIndex-returns-single-comma.js +++ b/test/built-ins/TypedArray/prototype/join/detached-buffer-during-fromIndex-returns-single-comma.js @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(function(TA) { }; assert.sameValue(sample.join(separator), ',,'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/join/detached-buffer.js b/test/built-ins/TypedArray/prototype/join/detached-buffer.js index 0d78c2b091c..104b20cd409 100644 --- a/test/built-ins/TypedArray/prototype/join/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/join/detached-buffer.js @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, () => { sample.join(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/join/empty-instance-empty-string.js b/test/built-ins/TypedArray/prototype/join/empty-instance-empty-string.js index 3f60ca7389c..5bee678817f 100644 --- a/test/built-ins/TypedArray/prototype/join/empty-instance-empty-string.js +++ b/test/built-ins/TypedArray/prototype/join/empty-instance-empty-string.js @@ -26,4 +26,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(sample.join(), ""); assert.sameValue(sample.join("test262"), ""); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/join/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/join/get-length-uses-internal-arraylength.js index 5588297048c..e1e80028025 100644 --- a/test/built-ins/TypedArray/prototype/join/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/join/get-length-uses-internal-arraylength.js @@ -32,8 +32,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); Object.defineProperty(TA.prototype, "length", desc); Object.defineProperty(sample, "length", desc); @@ -42,4 +42,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(getCalls, 0, "ignores length properties"); assert.notSameValue(result, "", "result is not affected but custom length 0"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/join/result-from-tostring-on-each-simple-value.js b/test/built-ins/TypedArray/prototype/join/result-from-tostring-on-each-simple-value.js index b6d91a0350e..8f0eb0ff2c0 100644 --- a/test/built-ins/TypedArray/prototype/join/result-from-tostring-on-each-simple-value.js +++ b/test/built-ins/TypedArray/prototype/join/result-from-tostring-on-each-simple-value.js @@ -28,8 +28,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([1, 0, 2, 3, 42, 127]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1, 0, 2, 3, 42, 127])); var result = sample.join(); diff --git a/test/built-ins/TypedArray/prototype/join/result-from-tostring-on-each-value.js b/test/built-ins/TypedArray/prototype/join/result-from-tostring-on-each-value.js index d3d699ffa08..14096788156 100644 --- a/test/built-ins/TypedArray/prototype/join/result-from-tostring-on-each-value.js +++ b/test/built-ins/TypedArray/prototype/join/result-from-tostring-on-each-value.js @@ -41,4 +41,4 @@ testWithTypedArrayConstructors(function(TA) { var result = sample.join(); assert.sameValue(result, expected); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/join/return-abrupt-from-separator-symbol.js b/test/built-ins/TypedArray/prototype/join/return-abrupt-from-separator-symbol.js index 5df19b9c8b7..a1df649ca0e 100644 --- a/test/built-ins/TypedArray/prototype/join/return-abrupt-from-separator-symbol.js +++ b/test/built-ins/TypedArray/prototype/join/return-abrupt-from-separator-symbol.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.join(s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/join/return-abrupt-from-separator.js b/test/built-ins/TypedArray/prototype/join/return-abrupt-from-separator.js index 69527f696b5..0a64c53808a 100644 --- a/test/built-ins/TypedArray/prototype/join/return-abrupt-from-separator.js +++ b/test/built-ins/TypedArray/prototype/join/return-abrupt-from-separator.js @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.join(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/join/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/join/return-abrupt-from-this-out-of-bounds.js index 15de78e0d82..ebbd28c3f75 100644 --- a/test/built-ins/TypedArray/prototype/join/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/join/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.join(0); throw new Test262Error('join completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/keys/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/keys/BigInt/detached-buffer.js index 90189e441df..425f729620c 100644 --- a/test/built-ins/TypedArray/prototype/keys/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/keys/BigInt/detached-buffer.js @@ -14,7 +14,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -24,4 +24,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.keys(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/keys/BigInt/iter-prototype.js b/test/built-ins/TypedArray/prototype/keys/BigInt/iter-prototype.js index 8d0e517a1d9..7049653dcfa 100644 --- a/test/built-ins/TypedArray/prototype/keys/BigInt/iter-prototype.js +++ b/test/built-ins/TypedArray/prototype/keys/BigInt/iter-prototype.js @@ -10,14 +10,14 @@ info: | ... 3. Return CreateArrayIterator(O, "key"). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.iterator, TypedArray] ---*/ var ArrayIteratorProto = Object.getPrototypeOf([][Symbol.iterator]()); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([0n, 42n, 64n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0n, 42n, 64n])); var iter = sample.keys(); assert.sameValue(Object.getPrototypeOf(iter), ArrayIteratorProto); diff --git a/test/built-ins/TypedArray/prototype/keys/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/keys/BigInt/return-abrupt-from-this-out-of-bounds.js index 5109017fa1b..d620b270d02 100644 --- a/test/built-ins/TypedArray/prototype/keys/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/keys/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.keys description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.keys(); throw new Test262Error('keys completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/keys/BigInt/return-itor.js b/test/built-ins/TypedArray/prototype/keys/BigInt/return-itor.js index 4fd8f285bd8..e1d9db19333 100644 --- a/test/built-ins/TypedArray/prototype/keys/BigInt/return-itor.js +++ b/test/built-ins/TypedArray/prototype/keys/BigInt/return-itor.js @@ -8,7 +8,7 @@ info: | ... 3. Return CreateArrayIterator(O, "key"). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -33,4 +33,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { next = itor.next(); assert.sameValue(next.value, undefined); assert.sameValue(next.done, true); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/keys/detached-buffer.js b/test/built-ins/TypedArray/prototype/keys/detached-buffer.js index c78994ac5dc..8c097b7ee1f 100644 --- a/test/built-ins/TypedArray/prototype/keys/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/keys/detached-buffer.js @@ -24,4 +24,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.keys(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/keys/iter-prototype.js b/test/built-ins/TypedArray/prototype/keys/iter-prototype.js index 3d24bee39d2..cb519e73f01 100644 --- a/test/built-ins/TypedArray/prototype/keys/iter-prototype.js +++ b/test/built-ins/TypedArray/prototype/keys/iter-prototype.js @@ -16,8 +16,8 @@ features: [Symbol.iterator, TypedArray] var ArrayIteratorProto = Object.getPrototypeOf([][Symbol.iterator]()); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([0, 42, 64]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0, 42, 64])); var iter = sample.keys(); assert.sameValue(Object.getPrototypeOf(iter), ArrayIteratorProto); diff --git a/test/built-ins/TypedArray/prototype/keys/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/keys/return-abrupt-from-this-out-of-bounds.js index 8a4c95cddaf..058d5f67a86 100644 --- a/test/built-ins/TypedArray/prototype/keys/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/keys/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.keys(); throw new Test262Error('keys completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/keys/return-itor.js b/test/built-ins/TypedArray/prototype/keys/return-itor.js index eff526da885..4ea2460883e 100644 --- a/test/built-ins/TypedArray/prototype/keys/return-itor.js +++ b/test/built-ins/TypedArray/prototype/keys/return-itor.js @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { next = itor.next(); assert.sameValue(next.value, undefined); assert.sameValue(next.done, true); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js index 327965c0e6b..807821f023f 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js @@ -29,7 +29,7 @@ info: | Set k to k - 1. Return -1F. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -43,4 +43,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }; assert.sameValue(sample.lastIndexOf(undefined, fromIndex), -1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js index 16fef1d6ae5..f4ccfd28643 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js @@ -29,7 +29,7 @@ info: | Set k to k - 1. Return -1F. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -43,4 +43,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }; assert.sameValue(sample.lastIndexOf(0n, fromIndex), -1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer.js index 70e471654c0..58c8f2c69e5 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.lastIndexOf(0n); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-infinity.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-infinity.js index 1c0488a76d4..ec1dbf3729f 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-infinity.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-infinity.js @@ -20,12 +20,12 @@ info: | a. Let k be len + n. 7. Repeat, while k ≥ 0 ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 43n, 41n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 43n, 41n])); assert.sameValue(sample.lastIndexOf(43n, Infinity), 2, "lastIndexOf(43, Infinity)"); assert.sameValue(sample.lastIndexOf(43n, -Infinity), -1, "lastIndexOf(43, -Infinity)"); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-minus-zero.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-minus-zero.js index bd42c027272..9f7b4233588 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-minus-zero.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-minus-zero.js @@ -17,14 +17,14 @@ info: | 5. If n ≥ 0, then a. If n is -0, let k be +0; else let k be min(n, len - 1). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42n, 43n]); + sample = new TA(makeCtorArg([42n, 43n])); assert.sameValue(sample.lastIndexOf(42n, -0), 0, "-0 [0]"); assert.sameValue(sample.lastIndexOf(43n, -0), -1, "-0 [1]"); }); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/get-length-uses-internal-arraylength.js index ee9f23ff019..d9d9eb91df0 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/get-length-uses-internal-arraylength.js @@ -16,17 +16,17 @@ info: | ... 2. Let len be ? ToLength(? Get(O, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ Object.defineProperty(TypedArray.prototype, "length", {value: 0}); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([7n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7n])); Object.defineProperty(TA.prototype, "length", {value: 0}); Object.defineProperty(sample, "length", {value: 0}); assert.sameValue(sample.lastIndexOf(7n), 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/length-zero-returns-minus-one.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/length-zero-returns-minus-one.js index 9676e2d5df0..f8ba1991546 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/length-zero-returns-minus-one.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/length-zero-returns-minus-one.js @@ -17,7 +17,7 @@ info: | 2. Let len be ? ToLength(? Get(O, "length")). 3. If len is 0, return -1. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -34,4 +34,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.lastIndexOf(0n, fromIndex), -1, "length is checked before ToInteger(fromIndex)" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/no-arg.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/no-arg.js index fc8040ad73b..88747da680f 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/no-arg.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/no-arg.js @@ -16,14 +16,14 @@ info: | [...] 8. Return -1. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var ta1 = new TA(); assert.sameValue(ta1.lastIndexOf(), -1); - var ta2 = new TA([0n, 1n, 2n]); + var ta2 = new TA(makeCtorArg([0n, 1n, 2n])); assert.sameValue(ta2.lastIndexOf(), -1); }); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-from-this-out-of-bounds.js index 226fa80b2f2..35475341512 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.lastindexof description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.lastIndexOf(0n); throw new Test262Error('lastIndexOf completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-tointeger-fromindex-symbol.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-tointeger-fromindex-symbol.js index 5f4f01d63d3..d0fdffa5b10 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-tointeger-fromindex-symbol.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-tointeger-fromindex-symbol.js @@ -17,14 +17,14 @@ info: | 4. If argument fromIndex was passed, let n be ? ToInteger(fromIndex); else let n be len-1. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ var fromIndex = Symbol("1"); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(TypeError, function() { sample.lastIndexOf(7n, fromIndex); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-tointeger-fromindex.js index ca2eb82d716..cfe2bb66067 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-tointeger-fromindex.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-tointeger-fromindex.js @@ -17,7 +17,7 @@ info: | 4. If argument fromIndex was passed, let n be ? ToInteger(fromIndex); else let n be len-1. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -27,8 +27,8 @@ var fromIndex = { } }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(Test262Error, function() { sample.lastIndexOf(7n, fromIndex); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-found-returns-index.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-found-returns-index.js index 91ce8873106..cae517afd32 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-found-returns-index.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-found-returns-index.js @@ -26,12 +26,12 @@ info: | searchElement === elementK. iii. If same is true, return k. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 42n, 41n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 42n, 41n])); assert.sameValue(sample.lastIndexOf(42n), 2, "lastIndexOf(42)"); assert.sameValue(sample.lastIndexOf(43n), 1, "lastIndexOf(43)"); assert.sameValue(sample.lastIndexOf(41n), 3, "lastIndexOf(41)"); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-not-found-returns-minus-one.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-not-found-returns-minus-one.js index 823e431748c..d2cab2647b0 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-not-found-returns-minus-one.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-not-found-returns-minus-one.js @@ -21,14 +21,14 @@ info: | 7. Repeat, while k ≥ 0 ... 8. Return -1. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42n, 43n, 42n, 41n]); + sample = new TA(makeCtorArg([42n, 43n, 42n, 41n])); assert.sameValue(sample.lastIndexOf(44n), -1, "lastIndexOf(44)"); assert.sameValue(sample.lastIndexOf(44n, -4), -1, "lastIndexOf(44, -4)"); assert.sameValue(sample.lastIndexOf(44n, -5), -1, "lastIndexOf(44, -5)"); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/tointeger-fromindex.js index a516567227e..3d7fcc6415e 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/tointeger-fromindex.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/tointeger-fromindex.js @@ -17,7 +17,7 @@ info: | 4. If argument fromIndex was passed, let n be ? ToInteger(fromIndex); else let n be len-1. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -27,10 +27,10 @@ var obj = { } }; -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42n, 43n]); + sample = new TA(makeCtorArg([42n, 43n])); assert.sameValue(sample.lastIndexOf(42n, "1"), 0, "string [0]"); assert.sameValue(sample.lastIndexOf(43n, "1"), 1, "string [1]"); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js b/test/built-ins/TypedArray/prototype/lastIndexOf/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js index 0f8094e2216..c49ada378e1 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js @@ -43,4 +43,4 @@ testWithTypedArrayConstructors(function(TA) { }; assert.sameValue(sample.lastIndexOf(undefined, fromIndex), -1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js b/test/built-ins/TypedArray/prototype/lastIndexOf/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js index 90096ada099..120e9b818da 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js @@ -43,4 +43,4 @@ testWithTypedArrayConstructors(function(TA) { }; assert.sameValue(sample.lastIndexOf(0, fromIndex), -1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/detached-buffer.js b/test/built-ins/TypedArray/prototype/lastIndexOf/detached-buffer.js index 8746af8e568..717f32e8b23 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/detached-buffer.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.lastIndexOf(0); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/fromIndex-infinity.js b/test/built-ins/TypedArray/prototype/lastIndexOf/fromIndex-infinity.js index 118fa2981bc..fc8f00ab198 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/fromIndex-infinity.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/fromIndex-infinity.js @@ -24,8 +24,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 43, 41]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 43, 41])); assert.sameValue(sample.lastIndexOf(43, Infinity), 2, "lastIndexOf(43, Infinity)"); assert.sameValue(sample.lastIndexOf(43, -Infinity), -1, "lastIndexOf(43, -Infinity)"); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/fromIndex-minus-zero.js b/test/built-ins/TypedArray/prototype/lastIndexOf/fromIndex-minus-zero.js index 1cf02d32952..ba121b7e710 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/fromIndex-minus-zero.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/fromIndex-minus-zero.js @@ -21,10 +21,10 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42, 43]); + sample = new TA(makeCtorArg([42, 43])); assert.sameValue(sample.lastIndexOf(42, -0), 0, "-0 [0]"); assert.sameValue(sample.lastIndexOf(43, -0), -1, "-0 [1]"); }); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/lastIndexOf/get-length-uses-internal-arraylength.js index 076d0b8d8fc..7c1c45ab98b 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/get-length-uses-internal-arraylength.js @@ -22,11 +22,11 @@ features: [TypedArray] Object.defineProperty(TypedArray.prototype, "length", {value: 0}); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([7]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7])); Object.defineProperty(TA.prototype, "length", {value: 0}); Object.defineProperty(sample, "length", {value: 0}); assert.sameValue(sample.lastIndexOf(7), 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/length-zero-returns-minus-one.js b/test/built-ins/TypedArray/prototype/lastIndexOf/length-zero-returns-minus-one.js index ebeeed65a0c..6481759acc7 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/length-zero-returns-minus-one.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/length-zero-returns-minus-one.js @@ -34,4 +34,4 @@ testWithTypedArrayConstructors(function(TA) { sample.lastIndexOf(0, fromIndex), -1, "length is checked before ToInteger(fromIndex)" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/negative-index-and-resize-to-smaller.js b/test/built-ins/TypedArray/prototype/lastIndexOf/negative-index-and-resize-to-smaller.js index 748e3a6e503..83db658d25b 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/negative-index-and-resize-to-smaller.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/negative-index-and-resize-to-smaller.js @@ -54,4 +54,4 @@ testWithTypedArrayConstructors(function(TA) { "For index " + index ); } -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/no-arg.js b/test/built-ins/TypedArray/prototype/lastIndexOf/no-arg.js index 813ecc17c1d..54bb9543a4b 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/no-arg.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/no-arg.js @@ -20,10 +20,10 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var ta1 = new TA(); assert.sameValue(ta1.lastIndexOf(), -1); - var ta2 = new TA([0, 1, 2]); + var ta2 = new TA(makeCtorArg([0, 1, 2])); assert.sameValue(ta2.lastIndexOf(), -1); }); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-from-this-out-of-bounds.js index e6cb1264fcc..a1eaaa39437 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.lastIndexOf(0); throw new Test262Error('lastIndexOf completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-tointeger-fromindex-symbol.js b/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-tointeger-fromindex-symbol.js index 273a754b2ef..88ab434fa89 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-tointeger-fromindex-symbol.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-tointeger-fromindex-symbol.js @@ -23,8 +23,8 @@ features: [Symbol, TypedArray] var fromIndex = Symbol("1"); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(TypeError, function() { sample.lastIndexOf(7, fromIndex); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-tointeger-fromindex.js index 6e5b60ddb3f..03de36103a1 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-tointeger-fromindex.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-tointeger-fromindex.js @@ -27,8 +27,8 @@ var fromIndex = { } }; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(Test262Error, function() { sample.lastIndexOf(7, fromIndex); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/search-found-returns-index.js b/test/built-ins/TypedArray/prototype/lastIndexOf/search-found-returns-index.js index ecf7b2a8499..7fc952644ca 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/search-found-returns-index.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/search-found-returns-index.js @@ -30,8 +30,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 42, 41]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 42, 41])); assert.sameValue(sample.lastIndexOf(42), 2, "lastIndexOf(42)"); assert.sameValue(sample.lastIndexOf(43), 1, "lastIndexOf(43)"); assert.sameValue(sample.lastIndexOf(41), 3, "lastIndexOf(41)"); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/search-not-found-returns-minus-one.js b/test/built-ins/TypedArray/prototype/lastIndexOf/search-not-found-returns-minus-one.js index 4669b5fc5e1..a0f9ae9d700 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/search-not-found-returns-minus-one.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/search-not-found-returns-minus-one.js @@ -25,10 +25,10 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42, 43, 42, 41]); + sample = new TA(makeCtorArg([42, 43, 42, 41])); assert.sameValue(sample.lastIndexOf(44), -1, "lastIndexOf(44)"); assert.sameValue(sample.lastIndexOf(44, -4), -1, "lastIndexOf(44, -4)"); assert.sameValue(sample.lastIndexOf(44, -5), -1, "lastIndexOf(44, -5)"); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/strict-comparison.js b/test/built-ins/TypedArray/prototype/lastIndexOf/strict-comparison.js index 374cebfa5c7..5f9cbd687e0 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/strict-comparison.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/strict-comparison.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, undefined, NaN, 0, 1]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, undefined, NaN, 0, 1])); assert.sameValue(sample.lastIndexOf("42"), -1, "'42'"); assert.sameValue(sample.lastIndexOf([42]), -1, "[42]"); assert.sameValue(sample.lastIndexOf(42.0), 0, "42.0"); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/lastIndexOf/tointeger-fromindex.js index 5d47be3342f..476b731187b 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/tointeger-fromindex.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/tointeger-fromindex.js @@ -27,10 +27,10 @@ var obj = { } }; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([42, 43]); + sample = new TA(makeCtorArg([42, 43])); assert.sameValue(sample.lastIndexOf(42, "1"), 0, "string [0]"); assert.sameValue(sample.lastIndexOf(43, "1"), 1, "string [1]"); diff --git a/test/built-ins/TypedArray/prototype/length/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/length/BigInt/detached-buffer.js index 31ee5548433..2a0a155fab4 100644 --- a/test/built-ins/TypedArray/prototype/length/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/length/BigInt/detached-buffer.js @@ -10,7 +10,7 @@ info: | 5. Let buffer be the value of O's [[ViewedArrayBuffer]] internal slot. 6. If IsDetachedBuffer(buffer) is true, return 0. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -18,4 +18,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(42); $DETACHBUFFER(sample.buffer); assert.sameValue(sample.length, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/length/BigInt/resizable-array-buffer-auto.js b/test/built-ins/TypedArray/prototype/length/BigInt/resizable-array-buffer-auto.js index 0ba617826a8..a0d75f1eafc 100644 --- a/test/built-ins/TypedArray/prototype/length/BigInt/resizable-array-buffer-auto.js +++ b/test/built-ins/TypedArray/prototype/length/BigInt/resizable-array-buffer-auto.js @@ -5,7 +5,7 @@ esid: sec-get-%typedarray%.prototype.length description: | reset to 0 if the underlying ArrayBuffer is resized beyond the boundary of the dynamically-sized TypedArray instance -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, resizable-arraybuffer] ---*/ @@ -57,4 +57,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { } catch (_) {} assert.sameValue(array.length, expected, "following shrink (out of bounds)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/length/BigInt/resizable-array-buffer-fixed.js b/test/built-ins/TypedArray/prototype/length/BigInt/resizable-array-buffer-fixed.js index de7d7306232..82395fa1568 100644 --- a/test/built-ins/TypedArray/prototype/length/BigInt/resizable-array-buffer-fixed.js +++ b/test/built-ins/TypedArray/prototype/length/BigInt/resizable-array-buffer-fixed.js @@ -5,7 +5,7 @@ esid: sec-get-%typedarray%.prototype.length description: | reset to 0 if the underlying ArrayBuffer is resized beyond the boundary of the fixed-sized TypedArray instance -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, resizable-arraybuffer] ---*/ @@ -43,4 +43,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { } assert.sameValue(array.length, expected, "following shrink (out of bounds)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/length/BigInt/return-length.js b/test/built-ins/TypedArray/prototype/length/BigInt/return-length.js index 419acd0f62d..eacc3604899 100644 --- a/test/built-ins/TypedArray/prototype/length/BigInt/return-length.js +++ b/test/built-ins/TypedArray/prototype/length/BigInt/return-length.js @@ -15,14 +15,14 @@ info: | The current tests on `prop-desc.js` and `length.js` already assert `length` is not a dynamic property as in regular arrays. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var ta1 = new TA(); assert.sameValue(ta1.length, 0); - var ta2 = new TA(42); + var ta2 = new TA(makeCtorArg(42)); assert.sameValue(ta2.length, 42); }); diff --git a/test/built-ins/TypedArray/prototype/length/detached-buffer.js b/test/built-ins/TypedArray/prototype/length/detached-buffer.js index a100b41e20f..9762092255c 100644 --- a/test/built-ins/TypedArray/prototype/length/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/length/detached-buffer.js @@ -18,4 +18,4 @@ testWithTypedArrayConstructors(function(TA) { var sample = new TA(42); $DETACHBUFFER(sample.buffer); assert.sameValue(sample.length, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/length/resizable-array-buffer-auto.js b/test/built-ins/TypedArray/prototype/length/resizable-array-buffer-auto.js index 3e240f32370..c0a24ab4efc 100644 --- a/test/built-ins/TypedArray/prototype/length/resizable-array-buffer-auto.js +++ b/test/built-ins/TypedArray/prototype/length/resizable-array-buffer-auto.js @@ -57,4 +57,4 @@ testWithTypedArrayConstructors(function(TA) { } catch (_) {} assert.sameValue(array.length, expected, "following shrink (out of bounds)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/length/resizable-array-buffer-fixed.js b/test/built-ins/TypedArray/prototype/length/resizable-array-buffer-fixed.js index 43d7c835cf7..5342c6f78eb 100644 --- a/test/built-ins/TypedArray/prototype/length/resizable-array-buffer-fixed.js +++ b/test/built-ins/TypedArray/prototype/length/resizable-array-buffer-fixed.js @@ -43,4 +43,4 @@ testWithTypedArrayConstructors(function(TA) { } assert.sameValue(array.length, expected, "following shrink (out of bounds)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/length/return-length.js b/test/built-ins/TypedArray/prototype/length/return-length.js index e7be300ed74..8f4fc451e40 100644 --- a/test/built-ins/TypedArray/prototype/length/return-length.js +++ b/test/built-ins/TypedArray/prototype/length/return-length.js @@ -19,10 +19,10 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var ta1 = new TA(); assert.sameValue(ta1.length, 0); - var ta2 = new TA(42); + var ta2 = new TA(makeCtorArg(42)); assert.sameValue(ta2.length, 42); }); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/arraylength-internal.js b/test/built-ins/TypedArray/prototype/map/BigInt/arraylength-internal.js index a23cca25714..6c5a599736b 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/arraylength-internal.js @@ -10,12 +10,12 @@ info: | ... 3. Let len be the value of O's [[ArrayLength]] internal slot. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample1 = new TA(42); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg(42)); var loop = 0; Object.defineProperty(sample1, "length", {value: 1}); @@ -27,7 +27,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(loop, 42, "data descriptor"); loop = 0; - var sample2 = new TA(4); + var sample2 = new TA(makeCtorArg(4)); Object.defineProperty(sample2, "length", { get: function() { throw new Test262Error( @@ -41,5 +41,5 @@ testWithBigIntTypedArrayConstructors(function(TA) { return 0n; }); assert.sameValue(loop, 4, "accessor descriptor"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-with-thisarg.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-with-thisarg.js index 169a83dee6b..775d0deea0f 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-with-thisarg.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-with-thisarg.js @@ -13,12 +13,12 @@ info: | b. Let kValue be ? Get(O, Pk). c. Let mappedValue be ? Call(callbackfn, T, « kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var results = []; var thisArg = ["test262", 0, "ecma262", 0]; diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-without-thisarg.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-without-thisarg.js index 13e7c1500f3..36a37bd30fb 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-without-thisarg.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-without-thisarg.js @@ -13,12 +13,12 @@ info: | b. Let kValue be ? Get(O, Pk). c. Let mappedValue be ? Call(callbackfn, T, « kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-detachbuffer.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-detachbuffer.js index c9ff3cdc4ec..ded0928ab35 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-detachbuffer.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-detachbuffer.js @@ -13,7 +13,7 @@ info: | b. Let kValue be ? Get(O, Pk). c. Let mappedValue be ? Call(callbackfn, T, « kValue, k, O »). ... -includes: [detachArrayBuffer.js, testBigIntTypedArray.js] +includes: [detachArrayBuffer.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -30,4 +30,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-is-not-callable.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-is-not-callable.js index 4f30cdf5092..51e6fc98a09 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-is-not-callable.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-is-not-callable.js @@ -10,12 +10,12 @@ info: | ... 4. If IsCallable(callbackfn) is false, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); assert.throws(TypeError, function() { sample.map(); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-no-interaction-over-non-integer-properties.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-no-interaction-over-non-integer-properties.js index cc9bf1acadd..7d669d73cf8 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-no-interaction-over-non-integer-properties.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-no-interaction-over-non-integer-properties.js @@ -14,12 +14,12 @@ info: | b. Let kValue be ? Get(O, Pk). c. Let mappedValue be ? Call(callbackfn, T, « kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([7n, 8n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7n, 8n])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-not-called-on-empty.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-not-called-on-empty.js index 3e7a82aeb6d..8f63f39c28c 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-not-called-on-empty.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-not-called-on-empty.js @@ -13,7 +13,7 @@ info: | ... c. Let mappedValue be ? Call(callbackfn, T, « kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-affects-returned-object.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-affects-returned-object.js index f2f679a6da4..d9badbd565d 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-affects-returned-object.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-affects-returned-object.js @@ -15,12 +15,12 @@ info: | d. Perform ? Set(A, Pk, mappedValue, true). ... 9. Return A. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([1n, 2n, 4n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1n, 2n, 4n])); var result = sample.map(function(v) { return v * 3n; }); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-change-instance.js index dfd441f3cc1..04a907c72a6 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-change-instance.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-change-instance.js @@ -6,14 +6,12 @@ description: > The callbackfn return does not change the `this` instance info: | 22.2.3.19 %TypedArray%.prototype.map ( callbackfn [ , thisArg ] ) -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample1 = new TA(3); - - sample1[1] = 1n; +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg(["0", "1", "0"])); sample1.map(function() { return 42n; diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-copy-non-integer-properties.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-copy-non-integer-properties.js index 4783a2a1ed7..3e548ef58b5 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-copy-non-integer-properties.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-copy-non-integer-properties.js @@ -13,12 +13,12 @@ info: | b. Let kValue be ? Get(O, Pk). c. Let mappedValue be ? Call(callbackfn, T, « kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([7n, 8n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7n, 8n])); var bar = Symbol("1"); sample.foo = 42; diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-returns-abrupt.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-returns-abrupt.js index c8080729d3a..af7ccbe2203 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-returns-abrupt.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-returns-abrupt.js @@ -7,12 +7,12 @@ description: > info: | 22.2.3.19 %TypedArray%.prototype.map ( callbackfn [ , thisArg ] ) -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); assert.throws(Test262Error, function() { sample.map(function() { diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-set-value-during-interaction.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-set-value-during-interaction.js index df41cb4590f..835888f7faa 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-set-value-during-interaction.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-set-value-during-interaction.js @@ -7,12 +7,12 @@ description: > Integer indexed values changed during iteration info: | 22.2.3.19 %TypedArray%.prototype.map ( callbackfn [ , thisArg ] ) -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect.set, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var newVal = 0n; sample.map(function(val, i) { @@ -40,4 +40,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(sample[0], 7n, "changed values after iteration [0] == 7"); assert.sameValue(sample[1], 1n, "changed values after iteration [1] == 1"); assert.sameValue(sample[2], 2n, "changed values after iteration [2] == 2"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-this.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-this.js index 820dfb198f0..de77bac09a7 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-this.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-this.js @@ -14,15 +14,15 @@ info: | ... c. Let mappedValue be ? Call(callbackfn, T, « kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ var expected = (function() { return this; })(); var thisArg = {}; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var results1 = []; diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/map/BigInt/detached-buffer.js index c7039bd1dab..76d39d558f5 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.map(callbackfn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/map/BigInt/return-abrupt-from-this-out-of-bounds.js index 5bb06dda129..e966f94a64d 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.map description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.map(() => 0n); throw new Test262Error('map completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/return-new-typedarray-from-empty-length.js b/test/built-ins/TypedArray/prototype/map/BigInt/return-new-typedarray-from-empty-length.js index 957bb7cddf4..c578da88dc9 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/return-new-typedarray-from-empty-length.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/return-new-typedarray-from-empty-length.js @@ -16,12 +16,12 @@ info: | c. Let mappedValue be ? Call(callbackfn, T, « kValue, k, O »). ... 9. Return A. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(0); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(0)); var result = sample.map(function() {}); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/return-new-typedarray-from-positive-length.js b/test/built-ins/TypedArray/prototype/map/BigInt/return-new-typedarray-from-positive-length.js index e7ba977099a..f7af9e741fd 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/return-new-typedarray-from-positive-length.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/return-new-typedarray-from-positive-length.js @@ -16,12 +16,12 @@ info: | c. Let mappedValue be ? Call(callbackfn, T, « kValue, k, O »). ... 9. Return A. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var result = sample.map(function(v) { return v; diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-destination-resizable.js b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-destination-resizable.js index 372acf3d396..b7f001371cd 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-destination-resizable.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-destination-resizable.js @@ -23,7 +23,7 @@ info: | a. If the value of newTypedArray's [[ArrayLength]] internal slot < argumentList[0], throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray, resizable-arraybuffer] ---*/ @@ -37,4 +37,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { ta.map(() => {}); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-ctor-abrupt.js b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-ctor-abrupt.js index 369c397dfe9..dbe9cb5cf08 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-ctor-abrupt.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-ctor-abrupt.js @@ -22,12 +22,12 @@ info: | 2. Let C be ? Get(O, "constructor"). 3. If C is undefined, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); var callCount = 0; Object.defineProperty(sample, "constructor", { @@ -42,4 +42,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); }); assert.sameValue(callCount, 0, "callback should not be called"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-ctor-inherited.js b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-ctor-inherited.js index 049e553ce75..236b2bc9b50 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-ctor-inherited.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-ctor-inherited.js @@ -22,12 +22,12 @@ info: | 2. Let C be ? Get(O, "constructor"). 3. If C is undefined, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); var calls = 0; var result; @@ -61,4 +61,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { 7, "result.constructor triggers the inherited accessor property" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-ctor-returns-throws.js b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-ctor-returns-throws.js index 330869120c9..928ef2d4252 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-ctor-returns-throws.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-ctor-returns-throws.js @@ -24,14 +24,14 @@ info: | 3. If C is undefined, return defaultConstructor. 4. If Type(C) is not Object, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ var callbackfn = function() { return 0n; }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); sample.constructor = 42; assert.throws(TypeError, function() { diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-ctor.js b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-ctor.js index 9e17d793ba0..f419827c62d 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-ctor.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-ctor.js @@ -22,12 +22,12 @@ info: | 2. Let C be ? Get(O, "constructor"). 3. If C is undefined, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); var calls = 0; var result; @@ -51,4 +51,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { TA, "use defaultCtor on an undefined return - .constructor check" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-abrupt.js b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-abrupt.js index bbfabecfa86..2fb535f0d3f 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-abrupt.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-abrupt.js @@ -24,12 +24,12 @@ info: | ... 5. Let S be ? Get(C, @@species). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; @@ -42,4 +42,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.map(function() { return 0n; }); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-invocation.js b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-invocation.js index 2bcdce8dfb8..db5de00d159 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-invocation.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-invocation.js @@ -32,12 +32,12 @@ info: | 3. If argumentList is a List of a single Number, then ... 4. Return newTypedArray. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 42n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 42n, 42n])); var result, ctorThis; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js index a0bf7578739..cb86d50dde2 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js @@ -23,7 +23,7 @@ info: | a. If the value of newTypedArray's [[ArrayLength]] internal slot < argumentList[0], throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray, resizable-arraybuffer] ---*/ @@ -39,5 +39,5 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.map(() => {}); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-length-throws.js b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-length-throws.js index 78402f62cbb..f8080d46ccd 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-length-throws.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-length-throws.js @@ -23,12 +23,12 @@ info: | a. If the value of newTypedArray's [[ArrayLength]] internal slot < argumentList[0], throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; sample.constructor[Symbol.species] = function() { diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-length.js b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-length.js index c5cd589cc0e..b7724206840 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-length.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-length.js @@ -23,12 +23,12 @@ info: | a. If the value of newTypedArray's [[ArrayLength]] internal slot < argumentList[0], throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var customCount, result; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js index ed43f6485a1..4d7da9991b5 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js @@ -32,12 +32,12 @@ info: | 3. If argumentList is a List of a single Number, then ... 4. Return newTypedArray. -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n])); var otherTA = TA === BigInt64Array ? BigUint64Array : BigInt64Array; var other = new otherTA([1n, 0n, 1n]); var result; diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-throws.js b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-throws.js index 54cb62c5365..572c724f30e 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-throws.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor-throws.js @@ -30,12 +30,12 @@ info: | 1. Let newTypedArray be ? Construct(constructor, argumentList). 2. Perform ? ValidateTypedArray(newTypedArray). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; sample.constructor[Symbol.species] = Array; diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor.js b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor.js index 45b6cb8faf4..00b7fa09945 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-custom-ctor.js @@ -32,12 +32,12 @@ info: | 3. If argumentList is a List of a single Number, then ... 4. Return newTypedArray. -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n])); var calls = 0; var other, result; diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-returns-throws.js b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-returns-throws.js index 33ce6739fbc..ee06c2b9bac 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-returns-throws.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-returns-throws.js @@ -25,12 +25,12 @@ info: | 7. If IsConstructor(S) is true, return S. 8. Throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-use-default-ctor.js b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-use-default-ctor.js index 7833a0e014a..3aa10dae897 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-use-default-ctor.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species-use-default-ctor.js @@ -23,12 +23,12 @@ info: | 5. Let S be ? Get(C, @@species). 6. If S is either undefined or null, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var result; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species.js b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species.js index 9160b3afa93..ad722cec7f6 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/speciesctor-get-species.js @@ -24,12 +24,12 @@ info: | ... 5. Let S be ? Get(C, @@species). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var calls = 0; sample.constructor = {}; @@ -43,4 +43,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.map(function() { return 0n; }); assert.sameValue(calls, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/map/BigInt/values-are-not-cached.js index 6b672822806..2b8bc35716d 100644 --- a/test/built-ins/TypedArray/prototype/map/BigInt/values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/map/BigInt/values-are-not-cached.js @@ -7,12 +7,12 @@ description: > Integer indexed values changed during iteration info: | 22.2.3.19 %TypedArray%.prototype.map ( callbackfn [ , thisArg ] ) -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); sample.map(function(v, i) { if (i < sample.length - 1) { @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { return 0n; }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/map/arraylength-internal.js b/test/built-ins/TypedArray/prototype/map/arraylength-internal.js index bb7186fc864..5c4430109d9 100644 --- a/test/built-ins/TypedArray/prototype/map/arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/map/arraylength-internal.js @@ -14,8 +14,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample1 = new TA(42); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg(42)); var loop = 0; Object.defineProperty(sample1, "length", {value: 1}); @@ -27,7 +27,7 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(loop, 42, "data descriptor"); loop = 0; - var sample2 = new TA(4); + var sample2 = new TA(makeCtorArg(4)); Object.defineProperty(sample2, "length", { get: function() { throw new Test262Error( @@ -41,5 +41,5 @@ testWithTypedArrayConstructors(function(TA) { return 0; }); assert.sameValue(loop, 4, "accessor descriptor"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-arguments-with-thisarg.js b/test/built-ins/TypedArray/prototype/map/callbackfn-arguments-with-thisarg.js index 7b0fcfcf2ad..c7da558e5ba 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-arguments-with-thisarg.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-arguments-with-thisarg.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var results = []; var thisArg = ["test262", 0, "ecma262", 0]; diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-arguments-without-thisarg.js b/test/built-ins/TypedArray/prototype/map/callbackfn-arguments-without-thisarg.js index 12ce6c78435..a395a8b31f0 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-arguments-without-thisarg.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-arguments-without-thisarg.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-detachbuffer.js b/test/built-ins/TypedArray/prototype/map/callbackfn-detachbuffer.js index cc36b154e68..a2bc8971892 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-detachbuffer.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-detachbuffer.js @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-is-not-callable.js b/test/built-ins/TypedArray/prototype/map/callbackfn-is-not-callable.js index f2fe274ce9b..fbaa673dad1 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-is-not-callable.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-is-not-callable.js @@ -14,8 +14,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); assert.throws(TypeError, function() { sample.map(); diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-no-interaction-over-non-integer-properties.js b/test/built-ins/TypedArray/prototype/map/callbackfn-no-interaction-over-non-integer-properties.js index 96495d98272..8e9895ba52f 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-no-interaction-over-non-integer-properties.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-no-interaction-over-non-integer-properties.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([7, 8]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7, 8])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-not-called-on-empty.js b/test/built-ins/TypedArray/prototype/map/callbackfn-not-called-on-empty.js index b89bf672fce..49949decf90 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-not-called-on-empty.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-not-called-on-empty.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-resize.js b/test/built-ins/TypedArray/prototype/map/callbackfn-resize.js index 75b37f4a6c9..4db445de98b 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-resize.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-resize.js @@ -73,4 +73,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.compareArray(result, expectedIndices, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-return-affects-returned-object.js b/test/built-ins/TypedArray/prototype/map/callbackfn-return-affects-returned-object.js index 6f19e2277d0..7644ffeaa22 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-return-affects-returned-object.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-return-affects-returned-object.js @@ -19,8 +19,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([1, 2, 4]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1, 2, 4])); var result = sample.map(function(v) { return v * 3; }); diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/map/callbackfn-return-does-not-change-instance.js index fe298618b8c..a16f3d04e55 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-return-does-not-change-instance.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-return-does-not-change-instance.js @@ -10,10 +10,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample1 = new TA(3); - - sample1[1] = 1; +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg(["0", "1", "0"])); sample1.map(function() { return 42; diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-return-does-not-copy-non-integer-properties.js b/test/built-ins/TypedArray/prototype/map/callbackfn-return-does-not-copy-non-integer-properties.js index cbe3316cd8e..504fffbb9fa 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-return-does-not-copy-non-integer-properties.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-return-does-not-copy-non-integer-properties.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([7, 8]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7, 8])); var bar = Symbol("1"); sample.foo = 42; diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-returns-abrupt.js b/test/built-ins/TypedArray/prototype/map/callbackfn-returns-abrupt.js index 634a7e8f617..d6c5686d14f 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-returns-abrupt.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-returns-abrupt.js @@ -11,8 +11,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); assert.throws(Test262Error, function() { sample.map(function() { diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-set-value-during-interaction.js b/test/built-ins/TypedArray/prototype/map/callbackfn-set-value-during-interaction.js index ddc93200ac6..111b353e17f 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-set-value-during-interaction.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-set-value-during-interaction.js @@ -11,8 +11,8 @@ includes: [testTypedArray.js] features: [Reflect.set, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var newVal = 0; sample.map(function(val, i) { @@ -40,4 +40,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(sample[0], 7, "changed values after iteration [0] == 7"); assert.sameValue(sample[1], 1, "changed values after iteration [1] == 1"); assert.sameValue(sample[2], 2, "changed values after iteration [2] == 2"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-this.js b/test/built-ins/TypedArray/prototype/map/callbackfn-this.js index 43d3159bc4b..e3680092bf5 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-this.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-this.js @@ -21,8 +21,8 @@ features: [TypedArray] var expected = (function() { return this; })(); var thisArg = {}; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var results1 = []; diff --git a/test/built-ins/TypedArray/prototype/map/detached-buffer.js b/test/built-ins/TypedArray/prototype/map/detached-buffer.js index b0678a8663b..cc00481646d 100644 --- a/test/built-ins/TypedArray/prototype/map/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/map/detached-buffer.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.map(callbackfn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/map/return-abrupt-from-this-out-of-bounds.js index f1afe9521b9..8fb19b1e2ed 100644 --- a/test/built-ins/TypedArray/prototype/map/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/map/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.map(() => {}); throw new Test262Error('map completed successfully'); }); -}); +}, null, ["passthrough"]); 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 63ff87afc50..a8915332a8c 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 @@ -53,7 +53,7 @@ includes: [nans.js, testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -function body(FloatArray) { +testWithTypedArrayConstructors(function body(FloatArray) { var sample = new FloatArray(NaNs); var sampleBytes, resultBytes; var i = 0; @@ -66,6 +66,4 @@ function body(FloatArray) { resultBytes = new Uint8Array(result.buffer); assert(compareArray(sampleBytes, resultBytes)); -} - -testWithTypedArrayConstructors(body, floatArrayConstructors); +}, floatArrayConstructors); diff --git a/test/built-ins/TypedArray/prototype/map/return-new-typedarray-from-empty-length.js b/test/built-ins/TypedArray/prototype/map/return-new-typedarray-from-empty-length.js index a7b475ec444..214d5b98296 100644 --- a/test/built-ins/TypedArray/prototype/map/return-new-typedarray-from-empty-length.js +++ b/test/built-ins/TypedArray/prototype/map/return-new-typedarray-from-empty-length.js @@ -20,8 +20,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(0); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(0)); var result = sample.map(function() {}); diff --git a/test/built-ins/TypedArray/prototype/map/return-new-typedarray-from-positive-length.js b/test/built-ins/TypedArray/prototype/map/return-new-typedarray-from-positive-length.js index 61696e503d1..0ae25567734 100644 --- a/test/built-ins/TypedArray/prototype/map/return-new-typedarray-from-positive-length.js +++ b/test/built-ins/TypedArray/prototype/map/return-new-typedarray-from-positive-length.js @@ -20,8 +20,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var result = sample.map(function(v) { return v; diff --git a/test/built-ins/TypedArray/prototype/map/speciesctor-destination-resizable.js b/test/built-ins/TypedArray/prototype/map/speciesctor-destination-resizable.js index 32d054b765b..1bbdbd56f38 100644 --- a/test/built-ins/TypedArray/prototype/map/speciesctor-destination-resizable.js +++ b/test/built-ins/TypedArray/prototype/map/speciesctor-destination-resizable.js @@ -37,4 +37,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { ta.map(() => {}); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/speciesctor-get-ctor-abrupt.js b/test/built-ins/TypedArray/prototype/map/speciesctor-get-ctor-abrupt.js index 90818cabee4..af57566325d 100644 --- a/test/built-ins/TypedArray/prototype/map/speciesctor-get-ctor-abrupt.js +++ b/test/built-ins/TypedArray/prototype/map/speciesctor-get-ctor-abrupt.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); var callCount = 0; Object.defineProperty(sample, "constructor", { @@ -42,4 +42,4 @@ testWithTypedArrayConstructors(function(TA) { }); }); assert.sameValue(callCount, 0, "callback should not be called"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/speciesctor-get-ctor-inherited.js b/test/built-ins/TypedArray/prototype/map/speciesctor-get-ctor-inherited.js index 2f4626b182d..cf620b2e16b 100644 --- a/test/built-ins/TypedArray/prototype/map/speciesctor-get-ctor-inherited.js +++ b/test/built-ins/TypedArray/prototype/map/speciesctor-get-ctor-inherited.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); var calls = 0; var result; @@ -61,4 +61,4 @@ testWithTypedArrayConstructors(function(TA) { 7, "result.constructor triggers the inherited accessor property" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/speciesctor-get-ctor-returns-throws.js b/test/built-ins/TypedArray/prototype/map/speciesctor-get-ctor-returns-throws.js index 21c3ec41437..ac258c10b97 100644 --- a/test/built-ins/TypedArray/prototype/map/speciesctor-get-ctor-returns-throws.js +++ b/test/built-ins/TypedArray/prototype/map/speciesctor-get-ctor-returns-throws.js @@ -30,8 +30,8 @@ features: [Symbol, TypedArray] var callbackfn = function() { return 0; }; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); sample.constructor = 42; assert.throws(TypeError, function() { diff --git a/test/built-ins/TypedArray/prototype/map/speciesctor-get-ctor.js b/test/built-ins/TypedArray/prototype/map/speciesctor-get-ctor.js index d324c33341b..7baee96aff3 100644 --- a/test/built-ins/TypedArray/prototype/map/speciesctor-get-ctor.js +++ b/test/built-ins/TypedArray/prototype/map/speciesctor-get-ctor.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); var calls = 0; var result; @@ -51,4 +51,4 @@ testWithTypedArrayConstructors(function(TA) { TA, "use defaultCtor on an undefined return - .constructor check" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-abrupt.js b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-abrupt.js index 95b57704bba..0bb552550be 100644 --- a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-abrupt.js +++ b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-abrupt.js @@ -28,8 +28,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; @@ -42,4 +42,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.map(function() { return 0; }); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-invocation.js b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-invocation.js index 0284f0230cb..b655572c2c7 100644 --- a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-invocation.js +++ b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-invocation.js @@ -36,8 +36,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 42, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 42, 42])); var result, ctorThis; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js index 6421975bf5a..61651307c70 100644 --- a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js +++ b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js @@ -39,5 +39,5 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.map(() => {}); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-length-throws.js b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-length-throws.js index dd9fb5f3ded..08449cfb867 100644 --- a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-length-throws.js +++ b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-length-throws.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; sample.constructor[Symbol.species] = function() { diff --git a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-length.js b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-length.js index df599dc8542..410eb5db7eb 100644 --- a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-length.js +++ b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-length.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var customCount, result; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-returns-another-instance.js b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-returns-another-instance.js index a13585f0154..38aa515ba1b 100644 --- a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-returns-another-instance.js +++ b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-returns-another-instance.js @@ -36,8 +36,8 @@ includes: [testTypedArray.js, compareArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40])); var otherTA = TA === Int8Array ? Int16Array : Int8Array; var other = new otherTA([1, 0, 1]); var result; diff --git a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-throws.js b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-throws.js index 49e51ef1d43..60458dfade1 100644 --- a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-throws.js +++ b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor-throws.js @@ -34,8 +34,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; sample.constructor[Symbol.species] = Array; diff --git a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor.js b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor.js index d6ec4774949..61c1b94e90f 100644 --- a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor.js +++ b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-custom-ctor.js @@ -36,8 +36,8 @@ includes: [testTypedArray.js, compareArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42])); var calls = 0; var other, result; diff --git a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-returns-throws.js b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-returns-throws.js index 1bec522ff19..d3af41766c8 100644 --- a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-returns-throws.js +++ b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-returns-throws.js @@ -29,8 +29,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-use-default-ctor.js b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-use-default-ctor.js index c35b3e9982d..c1b46d1f3da 100644 --- a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-use-default-ctor.js +++ b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species-use-default-ctor.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var result; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species.js b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species.js index ce4bae914fc..b0f67c5750b 100644 --- a/test/built-ins/TypedArray/prototype/map/speciesctor-get-species.js +++ b/test/built-ins/TypedArray/prototype/map/speciesctor-get-species.js @@ -28,8 +28,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var calls = 0; sample.constructor = {}; @@ -43,4 +43,4 @@ testWithTypedArrayConstructors(function(TA) { sample.map(function() {}); assert.sameValue(calls, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/map/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/map/values-are-not-cached.js index 8900d596ab2..ff674c26d68 100644 --- a/test/built-ins/TypedArray/prototype/map/values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/map/values-are-not-cached.js @@ -11,8 +11,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); sample.map(function(v, i) { if (i < sample.length - 1) { @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { return 0; }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-custom-accumulator.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-custom-accumulator.js index 6b54c191c3f..a359a5e1087 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-custom-accumulator.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-custom-accumulator.js @@ -22,12 +22,12 @@ info: | i. Let accumulator be ? Call(callbackfn, undefined, « accumulator, kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-default-accumulator.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-default-accumulator.js index ab9e5a286f1..d7c8d174ef9 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-default-accumulator.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-default-accumulator.js @@ -29,12 +29,12 @@ info: | i. Let accumulator be ? Call(callbackfn, undefined, « accumulator, kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-detachbuffer.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-detachbuffer.js index 7527cf918cd..a525adf06fb 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-detachbuffer.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-detachbuffer.js @@ -22,7 +22,7 @@ info: | i. Let accumulator be ? Call(callbackfn, undefined, « accumulator, kValue, k, O »). ... -includes: [detachArrayBuffer.js, testBigIntTypedArray.js] +includes: [detachArrayBuffer.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -39,4 +39,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }, 0); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-is-not-callable-throws.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-is-not-callable-throws.js index 36b14750190..65b8986f370 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-is-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-is-not-callable-throws.js @@ -18,12 +18,12 @@ info: | 3. If IsCallable(callbackfn) is false, throw a TypeError exception. 4. If len is 0 and initialValue is not present, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(TypeError, function() { sample.reduce(); diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-no-iteration-over-non-integer-properties.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-no-iteration-over-non-integer-properties.js index f8282a42edb..83784f270b7 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-no-iteration-over-non-integer-properties.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-no-iteration-over-non-integer-properties.js @@ -22,12 +22,12 @@ info: | i. Let accumulator be ? Call(callbackfn, undefined, « accumulator, kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([7n, 8n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7n, 8n])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-not-called-on-empty.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-not-called-on-empty.js index 8bcbcfd43a2..d06bacd67dc 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-not-called-on-empty.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-not-called-on-empty.js @@ -24,7 +24,7 @@ info: | i. Let accumulator be ? Call(callbackfn, undefined, « accumulator, kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }, undefined); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-return-does-not-change-instance.js index 31785cec9bf..03d4713cfdd 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-return-does-not-change-instance.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-return-does-not-change-instance.js @@ -4,12 +4,12 @@ esid: sec-%typedarray%.prototype.reduce description: > The callbackfn return does not change the `this` instance -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([0n, 1n, 0n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0n, 1n, 0n])); sample.reduce(function() { return 42; diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-returns-abrupt.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-returns-abrupt.js index 25470aff7bb..be042e89426 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-returns-abrupt.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-returns-abrupt.js @@ -22,12 +22,12 @@ info: | i. Let accumulator be ? Call(callbackfn, undefined, « accumulator, kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.throws(Test262Error, function() { sample.reduce(function() { diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-set-value-during-iteration.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-set-value-during-iteration.js index d77a8ebda04..b3d0cebb39a 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-set-value-during-iteration.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-set-value-during-iteration.js @@ -14,12 +14,12 @@ info: | a [[Get]] of "length". 22.1.3.19 Array.prototype.reduce ( callbackfn [ , initialValue ] ) -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect.set, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var newVal = 0n; sample.reduce(function(acc, val, i) { @@ -46,4 +46,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(sample[0], 7n, "changed values after iteration [0] == 7"); assert.sameValue(sample[1], 1n, "changed values after iteration [1] == 1"); assert.sameValue(sample[2], 2n, "changed values after iteration [2] == 2"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-this.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-this.js index fe364eeac87..3e934fd65a0 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-this.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-this.js @@ -22,14 +22,14 @@ info: | i. Let accumulator be ? Call(callbackfn, undefined, « accumulator, kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ var expected = (function() { return this; })(); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var results = []; diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/detached-buffer.js index 91763bcfbe5..5efbe4a86d8 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.reduce(callbackfn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/empty-instance-return-initialvalue.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/empty-instance-return-initialvalue.js index 34ed97d79ed..97d68c27080 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/empty-instance-return-initialvalue.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/empty-instance-return-initialvalue.js @@ -26,7 +26,7 @@ info: | 8. Repeat, while k < len ... 9. Return accumulator. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -38,4 +38,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(result, 42); assert.sameValue(called, false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/empty-instance-with-no-initialvalue-throws.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/empty-instance-with-no-initialvalue-throws.js index f903b32a0d6..17a37f79259 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/empty-instance-with-no-initialvalue-throws.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/empty-instance-with-no-initialvalue-throws.js @@ -17,7 +17,7 @@ info: | ... 4. If len is 0 and initialValue is not present, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -31,4 +31,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/get-length-uses-internal-arraylength.js index 98ff2510d35..f7bbbca38d1 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/get-length-uses-internal-arraylength.js @@ -16,7 +16,7 @@ info: | 1. Let O be ? ToObject(this value). 2. Let len be ? ToLength(? Get(O, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -30,8 +30,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); var calls = 0; Object.defineProperty(TA.prototype, "length", desc); @@ -43,4 +43,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(getCalls, 0, "ignores length properties"); assert.sameValue(calls, 2, "iterations are not affected by custom length"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/result-is-last-callbackfn-return.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/result-is-last-callbackfn-return.js index 2c424d4c8af..bb2569d940d 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/result-is-last-callbackfn-return.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/result-is-last-callbackfn-return.js @@ -30,15 +30,15 @@ info: | ii. Let accumulator be ? Call(callbackfn, undefined, « accumulator, kValue, k, O »). 9. Return accumulator. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var calls, result; calls = 0; - result = new TA([1n, 2n, 3n]).reduce(function() { + result = new TA(makeCtorArg([1n, 2n, 3n])).reduce(function() { calls++; if (calls == 2) { @@ -48,7 +48,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(result, 42, "using default accumulator"); calls = 0; - result = new TA([1n, 2n, 3n]).reduce(function() { + result = new TA(makeCtorArg([1n, 2n, 3n])).reduce(function() { calls++; if (calls == 3) { diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/result-of-any-type.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/result-of-any-type.js index e67a68dc3df..732dd227a49 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/result-of-any-type.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/result-of-any-type.js @@ -30,12 +30,12 @@ info: | ii. Let accumulator be ? Call(callbackfn, undefined, « accumulator, kValue, k, O »). 9. Return accumulator. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); [ ["test262", "string"], ["", "empty string"], diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/return-abrupt-from-this-out-of-bounds.js index 077b54cfa2d..ae1926e8a3f 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.reduce description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.reduce(() => {}); throw new Test262Error('reduce completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/return-first-value-without-callbackfn.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/return-first-value-without-callbackfn.js index 766bcdb628c..b0088b80308 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/return-first-value-without-callbackfn.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/return-first-value-without-callbackfn.js @@ -27,13 +27,13 @@ info: | 8. Repeat, while k < len ... 9. Return accumulator. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var called = false; - var result = new TA([42n]).reduce(function() { + var result = new TA(makeCtorArg([42n])).reduce(function() { called = true; }); diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/values-are-not-cached.js index 5362bf1dd0b..9f866b86f49 100644 --- a/test/built-ins/TypedArray/prototype/reduce/BigInt/values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/values-are-not-cached.js @@ -22,12 +22,12 @@ info: | ii. Let accumulator be ? Call(callbackfn, undefined, « accumulator, kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); sample.reduce(function(a, v, i) { if (i < sample.length - 1) { @@ -38,4 +38,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { v, 42n, "method does not cache values before callbackfn calls" ); }, 0); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/callbackfn-arguments-custom-accumulator.js b/test/built-ins/TypedArray/prototype/reduce/callbackfn-arguments-custom-accumulator.js index c99ad441b13..f487f0548fb 100644 --- a/test/built-ins/TypedArray/prototype/reduce/callbackfn-arguments-custom-accumulator.js +++ b/test/built-ins/TypedArray/prototype/reduce/callbackfn-arguments-custom-accumulator.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/reduce/callbackfn-arguments-default-accumulator.js b/test/built-ins/TypedArray/prototype/reduce/callbackfn-arguments-default-accumulator.js index f293ef1b934..9e546f5f38b 100644 --- a/test/built-ins/TypedArray/prototype/reduce/callbackfn-arguments-default-accumulator.js +++ b/test/built-ins/TypedArray/prototype/reduce/callbackfn-arguments-default-accumulator.js @@ -33,8 +33,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/reduce/callbackfn-detachbuffer.js b/test/built-ins/TypedArray/prototype/reduce/callbackfn-detachbuffer.js index 1d3c8f783eb..dfc80fff398 100644 --- a/test/built-ins/TypedArray/prototype/reduce/callbackfn-detachbuffer.js +++ b/test/built-ins/TypedArray/prototype/reduce/callbackfn-detachbuffer.js @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(function(TA) { }, 0); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/callbackfn-is-not-callable-throws.js b/test/built-ins/TypedArray/prototype/reduce/callbackfn-is-not-callable-throws.js index 3bc9191bfae..1410fd2374a 100644 --- a/test/built-ins/TypedArray/prototype/reduce/callbackfn-is-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/reduce/callbackfn-is-not-callable-throws.js @@ -22,8 +22,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(TypeError, function() { sample.reduce(); diff --git a/test/built-ins/TypedArray/prototype/reduce/callbackfn-no-iteration-over-non-integer-properties.js b/test/built-ins/TypedArray/prototype/reduce/callbackfn-no-iteration-over-non-integer-properties.js index 18982a9d371..82f50716a62 100644 --- a/test/built-ins/TypedArray/prototype/reduce/callbackfn-no-iteration-over-non-integer-properties.js +++ b/test/built-ins/TypedArray/prototype/reduce/callbackfn-no-iteration-over-non-integer-properties.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([7, 8]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7, 8])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/reduce/callbackfn-not-called-on-empty.js b/test/built-ins/TypedArray/prototype/reduce/callbackfn-not-called-on-empty.js index f3e75d26851..988ca67d0e4 100644 --- a/test/built-ins/TypedArray/prototype/reduce/callbackfn-not-called-on-empty.js +++ b/test/built-ins/TypedArray/prototype/reduce/callbackfn-not-called-on-empty.js @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { }, undefined); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/callbackfn-resize.js b/test/built-ins/TypedArray/prototype/reduce/callbackfn-resize.js index df21ba0d43d..18dd231fb8d 100644 --- a/test/built-ins/TypedArray/prototype/reduce/callbackfn-resize.js +++ b/test/built-ins/TypedArray/prototype/reduce/callbackfn-resize.js @@ -72,4 +72,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.sameValue(result, expectedIndices[expectedIndices.length - 1], 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/reduce/callbackfn-return-does-not-change-instance.js index 6969dd9b544..ca546e07d88 100644 --- a/test/built-ins/TypedArray/prototype/reduce/callbackfn-return-does-not-change-instance.js +++ b/test/built-ins/TypedArray/prototype/reduce/callbackfn-return-does-not-change-instance.js @@ -8,8 +8,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([0, 1, 0]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0, 1, 0])); sample.reduce(function() { return 42; diff --git a/test/built-ins/TypedArray/prototype/reduce/callbackfn-returns-abrupt.js b/test/built-ins/TypedArray/prototype/reduce/callbackfn-returns-abrupt.js index 5391e6fd07e..7d866462a13 100644 --- a/test/built-ins/TypedArray/prototype/reduce/callbackfn-returns-abrupt.js +++ b/test/built-ins/TypedArray/prototype/reduce/callbackfn-returns-abrupt.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.throws(Test262Error, function() { sample.reduce(function() { diff --git a/test/built-ins/TypedArray/prototype/reduce/callbackfn-set-value-during-iteration.js b/test/built-ins/TypedArray/prototype/reduce/callbackfn-set-value-during-iteration.js index 41ae9c0c7bb..a8ab14d9fc6 100644 --- a/test/built-ins/TypedArray/prototype/reduce/callbackfn-set-value-during-iteration.js +++ b/test/built-ins/TypedArray/prototype/reduce/callbackfn-set-value-during-iteration.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [Reflect.set, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var newVal = 0; sample.reduce(function(acc, val, i) { @@ -46,4 +46,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(sample[0], 7, "changed values after iteration [0] == 7"); assert.sameValue(sample[1], 1, "changed values after iteration [1] == 1"); assert.sameValue(sample[2], 2, "changed values after iteration [2] == 2"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/callbackfn-this.js b/test/built-ins/TypedArray/prototype/reduce/callbackfn-this.js index 8c56605bca9..3c5d242f04e 100644 --- a/test/built-ins/TypedArray/prototype/reduce/callbackfn-this.js +++ b/test/built-ins/TypedArray/prototype/reduce/callbackfn-this.js @@ -28,8 +28,8 @@ features: [TypedArray] var expected = (function() { return this; })(); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var results = []; diff --git a/test/built-ins/TypedArray/prototype/reduce/detached-buffer.js b/test/built-ins/TypedArray/prototype/reduce/detached-buffer.js index b599a8a7349..133253fa1fb 100644 --- a/test/built-ins/TypedArray/prototype/reduce/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/reduce/detached-buffer.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.reduce(callbackfn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/empty-instance-return-initialvalue.js b/test/built-ins/TypedArray/prototype/reduce/empty-instance-return-initialvalue.js index 0f69ae23d2e..b8c6dba5b4c 100644 --- a/test/built-ins/TypedArray/prototype/reduce/empty-instance-return-initialvalue.js +++ b/test/built-ins/TypedArray/prototype/reduce/empty-instance-return-initialvalue.js @@ -38,4 +38,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(result, 42); assert.sameValue(called, false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/empty-instance-with-no-initialvalue-throws.js b/test/built-ins/TypedArray/prototype/reduce/empty-instance-with-no-initialvalue-throws.js index c19f37feeb3..fd902fd1f08 100644 --- a/test/built-ins/TypedArray/prototype/reduce/empty-instance-with-no-initialvalue-throws.js +++ b/test/built-ins/TypedArray/prototype/reduce/empty-instance-with-no-initialvalue-throws.js @@ -31,4 +31,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/reduce/get-length-uses-internal-arraylength.js index 53f976f0f8f..af1029fcac2 100644 --- a/test/built-ins/TypedArray/prototype/reduce/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/reduce/get-length-uses-internal-arraylength.js @@ -30,8 +30,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); var calls = 0; Object.defineProperty(TA.prototype, "length", desc); @@ -43,4 +43,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(getCalls, 0, "ignores length properties"); assert.sameValue(calls, 2, "iterations are not affected by custom length"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/result-is-last-callbackfn-return.js b/test/built-ins/TypedArray/prototype/reduce/result-is-last-callbackfn-return.js index 17280f15903..ae232ebe013 100644 --- a/test/built-ins/TypedArray/prototype/reduce/result-is-last-callbackfn-return.js +++ b/test/built-ins/TypedArray/prototype/reduce/result-is-last-callbackfn-return.js @@ -34,11 +34,11 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var calls, result; calls = 0; - result = new TA([1, 2, 3]).reduce(function() { + result = new TA(makeCtorArg([1, 2, 3])).reduce(function() { calls++; if (calls == 2) { @@ -48,7 +48,7 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(result, 42, "using default accumulator"); calls = 0; - result = new TA([1, 2, 3]).reduce(function() { + result = new TA(makeCtorArg([1, 2, 3])).reduce(function() { calls++; if (calls == 3) { diff --git a/test/built-ins/TypedArray/prototype/reduce/result-of-any-type.js b/test/built-ins/TypedArray/prototype/reduce/result-of-any-type.js index 0519cc88a59..00fe963f120 100644 --- a/test/built-ins/TypedArray/prototype/reduce/result-of-any-type.js +++ b/test/built-ins/TypedArray/prototype/reduce/result-of-any-type.js @@ -34,8 +34,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); [ ["test262", "string"], ["", "empty string"], diff --git a/test/built-ins/TypedArray/prototype/reduce/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/reduce/return-abrupt-from-this-out-of-bounds.js index 3c0d872c232..0e90f0b6145 100644 --- a/test/built-ins/TypedArray/prototype/reduce/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/reduce/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.reduce(() => {}); throw new Test262Error('reduce completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduce/return-first-value-without-callbackfn.js b/test/built-ins/TypedArray/prototype/reduce/return-first-value-without-callbackfn.js index 236b332e4f6..ed1711a4628 100644 --- a/test/built-ins/TypedArray/prototype/reduce/return-first-value-without-callbackfn.js +++ b/test/built-ins/TypedArray/prototype/reduce/return-first-value-without-callbackfn.js @@ -31,9 +31,9 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var called = false; - var result = new TA([42]).reduce(function() { + var result = new TA(makeCtorArg([42])).reduce(function() { called = true; }); diff --git a/test/built-ins/TypedArray/prototype/reduce/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/reduce/values-are-not-cached.js index e091df1f9da..031983b8290 100644 --- a/test/built-ins/TypedArray/prototype/reduce/values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/reduce/values-are-not-cached.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); sample.reduce(function(a, v, i) { if (i < sample.length - 1) { @@ -38,4 +38,4 @@ testWithTypedArrayConstructors(function(TA) { v, 42, "method does not cache values before callbackfn calls" ); }, 0); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-custom-accumulator.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-custom-accumulator.js index 1d5d7dfbfe6..8b1cdaf0cfd 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-custom-accumulator.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-custom-accumulator.js @@ -23,12 +23,12 @@ info: | kValue, k, O »). d. Decrease k by 1. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-default-accumulator.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-default-accumulator.js index ec251e7096b..8788f455877 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-default-accumulator.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-default-accumulator.js @@ -32,12 +32,12 @@ info: | kValue, k, O »). d. Decrease k by 1. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-detachbuffer.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-detachbuffer.js index 64edd5a57db..d25ffa51d0f 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-detachbuffer.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-detachbuffer.js @@ -22,7 +22,7 @@ info: | i. Let accumulator be ? Call(callbackfn, undefined, « accumulator, kValue, k, O »). ... -includes: [detachArrayBuffer.js, testBigIntTypedArray.js] +includes: [detachArrayBuffer.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -39,4 +39,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }, 0); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-is-not-callable-throws.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-is-not-callable-throws.js index 880e1a1a965..3e3a4715f02 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-is-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-is-not-callable-throws.js @@ -18,12 +18,12 @@ info: | 3. If IsCallable(callbackfn) is false, throw a TypeError exception. 4. If len is 0 and initialValue is not present, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(TypeError, function() { sample.reduceRight(); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-no-iteration-over-non-integer-properties.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-no-iteration-over-non-integer-properties.js index 9dc6d1771b6..2adbf536a21 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-no-iteration-over-non-integer-properties.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-no-iteration-over-non-integer-properties.js @@ -23,12 +23,12 @@ info: | kValue, k, O »). d. Decrease k by 1. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([7n, 8n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7n, 8n])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-not-called-on-empty.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-not-called-on-empty.js index ce9dc4b0554..3dec96ab450 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-not-called-on-empty.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-not-called-on-empty.js @@ -25,7 +25,7 @@ info: | kValue, k, O »). d. Decrease k by 1. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -37,4 +37,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }, undefined); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-return-does-not-change-instance.js index 2dccce9e37e..8b353f4f570 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-return-does-not-change-instance.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-return-does-not-change-instance.js @@ -4,12 +4,12 @@ esid: sec-%typedarray%.prototype.reduceright description: > The callbackfn return does not change the `this` instance -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([0n, 1n, 0n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0n, 1n, 0n])); sample.reduceRight(function() { return 42; diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-returns-abrupt.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-returns-abrupt.js index ce1cc6d0e67..21587e03ffd 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-returns-abrupt.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-returns-abrupt.js @@ -22,12 +22,12 @@ info: | i. Let accumulator be ? Call(callbackfn, undefined, « accumulator, kValue, k, O »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.throws(Test262Error, function() { sample.reduceRight(function() { diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-set-value-during-iteration.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-set-value-during-iteration.js index 3442517c0b5..e7ff0179b09 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-set-value-during-iteration.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-set-value-during-iteration.js @@ -14,12 +14,12 @@ info: | performing a [[Get]] of "length". 22.1.3.20 Array.prototype.reduceRight ( callbackfn [ , initialValue ] ) -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect.set, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var newVal = 0n; sample.reduceRight(function(acc, val, i) { @@ -46,4 +46,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(sample[0], 2n, "changed values after iteration [0] == 2"); assert.sameValue(sample[1], 1n, "changed values after iteration [1] == 1"); assert.sameValue(sample[2], 7n, "changed values after iteration [2] == 7"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-this.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-this.js index 6210eea5047..9a564bf960c 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-this.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-this.js @@ -23,14 +23,14 @@ info: | kValue, k, O »). d. Decrease k by 1. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ var expected = (function() { return this; })(); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var results = []; diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/detached-buffer.js index 08e63543326..3bad2c54ed6 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.reduceRight(callbackfn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/empty-instance-return-initialvalue.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/empty-instance-return-initialvalue.js index 2818b78b111..7a066ea9303 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/empty-instance-return-initialvalue.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/empty-instance-return-initialvalue.js @@ -27,7 +27,7 @@ info: | 8. Repeat, while k ≥ 0 ... 9. Return accumulator. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -39,4 +39,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(result, 42); assert.sameValue(called, false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/empty-instance-with-no-initialvalue-throws.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/empty-instance-with-no-initialvalue-throws.js index 65b07a1ce15..51d93596386 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/empty-instance-with-no-initialvalue-throws.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/empty-instance-with-no-initialvalue-throws.js @@ -17,7 +17,7 @@ info: | ... 4. If len is 0 and initialValue is not present, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -31,4 +31,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/get-length-uses-internal-arraylength.js index 2aae5480ccf..47a8d6c15a8 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/get-length-uses-internal-arraylength.js @@ -16,7 +16,7 @@ info: | 1. Let O be ? ToObject(this value). 2. Let len be ? ToLength(? Get(O, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -30,8 +30,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); var calls = 0; Object.defineProperty(TA.prototype, "length", desc); @@ -43,4 +43,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(getCalls, 0, "ignores length properties"); assert.sameValue(calls, 2, "iterations are not affected by custom length"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-is-last-callbackfn-return.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-is-last-callbackfn-return.js index 140b095cb77..0876333e71e 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-is-last-callbackfn-return.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-is-last-callbackfn-return.js @@ -32,15 +32,15 @@ info: | kValue, k, O »). d. Decrease k by 1. 9. Return accumulator. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var calls, result; calls = 0; - result = new TA([1n, 2n, 3n]).reduceRight(function() { + result = new TA(makeCtorArg([1n, 2n, 3n])).reduceRight(function() { calls++; if (calls == 2) { @@ -50,7 +50,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(result, 42, "using default accumulator"); calls = 0; - result = new TA([1n, 2n, 3n]).reduceRight(function() { + result = new TA(makeCtorArg([1n, 2n, 3n])).reduceRight(function() { calls++; if (calls == 3) { diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-of-any-type.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-of-any-type.js index a70a4135ded..f9071db2346 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-of-any-type.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-of-any-type.js @@ -32,12 +32,12 @@ info: | kValue, k, O »). d. Decrease k by 1. 9. Return accumulator. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); [ ["test262", "string"], ["", "empty string"], diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/return-abrupt-from-this-out-of-bounds.js index 6c6bc72426d..8e8c97f6f70 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.reduceright description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.reduceRight(() => {}); throw new Test262Error('reduceRight completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/return-first-value-without-callbackfn.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/return-first-value-without-callbackfn.js index 71ada594966..b1b4a9c65f4 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/return-first-value-without-callbackfn.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/return-first-value-without-callbackfn.js @@ -28,13 +28,13 @@ info: | 8. Repeat, while k ≥ 0 ... 9. Return accumulator. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var called = false; - var result = new TA([42n]).reduceRight(function() { + var result = new TA(makeCtorArg([42n])).reduceRight(function() { called = true; }); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/values-are-not-cached.js index c0ae38dd750..421feff4dfa 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/values-are-not-cached.js @@ -23,12 +23,12 @@ info: | kValue, k, O »). d. Decrease k by 1. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([44n, 43n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([44n, 43n, 42n])); sample.reduceRight(function(a, v, i) { if (i > 0) { @@ -39,4 +39,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { v, 42n, "method does not cache values before callbackfn calls" ); }, 0); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-arguments-custom-accumulator.js b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-arguments-custom-accumulator.js index aecfae24eba..8107867bebc 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-arguments-custom-accumulator.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-arguments-custom-accumulator.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-arguments-default-accumulator.js b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-arguments-default-accumulator.js index 51509985e92..a33d0aec580 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-arguments-default-accumulator.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-arguments-default-accumulator.js @@ -36,8 +36,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-detachbuffer.js b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-detachbuffer.js index 498c5a5a3dd..c6f517c5ec9 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-detachbuffer.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-detachbuffer.js @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(function(TA) { }, 0); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-is-not-callable-throws.js b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-is-not-callable-throws.js index 36cd5ab9ad9..94d3738788e 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-is-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-is-not-callable-throws.js @@ -22,8 +22,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.throws(TypeError, function() { sample.reduceRight(); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-no-iteration-over-non-integer-properties.js b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-no-iteration-over-non-integer-properties.js index b81c9a91ed5..10aa5ee8692 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-no-iteration-over-non-integer-properties.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-no-iteration-over-non-integer-properties.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([7, 8]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7, 8])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-not-called-on-empty.js b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-not-called-on-empty.js index 94b19c33685..ce7443ce2b5 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-not-called-on-empty.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-not-called-on-empty.js @@ -37,4 +37,4 @@ testWithTypedArrayConstructors(function(TA) { }, undefined); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-resize.js b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-resize.js index c1ccad10491..d73bb0de945 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-resize.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-resize.js @@ -72,4 +72,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.sameValue(result, expectedIndices[expectedIndices.length - 1], 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-return-does-not-change-instance.js index d1c746ffaf8..67ade0a99e3 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-return-does-not-change-instance.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-return-does-not-change-instance.js @@ -8,8 +8,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([0, 1, 0]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0, 1, 0])); sample.reduceRight(function() { return 42; diff --git a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-returns-abrupt.js b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-returns-abrupt.js index dd92d24bd5e..ee532a193eb 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-returns-abrupt.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-returns-abrupt.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.throws(Test262Error, function() { sample.reduceRight(function() { diff --git a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-set-value-during-iteration.js b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-set-value-during-iteration.js index 290f197c031..105a8150bdd 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-set-value-during-iteration.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-set-value-during-iteration.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [Reflect.set, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var newVal = 0; sample.reduceRight(function(acc, val, i) { @@ -46,4 +46,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(sample[0], 2, "changed values after iteration [0] == 2"); assert.sameValue(sample[1], 1, "changed values after iteration [1] == 1"); assert.sameValue(sample[2], 7, "changed values after iteration [2] == 7"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-this.js b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-this.js index acddf6dd340..41663744c79 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-this.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/callbackfn-this.js @@ -29,8 +29,8 @@ features: [TypedArray] var expected = (function() { return this; })(); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var results = []; diff --git a/test/built-ins/TypedArray/prototype/reduceRight/detached-buffer.js b/test/built-ins/TypedArray/prototype/reduceRight/detached-buffer.js index fa40304738b..1270aed0678 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/detached-buffer.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.reduceRight(callbackfn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/empty-instance-return-initialvalue.js b/test/built-ins/TypedArray/prototype/reduceRight/empty-instance-return-initialvalue.js index 57193c3371c..512b3f77ef9 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/empty-instance-return-initialvalue.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/empty-instance-return-initialvalue.js @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(result, 42); assert.sameValue(called, false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/empty-instance-with-no-initialvalue-throws.js b/test/built-ins/TypedArray/prototype/reduceRight/empty-instance-with-no-initialvalue-throws.js index 0e65cbe4721..e0b9a72c3c1 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/empty-instance-with-no-initialvalue-throws.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/empty-instance-with-no-initialvalue-throws.js @@ -31,4 +31,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/reduceRight/get-length-uses-internal-arraylength.js index 32c560242c3..7f76d16bb38 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/get-length-uses-internal-arraylength.js @@ -30,8 +30,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); var calls = 0; Object.defineProperty(TA.prototype, "length", desc); @@ -43,4 +43,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(getCalls, 0, "ignores length properties"); assert.sameValue(calls, 2, "iterations are not affected by custom length"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/result-is-last-callbackfn-return.js b/test/built-ins/TypedArray/prototype/reduceRight/result-is-last-callbackfn-return.js index 67504f27be7..86008960e8a 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/result-is-last-callbackfn-return.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/result-is-last-callbackfn-return.js @@ -36,11 +36,11 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var calls, result; calls = 0; - result = new TA([1, 2, 3]).reduceRight(function() { + result = new TA(makeCtorArg([1, 2, 3])).reduceRight(function() { calls++; if (calls == 2) { @@ -50,7 +50,7 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(result, 42, "using default accumulator"); calls = 0; - result = new TA([1, 2, 3]).reduceRight(function() { + result = new TA(makeCtorArg([1, 2, 3])).reduceRight(function() { calls++; if (calls == 3) { diff --git a/test/built-ins/TypedArray/prototype/reduceRight/result-of-any-type.js b/test/built-ins/TypedArray/prototype/reduceRight/result-of-any-type.js index a7f2d6df87e..b771524e88a 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/result-of-any-type.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/result-of-any-type.js @@ -36,8 +36,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); [ ["test262", "string"], ["", "empty string"], diff --git a/test/built-ins/TypedArray/prototype/reduceRight/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/reduceRight/return-abrupt-from-this-out-of-bounds.js index 3ba3a6c89e5..98f6db8d58d 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.reduceRight(() => {}); throw new Test262Error('reduceRight completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/return-first-value-without-callbackfn.js b/test/built-ins/TypedArray/prototype/reduceRight/return-first-value-without-callbackfn.js index 7100baf43a8..8cd7d2a01dd 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/return-first-value-without-callbackfn.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/return-first-value-without-callbackfn.js @@ -32,9 +32,9 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var called = false; - var result = new TA([42]).reduceRight(function() { + var result = new TA(makeCtorArg([42])).reduceRight(function() { called = true; }); diff --git a/test/built-ins/TypedArray/prototype/reduceRight/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/reduceRight/values-are-not-cached.js index fb93d3e208c..be5eb080869 100644 --- a/test/built-ins/TypedArray/prototype/reduceRight/values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/reduceRight/values-are-not-cached.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([44, 43, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([44, 43, 42])); sample.reduceRight(function(a, v, i) { if (i > 0) { @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(function(TA) { v, 42, "method does not cache values before callbackfn calls" ); }, 0); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/reverse/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/reverse/BigInt/detached-buffer.js index 5067380d565..ddf7fee94aa 100644 --- a/test/built-ins/TypedArray/prototype/reverse/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/reverse/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.reverse(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reverse/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/reverse/BigInt/get-length-uses-internal-arraylength.js index 0a08956c729..89ddc583d98 100644 --- a/test/built-ins/TypedArray/prototype/reverse/BigInt/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/reverse/BigInt/get-length-uses-internal-arraylength.js @@ -16,7 +16,7 @@ info: | 1. Let O be ? ToObject(this value). 2. Let len be ? ToLength(? Get(O, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -30,8 +30,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); Object.defineProperty(TA.prototype, "length", desc); Object.defineProperty(sample, "length", desc); @@ -39,4 +39,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.reverse(); assert.sameValue(getCalls, 0, "ignores length properties"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reverse/BigInt/preserves-non-numeric-properties.js b/test/built-ins/TypedArray/prototype/reverse/BigInt/preserves-non-numeric-properties.js index a06d52f9804..70402a3b3a9 100644 --- a/test/built-ins/TypedArray/prototype/reverse/BigInt/preserves-non-numeric-properties.js +++ b/test/built-ins/TypedArray/prototype/reverse/BigInt/preserves-non-numeric-properties.js @@ -15,16 +15,16 @@ info: | ... 6. Return O. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ var s = Symbol("1"); -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample, result; - sample = new TA(2); + sample = new TA(makeCtorArg(2)); sample.foo = 42; sample.bar = "bar"; sample[s] = 1; @@ -32,4 +32,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(result.foo, 42, "sample.foo === 42"); assert.sameValue(result.bar, "bar", "sample.bar === 'bar'"); assert.sameValue(result[s], 1, "sample[s] === 1"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/reverse/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/reverse/BigInt/return-abrupt-from-this-out-of-bounds.js index ec55d9ffbe1..ee3cfb03ece 100644 --- a/test/built-ins/TypedArray/prototype/reverse/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/reverse/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.reverse description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.reverse(); throw new Test262Error('reverse completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reverse/BigInt/returns-original-object.js b/test/built-ins/TypedArray/prototype/reverse/BigInt/returns-original-object.js index c9f8fdafd7d..037c8d96bb1 100644 --- a/test/built-ins/TypedArray/prototype/reverse/BigInt/returns-original-object.js +++ b/test/built-ins/TypedArray/prototype/reverse/BigInt/returns-original-object.js @@ -15,7 +15,7 @@ info: | ... 6. Return O. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(result, sample, "returns the same object (empty instance)"); assert.sameValue(sample.buffer, buffer, "keeps the same buffer (empty instance)"); assert.sameValue(sample.length, 0, "length is preserved (empty instance)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reverse/BigInt/reverts.js b/test/built-ins/TypedArray/prototype/reverse/BigInt/reverts.js index 92aa0eb3e9f..20ea299c2a7 100644 --- a/test/built-ins/TypedArray/prototype/reverse/BigInt/reverts.js +++ b/test/built-ins/TypedArray/prototype/reverse/BigInt/reverts.js @@ -15,7 +15,7 @@ info: | ... 6. Return O. -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ @@ -54,4 +54,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert( compareArray(sample, [42n, 0n, 1n, 17n]) ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reverse/detached-buffer.js b/test/built-ins/TypedArray/prototype/reverse/detached-buffer.js index 904c0ab1c23..f21ca1509b7 100644 --- a/test/built-ins/TypedArray/prototype/reverse/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/reverse/detached-buffer.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.reverse(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reverse/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/reverse/get-length-uses-internal-arraylength.js index 4a51f2ffbcf..59e3d1858d2 100644 --- a/test/built-ins/TypedArray/prototype/reverse/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/reverse/get-length-uses-internal-arraylength.js @@ -30,8 +30,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); Object.defineProperty(TA.prototype, "length", desc); Object.defineProperty(sample, "length", desc); @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(function(TA) { sample.reverse(); assert.sameValue(getCalls, 0, "ignores length properties"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reverse/preserves-non-numeric-properties.js b/test/built-ins/TypedArray/prototype/reverse/preserves-non-numeric-properties.js index 730c4b0bd60..00efdaaceb9 100644 --- a/test/built-ins/TypedArray/prototype/reverse/preserves-non-numeric-properties.js +++ b/test/built-ins/TypedArray/prototype/reverse/preserves-non-numeric-properties.js @@ -21,10 +21,10 @@ features: [Symbol, TypedArray] var s = Symbol("1"); -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample, result; - sample = new TA(2); + sample = new TA(makeCtorArg(2)); sample.foo = 42; sample.bar = "bar"; sample[s] = 1; @@ -32,4 +32,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(result.foo, 42, "sample.foo === 42"); assert.sameValue(result.bar, "bar", "sample.bar === 'bar'"); assert.sameValue(result[s], 1, "sample[s] === 1"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/reverse/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/reverse/return-abrupt-from-this-out-of-bounds.js index 1bf8d67fa00..f50f9e96273 100644 --- a/test/built-ins/TypedArray/prototype/reverse/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/reverse/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.reverse(); throw new Test262Error('reverse completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reverse/returns-original-object.js b/test/built-ins/TypedArray/prototype/reverse/returns-original-object.js index b1330aae7b8..56de68b2e53 100644 --- a/test/built-ins/TypedArray/prototype/reverse/returns-original-object.js +++ b/test/built-ins/TypedArray/prototype/reverse/returns-original-object.js @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(result, sample, "returns the same object (empty instance)"); assert.sameValue(sample.buffer, buffer, "keeps the same buffer (empty instance)"); assert.sameValue(sample.length, 0, "length is preserved (empty instance)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/reverse/reverts.js b/test/built-ins/TypedArray/prototype/reverse/reverts.js index 5bec740e5b3..f127856223e 100644 --- a/test/built-ins/TypedArray/prototype/reverse/reverts.js +++ b/test/built-ins/TypedArray/prototype/reverse/reverts.js @@ -54,4 +54,4 @@ testWithTypedArrayConstructors(function(TA) { assert( compareArray(sample, [42, 0, 1, 17]) ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-negative-integer-offset-throws.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-negative-integer-offset-throws.js index 18de4d017b4..2d562409d4e 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-negative-integer-offset-throws.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-negative-integer-offset-throws.js @@ -14,12 +14,12 @@ info: | 6. Let targetOffset be ? ToInteger(offset). 7. If targetOffset < 0, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(4); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(4)); assert.throws(RangeError, function() { sample.set([1n], -1); @@ -32,4 +32,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { sample.set([1n], -Infinity); }, "-Infinity"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-offset-tointeger.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-offset-tointeger.js index e5d50463483..763b727f3b0 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-offset-tointeger.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-offset-tointeger.js @@ -14,82 +14,82 @@ info: | 6. Let targetOffset be ? ToInteger(offset). 7. If targetOffset < 0, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], ""); assert(compareArray(sample, [42n, 2n]), "the empty string"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], "0"); assert(compareArray(sample, [42n, 2n]), "'0'"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], false); assert(compareArray(sample, [42n, 2n]), "false"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], 0.1); assert(compareArray(sample, [42n, 2n]), "0.1"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], 0.9); assert(compareArray(sample, [42n, 2n]), "0.9"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], -0.5); assert(compareArray(sample, [42n, 2n]), "-0.5"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], 1.1); assert(compareArray(sample, [1n, 42n]), "1.1"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], NaN); assert(compareArray(sample, [42n, 2n]), "NaN"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], null); assert(compareArray(sample, [42n, 2n]), "null"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], undefined); assert(compareArray(sample, [42n, 2n]), "undefined"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], {}); assert(compareArray(sample, [42n, 2n]), "{}"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], []); assert(compareArray(sample, [42n, 2n]), "[]"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], [0]); assert(compareArray(sample, [42n, 2n]), "[0]"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], true); assert(compareArray(sample, [1n, 42n]), "true"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], "1"); assert(compareArray(sample, [1n, 42n]), "'1'"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], [1]); assert(compareArray(sample, [1n, 42n]), "[1]"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], { valueOf: function() {return 1;} }); assert(compareArray(sample, [1n, 42n]), "valueOf"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set([42n], { toString: function() {return 1;} }); assert(compareArray(sample, [1n, 42n]), "toString"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-primitive-toobject.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-primitive-toobject.js index 7647c8b273a..4dcae955b02 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-primitive-toobject.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-primitive-toobject.js @@ -22,28 +22,28 @@ info: | [...] f. Perform SetValueInBuffer(targetBuffer, targetByteIndex, targetType, value, true, Unordered). [...] -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray, Symbol] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var ta1 = new TA([1n, 2n, 3n, 4n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var ta1 = new TA(makeCtorArg([1n, 2n, 3n, 4n])); ta1.set("567"); assert.compareArray(ta1, [5n, 6n, 7n, 4n], "string"); - var ta2 = new TA([1n, 2n, 3n]); + var ta2 = new TA(makeCtorArg([1n, 2n, 3n])); ta2.set(-10, 2); assert.compareArray(ta2, [1n, 2n, 3n], "number"); - var ta3 = new TA([1n]); + var ta3 = new TA(makeCtorArg([1n])); ta3.set(false); assert.compareArray(ta3, [1n], "boolean"); - var ta4 = new TA([1n, 2n]); + var ta4 = new TA(makeCtorArg([1n, 2n])); ta4.set(Symbol("desc"), 0); assert.compareArray(ta4, [1n, 2n], "symbol"); - var ta5 = new TA([1n, 2n]); + var ta5 = new TA(makeCtorArg([1n, 2n])); ta5.set(4n, 1); assert.compareArray(ta5, [1n, 2n], "bigint"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-length.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-length.js index bd6a2872398..64f45d84424 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-length.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-length.js @@ -13,7 +13,7 @@ info: | ... 16. Let srcLength be ? ToLength(? Get(src, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -24,10 +24,10 @@ Object.defineProperty(obj, "length", { } }); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([1n, 2n, 3n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1n, 2n, 3n])); assert.throws(Test262Error, function() { sample.set(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-value.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-value.js index 237c9464588..eeba8b5909b 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-value.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-value.js @@ -18,11 +18,11 @@ info: | d. Perform SetValueInBuffer(targetBuffer, targetByteIndex, targetType, kNumber). ... -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var obj = { length: 4, "0": 42n, @@ -35,7 +35,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { } }); - var sample = new TA([1n, 2n, 3n, 4n]); + var sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); assert.throws(Test262Error, function() { sample.set(obj); @@ -45,4 +45,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { compareArray(sample, [42n, 43n, 3n, 4n]), "values are set until exception" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length-symbol.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length-symbol.js index e0393870d1f..4e9607d121e 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length-symbol.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length-symbol.js @@ -13,7 +13,7 @@ info: | ... 16. Let srcLength be ? ToLength(? Get(src, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -21,10 +21,10 @@ var obj = { length: Symbol("1") }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([1n, 2n, 3n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1n, 2n, 3n])); assert.throws(TypeError, function() { sample.set(obj); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length.js index f2bea737434..2351f646dd0 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length.js @@ -13,7 +13,7 @@ info: | ... 16. Let srcLength be ? ToLength(? Get(src, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -33,8 +33,8 @@ var obj2 = { } }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([1n, 2n, 3n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1n, 2n, 3n])); assert.throws(Test262Error, function() { sample.set(obj1); @@ -43,4 +43,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.set(obj2); }, "toString"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value-symbol.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value-symbol.js index 683d318f0c7..6003013e876 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value-symbol.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value-symbol.js @@ -18,11 +18,11 @@ info: | d. Perform SetValueInBuffer(targetBuffer, targetByteIndex, targetType, kNumber). ... -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var obj = { length: 4, "0": 42n, @@ -31,7 +31,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { "3": 44n }; - var sample = new TA([1n, 2n, 3n, 4n]); + var sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); assert.throws(TypeError, function() { sample.set(obj); @@ -41,4 +41,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { compareArray(sample, [42n, 43n, 3n, 4n]), "values are set until exception" ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value.js index 7195d3f7d2d..92d4f232e3c 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value.js @@ -18,11 +18,11 @@ info: | d. Perform SetValueInBuffer(targetBuffer, targetByteIndex, targetType, kNumber). ... -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var obj = { length: 4, "0": 42n, @@ -35,7 +35,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { "3": 44n }; - var sample = new TA([1n, 2n, 3n, 4n]); + var sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); assert.throws(Test262Error, function() { sample.set(obj); @@ -45,4 +45,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { compareArray(sample, [42n, 43n, 3n, 4n]), "values are set until exception" ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-tointeger-offset-symbol.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-tointeger-offset-symbol.js index 63b3095ac55..d7294c6b026 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-tointeger-offset-symbol.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-tointeger-offset-symbol.js @@ -12,16 +12,16 @@ info: | 22.2.3.23.2 applies. ... 6. Let targetOffset be ? ToInteger(offset). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ var s = Symbol("1"); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.throws(TypeError, function() { sample.set([1n], s); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-tointeger-offset.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-tointeger-offset.js index ca31811e516..bda1b0e6edc 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-tointeger-offset.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-tointeger-offset.js @@ -12,7 +12,7 @@ info: | 22.2.3.23.2 applies. ... 6. Let targetOffset be ? ToInteger(offset). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -38,4 +38,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.set([], obj2); }, "abrupt from toString"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-toobject-offset.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-toobject-offset.js index d55c05cd5c6..bed306ceb09 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-toobject-offset.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-toobject-offset.js @@ -13,12 +13,12 @@ info: | ... 15. Let src be ? ToObject(array). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([1n, 2n, 3n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1n, 2n, 3n])); assert.throws(TypeError, function() { sample.set(undefined); @@ -27,4 +27,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.set(null); }, "null"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values-in-order.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values-in-order.js index 3eb5722efc2..9b6df38959d 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values-in-order.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values-in-order.js @@ -18,12 +18,12 @@ info: | d. Perform SetValueInBuffer(targetBuffer, targetByteIndex, targetType, kNumber). ... -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(5); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(5)); var calls = []; var obj = { length: 3 @@ -69,4 +69,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { compareArray(calls, [0, "0,0,0,0,0", 1, "0,42,0,0,0", 2, "0,42,43,0,0"]), "values are set in order" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values.js index 1e3a226f8d5..898af13bd6b 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values.js @@ -18,11 +18,11 @@ info: | Perform SetValueInBuffer(targetBuffer, targetByteIndex, targetType, kNumber). ... 22. Return undefined. -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var src = [42n, 43n]; var srcObj = { length: 2, @@ -31,33 +31,33 @@ testWithBigIntTypedArrayConstructors(function(TA) { }; var sample, result; - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(src, 0); assert(compareArray(sample, [42n, 43n, 3n, 4n]), "offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(src, 1); assert(compareArray(sample, [1n, 42n, 43n, 4n]), "offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(src, 2); assert(compareArray(sample, [1n, 2n, 42n, 43n]), "offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(srcObj, 0); assert(compareArray(sample, [7n, 17n, 3n, 4n]), "offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(srcObj, 1); assert(compareArray(sample, [1n, 7n, 17n, 4n]), "offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(srcObj, 2); assert(compareArray(sample, [1n, 2n, 7n, 17n]), "offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-tonumber-value-type-conversions.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-tonumber-value-type-conversions.js index d3d5c1aa4a7..aabe13fbea2 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-tonumber-value-type-conversions.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-tonumber-value-type-conversions.js @@ -18,11 +18,11 @@ info: | d. Perform SetValueInBuffer(targetBuffer, targetByteIndex, targetType, kNumber). ... -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var obj1 = { valueOf: function() { return 42n; @@ -38,7 +38,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { var arr = [false, true, obj1, [], [1]]; var sample = new TA(arr.length); - var expected = new TA([0n, 1n, 42n, 0n, 1n]); + var expected = new TA(makeCtorArg([0n, 1n, 42n, 0n, 1n])); sample.set(arr); @@ -46,4 +46,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { compareArray(sample, expected), "sample: [" + sample + "], expected: [" + expected + "]" ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-values-are-not-cached.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-values-are-not-cached.js index d6156af9759..239c5dfee9f 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-values-are-not-cached.js @@ -18,12 +18,12 @@ info: | d. Perform SetValueInBuffer(targetBuffer, targetByteIndex, targetType, kNumber). ... -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(5); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(5)); var obj = { length: 5, '1': 7n, @@ -44,4 +44,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.set(obj); assert(compareArray(sample, [42n, 43n, 44n, 45n, 46n])); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-target-arraylength-internal.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-target-arraylength-internal.js index a6e6a3d342d..5e9445eb03e 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-target-arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-target-arraylength-internal.js @@ -15,7 +15,7 @@ info: | ... 17. If srcLength + targetOffset > targetLength, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -29,8 +29,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); Object.defineProperty(TA.prototype, "length", desc); Object.defineProperty(sample, "length", desc); @@ -38,4 +38,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.set([42n, 43n]); assert.sameValue(getCalls, 0, "ignores length properties"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-targetbuffer-detached-on-tointeger-offset-throws.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-targetbuffer-detached-on-tointeger-offset-throws.js index a3747af9a2a..b6bc54d4995 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-targetbuffer-detached-on-tointeger-offset-throws.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-targetbuffer-detached-on-tointeger-offset-throws.js @@ -17,7 +17,7 @@ info: | slot. 9. If IsDetachedBuffer(targetBuffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(calledOffset, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-targetbuffer-detached-throws.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-targetbuffer-detached-throws.js index 0b54b20cf1a..e90286fabff 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-targetbuffer-detached-throws.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-targetbuffer-detached-throws.js @@ -18,7 +18,7 @@ info: | 15. Let src be ? ToObject(array). 16. Let srcLength be ? ToLength(? Get(src, "length")). ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -40,4 +40,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.set(obj); }, "IsDetachedBuffer happens before Get(src.length)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/boolean-tobigint.js b/test/built-ins/TypedArray/prototype/set/BigInt/boolean-tobigint.js index 8674f72db70..171c667be38 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/boolean-tobigint.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/boolean-tobigint.js @@ -33,14 +33,14 @@ info: | Argument Type: Boolean Result: Return 1n if prim is true and 0n if prim is false. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(2)); typedArray.set([false, true]) assert.sameValue(typedArray[0], 0n, "False converts to BigInt"); assert.sameValue(typedArray[1], 1n, "True converts to BigInt"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/null-tobigint.js b/test/built-ins/TypedArray/prototype/set/BigInt/null-tobigint.js index 081fc70144f..7285917ae47 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/null-tobigint.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/null-tobigint.js @@ -33,15 +33,15 @@ info: | Argument Type: Null Result: Throw a TypeError exception. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(1)); assert.throws(TypeError, function() { typedArray.set([null]); }, "abrupt completion from Null"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/number-tobigint.js b/test/built-ins/TypedArray/prototype/set/BigInt/number-tobigint.js index 4ac612a359f..c0985c79b68 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/number-tobigint.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/number-tobigint.js @@ -34,12 +34,12 @@ info: | Argument Type: Number Result: Throw a TypeError exception. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(1)); assert.throws(TypeError, function() { typedArray.set([1]); @@ -69,4 +69,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { typedArray.set([NaN]); }, "abrupt completion from Number: NaN"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/src-typedarray-big.js b/test/built-ins/TypedArray/prototype/set/BigInt/src-typedarray-big.js index 2208e9b87b2..60285073158 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/src-typedarray-big.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/src-typedarray-big.js @@ -15,7 +15,7 @@ info: | other does not, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -23,16 +23,16 @@ var srcTypedArray; var targetTypedArray; var testValue = 42n; -testWithBigIntTypedArrayConstructors(function(BTA1) { +testWithBigIntTypedArrayConstructors(function(BTA1, makeCtorArg) { - srcTypedArray = new BTA1([testValue]); + srcTypedArray = new BTA1(makeCtorArg([testValue])); - testWithBigIntTypedArrayConstructors(function(BTA2) { + testWithBigIntTypedArrayConstructors(function(BTA2, makeCtorArg) { targetTypedArray = new BTA2(1); targetTypedArray.set(srcTypedArray); assert.sameValue(targetTypedArray[0], testValue, "Setting BigInt TypedArray with BigInt TypedArray should succeed.") }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/src-typedarray-not-big-throws.js b/test/built-ins/TypedArray/prototype/set/BigInt/src-typedarray-not-big-throws.js index 3976207ec08..824e9df2825 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/src-typedarray-not-big-throws.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/src-typedarray-not-big-throws.js @@ -15,23 +15,23 @@ info: | other does not, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, testTypedArray.js] +includes: [testTypedArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ var bigTypedArray; var littleTypedArray; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { - littleTypedArray = new TA([1]); + littleTypedArray = new TA(makeCtorArg([1])); - testWithBigIntTypedArrayConstructors(function(BTA) { + testWithBigIntTypedArrayConstructors(function(BTA, makeCtorArg) { - bigTypedArray = new BTA(1); + bigTypedArray = new BTA(makeCtorArg(1)); assert.throws(TypeError, function() { bigTypedArray.set(littleTypedArray); }); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/string-nan-tobigint.js b/test/built-ins/TypedArray/prototype/set/BigInt/string-nan-tobigint.js index b1b810acb6a..c26fb44a24b 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/string-nan-tobigint.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/string-nan-tobigint.js @@ -36,15 +36,15 @@ info: | 2. If n is NaN, throw a SyntaxError exception. 3. Return n. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(1)); assert.throws(SyntaxError, function() { typedArray.set(["definately not a number"]); }, "StringToBigInt(prim) == NaN"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/string-tobigint.js b/test/built-ins/TypedArray/prototype/set/BigInt/string-tobigint.js index aaa22d03c4f..c31a7a37b5c 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/string-tobigint.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/string-tobigint.js @@ -36,12 +36,12 @@ info: | 2. If n is NaN, throw a SyntaxError exception. 3. Return n. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(2)); typedArray.set(['', '1']) assert.sameValue(typedArray[0], 0n); @@ -63,4 +63,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { typedArray.set(["1e7"]); }, "Replace the StrUnsignedDecimalLiteral production with DecimalDigits to not allow... exponents..."); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/symbol-tobigint.js b/test/built-ins/TypedArray/prototype/set/BigInt/symbol-tobigint.js index 7a8e4c28254..dafea15a6d2 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/symbol-tobigint.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/symbol-tobigint.js @@ -34,17 +34,17 @@ info: | Argument Type: Symbol Result: Throw a TypeError exception. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, Symbol] ---*/ var s = Symbol() -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA(1) +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(1)) assert.throws(TypeError, function() { typedArray.set([s]); }, "abrupt completion from Symbol"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-negative-integer-offset-throws.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-negative-integer-offset-throws.js index d5848d91ae7..010aeb6c100 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-negative-integer-offset-throws.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-negative-integer-offset-throws.js @@ -12,7 +12,7 @@ info: | ... 6. Let targetOffset be ? ToInteger(offset). 7. If targetOffset < 0, throw a RangeError exception. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -30,4 +30,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { sample.set(sample, -Infinity); }, "-Infinity"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-offset-tointeger.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-offset-tointeger.js index 3b191aa4e8b..3341e2c208a 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-offset-tointeger.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-offset-tointeger.js @@ -11,83 +11,83 @@ info: | the definition in 22.2.3.23.1 applies. ... 6. Let targetOffset be ? ToInteger(offset). -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - var src = new TA([42n]); + var src = new TA(makeCtorArg([42n])); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, ""); assert(compareArray(sample, [42n, 2n]), "the empty string"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, "0"); assert(compareArray(sample, [42n, 2n]), "'0'"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, false); assert(compareArray(sample, [42n, 2n]), "false"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, 0.1); assert(compareArray(sample, [42n, 2n]), "0.1"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, 0.9); assert(compareArray(sample, [42n, 2n]), "0.9"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, -0.5); assert(compareArray(sample, [42n, 2n]), "-0.5"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, 1.1); assert(compareArray(sample, [1n, 42n]), "1.1"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, NaN); assert(compareArray(sample, [42n, 2n]), "NaN"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, null); assert(compareArray(sample, [42n, 2n]), "null"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, undefined); assert(compareArray(sample, [42n, 2n]), "undefined"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, {}); assert(compareArray(sample, [42n, 2n]), "{}"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, []); assert(compareArray(sample, [42n, 2n]), "[]"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, [0]); assert(compareArray(sample, [42n, 2n]), "[0]"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, true); assert(compareArray(sample, [1n, 42n]), "true"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, "1"); assert(compareArray(sample, [1n, 42n]), "'1'"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, [1]); assert(compareArray(sample, [1n, 42n]), "[1]"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, { valueOf: function() {return 1;} }); assert(compareArray(sample, [1n, 42n]), "valueOf"); - sample = new TA([1n, 2n]); + sample = new TA(makeCtorArg([1n, 2n])); sample.set(src, { toString: function() {return 1;} }); assert(compareArray(sample, [1n, 42n]), "toString"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-return-abrupt-from-tointeger-offset-symbol.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-return-abrupt-from-tointeger-offset-symbol.js index 1dd14da8cd7..975f32e0179 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-return-abrupt-from-tointeger-offset-symbol.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-return-abrupt-from-tointeger-offset-symbol.js @@ -11,7 +11,7 @@ info: | the definition in 22.2.3.23.1 applies. ... 6. Let targetOffset be ? ToInteger(offset). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -23,4 +23,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.set(sample, s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-return-abrupt-from-tointeger-offset.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-return-abrupt-from-tointeger-offset.js index 7f3c93ff351..9b8daee83ed 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-return-abrupt-from-tointeger-offset.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-return-abrupt-from-tointeger-offset.js @@ -11,7 +11,7 @@ info: | the definition in 22.2.3.23.1 applies. ... 6. Let targetOffset be ? ToInteger(offset). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -37,4 +37,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.set(sample, obj2); }, "abrupt from toString"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type-sab.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type-sab.js index 3145bc80759..4256ed9da3a 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type-sab.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type-sab.js @@ -7,11 +7,11 @@ esid: sec-%typedarray%.prototype.set-typedarray-offset description: > Set values from different instances using the different buffer and different type. -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sab = new SharedArrayBuffer(2 * BigInt64Array.BYTES_PER_ELEMENT); var otherCtor = TA === BigInt64Array ? BigUint64Array : BigInt64Array; var src = new otherCtor(sab); @@ -19,17 +19,17 @@ testWithBigIntTypedArrayConstructors(function(TA) { src[1] = 43n; var sample, result; - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(src, 0); assert(compareArray(sample, [42n, 43n, 3n, 4n]), "src is SAB-backed, offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(src, 1); assert(compareArray(sample, [1n, 42n, 43n, 4n]), "src is SAB-backed, offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(src, 2); assert(compareArray(sample, [1n, 2n, 42n, 43n]), "src is SAB-backed, offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); @@ -101,4 +101,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { result = sample.set(src, 2); assert(compareArray(sample, [1n, 2n, 42n, 43n]), "src and sample are SAB-backed, offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type.js index 4456c5dccc5..c2b3fa9e4dc 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type.js @@ -22,27 +22,27 @@ info: | i. Let value be GetValueFromBuffer(srcBuffer, srcByteIndex, srcType). ii. Perform SetValueInBuffer(targetBuffer, targetByteIndex, targetType, value). -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var other = TA === BigInt64Array ? BigUint64Array : BigInt64Array; var src = new other([42n, 43n]); var sample, result; - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(src, 0); assert(compareArray(sample, [42n, 43n, 3n, 4n]), "offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(src, 1); assert(compareArray(sample, [1n, 42n, 43n, 4n]), "offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(src, 2); assert(compareArray(sample, [1n, 2n, 42n, 43n]), "offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type-sab.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type-sab.js index f179ba052cd..ab1da824e55 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type-sab.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type-sab.js @@ -6,11 +6,11 @@ esid: sec-%typedarray%.prototype.set-typedarray-offset description: > Set values from different instances using the different buffer and same constructor. srcBuffer values are cached. -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample, result; var sab = new SharedArrayBuffer(2 * TA.BYTES_PER_ELEMENT); @@ -18,22 +18,22 @@ testWithBigIntTypedArrayConstructors(function(TA) { src[0] = 42n; src[1] = 43n; - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(src, 1); assert(compareArray(sample, [1n, 42n, 43n, 4n]), "src is SAB-backed, offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(src, 0); assert(compareArray(sample, [42n, 43n, 3n, 4n]), "src is SAB-backed, offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(src, 2); assert(compareArray(sample, [1n, 2n, 42n, 43n]), "src is SAB-backed, offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - src = new TA([42n, 43n]); + src = new TA(makeCtorArg([42n, 43n])); sab = new SharedArrayBuffer(4 * TA.BYTES_PER_ELEMENT); sample = new TA(sab); @@ -101,4 +101,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { result = sample.set(src, 2); assert(compareArray(sample, [1n, 2n, 42n, 43n]), "src and sample are SAB-backed, offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type.js index d806b6a6c3c..b0f26dc3876 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type.js @@ -25,26 +25,26 @@ info: | value). ... 29. Return undefined. -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample, result; - var src = new TA([42n, 43n]); + var src = new TA(makeCtorArg([42n, 43n])); - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(src, 1); assert(compareArray(sample, [1n, 42n, 43n, 4n]), "offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(src, 0); assert(compareArray(sample, [42n, 43n, 3n, 4n]), "offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); result = sample.set(src, 2); assert(compareArray(sample, [1n, 2n, 42n, 43n]), "offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type-resized.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type-resized.js index 7ffaf60153c..1cf3add6bf3 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type-resized.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type-resized.js @@ -5,7 +5,7 @@ esid: sec-%typedarray%.prototype.set-typedarray-offset description: > Set values from different instances using the same buffer and same constructor when underlying ArrayBuffer has been resized -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray, resizable-arraybuffer] ---*/ @@ -42,4 +42,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { target.set(source); assert(compareArray(target, expected), 'following shrink'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type-sab.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type-sab.js index 7e60fba1393..d6d7027061c 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type-sab.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type-sab.js @@ -7,7 +7,7 @@ esid: sec-%typedarray%.prototype.set-typedarray-offset description: > Set values from different instances using the same buffer and same constructor. srcBuffer values are cached. -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -46,4 +46,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { result = sample.set(src, 2); assert(compareArray(sample, [1n, 2n, 1n, 2n]), "offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type.js index ab1454760b1..d1ae10702f7 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type.js @@ -26,28 +26,28 @@ info: | i. Let value be GetValueFromBuffer(srcBuffer, srcByteIndex, "Uint8"). ii. Perform SetValueInBuffer(targetBuffer, targetByteIndex, "Uint8", value). -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample, src, result; - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); src = new TA(sample.buffer, 0, 2); result = sample.set(src, 0); assert(compareArray(sample, [1n, 2n, 3n, 4n]), "offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); src = new TA(sample.buffer, 0, 2); result = sample.set(src, 1); assert(compareArray(sample, [1n, 1n, 2n, 4n]), "offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1n, 2n, 3n, 4n]); + sample = new TA(makeCtorArg([1n, 2n, 3n, 4n])); src = new TA(sample.buffer, 0, 2); result = sample.set(src, 2); assert(compareArray(sample, [1n, 2n, 1n, 2n]), "offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-arraylength-internal.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-arraylength-internal.js index 96ea335ec95..40fe3b54ace 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-arraylength-internal.js @@ -14,7 +14,7 @@ info: | ... 22. If srcLength + targetOffset > targetLength, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -28,9 +28,9 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); - var src = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); + var src = new TA(makeCtorArg([42n, 43n])); Object.defineProperty(TA.prototype, "length", desc); Object.defineProperty(src, "length", desc); @@ -38,4 +38,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.set(src); assert.sameValue(getCalls, 0, "ignores length properties"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-byteoffset-internal.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-byteoffset-internal.js index 35c3ace2a61..0d027a65674 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-byteoffset-internal.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-byteoffset-internal.js @@ -11,7 +11,7 @@ info: | ... 21. Let srcByteOffset be typedArray.[[ByteOffset]]. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -25,9 +25,9 @@ var desc = { Object.defineProperty(TypedArray.prototype, "byteOffset", desc); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); - var src = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); + var src = new TA(makeCtorArg([42n, 43n])); var other = TA === BigInt64Array ? BigUint64Array : BigInt64Array; var src2 = new other([42n, 43n]); var src3 = new other(sample.buffer, 0, 2); @@ -42,4 +42,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.set(src3); assert.sameValue(getCalls, 0, "ignores byteOffset properties"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-range-greather-than-target-throws-rangeerror.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-range-greather-than-target-throws-rangeerror.js index 2a24d0990a8..12ccbc10181 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-range-greather-than-target-throws-rangeerror.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-range-greather-than-target-throws-rangeerror.js @@ -18,34 +18,34 @@ info: | ... 22. If srcLength + targetOffset > targetLength, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample, src; - sample = new TA(2); - src = new TA(2); + sample = new TA(makeCtorArg(2)); + src = new TA(makeCtorArg(2)); assert.throws(RangeError, function() { sample.set(src, 1); }, "2 + 1 > 2"); - sample = new TA(1); - src = new TA(2); + sample = new TA(makeCtorArg(1)); + src = new TA(makeCtorArg(2)); assert.throws(RangeError, function() { sample.set(src, 0); }, "2 + 0 > 1"); - sample = new TA(1); - src = new TA(0); + sample = new TA(makeCtorArg(1)); + src = new TA(makeCtorArg(0)); assert.throws(RangeError, function() { sample.set(src, 2); }, "0 + 2 > 1"); - sample = new TA(2); - src = new TA(2); + sample = new TA(makeCtorArg(2)); + src = new TA(makeCtorArg(2)); assert.throws(RangeError, function() { sample.set(src, Infinity); }, "2 + Infinity > 2"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-srcbuffer-detached-during-tointeger-offset-throws.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-srcbuffer-detached-during-tointeger-offset-throws.js index 98ae8b2fa92..8f46df093d1 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-srcbuffer-detached-during-tointeger-offset-throws.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-srcbuffer-detached-during-tointeger-offset-throws.js @@ -16,7 +16,7 @@ info: | slot. 12. If IsDetachedBuffer(srcBuffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(calledOffset, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-arraylength-internal.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-arraylength-internal.js index 9f13dc2b1e6..8427e9cea44 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-arraylength-internal.js @@ -15,7 +15,7 @@ info: | ... 22. If srcLength + targetOffset > targetLength, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -29,9 +29,9 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); - var src = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); + var src = new TA(makeCtorArg([42n, 43n])); Object.defineProperty(TA.prototype, "length", desc); Object.defineProperty(sample, "length", desc); @@ -39,4 +39,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.set(src); assert.sameValue(getCalls, 0, "ignores length properties"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-byteoffset-internal.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-byteoffset-internal.js index 13b7978fc64..9fc4b311cda 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-byteoffset-internal.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-byteoffset-internal.js @@ -12,7 +12,7 @@ info: | ... 16. Let targetByteOffset be target.[[ByteOffset]]. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -26,9 +26,9 @@ var desc = { Object.defineProperty(TypedArray.prototype, "byteOffset", desc); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); - var src = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); + var src = new TA(makeCtorArg([42n, 43n])); var other = TA === BigInt64Array ? BigUint64Array : BigInt64Array; var src2 = new other([42n, 43n]); var src3 = new other(sample.buffer, 0, 2); @@ -41,4 +41,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.set(src3); assert.sameValue(getCalls, 0, "ignores byteoffset properties"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-out-of-bounds.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-out-of-bounds.js index 8058ab54421..85a8bc0957d 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.set-typedarray-offset description: Error when target TypedArray fails boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, resizable-arraybuffer] ---*/ @@ -40,4 +40,4 @@ testWithBigIntTypedArrayConstructors(TA => { target.set(source, 0); throw new Test262Error('The `set` operation completed successfully.'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-targetbuffer-detached-during-tointeger-offset-throws.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-targetbuffer-detached-during-tointeger-offset-throws.js index b57c24551c9..3a486f448ad 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-targetbuffer-detached-during-tointeger-offset-throws.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-targetbuffer-detached-during-tointeger-offset-throws.js @@ -16,7 +16,7 @@ info: | slot. 9. If IsDetachedBuffer(targetBuffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(calledOffset, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/undefined-tobigint.js b/test/built-ins/TypedArray/prototype/set/BigInt/undefined-tobigint.js index 8d741c995a5..f11e3fbd3fb 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/undefined-tobigint.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/undefined-tobigint.js @@ -33,15 +33,15 @@ info: | Argument Type: Undefined Result: Throw a TypeError exception. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(1)); assert.throws(TypeError, function() { typedArray.set([undefined]); }, "abrupt completion from undefined"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-negative-integer-offset-throws.js b/test/built-ins/TypedArray/prototype/set/array-arg-negative-integer-offset-throws.js index 2cab16c868a..a8e02416740 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-negative-integer-offset-throws.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-negative-integer-offset-throws.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(4); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(4)); assert.throws(RangeError, function() { sample.set([1], -1); @@ -32,4 +32,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { sample.set([1], -Infinity); }, "-Infinity"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-offset-tointeger.js b/test/built-ins/TypedArray/prototype/set/array-arg-offset-tointeger.js index a5ab5277325..2e4913dc1ed 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-offset-tointeger.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-offset-tointeger.js @@ -18,78 +18,78 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], ""); assert(compareArray(sample, [42, 2]), "the empty string"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], "0"); assert(compareArray(sample, [42, 2]), "'0'"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], false); assert(compareArray(sample, [42, 2]), "false"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], 0.1); assert(compareArray(sample, [42, 2]), "0.1"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], 0.9); assert(compareArray(sample, [42, 2]), "0.9"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], -0.5); assert(compareArray(sample, [42, 2]), "-0.5"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], 1.1); assert(compareArray(sample, [1, 42]), "1.1"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], NaN); assert(compareArray(sample, [42, 2]), "NaN"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], null); assert(compareArray(sample, [42, 2]), "null"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], undefined); assert(compareArray(sample, [42, 2]), "undefined"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], {}); assert(compareArray(sample, [42, 2]), "{}"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], []); assert(compareArray(sample, [42, 2]), "[]"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], [0]); assert(compareArray(sample, [42, 2]), "[0]"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], true); assert(compareArray(sample, [1, 42]), "true"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], "1"); assert(compareArray(sample, [1, 42]), "'1'"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], [1]); assert(compareArray(sample, [1, 42]), "[1]"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], { valueOf: function() {return 1;} }); assert(compareArray(sample, [1, 42]), "valueOf"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set([42], { toString: function() {return 1;} }); assert(compareArray(sample, [1, 42]), "toString"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-primitive-toobject.js b/test/built-ins/TypedArray/prototype/set/array-arg-primitive-toobject.js index f2bf83a2ad6..e3abbd85ee8 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-primitive-toobject.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-primitive-toobject.js @@ -27,20 +27,20 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray, Symbol] ---*/ -testWithTypedArrayConstructors(function(TA) { - var ta1 = new TA([1, 2, 3, 4, 5]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var ta1 = new TA(makeCtorArg([1, 2, 3, 4, 5])); ta1.set("678", 1); assert.compareArray(ta1, [1, 6, 7, 8, 5], "string"); - var ta2 = new TA([1, 2, 3]); + var ta2 = new TA(makeCtorArg([1, 2, 3])); ta2.set(0); assert.compareArray(ta2, [1, 2, 3], "number"); - var ta3 = new TA([1, 2, 3]); + var ta3 = new TA(makeCtorArg([1, 2, 3])); ta3.set(true, 2); assert.compareArray(ta3, [1, 2, 3], "boolean"); - var ta4 = new TA([1]); + var ta4 = new TA(makeCtorArg([1])); ta4.set(Symbol()); assert.compareArray(ta4, [1], "symbol"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-get-length.js b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-get-length.js index 2c67c5cc405..495fa07f2d7 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-get-length.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-get-length.js @@ -24,10 +24,10 @@ Object.defineProperty(obj, "length", { } }); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([1, 2, 3]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1, 2, 3])); assert.throws(Test262Error, function() { sample.set(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-get-value.js b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-get-value.js index afe08003037..5cd057e7223 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-get-value.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-get-value.js @@ -22,7 +22,7 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var obj = { length: 4, "0": 42, @@ -35,7 +35,7 @@ testWithTypedArrayConstructors(function(TA) { } }); - var sample = new TA([1, 2, 3, 4]); + var sample = new TA(makeCtorArg([1, 2, 3, 4])); assert.throws(Test262Error, function() { sample.set(obj); @@ -45,4 +45,4 @@ testWithTypedArrayConstructors(function(TA) { compareArray(sample, [42, 43, 3, 4]), "values are set until exception" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-length-symbol.js b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-length-symbol.js index f5b2289d8db..d1ed8e8ab3c 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-length-symbol.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-length-symbol.js @@ -21,10 +21,10 @@ var obj = { length: Symbol("1") }; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([1, 2, 3]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1, 2, 3])); assert.throws(TypeError, function() { sample.set(obj); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-length.js b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-length.js index 8252ebbef6c..d87acdb0062 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-length.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-length.js @@ -33,8 +33,8 @@ var obj2 = { } }; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([1, 2, 3]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1, 2, 3])); assert.throws(Test262Error, function() { sample.set(obj1); @@ -43,4 +43,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.set(obj2); }, "toString"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-tonumber-value-symbol.js b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-tonumber-value-symbol.js index 2afc27a6fa1..1a6ed01e39c 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-tonumber-value-symbol.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-tonumber-value-symbol.js @@ -22,7 +22,7 @@ includes: [testTypedArray.js, compareArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var obj = { length: 4, "0": 42, @@ -31,7 +31,7 @@ testWithTypedArrayConstructors(function(TA) { "3": 44 }; - var sample = new TA([1, 2, 3, 4]); + var sample = new TA(makeCtorArg([1, 2, 3, 4])); assert.throws(TypeError, function() { sample.set(obj); @@ -41,4 +41,4 @@ testWithTypedArrayConstructors(function(TA) { compareArray(sample, [42, 43, 3, 4]), "values are set until exception" ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-tonumber-value.js b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-tonumber-value.js index 438001533b2..0f0215ff929 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-tonumber-value.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-tonumber-value.js @@ -22,7 +22,7 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var obj = { length: 4, "0": 42, @@ -35,7 +35,7 @@ testWithTypedArrayConstructors(function(TA) { "3": 44 }; - var sample = new TA([1, 2, 3, 4]); + var sample = new TA(makeCtorArg([1, 2, 3, 4])); assert.throws(Test262Error, function() { sample.set(obj); @@ -45,4 +45,4 @@ testWithTypedArrayConstructors(function(TA) { compareArray(sample, [42, 43, 3, 4]), "values are set until exception" ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-tointeger-offset-symbol.js b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-tointeger-offset-symbol.js index 9f71edd7a85..134526a67dc 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-tointeger-offset-symbol.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-tointeger-offset-symbol.js @@ -18,10 +18,10 @@ features: [Symbol, TypedArray] var s = Symbol("1"); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.throws(TypeError, function() { sample.set([1], s); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-tointeger-offset.js b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-tointeger-offset.js index 62ac632d5f4..c6cbd416111 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-tointeger-offset.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-tointeger-offset.js @@ -38,4 +38,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.set([], obj2); }, "abrupt from toString"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-toobject-offset.js b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-toobject-offset.js index d3671239391..3da0ffd36b1 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-toobject-offset.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-toobject-offset.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([1, 2, 3]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1, 2, 3])); assert.throws(TypeError, function() { sample.set(undefined); @@ -27,4 +27,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.set(null); }, "null"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-set-values-in-order.js b/test/built-ins/TypedArray/prototype/set/array-arg-set-values-in-order.js index 9c1603a30de..cc28f1ef742 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-set-values-in-order.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-set-values-in-order.js @@ -22,8 +22,8 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(5); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(5)); var calls = []; var obj = { length: 3 @@ -69,4 +69,4 @@ testWithTypedArrayConstructors(function(TA) { compareArray(calls, [0, "0,0,0,0,0", 1, "0,42,0,0,0", 2, "0,42,43,0,0"]), "values are set in order" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-set-values.js b/test/built-ins/TypedArray/prototype/set/array-arg-set-values.js index 6e53dbc94e3..b0e0ba19d04 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-set-values.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-set-values.js @@ -22,7 +22,7 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var src = [42, 43]; var srcObj = { length: 2, @@ -31,33 +31,33 @@ testWithTypedArrayConstructors(function(TA) { }; var sample, result; - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(src, 0); assert(compareArray(sample, [42, 43, 3, 4]), "offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(src, 1); assert(compareArray(sample, [1, 42, 43, 4]), "offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(src, 2); assert(compareArray(sample, [1, 2, 42, 43]), "offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(srcObj, 0); assert(compareArray(sample, [7, 17, 3, 4]), "offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(srcObj, 1); assert(compareArray(sample, [1, 7, 17, 4]), "offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(srcObj, 2); assert(compareArray(sample, [1, 2, 7, 17]), "offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-src-tonumber-value-type-conversions.js b/test/built-ins/TypedArray/prototype/set/array-arg-src-tonumber-value-type-conversions.js index 02cfa8b659e..ffc3cafede8 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-src-tonumber-value-type-conversions.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-src-tonumber-value-type-conversions.js @@ -22,7 +22,7 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var obj1 = { valueOf: function() { return 42; @@ -38,7 +38,7 @@ testWithTypedArrayConstructors(function(TA) { var arr = ["1", "", false, true, null, obj1, obj2, [], [1]]; var sample = new TA(arr.length); - var expected = new TA([1, 0, 0, 1, 0, 42, 42, 0, 1]); + var expected = new TA(makeCtorArg([1, 0, 0, 1, 0, 42, 42, 0, 1])); sample.set(arr); @@ -46,4 +46,4 @@ testWithTypedArrayConstructors(function(TA) { compareArray(sample, expected), "sample: [" + sample + "], expected: [" + expected + "]" ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-src-values-are-not-cached.js b/test/built-ins/TypedArray/prototype/set/array-arg-src-values-are-not-cached.js index a3750490f11..9489cf8a7eb 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-src-values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-src-values-are-not-cached.js @@ -22,8 +22,8 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(5); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(5)); var obj = { length: 5, '1': 7, @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA) { sample.set(obj); assert(compareArray(sample, [42, 43, 44, 45, 46])); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-target-arraylength-internal.js b/test/built-ins/TypedArray/prototype/set/array-arg-target-arraylength-internal.js index 97bead5c9e0..c030edb30a4 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-target-arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-target-arraylength-internal.js @@ -29,8 +29,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); Object.defineProperty(TA.prototype, "length", desc); Object.defineProperty(sample, "length", desc); @@ -38,4 +38,4 @@ testWithTypedArrayConstructors(function(TA) { sample.set([42, 43]); assert.sameValue(getCalls, 0, "ignores length properties"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-on-get-src-value-no-throw.js b/test/built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-on-get-src-value-no-throw.js index 1d514622089..a9724775333 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-on-get-src-value-no-throw.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-on-get-src-value-no-throw.js @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(0, sample.byteLength); assert.sameValue(0, sample.byteOffset); assert.sameValue(0, sample.length); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-on-tointeger-offset-throws.js b/test/built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-on-tointeger-offset-throws.js index 19da6a335a5..a59b405d089 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-on-tointeger-offset-throws.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-on-tointeger-offset-throws.js @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(calledOffset, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-throws.js b/test/built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-throws.js index c8800a80666..a23a66fcee2 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-throws.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-throws.js @@ -40,4 +40,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.set(obj); }, "IsDetachedBuffer happens before Get(src.length)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/bit-precision.js b/test/built-ins/TypedArray/prototype/set/bit-precision.js index e023189d3de..10cda344662 100644 --- a/test/built-ins/TypedArray/prototype/set/bit-precision.js +++ b/test/built-ins/TypedArray/prototype/set/bit-precision.js @@ -19,7 +19,7 @@ includes: [nans.js, compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -function body(FA) { +testWithTypedArrayConstructors(function body(FA) { var source = new FA(NaNs); var target = new FA(NaNs.length); var sourceBytes, targetBytes; @@ -30,6 +30,4 @@ function body(FA) { targetBytes = new Uint8Array(target.buffer); assert(compareArray(sourceBytes, targetBytes)) -} - -testWithTypedArrayConstructors(body, floatArrayConstructors); +}, floatArrayConstructors); diff --git a/test/built-ins/TypedArray/prototype/set/src-typedarray-big-throws.js b/test/built-ins/TypedArray/prototype/set/src-typedarray-big-throws.js index ddcf1e9654f..1241ae22342 100644 --- a/test/built-ins/TypedArray/prototype/set/src-typedarray-big-throws.js +++ b/test/built-ins/TypedArray/prototype/set/src-typedarray-big-throws.js @@ -15,18 +15,18 @@ info: | other does not, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, testTypedArray.js] +includes: [testTypedArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ var bigTypedArray; var littleTypedArray; -testWithBigIntTypedArrayConstructors(function(BTA) { +testWithBigIntTypedArrayConstructors(function(BTA, makeCtorArg) { - bigTypedArray = new BTA([1n]); + bigTypedArray = new BTA(makeCtorArg([1n])); - testWithTypedArrayConstructors(function(TA) { + testWithTypedArrayConstructors(function(TA, makeCtorArg) { littleTypedArray = new TA(1); assert.throws(TypeError, function() { @@ -34,4 +34,4 @@ testWithBigIntTypedArrayConstructors(function(BTA) { }); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-negative-integer-offset-throws.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-negative-integer-offset-throws.js index 2d38d886ebf..7f66f9242cd 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-negative-integer-offset-throws.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-negative-integer-offset-throws.js @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { sample.set(sample, -Infinity); }, "-Infinity"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-offset-tointeger.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-offset-tointeger.js index 7f63cb99607..75fc5dd2b9b 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-offset-tointeger.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-offset-tointeger.js @@ -15,79 +15,79 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - var src = new TA([42]); + var src = new TA(makeCtorArg([42])); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, ""); assert(compareArray(sample, [42, 2]), "the empty string"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, "0"); assert(compareArray(sample, [42, 2]), "'0'"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, false); assert(compareArray(sample, [42, 2]), "false"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, 0.1); assert(compareArray(sample, [42, 2]), "0.1"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, 0.9); assert(compareArray(sample, [42, 2]), "0.9"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, -0.5); assert(compareArray(sample, [42, 2]), "-0.5"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, 1.1); assert(compareArray(sample, [1, 42]), "1.1"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, NaN); assert(compareArray(sample, [42, 2]), "NaN"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, null); assert(compareArray(sample, [42, 2]), "null"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, undefined); assert(compareArray(sample, [42, 2]), "undefined"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, {}); assert(compareArray(sample, [42, 2]), "{}"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, []); assert(compareArray(sample, [42, 2]), "[]"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, [0]); assert(compareArray(sample, [42, 2]), "[0]"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, true); assert(compareArray(sample, [1, 42]), "true"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, "1"); assert(compareArray(sample, [1, 42]), "'1'"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, [1]); assert(compareArray(sample, [1, 42]), "[1]"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, { valueOf: function() {return 1;} }); assert(compareArray(sample, [1, 42]), "valueOf"); - sample = new TA([1, 2]); + sample = new TA(makeCtorArg([1, 2])); sample.set(src, { toString: function() {return 1;} }); assert(compareArray(sample, [1, 42]), "toString"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-return-abrupt-from-tointeger-offset-symbol.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-return-abrupt-from-tointeger-offset-symbol.js index 264d954cd30..485a5c19cff 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-return-abrupt-from-tointeger-offset-symbol.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-return-abrupt-from-tointeger-offset-symbol.js @@ -23,4 +23,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.set(sample, s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-return-abrupt-from-tointeger-offset.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-return-abrupt-from-tointeger-offset.js index fd524fc94d1..09f4b666c23 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-return-abrupt-from-tointeger-offset.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-return-abrupt-from-tointeger-offset.js @@ -37,4 +37,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.set(sample, obj2); }, "abrupt from toString"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type-sab.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type-sab.js index 1b1a9638875..f1be34eff24 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type-sab.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type-sab.js @@ -13,7 +13,7 @@ features: [SharedArrayBuffer, TypedArray] var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var other = Int32Array; var sab = new SharedArrayBuffer(2 * other.BYTES_PER_ELEMENT); var src = new other(sab); @@ -21,17 +21,17 @@ testWithTypedArrayConstructors(function(TA) { src[1] = 43; var sample, result; - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(src, 0); assert(compareArray(sample, [42, 43, 3, 4]), "src is SAB-backed, offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(src, 1); assert(compareArray(sample, [1, 42, 43, 4]), "src is SAB-backed, offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(src, 2); assert(compareArray(sample, [1, 2, 42, 43]), "src is SAB-backed, offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); @@ -104,4 +104,4 @@ testWithTypedArrayConstructors(function(TA) { result = sample.set(src, 2); assert(compareArray(sample, [1, 2, 42, 43]), "src and sample are SAB-backed, offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); -}, int_views); +}, int_views, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type.js index 04ddb52371f..3f39010c172 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type.js @@ -26,23 +26,23 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var other = TA === Float32Array ? Float64Array : Float32Array; var src = new other([42, 43]); var sample, result; - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(src, 0); assert(compareArray(sample, [42, 43, 3, 4]), "offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(src, 1); assert(compareArray(sample, [1, 42, 43, 4]), "offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(src, 2); assert(compareArray(sample, [1, 2, 42, 43]), "offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-same-type-sab.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-same-type-sab.js index cae8f7e5b3f..fd01d5f5de7 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-same-type-sab.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-same-type-sab.js @@ -12,7 +12,7 @@ features: [SharedArrayBuffer, TypedArray] var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample, result; var sab = new SharedArrayBuffer(2 * TA.BYTES_PER_ELEMENT); @@ -20,23 +20,23 @@ testWithTypedArrayConstructors(function(TA) { src[0] = 42; src[1] = 43; - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(src, 1); assert(compareArray(sample, [1, 42, 43, 4]), "src is SAB-backed, offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(src, 0); assert(compareArray(sample, [42, 43, 3, 4]), "src is SAB-backed, offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(src, 2); assert(compareArray(sample, [1, 2, 42, 43]), "src is SAB-backed, offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - src = new TA([42, 43]); + src = new TA(makeCtorArg([42, 43])); sab = new SharedArrayBuffer(4 * TA.BYTES_PER_ELEMENT); sample = new TA(sab); @@ -104,4 +104,4 @@ testWithTypedArrayConstructors(function(TA) { result = sample.set(src, 2); assert(compareArray(sample, [1, 2, 42, 43]), "src and sample are SAB-backed, offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); -}, int_views); +}, int_views, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-same-type.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-same-type.js index b9157478552..1ff070cc1ce 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-same-type.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-same-type.js @@ -29,22 +29,22 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample, result; - var src = new TA([42, 43]); + var src = new TA(makeCtorArg([42, 43])); - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(src, 1); assert(compareArray(sample, [1, 42, 43, 4]), "offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(src, 0); assert(compareArray(sample, [42, 43, 3, 4]), "offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); result = sample.set(src, 2); assert(compareArray(sample, [1, 2, 42, 43]), "offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type.js index 726bc815652..f625ebced7f 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type.js @@ -44,10 +44,10 @@ var expected = { Uint8ClampedArray: [0, 42, 0, 66, 5, 6, 7, 8] }; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var other = TA === Float32Array ? Float64Array : Float32Array; - var sample = new TA([1, 2, 3, 4, 5, 6, 7, 8]); + var sample = new TA(makeCtorArg([1, 2, 3, 4, 5, 6, 7, 8])); var src = new other(sample.buffer, 0, 2); // Reflect changes on sample object @@ -57,4 +57,4 @@ testWithTypedArrayConstructors(function(TA) { assert(compareArray(sample, expected[TA.name]), sample); assert.sameValue(result, undefined, "returns undefined"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type-resized.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type-resized.js index 3bd4bf6259c..f7ed52814f9 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type-resized.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type-resized.js @@ -42,4 +42,4 @@ testWithTypedArrayConstructors(function(TA) { target.set(source); assert(compareArray(target, expected), 'following shrink'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type.js index 02d15ddee9c..e5706a4148a 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type.js @@ -30,24 +30,24 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample, src, result; - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); src = new TA(sample.buffer, 0, 2); result = sample.set(src, 0); assert(compareArray(sample, [1, 2, 3, 4]), "offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); src = new TA(sample.buffer, 0, 2); result = sample.set(src, 1); assert(compareArray(sample, [1, 1, 2, 4]), "offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA(makeCtorArg([1, 2, 3, 4])); src = new TA(sample.buffer, 0, 2); result = sample.set(src, 2); assert(compareArray(sample, [1, 2, 1, 2]), "offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-arraylength-internal.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-arraylength-internal.js index 864172b96c0..49de4c94bf7 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-arraylength-internal.js @@ -28,9 +28,9 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); - var src = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); + var src = new TA(makeCtorArg([42, 43])); Object.defineProperty(TA.prototype, "length", desc); Object.defineProperty(src, "length", desc); @@ -38,4 +38,4 @@ testWithTypedArrayConstructors(function(TA) { sample.set(src); assert.sameValue(getCalls, 0, "ignores length properties"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-byteoffset-internal.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-byteoffset-internal.js index c3bfdeb28e9..fa343e7df12 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-byteoffset-internal.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-byteoffset-internal.js @@ -25,11 +25,11 @@ var desc = { Object.defineProperty(TypedArray.prototype, "byteOffset", desc); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); - var src = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); + var src = new TA(makeCtorArg([42, 43])); var differentTA = TA === Uint8Array ? Int8Array : Uint8Array; - var src2 = new differentTA([42, 43]); + var src2 = new differentTA(makeCtorArg([42, 43])); var src3 = new differentTA(sample.buffer, 0, 2); Object.defineProperty(TA.prototype, "byteOffset", desc); @@ -42,4 +42,4 @@ testWithTypedArrayConstructors(function(TA) { sample.set(src3); assert.sameValue(getCalls, 0, "ignores byteOffset properties"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-range-greather-than-target-throws-rangeerror.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-range-greather-than-target-throws-rangeerror.js index 5b1920bb430..2c09495e535 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-range-greather-than-target-throws-rangeerror.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-range-greather-than-target-throws-rangeerror.js @@ -22,30 +22,30 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample, src; - sample = new TA(2); - src = new TA(2); + sample = new TA(makeCtorArg(2)); + src = new TA(makeCtorArg(2)); assert.throws(RangeError, function() { sample.set(src, 1); }, "2 + 1 > 2"); - sample = new TA(1); - src = new TA(2); + sample = new TA(makeCtorArg(1)); + src = new TA(makeCtorArg(2)); assert.throws(RangeError, function() { sample.set(src, 0); }, "2 + 0 > 1"); - sample = new TA(1); - src = new TA(0); + sample = new TA(makeCtorArg(1)); + src = new TA(makeCtorArg(0)); assert.throws(RangeError, function() { sample.set(src, 2); }, "0 + 2 > 1"); - sample = new TA(2); - src = new TA(2); + sample = new TA(makeCtorArg(2)); + src = new TA(makeCtorArg(2)); assert.throws(RangeError, function() { sample.set(src, Infinity); }, "2 + Infinity > 2"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-srcbuffer-detached-during-tointeger-offset-throws.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-srcbuffer-detached-during-tointeger-offset-throws.js index f5f1d4629df..f470b1eb496 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-srcbuffer-detached-during-tointeger-offset-throws.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-srcbuffer-detached-during-tointeger-offset-throws.js @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(calledOffset, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-arraylength-internal.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-arraylength-internal.js index fe251f1f17a..9595b00a8ab 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-arraylength-internal.js @@ -29,9 +29,9 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); - var src = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); + var src = new TA(makeCtorArg([42, 43])); Object.defineProperty(TA.prototype, "length", desc); Object.defineProperty(sample, "length", desc); @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(function(TA) { sample.set(src); assert.sameValue(getCalls, 0, "ignores length properties"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-byteoffset-internal.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-byteoffset-internal.js index 9e2802617a2..49765268a83 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-byteoffset-internal.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-byteoffset-internal.js @@ -26,11 +26,11 @@ var desc = { Object.defineProperty(TypedArray.prototype, "byteOffset", desc); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); - var src = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); + var src = new TA(makeCtorArg([42, 43])); var differentTA = TA === Uint8Array ? Int8Array : Uint8Array; - var src2 = new differentTA([42, 43]); + var src2 = new differentTA(makeCtorArg([42, 43])); var src3 = new differentTA(sample.buffer, 0, 2); Object.defineProperty(TA.prototype, "byteOffset", desc); @@ -41,4 +41,4 @@ testWithTypedArrayConstructors(function(TA) { sample.set(src3); assert.sameValue(getCalls, 0, "ignores byteoffset properties"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-out-of-bounds.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-out-of-bounds.js index 04ee86b13f0..2baab2351b4 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-out-of-bounds.js @@ -40,4 +40,4 @@ testWithTypedArrayConstructors(TA => { target.set(source, 0); throw new Test262Error('The `set` operation completed successfully.'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-targetbuffer-detached-during-tointeger-offset-throws.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-targetbuffer-detached-during-tointeger-offset-throws.js index 759fb78468f..2dfd361cda0 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-targetbuffer-detached-during-tointeger-offset-throws.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-targetbuffer-detached-during-tointeger-offset-throws.js @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(calledOffset, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/arraylength-internal.js b/test/built-ins/TypedArray/prototype/slice/BigInt/arraylength-internal.js index 505215fb00a..8762de771d7 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/arraylength-internal.js @@ -9,7 +9,7 @@ info: | ... 3. Let len be the value of O's [[ArrayLength]] internal slot. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -23,8 +23,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); Object.defineProperty(TA.prototype, "length", desc); Object.defineProperty(sample, "length", desc); @@ -35,4 +35,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(result[0], 42n); assert.sameValue(result[1], 43n); assert.sameValue(result.hasOwnProperty(2), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-custom-ctor-other-targettype.js b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-custom-ctor-other-targettype.js index 32e9ee13005..e282d415917 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-custom-ctor-other-targettype.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-custom-ctor-other-targettype.js @@ -27,7 +27,7 @@ info: | If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Symbol.species, TypedArray] ---*/ @@ -49,4 +49,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }, '`sample.slice()` throws TypeError'); assert.sameValue(counter, 2, 'The value of `counter` is 2'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-custom-ctor-same-targettype.js b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-custom-ctor-same-targettype.js index 0cdea977d93..02ef04db075 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-custom-ctor-same-targettype.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-custom-ctor-same-targettype.js @@ -27,7 +27,7 @@ info: | If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Symbol.species, TypedArray] ---*/ @@ -48,4 +48,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }, '`sample.slice()` throws TypeError'); assert.sameValue(counter, 2, 'The value of `counter` is 2'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-get-ctor.js b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-get-ctor.js index 8c2d73e9e2d..44e0f109af3 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-get-ctor.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-get-ctor.js @@ -27,7 +27,7 @@ info: | If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -47,4 +47,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }, '`sample.slice()` throws TypeError'); assert.sameValue(counter, 2, 'The value of `counter` is 2'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-speciesctor-get-species-custom-ctor-throws.js b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-speciesctor-get-species-custom-ctor-throws.js index 1179fb1ff9b..11e70b69d45 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-speciesctor-get-species-custom-ctor-throws.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-speciesctor-get-species-custom-ctor-throws.js @@ -26,7 +26,7 @@ info: | If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Symbol.species, TypedArray] ---*/ @@ -48,4 +48,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }, '`sample.slice()` throws TypeError'); assert.sameValue(counter, 2, 'The value of `counter` is 2'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-zero-count-custom-ctor-other-targettype.js b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-zero-count-custom-ctor-other-targettype.js index 0cef4dd18d2..d2000c97e2b 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-zero-count-custom-ctor-other-targettype.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-zero-count-custom-ctor-other-targettype.js @@ -13,7 +13,7 @@ info: | ... Return A -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Symbol.species, TypedArray] ---*/ @@ -42,4 +42,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.constructor = ctor; sample.slice(1, 1); // count = 0; assert.sameValue(counter, 2, 'The value of `counter` is 2'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-zero-count-custom-ctor-same-targettype.js b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-zero-count-custom-ctor-same-targettype.js index 3f5424b14b1..28b42831038 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-zero-count-custom-ctor-same-targettype.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-zero-count-custom-ctor-same-targettype.js @@ -12,7 +12,7 @@ info: | If count > 0, then ... Return A -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Symbol.species, TypedArray] ---*/ @@ -46,4 +46,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { ); assert.sameValue(result.constructor, TA, 'The value of result.constructor is expected to equal the value of TA'); assert.sameValue(counter, 2, 'The value of `counter` is 2'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer.js index 846386175a8..6a1505a6832 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer.js @@ -14,7 +14,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -30,4 +30,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.slice(obj, obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/infinity.js b/test/built-ins/TypedArray/prototype/slice/BigInt/infinity.js index adad1dc0fad..c99d18b54fa 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/infinity.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/infinity.js @@ -3,12 +3,12 @@ /*--- esid: sec-%typedarray%.prototype.slice description: Infinity values on start and end -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); assert( compareArray(sample.slice(-Infinity), [40n, 41n, 42n, 43n]), diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/minus-zero.js b/test/built-ins/TypedArray/prototype/slice/BigInt/minus-zero.js index 12245c6aaec..c96aebed0c9 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/minus-zero.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/minus-zero.js @@ -5,12 +5,12 @@ esid: sec-%typedarray%.prototype.slice description: -0 values on start and end info: | 22.2.3.24 %TypedArray%.prototype.slice ( start, end ) -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); assert( compareArray(sample.slice(-0), [40n, 41n, 42n, 43n]), diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/result-does-not-copy-ordinary-properties.js b/test/built-ins/TypedArray/prototype/slice/BigInt/result-does-not-copy-ordinary-properties.js index 32f3a288327..91faac229d3 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/result-does-not-copy-ordinary-properties.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/result-does-not-copy-ordinary-properties.js @@ -5,12 +5,12 @@ esid: sec-%typedarray%.prototype.slice description: Result does not import own properties info: | 22.2.3.24 %TypedArray%.prototype.slice( start , end ) -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([41n, 42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([41n, 42n, 43n, 44n])); sample.foo = 42; var result = sample.slice(); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-different-length.js b/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-different-length.js index 1db41d60126..2b902f6c0c4 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-different-length.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-different-length.js @@ -3,12 +3,12 @@ /*--- esid: sec-%typedarray%.prototype.slice description: slice may return a new instance with a smaller length -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); function testRes(result, expected, msg) { assert(compareArray(result, expected), msg + ", result: [" + result + "]"); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-empty-length.js b/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-empty-length.js index d89433f37e8..50b8a6686d5 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-empty-length.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-empty-length.js @@ -3,12 +3,12 @@ /*--- esid: sec-%typedarray%.prototype.slice description: slice may return a new empty instance -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); function testRes(result, msg) { assert.sameValue(result.length, 0, msg); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-same-length.js b/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-same-length.js index ef8de0f3196..1069417f77c 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-same-length.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-same-length.js @@ -3,12 +3,12 @@ /*--- esid: sec-%typedarray%.prototype.slice description: slice may return a new instance with the same length -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); function testRes(result, msg) { assert.sameValue(result.length, 4, msg); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-end-symbol.js b/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-end-symbol.js index c0ec87e5a76..4ededf13d94 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-end-symbol.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-end-symbol.js @@ -10,7 +10,7 @@ info: | 6. If end is undefined, let relativeEnd be len; else let relativeEnd be ? ToInteger(end). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -22,4 +22,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.slice(0, s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-end.js b/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-end.js index 9fa2117984d..92b322d45e2 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-end.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-end.js @@ -10,7 +10,7 @@ info: | 6. If end is undefined, let relativeEnd be len; else let relativeEnd be ? ToInteger(end). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.slice(0, o2); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-start-symbol.js b/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-start-symbol.js index 6e003f8df9b..39aeda0c7c4 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-start-symbol.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-start-symbol.js @@ -9,7 +9,7 @@ info: | ... 4. Let relativeStart be ? ToInteger(start). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -21,4 +21,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.slice(s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-start.js b/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-start.js index 3b79f13759c..031693a8310 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-start.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-start.js @@ -9,7 +9,7 @@ info: | ... 4. Let relativeStart be ? ToInteger(start). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -35,4 +35,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.slice(o2); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-this-out-of-bounds.js index cd4099312cf..62a26adca2d 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.slice description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.slice(0); throw new Test262Error('slice completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/set-values-from-different-ctor-type.js b/test/built-ins/TypedArray/prototype/slice/BigInt/set-values-from-different-ctor-type.js index 53ee40eba00..59a8f98fbb3 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/set-values-from-different-ctor-type.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/set-values-from-different-ctor-type.js @@ -26,7 +26,7 @@ info: | v. Increase n by 1. ... 16. Return A -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ @@ -44,4 +44,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert(compareArray(result, arr), "values are set"); assert.notSameValue(result.buffer, sample.buffer, "creates a new buffer"); assert.sameValue(result.constructor, other, "used the custom ctor"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-destination-resizable.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-destination-resizable.js index cb0ff1776dd..72f8e7de27f 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-destination-resizable.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-destination-resizable.js @@ -23,7 +23,7 @@ info: | a. If the value of newTypedArray's [[ArrayLength]] internal slot < argumentList[0], throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray, resizable-arraybuffer] ---*/ @@ -37,4 +37,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { ta.slice(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-abrupt.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-abrupt.js index 2a30c86643b..7ff0f281b38 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-abrupt.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-abrupt.js @@ -22,12 +22,12 @@ info: | 2. Let C be ? Get(O, "constructor"). 3. If C is undefined, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); Object.defineProperty(sample, "constructor", { get: function() { @@ -38,4 +38,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.slice(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-inherited.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-inherited.js index d686fe084f3..4001e70a0eb 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-inherited.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-inherited.js @@ -22,12 +22,12 @@ info: | 2. Let C be ? Get(O, "constructor"). 3. If C is undefined, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); var calls = 0; var result; @@ -59,4 +59,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { 7, "result.constructor triggers the inherited accessor property" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-returns-throws.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-returns-throws.js index 6c2a4b88f85..a06f0a5c838 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-returns-throws.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-returns-throws.js @@ -24,12 +24,12 @@ info: | 3. If C is undefined, return defaultConstructor. 4. If Type(C) is not Object, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); sample.constructor = 42; assert.throws(TypeError, function() { diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor.js index 9d35910e5fb..ff4c3a55700 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor.js @@ -22,12 +22,12 @@ info: | 2. Let C be ? Get(O, "constructor"). 3. If C is undefined, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); var calls = 0; var result; @@ -51,4 +51,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { TA, "use defaultCtor on an undefined return - .constructor check" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-abrupt.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-abrupt.js index 74de9aceb8f..615e9c93174 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-abrupt.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-abrupt.js @@ -24,12 +24,12 @@ info: | ... 5. Let S be ? Get(C, @@species). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; @@ -42,4 +42,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.slice(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-invocation.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-invocation.js index 11ddad9e12d..12a8eb9cdd4 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-invocation.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-invocation.js @@ -32,12 +32,12 @@ info: | 3. If argumentList is a List of a single Number, then ... 4. Return newTypedArray. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n])); var result, ctorThis; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js index cb7e63339c2..78591174868 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js @@ -23,7 +23,7 @@ info: | a. If the value of newTypedArray's [[ArrayLength]] internal slot < argumentList[0], throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray, resizable-arraybuffer] ---*/ @@ -40,4 +40,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.slice(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-length-throws.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-length-throws.js index 3f8cb632deb..f49f66b31f7 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-length-throws.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-length-throws.js @@ -23,12 +23,12 @@ info: | a. If the value of newTypedArray's [[ArrayLength]] internal slot < argumentList[0], throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; sample.constructor[Symbol.species] = function() { diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-length.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-length.js index 3872088bbe5..383d76a7a28 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-length.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-length.js @@ -23,12 +23,12 @@ info: | a. If the value of newTypedArray's [[ArrayLength]] internal slot < argumentList[0], throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var customCount, result; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js index bfd0fff4f31..beadbf6f146 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js @@ -32,12 +32,12 @@ info: | 3. If argumentList is a List of a single Number, then ... 4. Return newTypedArray. -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n])); var other = new BigInt64Array([1n, 0n, 1n]); var result; diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-throws.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-throws.js index e35f1af62cd..7fbea16443f 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-throws.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-throws.js @@ -30,12 +30,12 @@ info: | 1. Let newTypedArray be ? Construct(constructor, argumentList). 2. Perform ? ValidateTypedArray(newTypedArray). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var ctor = function() {}; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor.js index 5965ce367af..51a5017bff0 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor.js @@ -32,12 +32,12 @@ info: | 3. If argumentList is a List of a single Number, then ... 4. Return newTypedArray. -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n])); var calls = 0; var result; diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-returns-throws.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-returns-throws.js index a24ba5a52d9..70111903316 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-returns-throws.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-returns-throws.js @@ -25,12 +25,12 @@ info: | 7. If IsConstructor(S) is true, return S. 8. Throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-use-default-ctor.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-use-default-ctor.js index 4429f6336d6..6e0a0adb62e 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-use-default-ctor.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-use-default-ctor.js @@ -23,12 +23,12 @@ info: | 5. Let S be ? Get(C, @@species). 6. If S is either undefined or null, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var result; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species.js index a2cf9e13117..199fb6d2752 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species.js @@ -24,12 +24,12 @@ info: | ... 5. Let S be ? Get(C, @@species). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var calls = 0; sample.constructor = {}; @@ -43,4 +43,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.slice(); assert.sameValue(calls, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-end.js b/test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-end.js index b43e92dc125..09c9eb7fd3a 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-end.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-end.js @@ -10,7 +10,7 @@ info: | 6. If end is undefined, let relativeEnd be len; else let relativeEnd be ? ToInteger(end). ... -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ @@ -20,8 +20,8 @@ var obj = { } }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); assert(compareArray(sample.slice(0, false), []), "false"); assert(compareArray(sample.slice(0, true), [40n]), "true"); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-start.js b/test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-start.js index 3b5bb606c9e..b72484c194e 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-start.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-start.js @@ -9,7 +9,7 @@ info: | ... 4. Let relativeStart be ? ToInteger(start). ... -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ @@ -19,8 +19,8 @@ var obj = { } }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); assert(compareArray(sample.slice(false), [40n, 41n, 42n, 43n]), "false"); assert(compareArray(sample.slice(true), [41n, 42n, 43n]), "true"); diff --git a/test/built-ins/TypedArray/prototype/slice/arraylength-internal.js b/test/built-ins/TypedArray/prototype/slice/arraylength-internal.js index 2c9e7cba303..5268e48413c 100644 --- a/test/built-ins/TypedArray/prototype/slice/arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/slice/arraylength-internal.js @@ -23,8 +23,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); Object.defineProperty(TA.prototype, "length", desc); Object.defineProperty(sample, "length", desc); @@ -35,4 +35,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(result[0], 42); assert.sameValue(result[1], 43); assert.sameValue(result.hasOwnProperty(2), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/bit-precision.js b/test/built-ins/TypedArray/prototype/slice/bit-precision.js index 41770bc2592..5ca23ea2083 100644 --- a/test/built-ins/TypedArray/prototype/slice/bit-precision.js +++ b/test/built-ins/TypedArray/prototype/slice/bit-precision.js @@ -24,7 +24,7 @@ includes: [nans.js, compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -function body(FloatArray) { +testWithTypedArrayConstructors(function body(FloatArray) { var subject = new FloatArray(NaNs); var sliced, subjectBytes, slicedBytes; @@ -34,6 +34,4 @@ function body(FloatArray) { slicedBytes = new Uint8Array(sliced.buffer); assert(compareArray(subjectBytes, slicedBytes)); -} - -testWithTypedArrayConstructors(body, floatArrayConstructors); +}, floatArrayConstructors); diff --git a/test/built-ins/TypedArray/prototype/slice/detached-buffer-custom-ctor-other-targettype.js b/test/built-ins/TypedArray/prototype/slice/detached-buffer-custom-ctor-other-targettype.js index c1ca81064f6..55d3d3af75d 100644 --- a/test/built-ins/TypedArray/prototype/slice/detached-buffer-custom-ctor-other-targettype.js +++ b/test/built-ins/TypedArray/prototype/slice/detached-buffer-custom-ctor-other-targettype.js @@ -35,4 +35,4 @@ testWithTypedArrayConstructors(function(TA) { }, '`sample.slice()` throws TypeError'); assert.sameValue(counter, 2, 'The value of `counter` is 2'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/detached-buffer-custom-ctor-same-targettype.js b/test/built-ins/TypedArray/prototype/slice/detached-buffer-custom-ctor-same-targettype.js index 1064996422c..83eb3abd95a 100644 --- a/test/built-ins/TypedArray/prototype/slice/detached-buffer-custom-ctor-same-targettype.js +++ b/test/built-ins/TypedArray/prototype/slice/detached-buffer-custom-ctor-same-targettype.js @@ -32,4 +32,4 @@ testWithTypedArrayConstructors(function(TA) { }, '`sample.slice()` throws TypeError'); assert.sameValue(counter, 2, 'The value of `counter` is 2'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/detached-buffer-get-ctor.js b/test/built-ins/TypedArray/prototype/slice/detached-buffer-get-ctor.js index c7588972a62..2b37e081384 100644 --- a/test/built-ins/TypedArray/prototype/slice/detached-buffer-get-ctor.js +++ b/test/built-ins/TypedArray/prototype/slice/detached-buffer-get-ctor.js @@ -31,4 +31,4 @@ testWithTypedArrayConstructors(function(TA) { }, '`sample.slice()` throws TypeError'); assert.sameValue(counter, 2, 'The value of `counter` is 2'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/detached-buffer-speciesctor-get-species-custom-ctor-throws.js b/test/built-ins/TypedArray/prototype/slice/detached-buffer-speciesctor-get-species-custom-ctor-throws.js index 13befe56f01..d8abf5034b1 100644 --- a/test/built-ins/TypedArray/prototype/slice/detached-buffer-speciesctor-get-species-custom-ctor-throws.js +++ b/test/built-ins/TypedArray/prototype/slice/detached-buffer-speciesctor-get-species-custom-ctor-throws.js @@ -48,4 +48,4 @@ testWithTypedArrayConstructors(function(TA) { }, '`sample.slice()` throws TypeError'); assert.sameValue(counter, 2, 'The value of `counter` is 2'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/detached-buffer-zero-count-custom-ctor-other-targettype.js b/test/built-ins/TypedArray/prototype/slice/detached-buffer-zero-count-custom-ctor-other-targettype.js index b3fe8456161..1b778ec473e 100644 --- a/test/built-ins/TypedArray/prototype/slice/detached-buffer-zero-count-custom-ctor-other-targettype.js +++ b/test/built-ins/TypedArray/prototype/slice/detached-buffer-zero-count-custom-ctor-other-targettype.js @@ -42,4 +42,4 @@ testWithTypedArrayConstructors(function(TA) { sample.constructor = ctor; sample.slice(1, 1); // count = 0; assert.sameValue(counter, 2, 'The value of `counter` is 2'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/detached-buffer-zero-count-custom-ctor-same-targettype.js b/test/built-ins/TypedArray/prototype/slice/detached-buffer-zero-count-custom-ctor-same-targettype.js index b4f26a44b4e..f996487df9f 100644 --- a/test/built-ins/TypedArray/prototype/slice/detached-buffer-zero-count-custom-ctor-same-targettype.js +++ b/test/built-ins/TypedArray/prototype/slice/detached-buffer-zero-count-custom-ctor-same-targettype.js @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(function(TA) { sample.constructor = ctor; sample.slice(1, 1); // count = 0; assert.sameValue(counter, 2, 'The value of `counter` is 2'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/detached-buffer.js b/test/built-ins/TypedArray/prototype/slice/detached-buffer.js index b45bee0c168..bbbb576f36d 100644 --- a/test/built-ins/TypedArray/prototype/slice/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/slice/detached-buffer.js @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.slice(obj, obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/infinity.js b/test/built-ins/TypedArray/prototype/slice/infinity.js index a93cd713a72..cf9386f4d20 100644 --- a/test/built-ins/TypedArray/prototype/slice/infinity.js +++ b/test/built-ins/TypedArray/prototype/slice/infinity.js @@ -7,8 +7,8 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); assert( compareArray(sample.slice(-Infinity), [40, 41, 42, 43]), diff --git a/test/built-ins/TypedArray/prototype/slice/minus-zero.js b/test/built-ins/TypedArray/prototype/slice/minus-zero.js index c597dadec9b..70cb0ac3654 100644 --- a/test/built-ins/TypedArray/prototype/slice/minus-zero.js +++ b/test/built-ins/TypedArray/prototype/slice/minus-zero.js @@ -9,8 +9,8 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); assert( compareArray(sample.slice(-0), [40, 41, 42, 43]), diff --git a/test/built-ins/TypedArray/prototype/slice/result-does-not-copy-ordinary-properties.js b/test/built-ins/TypedArray/prototype/slice/result-does-not-copy-ordinary-properties.js index 91df72a334d..30fcb91caaa 100644 --- a/test/built-ins/TypedArray/prototype/slice/result-does-not-copy-ordinary-properties.js +++ b/test/built-ins/TypedArray/prototype/slice/result-does-not-copy-ordinary-properties.js @@ -9,8 +9,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([41, 42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([41, 42, 43, 44])); sample.foo = 42; var result = sample.slice(); diff --git a/test/built-ins/TypedArray/prototype/slice/results-with-different-length.js b/test/built-ins/TypedArray/prototype/slice/results-with-different-length.js index 34a4ad11b3e..0d609383798 100644 --- a/test/built-ins/TypedArray/prototype/slice/results-with-different-length.js +++ b/test/built-ins/TypedArray/prototype/slice/results-with-different-length.js @@ -7,8 +7,8 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); function testRes(result, expected, msg) { assert(compareArray(result, expected), msg + ", result: [" + result + "]"); diff --git a/test/built-ins/TypedArray/prototype/slice/results-with-empty-length.js b/test/built-ins/TypedArray/prototype/slice/results-with-empty-length.js index 99e3b109b81..829083fc832 100644 --- a/test/built-ins/TypedArray/prototype/slice/results-with-empty-length.js +++ b/test/built-ins/TypedArray/prototype/slice/results-with-empty-length.js @@ -7,8 +7,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); function testRes(result, msg) { assert.sameValue(result.length, 0, msg); diff --git a/test/built-ins/TypedArray/prototype/slice/results-with-same-length.js b/test/built-ins/TypedArray/prototype/slice/results-with-same-length.js index 39252ed54a0..fbf839ca053 100644 --- a/test/built-ins/TypedArray/prototype/slice/results-with-same-length.js +++ b/test/built-ins/TypedArray/prototype/slice/results-with-same-length.js @@ -7,8 +7,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); function testRes(result, msg) { assert.sameValue(result.length, 4, msg); diff --git a/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-end-symbol.js b/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-end-symbol.js index 7f053bfbb8d..7c3fe8f7716 100644 --- a/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-end-symbol.js +++ b/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-end-symbol.js @@ -22,4 +22,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.slice(0, s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-end.js b/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-end.js index 41c907c3d7c..58c6a54739f 100644 --- a/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-end.js +++ b/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-end.js @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.slice(0, o2); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-start-symbol.js b/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-start-symbol.js index 7b3350b0f10..0dbf1fee6dc 100644 --- a/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-start-symbol.js +++ b/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-start-symbol.js @@ -21,4 +21,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.slice(s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-start.js b/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-start.js index 3488d2a9077..57c78ef133b 100644 --- a/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-start.js +++ b/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-start.js @@ -35,4 +35,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.slice(o2); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-this-out-of-bounds.js index 276bedee524..5030b91bb43 100644 --- a/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.slice(0); throw new Test262Error('slice completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/set-values-from-different-ctor-type.js b/test/built-ins/TypedArray/prototype/slice/set-values-from-different-ctor-type.js index cb19d311d2c..e160e456345 100644 --- a/test/built-ins/TypedArray/prototype/slice/set-values-from-different-ctor-type.js +++ b/test/built-ins/TypedArray/prototype/slice/set-values-from-different-ctor-type.js @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA) { assert(compareArray(result, arr), "values are set"); assert.notSameValue(result.buffer, sample.buffer, "creates a new buffer"); assert.sameValue(result.constructor, other, "used the custom ctor"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-destination-resizable.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-destination-resizable.js index 9927d1718ea..cf9bce3c9b9 100644 --- a/test/built-ins/TypedArray/prototype/slice/speciesctor-destination-resizable.js +++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-destination-resizable.js @@ -37,4 +37,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { ta.slice(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-abrupt.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-abrupt.js index d7baa426e32..66c57ef889a 100644 --- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-abrupt.js +++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-abrupt.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); Object.defineProperty(sample, "constructor", { get: function() { @@ -38,4 +38,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.slice(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-inherited.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-inherited.js index 79c9df2a772..c8729e1ec10 100644 --- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-inherited.js +++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-inherited.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); var calls = 0; var result; @@ -59,4 +59,4 @@ testWithTypedArrayConstructors(function(TA) { 7, "result.constructor triggers the inherited accessor property" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-returns-throws.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-returns-throws.js index c048632f26b..b85013d10b2 100644 --- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-returns-throws.js +++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-returns-throws.js @@ -28,8 +28,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); sample.constructor = 42; assert.throws(TypeError, function() { diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor.js index c09681ec052..bdfd46e0141 100644 --- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor.js +++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); var calls = 0; var result; @@ -51,4 +51,4 @@ testWithTypedArrayConstructors(function(TA) { TA, "use defaultCtor on an undefined return - .constructor check" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-abrupt.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-abrupt.js index 56310fa0875..fe47fea383c 100644 --- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-abrupt.js +++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-abrupt.js @@ -28,8 +28,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; @@ -42,4 +42,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.slice(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-invocation.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-invocation.js index d1642f1b774..65a67584a90 100644 --- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-invocation.js +++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-invocation.js @@ -36,8 +36,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42])); var result, ctorThis; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js index 925b59c22af..fae4e773a62 100644 --- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js +++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-length-throws-resizable-arraybuffer.js @@ -40,4 +40,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.slice(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-length-throws.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-length-throws.js index 7ff46d746d2..f5a3614ecf6 100644 --- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-length-throws.js +++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-length-throws.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; sample.constructor[Symbol.species] = function() { diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-length.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-length.js index a4d33b2a9c8..050370f9047 100644 --- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-length.js +++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-length.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var customCount, result; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-returns-another-instance.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-returns-another-instance.js index 7bb19f5df4a..f48fd03bbe1 100644 --- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-returns-another-instance.js +++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-returns-another-instance.js @@ -36,8 +36,8 @@ includes: [testTypedArray.js, compareArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40])); var other = new Int8Array([1, 0, 1]); var result; diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-throws.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-throws.js index d60b39ccad6..4e5b2630ca4 100644 --- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-throws.js +++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-throws.js @@ -34,8 +34,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var ctor = function() {}; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor.js index 0477a0fd43b..0db0bcc6afc 100644 --- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor.js +++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor.js @@ -36,8 +36,8 @@ includes: [testTypedArray.js, compareArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42])); var calls = 0; var result; diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-returns-throws.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-returns-throws.js index 78b822dc692..12545843875 100644 --- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-returns-throws.js +++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-returns-throws.js @@ -29,8 +29,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-use-default-ctor.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-use-default-ctor.js index e6f903ea416..97211554a5d 100644 --- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-use-default-ctor.js +++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-use-default-ctor.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var result; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species.js index 09a1dc08703..bf6e20432e3 100644 --- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species.js +++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species.js @@ -28,8 +28,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var calls = 0; sample.constructor = {}; @@ -43,4 +43,4 @@ testWithTypedArrayConstructors(function(TA) { sample.slice(); assert.sameValue(calls, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-return-same-buffer-with-offset.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-return-same-buffer-with-offset.js index 6a91d5c4e32..46cc8085eea 100644 --- a/test/built-ins/TypedArray/prototype/slice/speciesctor-return-same-buffer-with-offset.js +++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-return-same-buffer-with-offset.js @@ -42,4 +42,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(result, [ 20, 20, 20, 60, ]); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/slice/tointeger-end.js b/test/built-ins/TypedArray/prototype/slice/tointeger-end.js index 2a9be940680..46c33ea6f1d 100644 --- a/test/built-ins/TypedArray/prototype/slice/tointeger-end.js +++ b/test/built-ins/TypedArray/prototype/slice/tointeger-end.js @@ -20,8 +20,8 @@ var obj = { } }; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); assert(compareArray(sample.slice(0, false), []), "false"); assert(compareArray(sample.slice(0, true), [40]), "true"); diff --git a/test/built-ins/TypedArray/prototype/slice/tointeger-start.js b/test/built-ins/TypedArray/prototype/slice/tointeger-start.js index f67ee090c08..f0ca22be5a1 100644 --- a/test/built-ins/TypedArray/prototype/slice/tointeger-start.js +++ b/test/built-ins/TypedArray/prototype/slice/tointeger-start.js @@ -19,8 +19,8 @@ var obj = { } }; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); assert(compareArray(sample.slice(false), [40, 41, 42, 43]), "false"); assert(compareArray(sample.slice(true), [41, 42, 43]), "true"); diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-with-thisarg.js b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-with-thisarg.js index 737691cf6ed..0a962a1eba1 100644 --- a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-with-thisarg.js +++ b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-with-thisarg.js @@ -23,12 +23,12 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var results = []; var thisArg = ["test262", 0, "ecma262", 0]; diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-without-thisarg.js b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-without-thisarg.js index 08f138acee2..1ed04950f60 100644 --- a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-without-thisarg.js +++ b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-without-thisarg.js @@ -23,12 +23,12 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-detachbuffer.js b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-detachbuffer.js index 3aaa70fad49..9aef470ec7c 100644 --- a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-detachbuffer.js +++ b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-detachbuffer.js @@ -21,7 +21,7 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [detachArrayBuffer.js, testBigIntTypedArray.js] +includes: [detachArrayBuffer.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -38,4 +38,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-no-interaction-over-non-integer.js b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-no-interaction-over-non-integer.js index df9b85c7cf8..84db2f09093 100644 --- a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-no-interaction-over-non-integer.js +++ b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-no-interaction-over-non-integer.js @@ -14,12 +14,12 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([7n, 8n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7n, 8n])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-not-callable-throws.js b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-not-callable-throws.js index ce453a2c6b2..2d61c255c63 100644 --- a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-not-callable-throws.js @@ -16,12 +16,12 @@ info: | ... 3. If IsCallable(callbackfn) is false, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.throws(TypeError, function() { sample.some(); diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-not-called-on-empty.js b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-not-called-on-empty.js index 4480beb4df3..d05c270e47f 100644 --- a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-not-called-on-empty.js +++ b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-not-called-on-empty.js @@ -21,7 +21,7 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -33,4 +33,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-return-does-not-change-instance.js index 2ea584f16a1..d36c12d1000 100644 --- a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-return-does-not-change-instance.js +++ b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-return-does-not-change-instance.js @@ -21,12 +21,12 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n])); sample.some(function() { return 0; diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-returns-abrupt.js b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-returns-abrupt.js index eef277bfb7d..e560895d63d 100644 --- a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-returns-abrupt.js +++ b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-returns-abrupt.js @@ -20,12 +20,12 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); assert.throws(Test262Error, function() { sample.some(function() { diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-set-value-during-interaction.js b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-set-value-during-interaction.js index c248960d336..7b369155c38 100644 --- a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-set-value-during-interaction.js +++ b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-set-value-during-interaction.js @@ -21,12 +21,12 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect.set, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); var newVal = 0n; sample.some(function(val, i) { @@ -53,4 +53,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(sample[0], 7n, "changed values after iteration [0] == 7"); assert.sameValue(sample[1], 1n, "changed values after iteration [1] == 1"); assert.sameValue(sample[2], 2n, "changed values after iteration [2] == 2"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-this.js b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-this.js index dc08ba4aa01..002874fc6fd 100644 --- a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-this.js +++ b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-this.js @@ -23,15 +23,15 @@ info: | ... ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ var expected = (function() { return this; })(); var thisArg = {}; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var results1 = []; diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/some/BigInt/detached-buffer.js index ec32a7df446..b7b84a16549 100644 --- a/test/built-ins/TypedArray/prototype/some/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/some/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.some(callbackfn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/some/BigInt/get-length-uses-internal-arraylength.js index bca0d658f84..29c2a08b306 100644 --- a/test/built-ins/TypedArray/prototype/some/BigInt/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/some/BigInt/get-length-uses-internal-arraylength.js @@ -16,7 +16,7 @@ info: | 1. Let O be ? ToObject(this value). 2. Let len be ? ToLength(? Get(O, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -30,8 +30,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); var calls = 0; Object.defineProperty(TA.prototype, "length", desc); @@ -43,4 +43,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(getCalls, 0, "ignores length properties"); assert.sameValue(calls, 2, "iterations are not affected by custom length"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/some/BigInt/return-abrupt-from-this-out-of-bounds.js index 19d8b6f723d..aa241c3801d 100644 --- a/test/built-ins/TypedArray/prototype/some/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/some/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.some description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.some(() => {}); throw new Test262Error('some completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/returns-false-if-every-cb-returns-false.js b/test/built-ins/TypedArray/prototype/some/BigInt/returns-false-if-every-cb-returns-false.js index ef733a11edb..a670b6522d7 100644 --- a/test/built-ins/TypedArray/prototype/some/BigInt/returns-false-if-every-cb-returns-false.js +++ b/test/built-ins/TypedArray/prototype/some/BigInt/returns-false-if-every-cb-returns-false.js @@ -16,12 +16,12 @@ info: | ... 7. Return true. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(42); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(42)); [ false, diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/returns-true-if-any-cb-returns-true.js b/test/built-ins/TypedArray/prototype/some/BigInt/returns-true-if-any-cb-returns-true.js index da956be0653..c6a70972f12 100644 --- a/test/built-ins/TypedArray/prototype/some/BigInt/returns-true-if-any-cb-returns-true.js +++ b/test/built-ins/TypedArray/prototype/some/BigInt/returns-true-if-any-cb-returns-true.js @@ -22,14 +22,14 @@ info: | ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). iii. If testResult is true, return true. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ var s = Symbol("1"); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(42); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(42)); [ true, 1, diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/some/BigInt/values-are-not-cached.js index c4918d6bb29..cab518f2556 100644 --- a/test/built-ins/TypedArray/prototype/some/BigInt/values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/some/BigInt/values-are-not-cached.js @@ -21,12 +21,12 @@ info: | i. Let kValue be ? Get(O, Pk). ii. Let testResult be ToBoolean(? Call(callbackfn, T, « kValue, k, O »)). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n])); sample.some(function(v, i) { if (i < sample.length - 1) { @@ -37,4 +37,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { v, 42n, "method does not cache values before callbackfn calls" ); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/some/callbackfn-arguments-with-thisarg.js b/test/built-ins/TypedArray/prototype/some/callbackfn-arguments-with-thisarg.js index 57fbcf3f58f..bd3d5410d97 100644 --- a/test/built-ins/TypedArray/prototype/some/callbackfn-arguments-with-thisarg.js +++ b/test/built-ins/TypedArray/prototype/some/callbackfn-arguments-with-thisarg.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var results = []; var thisArg = ["test262", 0, "ecma262", 0]; diff --git a/test/built-ins/TypedArray/prototype/some/callbackfn-arguments-without-thisarg.js b/test/built-ins/TypedArray/prototype/some/callbackfn-arguments-without-thisarg.js index fff82e93b87..da3bfa9b221 100644 --- a/test/built-ins/TypedArray/prototype/some/callbackfn-arguments-without-thisarg.js +++ b/test/built-ins/TypedArray/prototype/some/callbackfn-arguments-without-thisarg.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/some/callbackfn-detachbuffer.js b/test/built-ins/TypedArray/prototype/some/callbackfn-detachbuffer.js index 1bc4bd56ba2..35e1a91eacc 100644 --- a/test/built-ins/TypedArray/prototype/some/callbackfn-detachbuffer.js +++ b/test/built-ins/TypedArray/prototype/some/callbackfn-detachbuffer.js @@ -38,4 +38,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(loops, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/some/callbackfn-no-interaction-over-non-integer.js b/test/built-ins/TypedArray/prototype/some/callbackfn-no-interaction-over-non-integer.js index d7a55a444b4..531796ab6a2 100644 --- a/test/built-ins/TypedArray/prototype/some/callbackfn-no-interaction-over-non-integer.js +++ b/test/built-ins/TypedArray/prototype/some/callbackfn-no-interaction-over-non-integer.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([7, 8]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([7, 8])); var results = []; diff --git a/test/built-ins/TypedArray/prototype/some/callbackfn-not-callable-throws.js b/test/built-ins/TypedArray/prototype/some/callbackfn-not-callable-throws.js index 7a68eab8075..b3cdd311588 100644 --- a/test/built-ins/TypedArray/prototype/some/callbackfn-not-callable-throws.js +++ b/test/built-ins/TypedArray/prototype/some/callbackfn-not-callable-throws.js @@ -20,8 +20,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.throws(TypeError, function() { sample.some(); diff --git a/test/built-ins/TypedArray/prototype/some/callbackfn-not-called-on-empty.js b/test/built-ins/TypedArray/prototype/some/callbackfn-not-called-on-empty.js index 655bb31a0f2..f90690b4e0a 100644 --- a/test/built-ins/TypedArray/prototype/some/callbackfn-not-called-on-empty.js +++ b/test/built-ins/TypedArray/prototype/some/callbackfn-not-called-on-empty.js @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/some/callbackfn-resize.js b/test/built-ins/TypedArray/prototype/some/callbackfn-resize.js index 95474b080b1..e99793c7a6f 100644 --- a/test/built-ins/TypedArray/prototype/some/callbackfn-resize.js +++ b/test/built-ins/TypedArray/prototype/some/callbackfn-resize.js @@ -70,4 +70,4 @@ testWithTypedArrayConstructors(function(TA) { assert.compareArray(indices, expectedIndices, 'indices (grow)'); assert.compareArray(arrays, expectedArrays, 'arrays (grow)'); assert.sameValue(result, false, 'result (grow)'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/some/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/some/callbackfn-return-does-not-change-instance.js index ddfedf5af9c..d3b6a00271e 100644 --- a/test/built-ins/TypedArray/prototype/some/callbackfn-return-does-not-change-instance.js +++ b/test/built-ins/TypedArray/prototype/some/callbackfn-return-does-not-change-instance.js @@ -25,8 +25,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42])); sample.some(function() { return 0; diff --git a/test/built-ins/TypedArray/prototype/some/callbackfn-returns-abrupt.js b/test/built-ins/TypedArray/prototype/some/callbackfn-returns-abrupt.js index 893d1791893..81d9c03422b 100644 --- a/test/built-ins/TypedArray/prototype/some/callbackfn-returns-abrupt.js +++ b/test/built-ins/TypedArray/prototype/some/callbackfn-returns-abrupt.js @@ -24,8 +24,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); assert.throws(Test262Error, function() { sample.some(function() { diff --git a/test/built-ins/TypedArray/prototype/some/callbackfn-set-value-during-interaction.js b/test/built-ins/TypedArray/prototype/some/callbackfn-set-value-during-interaction.js index da68b8a16cf..dd673ff5064 100644 --- a/test/built-ins/TypedArray/prototype/some/callbackfn-set-value-during-interaction.js +++ b/test/built-ins/TypedArray/prototype/some/callbackfn-set-value-during-interaction.js @@ -25,8 +25,8 @@ includes: [testTypedArray.js] features: [Reflect.set, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); var newVal = 0; sample.some(function(val, i) { @@ -53,4 +53,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(sample[0], 7, "changed values after iteration [0] == 7"); assert.sameValue(sample[1], 1, "changed values after iteration [1] == 1"); assert.sameValue(sample[2], 2, "changed values after iteration [2] == 2"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/some/callbackfn-this.js b/test/built-ins/TypedArray/prototype/some/callbackfn-this.js index d15699b80a5..01257f2f550 100644 --- a/test/built-ins/TypedArray/prototype/some/callbackfn-this.js +++ b/test/built-ins/TypedArray/prototype/some/callbackfn-this.js @@ -30,8 +30,8 @@ features: [TypedArray] var expected = (function() { return this; })(); var thisArg = {}; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(3); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(3)); var results1 = []; diff --git a/test/built-ins/TypedArray/prototype/some/detached-buffer.js b/test/built-ins/TypedArray/prototype/some/detached-buffer.js index 75010285bad..1ad6a7078b2 100644 --- a/test/built-ins/TypedArray/prototype/some/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/some/detached-buffer.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.some(callbackfn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/some/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/some/get-length-uses-internal-arraylength.js index 3fd958a92c5..fc05b0582c1 100644 --- a/test/built-ins/TypedArray/prototype/some/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/some/get-length-uses-internal-arraylength.js @@ -30,8 +30,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); var calls = 0; Object.defineProperty(TA.prototype, "length", desc); @@ -43,4 +43,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(getCalls, 0, "ignores length properties"); assert.sameValue(calls, 2, "iterations are not affected by custom length"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/some/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/some/return-abrupt-from-this-out-of-bounds.js index bb5ba9550bf..420cb9a692c 100644 --- a/test/built-ins/TypedArray/prototype/some/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/some/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.some(() => {}); throw new Test262Error('some completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/some/returns-false-if-every-cb-returns-false.js b/test/built-ins/TypedArray/prototype/some/returns-false-if-every-cb-returns-false.js index 00741adbed9..bc8dd4acb20 100644 --- a/test/built-ins/TypedArray/prototype/some/returns-false-if-every-cb-returns-false.js +++ b/test/built-ins/TypedArray/prototype/some/returns-false-if-every-cb-returns-false.js @@ -20,8 +20,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(42); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(42)); [ false, diff --git a/test/built-ins/TypedArray/prototype/some/returns-true-if-any-cb-returns-true.js b/test/built-ins/TypedArray/prototype/some/returns-true-if-any-cb-returns-true.js index c11fdae903e..89cda5ebfee 100644 --- a/test/built-ins/TypedArray/prototype/some/returns-true-if-any-cb-returns-true.js +++ b/test/built-ins/TypedArray/prototype/some/returns-true-if-any-cb-returns-true.js @@ -28,8 +28,8 @@ features: [Symbol, TypedArray] var s = Symbol("1"); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(42); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(42)); [ true, 1, diff --git a/test/built-ins/TypedArray/prototype/some/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/some/values-are-not-cached.js index c8a3c2cdeae..14aeefee7eb 100644 --- a/test/built-ins/TypedArray/prototype/some/values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/some/values-are-not-cached.js @@ -25,8 +25,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44])); sample.some(function(v, i) { if (i < sample.length - 1) { @@ -37,4 +37,4 @@ testWithTypedArrayConstructors(function(TA) { v, 42, "method does not cache values before callbackfn calls" ); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/arraylength-internal.js b/test/built-ins/TypedArray/prototype/sort/BigInt/arraylength-internal.js index 8a3d5a7f8b6..05fac1e99d0 100644 --- a/test/built-ins/TypedArray/prototype/sort/BigInt/arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/sort/BigInt/arraylength-internal.js @@ -8,7 +8,7 @@ info: | ... 3. Let len be the value of obj's [[ArrayLength]] internal slot. -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ @@ -22,8 +22,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 42n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 42n, 42n])); getCalls = 0; Object.defineProperty(TA.prototype, "length", desc); @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { compareArray(result, sample), "result is not affected by custom length" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-call-throws.js b/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-call-throws.js index 668f33e0600..30e0ba147a6 100644 --- a/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-call-throws.js +++ b/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-call-throws.js @@ -21,12 +21,12 @@ info: | - If an abrupt completion is returned from any of these operations, it is immediately returned as the value of this function. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n, 45n, 46n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n, 45n, 46n])); var calls = 0; var comparefn = function() { @@ -39,4 +39,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(calls, 1, "immediately returned"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-calls.js b/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-calls.js index 0e8846c1369..218f2d6a90d 100644 --- a/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-calls.js +++ b/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-calls.js @@ -14,7 +14,7 @@ info: | a. Let v be ? Call(comparefn, undefined, « x, y »). ... ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -22,8 +22,8 @@ var expectedThis = (function() { return this; })(); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 42n, 42n, 42n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 42n, 42n, 42n, 42n])); var calls = []; var comparefn = function() { @@ -39,4 +39,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(args[1][0], 42n, "x is a listed value"); assert.sameValue(args[1][0], 42n, "y is a listed value"); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-is-undefined.js b/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-is-undefined.js index 72351466024..52749b5d221 100644 --- a/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-is-undefined.js +++ b/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-is-undefined.js @@ -9,15 +9,15 @@ info: | 1. If comparefn is not undefined and IsCallable(comparefn) is false, throw a TypeError exception. ... -includes: [compareArray.js, testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [TypedArray, BigInt] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - let sample = new TA([42n, 44n, 46n, 43n, 45n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + let sample = new TA(makeCtorArg([42n, 44n, 46n, 43n, 45n])); let explicit = sample.sort(undefined); let implicit = sample.sort(); assert.compareArray(explicit, [42n, 43n, 44n, 45n, 46n], 'The value of `explicit` is [42n, 43n, 44n, 45n, 46n]'); assert.compareArray(implicit, [42n, 43n, 44n, 45n, 46n], 'The value of `implicit` is [42n, 43n, 44n, 45n, 46n]'); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-nonfunction-call-throws.js b/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-nonfunction-call-throws.js index 4770b66da60..0f48fb2f3e5 100644 --- a/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-nonfunction-call-throws.js +++ b/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-nonfunction-call-throws.js @@ -14,12 +14,12 @@ info: | 1. If _comparefn_ is not *undefined* and IsCallable(_comparefn_) is *false*, throw a *TypeError* exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n, 44n, 45n, 46n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n, 44n, 45n, 46n])); assert.throws(TypeError, function() { sample.sort(null); @@ -52,4 +52,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.sort({}); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/sort/BigInt/detached-buffer.js index e49bb08837d..39829d049dd 100644 --- a/test/built-ins/TypedArray/prototype/sort/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/sort/BigInt/detached-buffer.js @@ -14,7 +14,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -28,4 +28,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.sort(comparefn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/sort/BigInt/return-abrupt-from-this-out-of-bounds.js index d59651389f9..5457336512f 100644 --- a/test/built-ins/TypedArray/prototype/sort/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/sort/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.sort description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.sort(); throw new Test262Error('sort completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/return-same-instance.js b/test/built-ins/TypedArray/prototype/sort/BigInt/return-same-instance.js index 702f4501548..f71063557b9 100644 --- a/test/built-ins/TypedArray/prototype/sort/BigInt/return-same-instance.js +++ b/test/built-ins/TypedArray/prototype/sort/BigInt/return-same-instance.js @@ -10,16 +10,16 @@ info: | arguments x and y, the following steps are taken: ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([2n, 1n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([2n, 1n])); var result = sample.sort(); assert.sameValue(sample, result, "without comparefn"); result = sample.sort(function() { return 0; }); assert.sameValue(sample, result, "with comparefn"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/sortcompare-with-no-tostring.js b/test/built-ins/TypedArray/prototype/sort/BigInt/sortcompare-with-no-tostring.js index f588b36bcc3..3bb7ca0f44d 100644 --- a/test/built-ins/TypedArray/prototype/sort/BigInt/sortcompare-with-no-tostring.js +++ b/test/built-ins/TypedArray/prototype/sort/BigInt/sortcompare-with-no-tostring.js @@ -14,7 +14,7 @@ info: | a. Let v be ? Call(comparefn, undefined, « x, y »). ... ... -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ @@ -23,9 +23,9 @@ BigInt.prototype.toString = function() { toStringCalled = true; } -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([20n, 100n, 3n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([20n, 100n, 3n])); var result = sample.sort(); assert.sameValue(toStringCalled, false, "BigInt.prototype.toString will not be called"); assert(compareArray(result, [3n, 20n, 100n])); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js b/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js index 79b7e54691d..e25ee6249fc 100644 --- a/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js +++ b/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js @@ -10,22 +10,22 @@ info: | arguments x and y, the following steps are taken: ... -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([4n, 3n, 2n, 1n]).sort(); + sample = new TA(makeCtorArg([4n, 3n, 2n, 1n])).sort(); assert(compareArray(sample, [1n, 2n, 3n, 4n]), "descending values"); - sample = new TA([3n, 4n, 1n, 2n]).sort(); + sample = new TA(makeCtorArg([3n, 4n, 1n, 2n])).sort(); assert(compareArray(sample, [1n, 2n, 3n, 4n]), "mixed numbers"); - sample = new TA([3n, 4n, 3n, 1n, 0n, 1n, 2n]).sort(); + sample = new TA(makeCtorArg([3n, 4n, 3n, 1n, 0n, 1n, 2n])).sort(); assert(compareArray(sample, [0n, 1n, 1n, 2n, 3n, 3n, 4n]), "repeating numbers"); -}); +}, null, null, ["immutable"]); var sample = new BigInt64Array([-4n, 3n, 4n, -3n, 2n, -2n, 1n, 0n]).sort(); assert(compareArray(sample, [-4n, -3n, -2n, 0n, 1n, 2n, 3n, 4n]), "negative values"); diff --git a/test/built-ins/TypedArray/prototype/sort/arraylength-internal.js b/test/built-ins/TypedArray/prototype/sort/arraylength-internal.js index 543c4eaa6f0..fbe159c85c7 100644 --- a/test/built-ins/TypedArray/prototype/sort/arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/sort/arraylength-internal.js @@ -22,8 +22,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 42, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 42, 42])); getCalls = 0; Object.defineProperty(TA.prototype, "length", desc); @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { compareArray(result, sample), "result is not affected by custom length" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/sort/comparefn-call-throws.js b/test/built-ins/TypedArray/prototype/sort/comparefn-call-throws.js index 3370975d0e4..028038ae758 100644 --- a/test/built-ins/TypedArray/prototype/sort/comparefn-call-throws.js +++ b/test/built-ins/TypedArray/prototype/sort/comparefn-call-throws.js @@ -25,8 +25,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44, 45, 46]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44, 45, 46])); var calls = 0; var comparefn = function() { @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(calls, 1, "immediately returned"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/sort/comparefn-calls.js b/test/built-ins/TypedArray/prototype/sort/comparefn-calls.js index 6c060218291..c1e773bcc4d 100644 --- a/test/built-ins/TypedArray/prototype/sort/comparefn-calls.js +++ b/test/built-ins/TypedArray/prototype/sort/comparefn-calls.js @@ -22,8 +22,8 @@ var expectedThis = (function() { return this; })(); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 42, 42, 42, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 42, 42, 42, 42])); var calls = []; var comparefn = function() { @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(args[1][0], 42, "x is a listed value"); assert.sameValue(args[1][0], 42, "y is a listed value"); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/sort/comparefn-is-undefined.js b/test/built-ins/TypedArray/prototype/sort/comparefn-is-undefined.js index 6d763671c9f..267f2fbbede 100644 --- a/test/built-ins/TypedArray/prototype/sort/comparefn-is-undefined.js +++ b/test/built-ins/TypedArray/prototype/sort/comparefn-is-undefined.js @@ -13,11 +13,11 @@ includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - let sample = new TA([42, 44, 46, 43, 45]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + let sample = new TA(makeCtorArg([42, 44, 46, 43, 45])); let explicit = sample.sort(undefined); let implicit = sample.sort(); assert.compareArray(explicit, [42, 43, 44, 45, 46], 'The value of `explicit` is [42, 43, 44, 45, 46]'); assert.compareArray(implicit, [42, 43, 44, 45, 46], 'The value of `implicit` is [42, 43, 44, 45, 46]'); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/sort/comparefn-nonfunction-call-throws.js b/test/built-ins/TypedArray/prototype/sort/comparefn-nonfunction-call-throws.js index dceb36d66bc..8809b550e46 100644 --- a/test/built-ins/TypedArray/prototype/sort/comparefn-nonfunction-call-throws.js +++ b/test/built-ins/TypedArray/prototype/sort/comparefn-nonfunction-call-throws.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43, 44, 45, 46]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43, 44, 45, 46])); assert.throws(TypeError, function() { sample.sort(null); @@ -52,4 +52,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.sort({}); }); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/sort/detached-buffer.js b/test/built-ins/TypedArray/prototype/sort/detached-buffer.js index 5d60ec20bd0..4b1a2a6a581 100644 --- a/test/built-ins/TypedArray/prototype/sort/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/sort/detached-buffer.js @@ -28,4 +28,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.sort(comparefn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/sort/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/sort/return-abrupt-from-this-out-of-bounds.js index 732bce9f58d..f6b19c66e8c 100644 --- a/test/built-ins/TypedArray/prototype/sort/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/sort/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.sort(); throw new Test262Error('sort completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/sort/return-same-instance.js b/test/built-ins/TypedArray/prototype/sort/return-same-instance.js index f9588508025..bb9c2de4fa5 100644 --- a/test/built-ins/TypedArray/prototype/sort/return-same-instance.js +++ b/test/built-ins/TypedArray/prototype/sort/return-same-instance.js @@ -14,12 +14,12 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([2, 1]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([2, 1])); var result = sample.sort(); assert.sameValue(sample, result, "without comparefn"); result = sample.sort(function() { return 0; }); assert.sameValue(sample, result, "with comparefn"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/sort/sort-tonumber.js b/test/built-ins/TypedArray/prototype/sort/sort-tonumber.js index 36d8457e980..04e36760add 100644 --- a/test/built-ins/TypedArray/prototype/sort/sort-tonumber.js +++ b/test/built-ins/TypedArray/prototype/sort/sort-tonumber.js @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(true, called); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/sort/sortcompare-with-no-tostring.js b/test/built-ins/TypedArray/prototype/sort/sortcompare-with-no-tostring.js index 591c9087b07..c5e347334b7 100644 --- a/test/built-ins/TypedArray/prototype/sort/sortcompare-with-no-tostring.js +++ b/test/built-ins/TypedArray/prototype/sort/sortcompare-with-no-tostring.js @@ -23,9 +23,9 @@ Number.prototype.toString = function() { toStringCalled = true; } -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([20, 100, 3]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([20, 100, 3])); var result = sample.sort(); assert.sameValue(toStringCalled, false, "Number.prototype.toString will not be called"); assert(compareArray(result, [3, 20, 100]), "Default sorting by value"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/sort/sorted-values-nan.js b/test/built-ins/TypedArray/prototype/sort/sorted-values-nan.js index 1f3ea0be097..af77b845cb6 100644 --- a/test/built-ins/TypedArray/prototype/sort/sorted-values-nan.js +++ b/test/built-ins/TypedArray/prototype/sort/sorted-values-nan.js @@ -17,17 +17,17 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([2, NaN, NaN, 0, 1]).sort(); + sample = new TA(makeCtorArg([2, NaN, NaN, 0, 1])).sort(); assert.sameValue(sample[0], 0, "#1 [0]"); assert.sameValue(sample[1], 1, "#1 [1]"); assert.sameValue(sample[2], 2, "#1 [2]"); assert.sameValue(sample[3], NaN, "#1 [3]"); assert.sameValue(sample[4], NaN, "#1 [4]"); - sample = new TA([3, NaN, NaN, Infinity, 0, -Infinity, 2]).sort(); + sample = new TA(makeCtorArg([3, NaN, NaN, Infinity, 0, -Infinity, 2])).sort(); assert.sameValue(sample[0], -Infinity, "#2 [0]"); assert.sameValue(sample[1], 0, "#2 [1]"); assert.sameValue(sample[2], 2, "#2 [2]"); @@ -35,4 +35,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(sample[4], Infinity, "#2 [4]"); assert.sameValue(sample[5], NaN, "#2 [5]"); assert.sameValue(sample[6], NaN, "#2 [6]"); -}, floatArrayConstructors); +}, floatArrayConstructors, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/sort/sorted-values.js b/test/built-ins/TypedArray/prototype/sort/sorted-values.js index acc7fc88018..667ef22310a 100644 --- a/test/built-ins/TypedArray/prototype/sort/sorted-values.js +++ b/test/built-ins/TypedArray/prototype/sort/sorted-values.js @@ -14,44 +14,49 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([4, 3, 2, 1]).sort(); + sample = new TA(makeCtorArg([4, 3, 2, 1])).sort(); assert(compareArray(sample, [1, 2, 3, 4]), "descending values"); - sample = new TA([3, 4, 1, 2]).sort(); + sample = new TA(makeCtorArg([3, 4, 1, 2])).sort(); assert(compareArray(sample, [1, 2, 3, 4]), "mixed numbers"); - sample = new TA([3, 4, 3, 1, 0, 1, 2]).sort(); + sample = new TA(makeCtorArg([3, 4, 3, 1, 0, 1, 2])).sort(); assert(compareArray(sample, [0, 1, 1, 2, 3, 3, 4]), "repeating numbers"); -}); +}, null, null, ["immutable"]); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([1, 0, -0, 2]).sort(); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1, 0, -0, 2])).sort(); assert(compareArray(sample, [-0, 0, 1, 2]), "0s"); -}, floatArrayConstructors); +}, floatArrayConstructors, null, ["immutable"]); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([1, 0, -0, 2]).sort(); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([1, 0, -0, 2])).sort(); assert(compareArray(sample, [0, 0, 1, 2]), "0s"); -}, intArrayConstructors); - -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([-4, 3, 4, -3, 2, -2, 1, 0]).sort(); - assert(compareArray(sample, [-4, -3, -2, 0, 1, 2, 3, 4]), "negative values"); -}, floatArrayConstructors.concat([Int8Array, Int16Array, Int32Array])); - -testWithTypedArrayConstructors(function(TA) { +}, intArrayConstructors, null, ["immutable"]); + +testWithTypedArrayConstructors( + function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([-4, 3, 4, -3, 2, -2, 1, 0])).sort(); + assert(compareArray(sample, [-4, -3, -2, 0, 1, 2, 3, 4]), "negative values"); + }, + floatArrayConstructors.concat([Int8Array, Int16Array, Int32Array]), + null, + ["immutable"] +); + +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample; - sample = new TA([0.5, 0, 1.5, 1]).sort(); + sample = new TA(makeCtorArg([0.5, 0, 1.5, 1])).sort(); assert(compareArray(sample, [0, 0.5, 1, 1.5]), "non integers"); - sample = new TA([0.5, 0, 1.5, -0.5, -1, -1.5, 1]).sort(); + sample = new TA(makeCtorArg([0.5, 0, 1.5, -0.5, -1, -1.5, 1])).sort(); assert(compareArray(sample, [-1.5, -1, -0.5, 0, 0.5, 1, 1.5]), "non integers + negatives"); - sample = new TA([3, 4, Infinity, -Infinity, 1, 2]).sort(); + sample = new TA(makeCtorArg([3, 4, Infinity, -Infinity, 1, 2])).sort(); assert(compareArray(sample, [-Infinity, 1, 2, 3, 4, Infinity]), "infinities"); -}, floatArrayConstructors); +}, floatArrayConstructors, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/sort/stability.js b/test/built-ins/TypedArray/prototype/sort/stability.js index 3bdd6fc6edb..a5bc8d5b2fd 100644 --- a/test/built-ins/TypedArray/prototype/sort/stability.js +++ b/test/built-ins/TypedArray/prototype/sort/stability.js @@ -12,7 +12,7 @@ features: [TypedArray] // Treat 0..3, 4..7, etc. as equal. const compare = (a, b) => (a / 4 | 0) - (b / 4 | 0); -testWithTypedArrayConstructors((TA) => { +testWithTypedArrayConstructors(TA => { // Create an array of the form `[0, 1, …, 126, 127]`. const array = Array.from({ length: 128 }, (_, i) => i); @@ -42,4 +42,4 @@ testWithTypedArrayConstructors((TA) => { 123, 122, 121, 120, 127, 126, 125, 124, ] ), 'not presorted'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/detached-buffer.js index b8e4087e583..8cfe424305a 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/detached-buffer.js @@ -30,7 +30,7 @@ info: | ... 11. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -62,4 +62,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert(begin, "observable ToInteger(begin)"); assert(end, "observable ToInteger(end)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/infinity.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/infinity.js index fc6786978f6..c1f3c6a6863 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/infinity.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/infinity.js @@ -5,12 +5,12 @@ esid: sec-%typedarray%.prototype.subarray description: Infinity values on begin and end info: | 22.2.3.27 %TypedArray%.prototype.subarray( begin , end ) -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); assert( compareArray(sample.subarray(-Infinity), [40n, 41n, 42n, 43n]), diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/minus-zero.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/minus-zero.js index b71e445c7f3..96632a79f25 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/minus-zero.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/minus-zero.js @@ -5,12 +5,12 @@ esid: sec-%typedarray%.prototype.subarray description: -0 values on begin and end info: | 22.2.3.27 %TypedArray%.prototype.subarray( begin , end ) -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); assert( compareArray(sample.subarray(-0), [40n, 41n, 42n, 43n]), diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/result-does-not-copy-ordinary-properties.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/result-does-not-copy-ordinary-properties.js index af87b3756f3..c23e8c224dd 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/result-does-not-copy-ordinary-properties.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/result-does-not-copy-ordinary-properties.js @@ -8,12 +8,12 @@ info: | ... 17. Return ? TypedArraySpeciesCreate(O, argumentsList). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([41n, 42n, 43n, 44n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([41n, 42n, 43n, 44n])); var result; sample.foo = 42; diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-from-same-ctor.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-from-same-ctor.js index 0d0362394ad..91bc318ab24 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-from-same-ctor.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-from-same-ctor.js @@ -8,12 +8,12 @@ info: | ... 17. Return ? TypedArraySpeciesCreate(O, argumentsList). -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); var result = sample.subarray(1); assert.sameValue( diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-with-shared-buffer.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-with-shared-buffer.js index ee1198833ff..83f95a08a15 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-with-shared-buffer.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-with-shared-buffer.js @@ -8,12 +8,12 @@ info: | ... 17. Return ? TypedArraySpeciesCreate(O, argumentsList). -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); var buffer = sample.buffer; var result = sample.subarray(1); @@ -32,4 +32,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { compareArray(sample, [40n, 100n, 111n, 43n]), "changes on the new instance values affect the original sample" ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-different-length.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-different-length.js index ff078746983..c69e34001d8 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-different-length.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-different-length.js @@ -8,12 +8,12 @@ info: | ... 17. Return ? TypedArraySpeciesCreate(O, argumentsList). -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); function testRes(result, expected, msg) { assert(compareArray(result, expected), msg + ", result: [" + result + "]"); diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-empty-length.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-empty-length.js index 5ff6768ec50..24a96ee2165 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-empty-length.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-empty-length.js @@ -8,12 +8,12 @@ info: | ... 17. Return ? TypedArraySpeciesCreate(O, argumentsList). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); function testRes(result, msg) { assert.sameValue(result.length, 0, msg); diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-same-length.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-same-length.js index d54310d5260..8e5cf0a150a 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-same-length.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-same-length.js @@ -8,12 +8,12 @@ info: | ... 17. Return ? TypedArraySpeciesCreate(O, argumentsList). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); function testRes(result, msg) { assert.sameValue(result.length, 4, msg); diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/return-abrupt-from-begin-symbol.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/return-abrupt-from-begin-symbol.js index dbd09e13ba7..3b1b36cefd0 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/return-abrupt-from-begin-symbol.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/return-abrupt-from-begin-symbol.js @@ -9,7 +9,7 @@ info: | ... 7. Let relativeBegin be ? ToInteger(begin). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -21,4 +21,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.subarray(s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/return-abrupt-from-begin.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/return-abrupt-from-begin.js index 50ac28981af..2388d053998 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/return-abrupt-from-begin.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/return-abrupt-from-begin.js @@ -9,7 +9,7 @@ info: | ... 7. Let relativeBegin be ? ToInteger(begin). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -35,4 +35,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.subarray(o2); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/return-abrupt-from-end-symbol.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/return-abrupt-from-end-symbol.js index 29f517746d2..44b1dec715e 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/return-abrupt-from-end-symbol.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/return-abrupt-from-end-symbol.js @@ -10,7 +10,7 @@ info: | 9. If end is undefined, let relativeEnd be srcLength; else, let relativeEnd be ? ToInteger(end). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -22,4 +22,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.subarray(0, s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/return-abrupt-from-end.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/return-abrupt-from-end.js index 4341c436237..8b892bc903a 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/return-abrupt-from-end.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/return-abrupt-from-end.js @@ -10,7 +10,7 @@ info: | 9. If end is undefined, let relativeEnd be srcLength; else, let relativeEnd be ? ToInteger(end). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.subarray(0, o2); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-abrupt.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-abrupt.js index 9ed4e0900a6..48c7dbd2b89 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-abrupt.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-abrupt.js @@ -21,12 +21,12 @@ info: | 2. Let C be ? Get(O, "constructor"). 3. If C is undefined, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); Object.defineProperty(sample, "constructor", { get: function() { @@ -37,4 +37,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.subarray(0); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-inherited.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-inherited.js index 67841f4428d..2cc5aaf2c0d 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-inherited.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-inherited.js @@ -21,12 +21,12 @@ info: | 2. Let C be ? Get(O, "constructor"). 3. If C is undefined, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); var calls = 0; var result; @@ -58,4 +58,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { 7, "result.constructor triggers the inherited accessor property" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-returns-throws.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-returns-throws.js index 6967323710e..6125bba5bcd 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-returns-throws.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-returns-throws.js @@ -23,12 +23,12 @@ info: | 3. If C is undefined, return defaultConstructor. 4. If Type(C) is not Object, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); sample.constructor = 42; assert.throws(TypeError, function() { diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor.js index a0546000472..4e257fc557a 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor.js @@ -21,12 +21,12 @@ info: | 2. Let C be ? Get(O, "constructor"). 3. If C is undefined, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); var calls = 0; var result; @@ -50,4 +50,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { TA, "use defaultCtor on an undefined return - .constructor check" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-abrupt.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-abrupt.js index c1b64586d86..cf6b59386b9 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-abrupt.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-abrupt.js @@ -23,12 +23,12 @@ info: | ... 5. Let S be ? Get(C, @@species). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; @@ -41,4 +41,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.subarray(0); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-invocation.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-invocation.js index ebde3808823..79507956b50 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-invocation.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-invocation.js @@ -8,6 +8,11 @@ info: | 22.2.3.27 %TypedArray%.prototype.subarray( begin , end ) ... + 15. If O.[[ArrayLength]] is auto and end is undefined, then + a. Let argumentsList be « buffer, 𝔽(beginByteOffset) ». + 16. Else, + ... + f. Let argumentsList be « buffer, 𝔽(beginByteOffset), 𝔽(newLength) ». 17. Return ? TypedArraySpeciesCreate(O, argumentsList). 22.2.4.7 TypedArraySpeciesCreate ( exemplar, argumentList ) @@ -31,12 +36,12 @@ info: | 3. If argumentList is a List of a single Number, then ... 4. Return newTypedArray. -includes: [testBigIntTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n])); var expectedOffset = TA.BYTES_PER_ELEMENT; var result, ctorThis; @@ -49,10 +54,10 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.subarray(1); - assert.sameValue(result.length, 3, "called with 3 arguments"); - assert.sameValue(result[0], sample.buffer, "[0] is sample.buffer"); - assert.sameValue(result[1], expectedOffset, "[1] is the byte offset pos"); - assert.sameValue(result[2], 2, "[2] is expected length"); + var expectArgs = sample.buffer.resizable + ? [sample.buffer, expectedOffset] + : [sample.buffer, expectedOffset, 2]; + assert.compareArray(result, expectArgs, "Constructor called with arguments"); assert( ctorThis instanceof sample.constructor[Symbol.species], diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js index 0aa28e822ad..97326533caa 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js @@ -31,12 +31,12 @@ info: | 3. If argumentList is a List of a single Number, then ... 4. Return newTypedArray. -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n])); var other = new BigInt64Array([1n, 0n, 1n]); var result; diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-throws.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-throws.js index 958378556a6..49a1feb27a5 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-throws.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-throws.js @@ -29,12 +29,12 @@ info: | 1. Let newTypedArray be ? Construct(constructor, argumentList). 2. Perform ? ValidateTypedArray(newTypedArray). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var ctor = function() {}; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor.js index 01b0dbd9b4e..6553ddd979b 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor.js @@ -31,12 +31,12 @@ info: | 3. If argumentList is a List of a single Number, then ... 4. Return newTypedArray. -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n])); var calls = 0; var result; diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-returns-throws.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-returns-throws.js index 1a01c046056..7fa3b5c5048 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-returns-throws.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-returns-throws.js @@ -24,12 +24,12 @@ info: | 7. If IsConstructor(S) is true, return S. 8. Throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-use-default-ctor.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-use-default-ctor.js index 1b1a4e46f0c..c7ec3f9f8af 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-use-default-ctor.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-use-default-ctor.js @@ -22,12 +22,12 @@ info: | 5. Let S be ? Get(C, @@species). 6. If S is either undefined or null, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var result; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species.js index 01f3427bfee..dcf74af431a 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species.js @@ -23,12 +23,12 @@ info: | ... 5. Let S be ? Get(C, @@species). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var calls = 0; sample.constructor = {}; @@ -42,4 +42,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.subarray(0); assert.sameValue(calls, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-begin.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-begin.js index 3d9ff3c0f15..afab326846f 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-begin.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-begin.js @@ -9,7 +9,7 @@ info: | ... 7. Let relativeBegin be ? ToInteger(begin). ... -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ @@ -19,8 +19,8 @@ var obj = { } }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); assert(compareArray(sample.subarray(false), [40n, 41n, 42n, 43n]), "false"); assert(compareArray(sample.subarray(true), [41n, 42n, 43n]), "true"); diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-end.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-end.js index 8885220a3f0..6e583e263a6 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-end.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-end.js @@ -10,7 +10,7 @@ info: | 9. If end is undefined, let relativeEnd be srcLength; else, let relativeEnd be ? ToInteger(end). ... -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ @@ -20,8 +20,8 @@ var obj = { } }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([40n, 41n, 42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40n, 41n, 42n, 43n])); assert(compareArray(sample.subarray(0, false), []), "false"); assert(compareArray(sample.subarray(0, true), [40n]), "true"); diff --git a/test/built-ins/TypedArray/prototype/subarray/byteoffset-with-detached-buffer.js b/test/built-ins/TypedArray/prototype/subarray/byteoffset-with-detached-buffer.js index ebe1b877c9f..590e3c59580 100644 --- a/test/built-ins/TypedArray/prototype/subarray/byteoffset-with-detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/subarray/byteoffset-with-detached-buffer.js @@ -42,4 +42,4 @@ testWithTypedArrayConstructors(function(TA) { }; assert.sameValue(ta.subarray(1, end), result); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/detached-buffer.js b/test/built-ins/TypedArray/prototype/subarray/detached-buffer.js index 73785cb443d..fb049c89074 100644 --- a/test/built-ins/TypedArray/prototype/subarray/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/subarray/detached-buffer.js @@ -62,4 +62,4 @@ testWithTypedArrayConstructors(function(TA) { assert(begin, "observable ToInteger(begin)"); assert(end, "observable ToInteger(end)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/infinity.js b/test/built-ins/TypedArray/prototype/subarray/infinity.js index 8a27464925d..32581d3e678 100644 --- a/test/built-ins/TypedArray/prototype/subarray/infinity.js +++ b/test/built-ins/TypedArray/prototype/subarray/infinity.js @@ -9,8 +9,8 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); assert( compareArray(sample.subarray(-Infinity), [40, 41, 42, 43]), diff --git a/test/built-ins/TypedArray/prototype/subarray/minus-zero.js b/test/built-ins/TypedArray/prototype/subarray/minus-zero.js index de714ad4698..0dbc18705c8 100644 --- a/test/built-ins/TypedArray/prototype/subarray/minus-zero.js +++ b/test/built-ins/TypedArray/prototype/subarray/minus-zero.js @@ -9,8 +9,8 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); assert( compareArray(sample.subarray(-0), [40, 41, 42, 43]), diff --git a/test/built-ins/TypedArray/prototype/subarray/result-does-not-copy-ordinary-properties.js b/test/built-ins/TypedArray/prototype/subarray/result-does-not-copy-ordinary-properties.js index c8e9e0d6cee..1fdc05cb9e6 100644 --- a/test/built-ins/TypedArray/prototype/subarray/result-does-not-copy-ordinary-properties.js +++ b/test/built-ins/TypedArray/prototype/subarray/result-does-not-copy-ordinary-properties.js @@ -12,8 +12,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([41, 42, 43, 44]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([41, 42, 43, 44])); var result; sample.foo = 42; diff --git a/test/built-ins/TypedArray/prototype/subarray/result-is-new-instance-from-same-ctor.js b/test/built-ins/TypedArray/prototype/subarray/result-is-new-instance-from-same-ctor.js index a507518bb75..db55f3f8079 100644 --- a/test/built-ins/TypedArray/prototype/subarray/result-is-new-instance-from-same-ctor.js +++ b/test/built-ins/TypedArray/prototype/subarray/result-is-new-instance-from-same-ctor.js @@ -12,8 +12,8 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); var result = sample.subarray(1); assert.sameValue( diff --git a/test/built-ins/TypedArray/prototype/subarray/result-is-new-instance-with-shared-buffer.js b/test/built-ins/TypedArray/prototype/subarray/result-is-new-instance-with-shared-buffer.js index ff3925eb632..e9a110669be 100644 --- a/test/built-ins/TypedArray/prototype/subarray/result-is-new-instance-with-shared-buffer.js +++ b/test/built-ins/TypedArray/prototype/subarray/result-is-new-instance-with-shared-buffer.js @@ -12,8 +12,8 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); var buffer = sample.buffer; var result = sample.subarray(1); @@ -32,4 +32,4 @@ testWithTypedArrayConstructors(function(TA) { compareArray(sample, [40, 100, 111, 43]), "changes on the new instance values affect the original sample" ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/results-with-different-length.js b/test/built-ins/TypedArray/prototype/subarray/results-with-different-length.js index c206e2462ba..71297925460 100644 --- a/test/built-ins/TypedArray/prototype/subarray/results-with-different-length.js +++ b/test/built-ins/TypedArray/prototype/subarray/results-with-different-length.js @@ -12,8 +12,8 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); function testRes(result, expected, msg) { assert(compareArray(result, expected), msg + ", result: [" + result + "]"); diff --git a/test/built-ins/TypedArray/prototype/subarray/results-with-empty-length.js b/test/built-ins/TypedArray/prototype/subarray/results-with-empty-length.js index 9e04230690d..72cba2f57b3 100644 --- a/test/built-ins/TypedArray/prototype/subarray/results-with-empty-length.js +++ b/test/built-ins/TypedArray/prototype/subarray/results-with-empty-length.js @@ -12,8 +12,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); function testRes(result, msg) { assert.sameValue(result.length, 0, msg); diff --git a/test/built-ins/TypedArray/prototype/subarray/results-with-same-length.js b/test/built-ins/TypedArray/prototype/subarray/results-with-same-length.js index c51cbcc023c..4a2a9d65e45 100644 --- a/test/built-ins/TypedArray/prototype/subarray/results-with-same-length.js +++ b/test/built-ins/TypedArray/prototype/subarray/results-with-same-length.js @@ -12,8 +12,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); function testRes(result, msg) { assert.sameValue(result.length, 4, msg); diff --git a/test/built-ins/TypedArray/prototype/subarray/return-abrupt-from-begin-symbol.js b/test/built-ins/TypedArray/prototype/subarray/return-abrupt-from-begin-symbol.js index 6da5dd1ba2f..8d9fd089066 100644 --- a/test/built-ins/TypedArray/prototype/subarray/return-abrupt-from-begin-symbol.js +++ b/test/built-ins/TypedArray/prototype/subarray/return-abrupt-from-begin-symbol.js @@ -21,4 +21,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.subarray(s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/return-abrupt-from-begin.js b/test/built-ins/TypedArray/prototype/subarray/return-abrupt-from-begin.js index 6e1ac2f6439..e021609dcdd 100644 --- a/test/built-ins/TypedArray/prototype/subarray/return-abrupt-from-begin.js +++ b/test/built-ins/TypedArray/prototype/subarray/return-abrupt-from-begin.js @@ -35,4 +35,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.subarray(o2); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/return-abrupt-from-end-symbol.js b/test/built-ins/TypedArray/prototype/subarray/return-abrupt-from-end-symbol.js index ecb6f8defe8..a780599ffab 100644 --- a/test/built-ins/TypedArray/prototype/subarray/return-abrupt-from-end-symbol.js +++ b/test/built-ins/TypedArray/prototype/subarray/return-abrupt-from-end-symbol.js @@ -22,4 +22,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.subarray(0, s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/return-abrupt-from-end.js b/test/built-ins/TypedArray/prototype/subarray/return-abrupt-from-end.js index eaa4e9dddb5..56a9ea4675d 100644 --- a/test/built-ins/TypedArray/prototype/subarray/return-abrupt-from-end.js +++ b/test/built-ins/TypedArray/prototype/subarray/return-abrupt-from-end.js @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.subarray(0, o2); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-abrupt.js b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-abrupt.js index a7d2bc800e7..419a33780fe 100644 --- a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-abrupt.js +++ b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-abrupt.js @@ -25,8 +25,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); Object.defineProperty(sample, "constructor", { get: function() { @@ -37,4 +37,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.subarray(0); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-inherited.js b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-inherited.js index 3fa39b43142..b08588bf6ae 100644 --- a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-inherited.js +++ b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-inherited.js @@ -25,8 +25,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); var calls = 0; var result; @@ -58,4 +58,4 @@ testWithTypedArrayConstructors(function(TA) { 7, "result.constructor triggers the inherited accessor property" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-returns-throws.js b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-returns-throws.js index 70714191e7c..72026b80201 100644 --- a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-returns-throws.js +++ b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-returns-throws.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); sample.constructor = 42; assert.throws(TypeError, function() { diff --git a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor.js b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor.js index 6e6a65e3b98..3ef0b4e75a6 100644 --- a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor.js +++ b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor.js @@ -25,8 +25,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); var calls = 0; var result; @@ -50,4 +50,4 @@ testWithTypedArrayConstructors(function(TA) { TA, "use defaultCtor on an undefined return - .constructor check" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-abrupt.js b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-abrupt.js index e10dfe5ff18..b6bcce9ae7a 100644 --- a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-abrupt.js +++ b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-abrupt.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; @@ -41,4 +41,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.subarray(0); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-invocation.js b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-invocation.js index 0b62ffdcb12..3aef777d1b1 100644 --- a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-invocation.js +++ b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-invocation.js @@ -8,6 +8,11 @@ info: | 22.2.3.27 %TypedArray%.prototype.subarray( begin , end ) ... + 15. If O.[[ArrayLength]] is auto and end is undefined, then + a. Let argumentsList be « buffer, 𝔽(beginByteOffset) ». + 16. Else, + ... + f. Let argumentsList be « buffer, 𝔽(beginByteOffset), 𝔽(newLength) ». 17. Return ? TypedArraySpeciesCreate(O, argumentsList). 22.2.4.7 TypedArraySpeciesCreate ( exemplar, argumentList ) @@ -31,12 +36,12 @@ info: | 3. If argumentList is a List of a single Number, then ... 4. Return newTypedArray. -includes: [testTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42])); var expectedOffset = TA.BYTES_PER_ELEMENT; var result, ctorThis; @@ -49,10 +54,10 @@ testWithTypedArrayConstructors(function(TA) { sample.subarray(1); - assert.sameValue(result.length, 3, "called with 3 arguments"); - assert.sameValue(result[0], sample.buffer, "[0] is sample.buffer"); - assert.sameValue(result[1], expectedOffset, "[1] is the byte offset pos"); - assert.sameValue(result[2], 2, "[2] is expected length"); + var expectArgs = sample.buffer.resizable + ? [sample.buffer, expectedOffset] + : [sample.buffer, expectedOffset, 2]; + assert.compareArray(result, expectArgs, "Constructor called with arguments"); assert( ctorThis instanceof sample.constructor[Symbol.species], diff --git a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-returns-another-instance.js b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-returns-another-instance.js index 3ed6ba00a86..b74598d97d0 100644 --- a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-returns-another-instance.js +++ b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-returns-another-instance.js @@ -35,8 +35,8 @@ includes: [testTypedArray.js, compareArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40])); var other = new Int8Array([1, 0, 1]); var result; diff --git a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-throws.js b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-throws.js index e548de514c8..fa48468ecba 100644 --- a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-throws.js +++ b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-throws.js @@ -33,8 +33,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var ctor = function() {}; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor.js b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor.js index 5dbc2cc3610..e29fd360e02 100644 --- a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor.js +++ b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor.js @@ -35,8 +35,8 @@ includes: [testTypedArray.js, compareArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42])); var calls = 0; var result; diff --git a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-returns-throws.js b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-returns-throws.js index 3c22bcf0182..d8c58c36655 100644 --- a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-returns-throws.js +++ b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-returns-throws.js @@ -28,8 +28,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-use-default-ctor.js b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-use-default-ctor.js index 3540b0c2f21..6c4eebfb75e 100644 --- a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-use-default-ctor.js +++ b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-use-default-ctor.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var result; sample.constructor = {}; diff --git a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species.js b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species.js index b2d9d260348..63bcecbcf72 100644 --- a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species.js +++ b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species.js @@ -27,8 +27,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); var calls = 0; sample.constructor = {}; @@ -42,4 +42,4 @@ testWithTypedArrayConstructors(function(TA) { sample.subarray(0); assert.sameValue(calls, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/subarray/tointeger-begin.js b/test/built-ins/TypedArray/prototype/subarray/tointeger-begin.js index abf503cb8f7..fd5cd212cc6 100644 --- a/test/built-ins/TypedArray/prototype/subarray/tointeger-begin.js +++ b/test/built-ins/TypedArray/prototype/subarray/tointeger-begin.js @@ -19,8 +19,8 @@ var obj = { } }; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); assert(compareArray(sample.subarray(false), [40, 41, 42, 43]), "false"); assert(compareArray(sample.subarray(true), [41, 42, 43]), "true"); diff --git a/test/built-ins/TypedArray/prototype/subarray/tointeger-end.js b/test/built-ins/TypedArray/prototype/subarray/tointeger-end.js index 4797bf5b22a..dbfde335024 100644 --- a/test/built-ins/TypedArray/prototype/subarray/tointeger-end.js +++ b/test/built-ins/TypedArray/prototype/subarray/tointeger-end.js @@ -20,8 +20,8 @@ var obj = { } }; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([40, 41, 42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([40, 41, 42, 43])); assert(compareArray(sample.subarray(0, false), []), "false"); assert(compareArray(sample.subarray(0, true), [40]), "true"); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tolocalestring-from-each-value.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tolocalestring-from-each-value.js index 82cd346b912..7a7731107f1 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tolocalestring-from-each-value.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tolocalestring-from-each-value.js @@ -27,7 +27,7 @@ info: | i. Let R be the empty String. d. Else, i. Let R be ? ToString(? Invoke(nextElement, "toLocaleString")). -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, TypedArray] ---*/ @@ -41,8 +41,8 @@ BigInt.prototype.toLocaleString = function() { var expected = ["hacks1", "hacks2"].join(separator); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 0n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 0n])); calls = []; assert.sameValue(sample.toLocaleString(), expected, "returns expected value"); assert( diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tostring-from-each-value.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tostring-from-each-value.js index 7fb9d63936f..d481f520323 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tostring-from-each-value.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tostring-from-each-value.js @@ -28,7 +28,7 @@ info: | i. Let R be the empty String. d. Else, i. Let R be ? ToString(? Invoke(nextElement, "toLocaleString")). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -55,4 +55,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { calls = 0; assert.sameValue(sample.toLocaleString(), expected, "returns expected value"); assert.sameValue(calls, 2, "toString called once for each item"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-valueof-from-each-value.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-valueof-from-each-value.js index ea5464d98e1..60e6a1914f4 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-valueof-from-each-value.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-valueof-from-each-value.js @@ -28,7 +28,7 @@ info: | i. Let R be the empty String. d. Else, i. Let R be ? ToString(? Invoke(nextElement, "toLocaleString")). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -47,8 +47,8 @@ BigInt.prototype.toLocaleString = function() { var expected = ["hacks1", "hacks2"].join(separator); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 0n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 0n])); calls = 0; assert.sameValue(sample.toLocaleString(), expected, "returns expected value"); assert.sameValue(calls, 2, "valueOf called once for each item"); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/detached-buffer.js index debd112e63e..75ed4c77f74 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.toLocaleString(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/empty-instance-returns-empty-string.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/empty-instance-returns-empty-string.js index 6dc34b08db0..26dd219a08a 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/empty-instance-returns-empty-string.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/empty-instance-returns-empty-string.js @@ -16,11 +16,11 @@ info: | ... 4. If len is zero, return the empty String. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(); assert.sameValue(sample.toLocaleString(), ""); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/get-length-uses-internal-arraylength.js index bca3f6e7639..87bfb7df34a 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/get-length-uses-internal-arraylength.js @@ -16,7 +16,7 @@ info: | 1. Let array be ? ToObject(this value). 2.Let len be ? ToLength(? Get(array, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -30,8 +30,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); Object.defineProperty(TA.prototype, "length", desc); Object.defineProperty(sample, "length", desc); @@ -39,4 +39,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.toLocaleString(); assert.sameValue(getCalls, 0, "ignores length properties"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tolocalestring.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tolocalestring.js index a0927933ef1..62159871d34 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tolocalestring.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tolocalestring.js @@ -20,7 +20,7 @@ info: | a. Let R be the empty String. 7. Else, a. Let R be ? ToString(? Invoke(firstElement, "toLocaleString")). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -31,9 +31,9 @@ BigInt.prototype.toLocaleString = function() { throw new Test262Error(); }; -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { calls = 0; - var sample = new TA([42n, 0n]); + var sample = new TA(makeCtorArg([42n, 0n])); assert.throws(Test262Error, function() { sample.toLocaleString(); }); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tostring.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tostring.js index 058f684c3cb..cbfc0fbe129 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tostring.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tostring.js @@ -28,7 +28,7 @@ info: | i. Let R be the empty String. d. Else, i. Let R be ? ToString(? Invoke(nextElement, "toLocaleString")). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -43,8 +43,8 @@ BigInt.prototype.toLocaleString = function() { }; }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 0n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 0n])); calls = 0; assert.throws(Test262Error, function() { sample.toLocaleString(); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-valueof.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-valueof.js index 96259ba5d49..e4293f9625c 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-valueof.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-valueof.js @@ -28,7 +28,7 @@ info: | i. Let R be the empty String. d. Else, i. Let R be ? ToString(? Invoke(nextElement, "toLocaleString")). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -44,8 +44,8 @@ BigInt.prototype.toLocaleString = function() { }; }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 0n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 0n])); calls = 0; assert.throws(Test262Error, function() { sample.toLocaleString(); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tolocalestring.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tolocalestring.js index 4cab0e28863..8c66bfe5046 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tolocalestring.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tolocalestring.js @@ -21,7 +21,7 @@ info: | i. Let R be the empty String. d. Else, i. Let R be ? ToString(? Invoke(nextElement, "toLocaleString")). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -34,9 +34,9 @@ BigInt.prototype.toLocaleString = function() { } }; -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { calls = 0; - var sample = new TA([42n, 0n]); + var sample = new TA(makeCtorArg([42n, 0n])); assert.throws(Test262Error, function() { sample.toLocaleString(); }); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tostring.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tostring.js index cc0bd5ee6fb..16f8d8bb88b 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tostring.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tostring.js @@ -28,7 +28,7 @@ info: | i. Let R be the empty String. d. Else, i. Let R be ? ToString(? Invoke(nextElement, "toLocaleString")). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -45,8 +45,8 @@ BigInt.prototype.toLocaleString = function() { }; }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 0n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 0n])); calls = 0; assert.throws(Test262Error, function() { sample.toLocaleString(); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-valueof.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-valueof.js index 152095ebea1..6a0b193302d 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-valueof.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-valueof.js @@ -28,7 +28,7 @@ info: | i. Let R be the empty String. d. Else, i. Let R be ? ToString(? Invoke(nextElement, "toLocaleString")). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -46,8 +46,8 @@ BigInt.prototype.toLocaleString = function() { }; }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 0n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 0n])); calls = 0; assert.throws(Test262Error, function() { sample.toLocaleString(); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-this-out-of-bounds.js index 1f229df564a..6f1a3606918 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.tolocalestring description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.toLocaleString(); throw new Test262Error('toLocaleString completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-result.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-result.js index 0e2a439c3a3..19612b0cba1 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-result.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-result.js @@ -27,14 +27,14 @@ info: | i. Let R be the empty String. d. Else, i. Let R be ? ToString(? Invoke(nextElement, "toLocaleString")). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ var separator = ["", ""].toLocaleString(); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 0n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 0n, 43n])); var expected = sample[0].toLocaleString().toString() + separator + diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/calls-tolocalestring-from-each-value.js b/test/built-ins/TypedArray/prototype/toLocaleString/calls-tolocalestring-from-each-value.js index 980670c721c..1457e3a2245 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/calls-tolocalestring-from-each-value.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/calls-tolocalestring-from-each-value.js @@ -50,4 +50,4 @@ testWithTypedArrayConstructors(function(TA) { compareArray(new TA(calls), sample), "toLocaleString called for each item" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/calls-tostring-from-each-value.js b/test/built-ins/TypedArray/prototype/toLocaleString/calls-tostring-from-each-value.js index 530ec105574..c82a5c8c070 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/calls-tostring-from-each-value.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/calls-tostring-from-each-value.js @@ -50,9 +50,9 @@ Number.prototype.toLocaleString = function() { var arr = [42, 0]; var expected = ["hacks1", "hacks2"].join(separator); -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample = new TA(arr); calls = 0; assert.sameValue(sample.toLocaleString(), expected, "returns expected value"); assert.sameValue(calls, 2, "toString called once for each item"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/calls-valueof-from-each-value.js b/test/built-ins/TypedArray/prototype/toLocaleString/calls-valueof-from-each-value.js index 328bbbf4e6b..85d37be0602 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/calls-valueof-from-each-value.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/calls-valueof-from-each-value.js @@ -48,9 +48,9 @@ Number.prototype.toLocaleString = function() { var arr = [42, 0]; var expected = ["hacks1", "hacks2"].join(separator); -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample = new TA(arr); calls = 0; assert.sameValue(sample.toLocaleString(), expected, "returns expected value"); assert.sameValue(calls, 2, "valueOf called once for each item"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/detached-buffer.js b/test/built-ins/TypedArray/prototype/toLocaleString/detached-buffer.js index 9f2bbaed922..52740d73293 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/detached-buffer.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.toLocaleString(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/empty-instance-returns-empty-string.js b/test/built-ins/TypedArray/prototype/toLocaleString/empty-instance-returns-empty-string.js index e2570724ad2..1f64581d794 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/empty-instance-returns-empty-string.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/empty-instance-returns-empty-string.js @@ -23,4 +23,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { var sample = new TA(); assert.sameValue(sample.toLocaleString(), ""); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/toLocaleString/get-length-uses-internal-arraylength.js index 04ee64e7cf0..226650ca11f 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/get-length-uses-internal-arraylength.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/get-length-uses-internal-arraylength.js @@ -30,8 +30,8 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithTypedArrayConstructors(function(TA, N) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); Object.defineProperty(TA.prototype, "length", desc); Object.defineProperty(sample, "length", desc); @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(function(TA, N) { sample.toLocaleString(); assert.sameValue(getCalls, 0, "ignores length properties"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-firstelement-tolocalestring.js b/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-firstelement-tolocalestring.js index d934b70da48..290ec32f472 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-firstelement-tolocalestring.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-firstelement-tolocalestring.js @@ -33,11 +33,11 @@ Number.prototype.toLocaleString = function() { var arr = [42, 0]; -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { calls = 0; var sample = new TA(arr); assert.throws(Test262Error, function() { sample.toLocaleString(); }); assert.sameValue(calls, 1, "abrupt from first element"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-firstelement-tostring.js b/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-firstelement-tostring.js index 394105ef3aa..46d352aefa3 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-firstelement-tostring.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-firstelement-tostring.js @@ -45,11 +45,11 @@ Number.prototype.toLocaleString = function() { var arr = [42, 0]; -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample = new TA(arr); calls = 0; assert.throws(Test262Error, function() { sample.toLocaleString(); }); assert.sameValue(calls, 1, "toString called once"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-firstelement-valueof.js b/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-firstelement-valueof.js index ae7e4169e22..9e830ae9e39 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-firstelement-valueof.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-firstelement-valueof.js @@ -46,11 +46,11 @@ Number.prototype.toLocaleString = function() { var arr = [42, 0]; -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample = new TA(arr); calls = 0; assert.throws(Test262Error, function() { sample.toLocaleString(); }); assert.sameValue(calls, 1, "toString called once"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-nextelement-tolocalestring.js b/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-nextelement-tolocalestring.js index 49e02d09a4e..d82a9c3da9f 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-nextelement-tolocalestring.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-nextelement-tolocalestring.js @@ -36,11 +36,11 @@ Number.prototype.toLocaleString = function() { var arr = [42, 0]; -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { calls = 0; var sample = new TA(arr); assert.throws(Test262Error, function() { sample.toLocaleString(); }); assert.sameValue(calls, 2, "abrupt from a next element"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-nextelement-tostring.js b/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-nextelement-tostring.js index d872475c79a..c6dd6a43866 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-nextelement-tostring.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-nextelement-tostring.js @@ -47,11 +47,11 @@ Number.prototype.toLocaleString = function() { var arr = [42, 0]; -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample = new TA(arr); calls = 0; assert.throws(Test262Error, function() { sample.toLocaleString(); }); assert.sameValue(calls, 2, "abrupt from a nextElement"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-nextelement-valueof.js b/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-nextelement-valueof.js index 7df9a09d4fe..3b9697ebaac 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-nextelement-valueof.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-nextelement-valueof.js @@ -48,11 +48,11 @@ Number.prototype.toLocaleString = function() { var arr = [42, 0]; -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample = new TA(arr); calls = 0; assert.throws(Test262Error, function() { sample.toLocaleString(); }); assert.sameValue(calls, 2, "abrupt from a nextElement"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-this-out-of-bounds.js index 7a45f2f4430..c429add9bde 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.toLocaleString(); throw new Test262Error('toLocaleString completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/return-result.js b/test/built-ins/TypedArray/prototype/toLocaleString/return-result.js index fca0e70b365..a35a693d0f6 100644 --- a/test/built-ins/TypedArray/prototype/toLocaleString/return-result.js +++ b/test/built-ins/TypedArray/prototype/toLocaleString/return-result.js @@ -35,7 +35,7 @@ var separator = ["", ""].toLocaleString(); var arr = [42, 0, 43]; -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample = new TA(arr); var expected = sample[0].toLocaleString().toString() + @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA, N) { separator + sample[2].toLocaleString().toString(); assert.sameValue(sample.toLocaleString(), expected); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toReversed/ignores-species.js b/test/built-ins/TypedArray/prototype/toReversed/ignores-species.js index 6daccdb9f13..80172fe2e8e 100644 --- a/test/built-ins/TypedArray/prototype/toReversed/ignores-species.js +++ b/test/built-ins/TypedArray/prototype/toReversed/ignores-species.js @@ -38,4 +38,4 @@ testWithTypedArrayConstructors(TA => { } }); ta.toReversed(); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toReversed/immutable.js b/test/built-ins/TypedArray/prototype/toReversed/immutable.js index e2c6e80088a..1987468c28b 100644 --- a/test/built-ins/TypedArray/prototype/toReversed/immutable.js +++ b/test/built-ins/TypedArray/prototype/toReversed/immutable.js @@ -9,8 +9,8 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray, change-array-by-copy] ---*/ -testWithTypedArrayConstructors(TA => { - var ta = new TA([0, 1, 2]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + var ta = new TA(makeCtorArg([0, 1, 2])); ta.toReversed(); assert.compareArray(ta, [0, 1, 2]); diff --git a/test/built-ins/TypedArray/prototype/toReversed/length-property-ignored.js b/test/built-ins/TypedArray/prototype/toReversed/length-property-ignored.js index ba83bf6dff9..b2c058514e8 100644 --- a/test/built-ins/TypedArray/prototype/toReversed/length-property-ignored.js +++ b/test/built-ins/TypedArray/prototype/toReversed/length-property-ignored.js @@ -15,19 +15,19 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray, change-array-by-copy] ---*/ -testWithTypedArrayConstructors(TA => { - var ta = new TA([0, 1, 2]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + var ta = new TA(makeCtorArg([0, 1, 2])); Object.defineProperty(ta, "length", { value: 2 }) var res = ta.toReversed(); assert.compareArray(res, [2, 1, 0]); assert.sameValue(res.length, 3); - ta = new TA([0, 1, 2]); + ta = new TA(makeCtorArg([0, 1, 2])); Object.defineProperty(ta, "length", { value: 5 }); res = ta.toReversed(); assert.compareArray(res, [2, 1, 0]); assert.sameValue(res.length, 3); -}); +}, null, ["passthrough"]); function setLength(length) { Object.defineProperty(TypedArray.prototype, "length", { @@ -35,8 +35,8 @@ function setLength(length) { }); } -testWithTypedArrayConstructors(TA => { - var ta = new TA([0, 1, 2]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + var ta = new TA(makeCtorArg([0, 1, 2])); setLength(2); var res = ta.toReversed(); @@ -47,4 +47,4 @@ testWithTypedArrayConstructors(TA => { res = ta.toReversed(); setLength(3); assert.compareArray(res, [2, 1, 0]); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toReversed/this-value-invalid.js b/test/built-ins/TypedArray/prototype/toReversed/this-value-invalid.js index ed08ee4a3e4..329157b1864 100644 --- a/test/built-ins/TypedArray/prototype/toReversed/this-value-invalid.js +++ b/test/built-ins/TypedArray/prototype/toReversed/this-value-invalid.js @@ -41,4 +41,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, () => { sample.toReversed(); }, `array has a detached buffer`); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toSorted/comparefn-not-a-function.js b/test/built-ins/TypedArray/prototype/toSorted/comparefn-not-a-function.js index 2c6ba162761..76e3cc8a016 100644 --- a/test/built-ins/TypedArray/prototype/toSorted/comparefn-not-a-function.js +++ b/test/built-ins/TypedArray/prototype/toSorted/comparefn-not-a-function.js @@ -17,8 +17,8 @@ features: [TypedArray, change-array-by-copy] var invalidComparators = [null, true, false, "", /a/g, 42, 42n, [], {}, Symbol()]; -testWithTypedArrayConstructors(TA => { - const ta = new TA([1]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + const ta = new TA(makeCtorArg([1])); for (var i = 0; i < invalidComparators.length; i++) { assert.throws(TypeError, function() { ta.toSorted(invalidComparators[i]); diff --git a/test/built-ins/TypedArray/prototype/toSorted/comparefn-stop-after-error.js b/test/built-ins/TypedArray/prototype/toSorted/comparefn-stop-after-error.js index cf7e4ef4c25..893e7bb92f4 100644 --- a/test/built-ins/TypedArray/prototype/toSorted/comparefn-stop-after-error.js +++ b/test/built-ins/TypedArray/prototype/toSorted/comparefn-stop-after-error.js @@ -18,9 +18,9 @@ includes: [testTypedArray.js] features: [TypedArray, change-array-by-copy] ---*/ -testWithTypedArrayConstructors(TA => { +testWithTypedArrayConstructors((TA, makeCtorArg) => { var calls = 0; - var ta = new TA([3, 1, 2]); + var ta = new TA(makeCtorArg([3, 1, 2])); try { ta.toSorted(() => { ++calls; diff --git a/test/built-ins/TypedArray/prototype/toSorted/ignores-species.js b/test/built-ins/TypedArray/prototype/toSorted/ignores-species.js index 4052ef223f4..9d17f00adf7 100644 --- a/test/built-ins/TypedArray/prototype/toSorted/ignores-species.js +++ b/test/built-ins/TypedArray/prototype/toSorted/ignores-species.js @@ -38,4 +38,4 @@ testWithTypedArrayConstructors(TA => { } }); ta.toSorted(); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toSorted/immutable.js b/test/built-ins/TypedArray/prototype/toSorted/immutable.js index 3e96e85d518..9ba10a0f2b1 100644 --- a/test/built-ins/TypedArray/prototype/toSorted/immutable.js +++ b/test/built-ins/TypedArray/prototype/toSorted/immutable.js @@ -9,8 +9,8 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray, change-array-by-copy] ---*/ -testWithTypedArrayConstructors(TA => { - var ta = new TA([3, 1, 2]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + var ta = new TA(makeCtorArg([3, 1, 2])); ta.toSorted(); assert.compareArray(ta, [3, 1, 2]); diff --git a/test/built-ins/TypedArray/prototype/toSorted/length-property-ignored.js b/test/built-ins/TypedArray/prototype/toSorted/length-property-ignored.js index 22dd76dcaac..e2f6eed387c 100644 --- a/test/built-ins/TypedArray/prototype/toSorted/length-property-ignored.js +++ b/test/built-ins/TypedArray/prototype/toSorted/length-property-ignored.js @@ -15,19 +15,19 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray, change-array-by-copy] ---*/ -testWithTypedArrayConstructors(TA => { - var ta = new TA([3, 1, 2]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + var ta = new TA(makeCtorArg([3, 1, 2])); Object.defineProperty(ta, "length", { value: 2 }) var res = ta.toSorted() assert.compareArray(res, [1, 2, 3]); assert.sameValue(res.length, 3); - ta = new TA([3, 1, 2]); + ta = new TA(makeCtorArg([3, 1, 2])); Object.defineProperty(ta, "length", { value: 5 }); res = ta.toSorted(); assert.compareArray(res, [1, 2, 3]); assert.sameValue(res.length, 3); -}); +}, null, ["passthrough"]); function setLength(length) { Object.defineProperty(TypedArray.prototype, "length", { @@ -35,8 +35,8 @@ function setLength(length) { }); } -testWithTypedArrayConstructors(TA => { - var ta = new TA([3, 1, 2]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + var ta = new TA(makeCtorArg([3, 1, 2])); setLength(2); var res = ta.toSorted(); @@ -48,4 +48,4 @@ testWithTypedArrayConstructors(TA => { setLength(3); assert.compareArray(res, [1, 2, 3]); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toSorted/this-value-invalid.js b/test/built-ins/TypedArray/prototype/toSorted/this-value-invalid.js index 1adc7f35cc9..5dec68e2e60 100644 --- a/test/built-ins/TypedArray/prototype/toSorted/this-value-invalid.js +++ b/test/built-ins/TypedArray/prototype/toSorted/this-value-invalid.js @@ -41,4 +41,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, () => { sample.toSorted(); }, `array has a detached buffer`); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toString/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/toString/BigInt/detached-buffer.js index 5b9e0cedc65..7fa87a4d2d5 100644 --- a/test/built-ins/TypedArray/prototype/toString/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/toString/BigInt/detached-buffer.js @@ -19,7 +19,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.toString(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/toString/detached-buffer.js b/test/built-ins/TypedArray/prototype/toString/detached-buffer.js index 32255ced240..7a0c106721b 100644 --- a/test/built-ins/TypedArray/prototype/toString/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/toString/detached-buffer.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.toString(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/values/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/values/BigInt/detached-buffer.js index 6c31b6bce65..0f92f92091c 100644 --- a/test/built-ins/TypedArray/prototype/values/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/values/BigInt/detached-buffer.js @@ -14,7 +14,7 @@ info: | ... 5. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -24,4 +24,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.values(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/values/BigInt/iter-prototype.js b/test/built-ins/TypedArray/prototype/values/BigInt/iter-prototype.js index 3232e8e7fc4..c21c38f45ce 100644 --- a/test/built-ins/TypedArray/prototype/values/BigInt/iter-prototype.js +++ b/test/built-ins/TypedArray/prototype/values/BigInt/iter-prototype.js @@ -10,14 +10,14 @@ info: | ... 3. Return CreateArrayIterator(O, "value"). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.iterator, TypedArray] ---*/ var ArrayIteratorProto = Object.getPrototypeOf([][Symbol.iterator]()); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([0n, 42n, 64n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0n, 42n, 64n])); var iter = sample.values(); assert.sameValue(Object.getPrototypeOf(iter), ArrayIteratorProto); diff --git a/test/built-ins/TypedArray/prototype/values/BigInt/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/values/BigInt/return-abrupt-from-this-out-of-bounds.js index 6ad023c23b8..65dc6a64cfa 100644 --- a/test/built-ins/TypedArray/prototype/values/BigInt/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/values/BigInt/return-abrupt-from-this-out-of-bounds.js @@ -3,7 +3,7 @@ /*--- esid: sec-%typedarray%.prototype.values description: Return abrupt when "this" value fails buffer boundary checks -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [ArrayBuffer, BigInt, TypedArray, arrow-function, resizable-arraybuffer] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(TA => { array.values(); throw new Test262Error('values completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/values/BigInt/return-itor.js b/test/built-ins/TypedArray/prototype/values/BigInt/return-itor.js index 48307c393db..16cf0676b56 100644 --- a/test/built-ins/TypedArray/prototype/values/BigInt/return-itor.js +++ b/test/built-ins/TypedArray/prototype/values/BigInt/return-itor.js @@ -8,12 +8,12 @@ info: | ... 3. Return CreateArrayIterator(O, "value"). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA([0n, 42n, 64n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg([0n, 42n, 64n])); var itor = typedArray.values(); var next = itor.next(); diff --git a/test/built-ins/TypedArray/prototype/values/detached-buffer.js b/test/built-ins/TypedArray/prototype/values/detached-buffer.js index 9d3618e48ab..83833e55698 100644 --- a/test/built-ins/TypedArray/prototype/values/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/values/detached-buffer.js @@ -24,4 +24,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.values(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/values/iter-prototype.js b/test/built-ins/TypedArray/prototype/values/iter-prototype.js index 9bb874faf9d..1d0b00c2d21 100644 --- a/test/built-ins/TypedArray/prototype/values/iter-prototype.js +++ b/test/built-ins/TypedArray/prototype/values/iter-prototype.js @@ -16,8 +16,8 @@ features: [Symbol.iterator, TypedArray] var ArrayIteratorProto = Object.getPrototypeOf([][Symbol.iterator]()); -testWithTypedArrayConstructors(function(TA, N) { - var sample = new TA([0, 42, 64]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0, 42, 64])); var iter = sample.values(); assert.sameValue(Object.getPrototypeOf(iter), ArrayIteratorProto); diff --git a/test/built-ins/TypedArray/prototype/values/return-abrupt-from-this-out-of-bounds.js b/test/built-ins/TypedArray/prototype/values/return-abrupt-from-this-out-of-bounds.js index 654535d7077..02b63abecb4 100644 --- a/test/built-ins/TypedArray/prototype/values/return-abrupt-from-this-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/values/return-abrupt-from-this-out-of-bounds.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(TA => { array.values(); throw new Test262Error('values completed successfully'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/values/return-itor.js b/test/built-ins/TypedArray/prototype/values/return-itor.js index 43023563895..047fef4ba54 100644 --- a/test/built-ins/TypedArray/prototype/values/return-itor.js +++ b/test/built-ins/TypedArray/prototype/values/return-itor.js @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { next = itor.next(); assert.sameValue(next.value, undefined); assert.sameValue(next.done, true); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/with/BigInt/early-type-coercion-bigint.js b/test/built-ins/TypedArray/prototype/with/BigInt/early-type-coercion-bigint.js index c1a9141ba7b..9c479854f48 100644 --- a/test/built-ins/TypedArray/prototype/with/BigInt/early-type-coercion-bigint.js +++ b/test/built-ins/TypedArray/prototype/with/BigInt/early-type-coercion-bigint.js @@ -13,11 +13,11 @@ info: | 8. Else, set _value_ to ? ToNumber(_value_). ... features: [BigInt, TypedArray, change-array-by-copy] -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var arr = new TA([0n, 1n, 2n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var arr = new TA(makeCtorArg([0n, 1n, 2n])); var value = { valueOf() { @@ -28,4 +28,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.compareArray(arr.with(1, value), [3n, 4n, 2n]); assert.compareArray(arr, [3n, 1n, 2n]); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/with/early-type-coercion.js b/test/built-ins/TypedArray/prototype/with/early-type-coercion.js index 2be53157a24..3dacee28b5a 100644 --- a/test/built-ins/TypedArray/prototype/with/early-type-coercion.js +++ b/test/built-ins/TypedArray/prototype/with/early-type-coercion.js @@ -16,8 +16,8 @@ features: [TypedArray, change-array-by-copy] includes: [testTypedArray.js, compareArray.js] ---*/ -testWithTypedArrayConstructors(TA => { - var arr = new TA([0, 1, 2]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + var arr = new TA(makeCtorArg([0, 1, 2])); var value = { valueOf() { @@ -28,4 +28,4 @@ testWithTypedArrayConstructors(TA => { assert.compareArray(arr.with(1, value), [3, 4, 2]); assert.compareArray(arr, [3, 1, 2]); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArray/prototype/with/ignores-species.js b/test/built-ins/TypedArray/prototype/with/ignores-species.js index 7ba48035859..9f2d2f99b78 100644 --- a/test/built-ins/TypedArray/prototype/with/ignores-species.js +++ b/test/built-ins/TypedArray/prototype/with/ignores-species.js @@ -20,22 +20,22 @@ includes: [testTypedArray.js] features: [TypedArray, change-array-by-copy] ---*/ -testWithTypedArrayConstructors(TA => { - var ta = new TA([1, 2, 3]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + var ta = new TA(makeCtorArg([1, 2, 3])); ta.constructor = TA === Uint8Array ? Int32Array : Uint8Array; assert.sameValue(Object.getPrototypeOf(ta.with(0, 2)), TA.prototype); - ta = new TA([1, 2, 3]); + ta = new TA(makeCtorArg([1, 2, 3])); ta.constructor = { [Symbol.species]: TA === Uint8Array ? Int32Array : Uint8Array, }; assert.sameValue(Object.getPrototypeOf(ta.with(0, 2)), TA.prototype); - ta = new TA([1, 2, 3]); + ta = new TA(makeCtorArg([1, 2, 3])); Object.defineProperty(ta, "constructor", { get() { throw new Test262Error("Should not get .constructor"); } }); ta.with(0, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/with/immutable.js b/test/built-ins/TypedArray/prototype/with/immutable.js index 265bf1f71e4..4061c08cc73 100644 --- a/test/built-ins/TypedArray/prototype/with/immutable.js +++ b/test/built-ins/TypedArray/prototype/with/immutable.js @@ -9,8 +9,8 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray, change-array-by-copy] ---*/ -testWithTypedArrayConstructors(TA => { - var ta = new TA([3, 1, 2]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + var ta = new TA(makeCtorArg([3, 1, 2])); ta.with(0, 2); assert.compareArray(ta, [3, 1, 2]); diff --git a/test/built-ins/TypedArray/prototype/with/index-bigger-or-eq-than-length.js b/test/built-ins/TypedArray/prototype/with/index-bigger-or-eq-than-length.js index 979676e62e6..dd78325b702 100644 --- a/test/built-ins/TypedArray/prototype/with/index-bigger-or-eq-than-length.js +++ b/test/built-ins/TypedArray/prototype/with/index-bigger-or-eq-than-length.js @@ -19,8 +19,8 @@ includes: [testTypedArray.js] features: [TypedArray, change-array-by-copy] ---*/ -testWithTypedArrayConstructors(TA => { - var arr = new TA([0, 1, 2]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + var arr = new TA(makeCtorArg([0, 1, 2])); assert.throws(RangeError, function() { arr.with(3, 7); diff --git a/test/built-ins/TypedArray/prototype/with/index-casted-to-number.js b/test/built-ins/TypedArray/prototype/with/index-casted-to-number.js index 22ffe7878d2..2a6f8662f29 100644 --- a/test/built-ins/TypedArray/prototype/with/index-casted-to-number.js +++ b/test/built-ins/TypedArray/prototype/with/index-casted-to-number.js @@ -18,8 +18,8 @@ features: [TypedArray, change-array-by-copy] includes: [testTypedArray.js, compareArray.js] ---*/ -testWithTypedArrayConstructors(TA => { - var arr = new TA([0, 4, 16]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + var arr = new TA(makeCtorArg([0, 4, 16])); assert.compareArray(arr.with(1.2, 7), [0, 7, 16]); assert.compareArray(arr.with("1", 3), [0, 3, 16]); diff --git a/test/built-ins/TypedArray/prototype/with/index-negative.js b/test/built-ins/TypedArray/prototype/with/index-negative.js index 3e49f8f5e1c..d4382ac23b3 100644 --- a/test/built-ins/TypedArray/prototype/with/index-negative.js +++ b/test/built-ins/TypedArray/prototype/with/index-negative.js @@ -18,8 +18,8 @@ features: [TypedArray, change-array-by-copy] includes: [testTypedArray.js, compareArray.js] ---*/ -testWithTypedArrayConstructors(TA => { - var arr = new TA([0, 1, 2]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + var arr = new TA(makeCtorArg([0, 1, 2])); assert.compareArray(arr.with(-1, 4), [0, 1, 4]); assert.compareArray(arr.with(-3, 4), [4, 1, 2]); diff --git a/test/built-ins/TypedArray/prototype/with/index-smaller-than-minus-length.js b/test/built-ins/TypedArray/prototype/with/index-smaller-than-minus-length.js index 42a5941cdba..49effcd4fa6 100644 --- a/test/built-ins/TypedArray/prototype/with/index-smaller-than-minus-length.js +++ b/test/built-ins/TypedArray/prototype/with/index-smaller-than-minus-length.js @@ -19,8 +19,8 @@ features: [TypedArray, change-array-by-copy] includes: [testTypedArray.js] ---*/ -testWithTypedArrayConstructors(TA => { - var arr = new TA([0, 1, 2]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + var arr = new TA(makeCtorArg([0, 1, 2])); assert.throws(RangeError, function() { arr.with(-4, 7); diff --git a/test/built-ins/TypedArray/prototype/with/index-throw-completion.js b/test/built-ins/TypedArray/prototype/with/index-throw-completion.js index c5dc254a384..1c29e94ff39 100644 --- a/test/built-ins/TypedArray/prototype/with/index-throw-completion.js +++ b/test/built-ins/TypedArray/prototype/with/index-throw-completion.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js] function MyError() {} -testWithTypedArrayConstructors(function(TA) { - var ta = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var ta = new TA(makeCtorArg(1)); var index = { valueOf() { diff --git a/test/built-ins/TypedArray/prototype/with/length-property-ignored.js b/test/built-ins/TypedArray/prototype/with/length-property-ignored.js index b8276ce51da..8247e43ea12 100644 --- a/test/built-ins/TypedArray/prototype/with/length-property-ignored.js +++ b/test/built-ins/TypedArray/prototype/with/length-property-ignored.js @@ -15,19 +15,19 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray, change-array-by-copy] ---*/ -testWithTypedArrayConstructors(TA => { - var ta = new TA([3, 1, 2]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + var ta = new TA(makeCtorArg([3, 1, 2])); Object.defineProperty(ta, "length", { value: 2 }) var res = ta.with(0, 0); assert.compareArray(res, [0, 1, 2]); assert.sameValue(res.length, 3); - ta = new TA([3, 1, 2]); + ta = new TA(makeCtorArg([3, 1, 2])); Object.defineProperty(ta, "length", { value: 5 }); res = ta.with(0, 0); assert.compareArray(res, [0, 1, 2]); assert.sameValue(res.length, 3); -}); +}, null, ["passthrough"]); function setLength(length) { Object.defineProperty(TypedArray.prototype, "length", { @@ -35,8 +35,8 @@ function setLength(length) { }); } -testWithTypedArrayConstructors(TA => { - var ta = new TA([3, 1, 2]); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + var ta = new TA(makeCtorArg([3, 1, 2])); setLength(2); var res = ta.with(0, 0); @@ -47,4 +47,4 @@ testWithTypedArrayConstructors(TA => { res = ta.with(0, 0); setLength(3); assert.compareArray(res, [0, 1, 2]); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/with/negative-fractional-index-truncated-to-zero.js b/test/built-ins/TypedArray/prototype/with/negative-fractional-index-truncated-to-zero.js index 15428c5fa8d..50bc4412a87 100644 --- a/test/built-ins/TypedArray/prototype/with/negative-fractional-index-truncated-to-zero.js +++ b/test/built-ins/TypedArray/prototype/with/negative-fractional-index-truncated-to-zero.js @@ -23,8 +23,8 @@ features: [TypedArray, change-array-by-copy] includes: [testTypedArray.js] ---*/ -testWithTypedArrayConstructors(function(TA) { - var ta = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var ta = new TA(makeCtorArg(1)); var result = ta.with(-0.5, 123); assert.sameValue(result[0], 123); }); diff --git a/test/built-ins/TypedArray/prototype/with/negative-index-resize-to-in-bounds.js b/test/built-ins/TypedArray/prototype/with/negative-index-resize-to-in-bounds.js index 2f19a36f234..16a26b4526c 100644 --- a/test/built-ins/TypedArray/prototype/with/negative-index-resize-to-in-bounds.js +++ b/test/built-ins/TypedArray/prototype/with/negative-index-resize-to-in-bounds.js @@ -34,4 +34,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { ta.with(-1, value); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/with/negative-index-resize-to-out-of-bounds.js b/test/built-ins/TypedArray/prototype/with/negative-index-resize-to-out-of-bounds.js index 06a990d1cff..ee531c47e61 100644 --- a/test/built-ins/TypedArray/prototype/with/negative-index-resize-to-out-of-bounds.js +++ b/test/built-ins/TypedArray/prototype/with/negative-index-resize-to-out-of-bounds.js @@ -34,4 +34,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { ta.with(-1, value); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/with/order-of-evaluation.js b/test/built-ins/TypedArray/prototype/with/order-of-evaluation.js index 3d28aa88465..2005b9af100 100644 --- a/test/built-ins/TypedArray/prototype/with/order-of-evaluation.js +++ b/test/built-ins/TypedArray/prototype/with/order-of-evaluation.js @@ -17,8 +17,8 @@ features: [TypedArray, change-array-by-copy] includes: [testTypedArray.js, compareArray.js] ---*/ -testWithTypedArrayConstructors(TA => { - var ta = new TA(1); +testWithTypedArrayConstructors((TA, makeCtorArg) => { + var ta = new TA(makeCtorArg(1)); var logs = []; diff --git a/test/built-ins/TypedArray/prototype/with/valid-typedarray-index-checked-after-coercions.js b/test/built-ins/TypedArray/prototype/with/valid-typedarray-index-checked-after-coercions.js index f39bf2ed931..849f76748f7 100644 --- a/test/built-ins/TypedArray/prototype/with/valid-typedarray-index-checked-after-coercions.js +++ b/test/built-ins/TypedArray/prototype/with/valid-typedarray-index-checked-after-coercions.js @@ -32,4 +32,4 @@ testWithTypedArrayConstructors(TA => { assert.sameValue(result.length, 0); assert.sameValue(rab.byteLength, TA.BYTES_PER_ELEMENT); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArray/prototype/with/value-throw-completion.js b/test/built-ins/TypedArray/prototype/with/value-throw-completion.js index 760571da243..039cce076a0 100644 --- a/test/built-ins/TypedArray/prototype/with/value-throw-completion.js +++ b/test/built-ins/TypedArray/prototype/with/value-throw-completion.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] function MyError() {} -testWithTypedArrayConstructors(function(TA) { - var ta = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var ta = new TA(makeCtorArg(1)); var value = { valueOf() { diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size-sab.js index 73de6c0602f..40f9edd54a9 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size-sab.js @@ -16,7 +16,7 @@ info: | 13. If length is undefined, then a. If bufferByteLength modulo elementSize ≠ 0, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -30,4 +30,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, 0, undefined); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size.js index 171ea96a4c4..e926672b328 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size.js @@ -15,7 +15,7 @@ info: | 13. If length is undefined, then a. If bufferByteLength modulo elementSize ≠ 0, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, 0, undefined); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-throws-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-throws-sab.js index bd376cb79ce..d032c260ae8 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-throws-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-throws-sab.js @@ -16,7 +16,7 @@ info: | 7. Let offset be ? ToInteger(byteOffset). 8. If offset < 0, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, -Infinity); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-throws.js index dfd6c4bc873..8543bb56dcd 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-throws.js @@ -15,7 +15,7 @@ info: | 7. Let offset be ? ToInteger(byteOffset). 8. If offset < 0, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -28,4 +28,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, -Infinity); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-zero-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-zero-sab.js index 777a933f07d..f08600f8644 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-zero-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-zero-sab.js @@ -13,11 +13,11 @@ info: | 7. If offset < 0, throw a RangeError exception. 8. If offset is -0, let offset be +0. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TAConstructor) { var typedArray = new TAConstructor(new SharedArrayBuffer(8), -0); assert.sameValue(typedArray.byteOffset, +0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-zero.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-zero.js index 4daa6aee12c..ba65021359c 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-zero.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-zero.js @@ -13,11 +13,11 @@ info: | 7. If offset < 0, throw a RangeError exception. 8. If offset is -0, let offset be +0. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TAConstructor) { var typedArray = new TAConstructor(new ArrayBuffer(8), -0); assert.sameValue(typedArray.byteOffset, +0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws-sab.js index 82cbc1ab945..29a72dc118a 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws-sab.js @@ -15,7 +15,7 @@ info: | ... 7. Let offset be ? ToInteger(byteOffset). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, SharedArrayBuffer, TypedArray] ---*/ @@ -26,4 +26,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(buffer, byteOffset); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws.js index cda2f9ae284..3a7cd15ed5a 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws.js @@ -14,7 +14,7 @@ info: | ... 7. Let offset be ? ToInteger(byteOffset). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(buffer, byteOffset); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size-sab.js index 0782f270d16..889c0f4603e 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size-sab.js @@ -15,7 +15,7 @@ info: | ... 10. If offset modulo elementSize ≠ 0, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, 7); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size.js index 9e4f26ee67a..fabb10c3a01 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size.js @@ -14,7 +14,7 @@ info: | ... 10. If offset modulo elementSize ≠ 0, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -24,4 +24,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, 7); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-to-number-detachbuffer.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-to-number-detachbuffer.js index 7c44a5389c4..ec319bdd6d9 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-to-number-detachbuffer.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-to-number-detachbuffer.js @@ -9,7 +9,7 @@ info: | ... 9. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -18,4 +18,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var buffer = new ArrayBuffer(3 * offset); var byteOffset = { valueOf() { $DETACHBUFFER(buffer); return offset; } }; assert.throws(TypeError, () => new TA(buffer, byteOffset)); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-to-number-throws-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-to-number-throws-sab.js index a79626847f3..16f51dd6ef1 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-to-number-throws-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-to-number-throws-sab.js @@ -15,7 +15,7 @@ info: | ... 7. Let offset be ? ToInteger(byteOffset). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -30,4 +30,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(buffer, byteOffset); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-to-number-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-to-number-throws.js index 19a6095cb3d..e9bde4a8ddf 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-to-number-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-to-number-throws.js @@ -14,7 +14,7 @@ info: | ... 7. Let offset be ? ToInteger(byteOffset). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(buffer, byteOffset); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/custom-proto-access-throws-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/custom-proto-access-throws-sab.js index f6ce2fdbcb3..a021c72a82a 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/custom-proto-access-throws-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/custom-proto-access-throws-sab.js @@ -28,7 +28,7 @@ info: | ... 3. Let proto be ? Get(constructor, "prototype"). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, SharedArrayBuffer, TypedArray] ---*/ @@ -45,4 +45,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [buffer], newTarget); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/custom-proto-access-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/custom-proto-access-throws.js index e30dc82f973..95763a591f9 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/custom-proto-access-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/custom-proto-access-throws.js @@ -27,7 +27,7 @@ info: | ... 3. Let proto be ? Get(constructor, "prototype"). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ @@ -44,4 +44,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [buffer], newTarget); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length-and-offset-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length-and-offset-sab.js index 0c86ffd725c..e79775439ed 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length-and-offset-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length-and-offset-sab.js @@ -11,7 +11,7 @@ info: | This description applies only if the TypedArray function is called with at least one argument and the Type of the first argument is Object and that object has an [[ArrayBufferData]] internal slot. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -30,4 +30,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta2.buffer, buffer, "ta2.buffer"); assert.sameValue(ta2.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta2), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length-and-offset.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length-and-offset.js index eb2b421877d..d7d1a21e93f 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length-and-offset.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length-and-offset.js @@ -10,7 +10,7 @@ info: | This description applies only if the TypedArray function is called with at least one argument and the Type of the first argument is Object and that object has an [[ArrayBufferData]] internal slot. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta2.buffer, buffer, "ta2.buffer"); assert.sameValue(ta2.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta2), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length-sab.js index a47347e67f1..a4de18a056f 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length-sab.js @@ -12,7 +12,7 @@ info: | least one argument and the Type of the first argument is Object and that object has an [[ArrayBufferData]] internal slot. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -32,4 +32,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta2.buffer, buffer); assert.sameValue(ta2.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta2), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length.js index 038c3e0baf1..9a965df3574 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length.js @@ -11,7 +11,7 @@ info: | least one argument and the Type of the first argument is Object and that object has an [[ArrayBufferData]] internal slot. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -31,4 +31,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta2.buffer, buffer); assert.sameValue(ta2.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta2), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-negative-length-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-negative-length-sab.js index 0a87ac33360..a4b603e7c68 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-negative-length-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-negative-length-sab.js @@ -12,7 +12,7 @@ info: | least one argument and the Type of the first argument is Object and that object has an [[ArrayBufferData]] internal slot. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -26,4 +26,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, 0, -Infinity); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-negative-length.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-negative-length.js index c4773ccaa28..1fce6dbef66 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-negative-length.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-negative-length.js @@ -11,7 +11,7 @@ info: | least one argument and the Type of the first argument is Object and that object has an [[ArrayBufferData]] internal slot. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, 0, -Infinity); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-offset-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-offset-sab.js index 28fa1938ef9..fbf722a277b 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-offset-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-offset-sab.js @@ -11,7 +11,7 @@ info: | This description applies only if the TypedArray function is called with at least one argument and the Type of the first argument is Object and that object has an [[ArrayBufferData]] internal slot. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -30,4 +30,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta2.buffer, buffer); assert.sameValue(ta2.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta2), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-offset.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-offset.js index 1dc932cb4ad..3d4fd48cb64 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-offset.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-offset.js @@ -10,7 +10,7 @@ info: | This description applies only if the TypedArray function is called with at least one argument and the Type of the first argument is Object and that object has an [[ArrayBufferData]] internal slot. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta2.buffer, buffer); assert.sameValue(ta2.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta2), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/detachedbuffer.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/detachedbuffer.js index 3e01105b36e..c543c12d081 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/detachedbuffer.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/detachedbuffer.js @@ -9,7 +9,7 @@ info: | ... 9. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -18,4 +18,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var buffer = new ArrayBuffer(3 * offset); $DETACHBUFFER(buffer); assert.throws(TypeError, () => new TA(buffer)); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-length-throws-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-length-throws-sab.js index a324f6feb3b..7a4ed520555 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-length-throws-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-length-throws-sab.js @@ -18,7 +18,7 @@ info: | b. Let newByteLength be newLength × elementSize. c. If offset+newByteLength > bufferByteLength, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, 0, bpe * 2); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-length-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-length-throws.js index ed156f400f6..a8516863dd9 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-length-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-length-throws.js @@ -17,7 +17,7 @@ info: | b. Let newByteLength be newLength × elementSize. c. If offset+newByteLength > bufferByteLength, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -28,4 +28,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, 0, bpe * 2); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-offset-throws-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-offset-throws-sab.js index 090afac5a0b..f674328da5c 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-offset-throws-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-offset-throws-sab.js @@ -18,7 +18,7 @@ info: | b. Let newByteLength be bufferByteLength - offset. c. If newByteLength < 0, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -33,4 +33,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, bpe * 2, undefined); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-offset-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-offset-throws.js index 6e09a341b33..bdc79c5ecac 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-offset-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-offset-throws.js @@ -17,7 +17,7 @@ info: | b. Let newByteLength be bufferByteLength - offset. c. If newByteLength < 0, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -32,4 +32,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, bpe * 2, undefined); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget-sab.js index 4b242832d94..fa87d6f80a7 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget-sab.js @@ -15,7 +15,7 @@ info: | ... 2. If NewTarget is undefined, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -24,4 +24,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA(buffer); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget.js index 623c193af79..9644191be17 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget.js @@ -14,7 +14,7 @@ info: | ... 2. If NewTarget is undefined, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -23,4 +23,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA(buffer); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/is-referenced-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/is-referenced-sab.js index 34efb070f77..87d655fac90 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/is-referenced-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/is-referenced-sab.js @@ -15,7 +15,7 @@ info: | ... 15. Set O's [[ViewedArrayBuffer]] internal slot to buffer. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -30,4 +30,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta1.buffer, buffer); assert.sameValue(ta2.buffer, buffer); assert.sameValue(ta1.buffer, ta2.buffer); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/is-referenced.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/is-referenced.js index 720e8719144..df81e18a121 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/is-referenced.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/is-referenced.js @@ -14,7 +14,7 @@ info: | ... 15. Set O's [[ViewedArrayBuffer]] internal slot to buffer. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta1.buffer, buffer); assert.sameValue(ta2.buffer, buffer); assert.sameValue(ta1.buffer, ta2.buffer); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-access-throws-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-access-throws-sab.js index 1e38324b347..1678826965b 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-access-throws-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-access-throws-sab.js @@ -16,7 +16,7 @@ info: | 14. Else, a. Let newLength be ? ToLength(length). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -31,4 +31,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(buffer, 0, len); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-access-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-access-throws.js index a618946fcee..45f0b9888f3 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-access-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-access-throws.js @@ -15,7 +15,7 @@ info: | 14. Else, a. Let newLength be ? ToLength(length). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -30,4 +30,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(buffer, 0, len); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-is-symbol-throws-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-is-symbol-throws-sab.js index 10518511c55..39c77cde54f 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-is-symbol-throws-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-is-symbol-throws-sab.js @@ -16,7 +16,7 @@ info: | 14. Else, a. Let newLength be ? ToLength(length). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, SharedArrayBuffer, TypedArray] ---*/ @@ -27,4 +27,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(buffer, 0, s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-is-symbol-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-is-symbol-throws.js index a1d1e1340f2..4dc36c813fc 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-is-symbol-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-is-symbol-throws.js @@ -15,7 +15,7 @@ info: | 14. Else, a. Let newLength be ? ToLength(length). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -26,4 +26,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(buffer, 0, s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-to-number-detachbuffer.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-to-number-detachbuffer.js index e7bc719de03..f438ca98f24 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-to-number-detachbuffer.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-to-number-detachbuffer.js @@ -9,7 +9,7 @@ info: | ... 9. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -18,4 +18,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var buffer = new ArrayBuffer(3 * offset); var length = { valueOf() { $DETACHBUFFER(buffer); return 1; } }; assert.throws(TypeError, () => new TA(buffer, 0, length)); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/new-instance-extensibility-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/new-instance-extensibility-sab.js index b918f788f5d..43664e8deea 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/new-instance-extensibility-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/new-instance-extensibility-sab.js @@ -26,7 +26,7 @@ info: | ... 11. Set the [[Extensible]] internal slot of A to true. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -35,4 +35,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(buffer); assert(Object.isExtensible(sample)); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/new-instance-extensibility.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/new-instance-extensibility.js index 8ffd2d7e7a8..729ed5ac768 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/new-instance-extensibility.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/new-instance-extensibility.js @@ -25,7 +25,7 @@ info: | ... 11. Set the [[Extensible]] internal slot of A to true. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -34,4 +34,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(buffer); assert(Object.isExtensible(sample)); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/proto-from-ctor-realm-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/proto-from-ctor-realm-sab.js index f1394f92290..8aff693e5a0 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/proto-from-ctor-realm-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/proto-from-ctor-realm-sab.js @@ -23,7 +23,7 @@ info: | a. Let realm be ? GetFunctionRealm(constructor). b. Let proto be realm's intrinsic object named intrinsicDefaultProto. 5. Return proto. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, cross-realm, SharedArrayBuffer, Reflect, TypedArray] ---*/ @@ -35,4 +35,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [new SharedArrayBuffer(8)], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/proto-from-ctor-realm.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/proto-from-ctor-realm.js index 787a8cc7f90..525aacfbd86 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/proto-from-ctor-realm.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/proto-from-ctor-realm.js @@ -22,7 +22,7 @@ info: | a. Let realm be ? GetFunctionRealm(constructor). b. Let proto be realm's intrinsic object named intrinsicDefaultProto. 5. Return proto. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, cross-realm, Reflect, TypedArray] ---*/ @@ -34,4 +34,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [new ArrayBuffer(8)], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/returns-new-instance-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/returns-new-instance-sab.js index 5b8d3e710f3..a51945965a3 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/returns-new-instance-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/returns-new-instance-sab.js @@ -11,7 +11,7 @@ info: | This description applies only if the TypedArray function is called with at least one argument and the Type of the first argument is Object and that object has an [[ArrayBufferData]] internal slot. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -31,4 +31,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta2.buffer, buffer2); assert.sameValue(ta2.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta2), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/returns-new-instance.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/returns-new-instance.js index 902aa2f23f1..657bfa4cc0c 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/returns-new-instance.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/returns-new-instance.js @@ -10,7 +10,7 @@ info: | This description applies only if the TypedArray function is called with at least one argument and the Type of the first argument is Object and that object has an [[ArrayBufferData]] internal slot. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -30,4 +30,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta2.buffer, buffer2); assert.sameValue(ta2.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta2), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-bytelength-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-bytelength-sab.js index af55dd163e9..b265b0a4295 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-bytelength-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-bytelength-sab.js @@ -18,7 +18,7 @@ info: | 12. Else, a. Let newLength be ? ToIndex(length). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -70,4 +70,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { name + " prototype" ); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-bytelength.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-bytelength.js index 589570da1c7..12a0f33fefc 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-bytelength.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-bytelength.js @@ -17,7 +17,7 @@ info: | 12. Else, a. Let newLength be ? ToIndex(length). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -69,4 +69,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { name + " prototype" ); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-byteoffset-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-byteoffset-sab.js index fa65ca0da1f..fc74ba23355 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-byteoffset-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-byteoffset-sab.js @@ -16,7 +16,7 @@ info: | 7. Let offset be ? ToIndex(byteOffset). 8. If offset modulo elementSize ≠ 0, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -84,4 +84,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { new TA(buffer, true); }, "1 modulo elementSize ≠ 0, throws a RangeError"); } -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-byteoffset.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-byteoffset.js index 2832f78e9f6..2470cacb673 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-byteoffset.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-byteoffset.js @@ -15,7 +15,7 @@ info: | 7. Let offset be ? ToIndex(byteOffset). 8. If offset modulo elementSize ≠ 0, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -83,4 +83,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { new TA(buffer, true); }, "1 modulo elementSize ≠ 0, throws a RangeError"); } -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/typedarray-backed-by-sharedarraybuffer.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/typedarray-backed-by-sharedarraybuffer.js index 50ba4d0a96a..6938d8161fd 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/typedarray-backed-by-sharedarraybuffer.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/typedarray-backed-by-sharedarraybuffer.js @@ -6,15 +6,15 @@ esid: sec-typedarray-typedarray description: > Passing a SharedArrayBuffer-backed TypedArray to a TypedArray constructor produces an ArrayBuffer-backed TypedArray. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ var sab = new SharedArrayBuffer(8); -testWithBigIntTypedArrayConstructors(function(View1) { +testWithBigIntTypedArrayConstructors(function(View1, makeCtorArg) { var ta1 = new View1(sab); - testWithBigIntTypedArrayConstructors(function(View2) { + testWithBigIntTypedArrayConstructors(function(View2, makeCtorArg) { var ta2 = new View2(ta1); assert.sameValue( ta2.buffer.constructor, diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-custom-proto-if-object-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-custom-proto-if-object-sab.js index fca8656cd47..355dc4f418c 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-custom-proto-if-object-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-custom-proto-if-object-sab.js @@ -31,7 +31,7 @@ info: | 10. Set the [[Prototype]] internal slot of A to prototype. ... 12. Return A. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, Reflect, TypedArray] ---*/ @@ -46,4 +46,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, Object); assert.sameValue(Object.getPrototypeOf(ta), proto); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-custom-proto-if-object.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-custom-proto-if-object.js index 6988535fd8c..9678a271d1b 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-custom-proto-if-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-custom-proto-if-object.js @@ -30,7 +30,7 @@ info: | 10. Set the [[Prototype]] internal slot of A to prototype. ... 12. Return A. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ @@ -45,4 +45,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, Object); assert.sameValue(Object.getPrototypeOf(ta), proto); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object-sab.js index 830edce72eb..ac5dac9e0f9 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object-sab.js @@ -31,7 +31,7 @@ info: | 10. Set the [[Prototype]] internal slot of A to prototype. ... 12. Return A. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ @@ -45,4 +45,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object.js index 88b6e23cfce..6202c65eeaa 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object.js @@ -30,7 +30,7 @@ info: | 10. Set the [[Prototype]] internal slot of A to prototype. ... 12. Return A. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -44,4 +44,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/custom-proto-access-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/custom-proto-access-throws.js index ba557d010ed..6f7b12fd6db 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/custom-proto-access-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/custom-proto-access-throws.js @@ -25,7 +25,7 @@ info: | ... 3. Let proto be ? Get(constructor, "prototype"). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ @@ -40,4 +40,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [1], newTarget); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/init-zeros.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/init-zeros.js index cb627ba2efb..b16a558fb0f 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/init-zeros.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/init-zeros.js @@ -36,12 +36,12 @@ info: | impossible to create such a Data Block, throw a RangeError exception. 3. Set all of the bytes of db to 0. 4. Return db. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var subject = new TA(9); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var subject = new TA(makeCtorArg(9)); assert.sameValue(subject[0], 0n, 'index 0'); assert.sameValue(subject[1], 0n, 'index 1'); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/is-infinity-throws-rangeerror.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/is-infinity-throws-rangeerror.js index f42ee337e61..7228f71c57d 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/is-infinity-throws-rangeerror.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/is-infinity-throws-rangeerror.js @@ -16,7 +16,7 @@ info: | 6. If SameValueZero(numberLength, elementLength) is false, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -24,4 +24,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(Infinity); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/is-negative-integer-throws-rangeerror.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/is-negative-integer-throws-rangeerror.js index eca3f8627bc..b483e188ad4 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/is-negative-integer-throws-rangeerror.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/is-negative-integer-throws-rangeerror.js @@ -22,7 +22,7 @@ info: | a. Let integerIndex be ? ToInteger(value). b. If integerIndex < 0, throw a RangeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -34,4 +34,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(-Infinity); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/is-symbol-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/is-symbol-throws.js index 2c59839d1fc..176ec79c278 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/is-symbol-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/is-symbol-throws.js @@ -13,7 +13,7 @@ info: | ... 4. Let numberLength be ? ToNumber(length). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -23,4 +23,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/new-instance-extensibility.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/new-instance-extensibility.js index 094653dab8c..13d366b0136 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/new-instance-extensibility.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/new-instance-extensibility.js @@ -27,12 +27,12 @@ info: | ... 11. Set the [[Extensible]] internal slot of A to true. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(4); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(4)); assert(Object.isExtensible(sample)); }); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/proto-from-ctor-realm.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/proto-from-ctor-realm.js index 52c6aef32c1..7c8befbd090 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/proto-from-ctor-realm.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/proto-from-ctor-realm.js @@ -21,7 +21,7 @@ info: | a. Let realm be ? GetFunctionRealm(constructor). b. Let proto be realm's intrinsic object named intrinsicDefaultProto. 5. Return proto. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, cross-realm, Reflect, TypedArray] ---*/ @@ -33,4 +33,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [0], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/returns-object.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/returns-object.js index f5839c568ee..4c35780044f 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/returns-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/returns-object.js @@ -19,12 +19,12 @@ info: | ... 7. Return obj -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA(4); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(4)); var length = typedArray.length; assert.sameValue(length, 4, "length"); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/toindex-length.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/toindex-length.js index cfdadc0b61a..58d48cc1a50 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/toindex-length.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/toindex-length.js @@ -13,7 +13,7 @@ info: | ... 3. Let elementLength be ? ToIndex(length). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -50,4 +50,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { name + " prototype" ); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/undefined-newtarget-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/undefined-newtarget-throws.js index 678e0f9cae6..e5f84d2723c 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/undefined-newtarget-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/undefined-newtarget-throws.js @@ -13,13 +13,13 @@ info: | ... 2. If NewTarget is undefined, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert.throws(TypeError, function() { - TA(0); + TA(makeCtorArg(0)); }); assert.throws(TypeError, function() { diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/use-custom-proto-if-object.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/use-custom-proto-if-object.js index 5c1503217a9..211b1bfc235 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/use-custom-proto-if-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/use-custom-proto-if-object.js @@ -28,7 +28,7 @@ info: | 10. Set the [[Prototype]] internal slot of A to prototype. ... 12. Return A. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ @@ -41,4 +41,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, Object); assert.sameValue(Object.getPrototypeOf(ta), proto); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/use-default-proto-if-custom-proto-is-not-object.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/use-default-proto-if-custom-proto-is-not-object.js index e8526816879..98c0f6e1612 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/use-default-proto-if-custom-proto-is-not-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/length-arg/use-default-proto-if-custom-proto-is-not-object.js @@ -28,7 +28,7 @@ info: | 10. Set the [[Prototype]] internal slot of A to prototype. ... 12. Return A. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -40,4 +40,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/custom-proto-access-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/custom-proto-access-throws.js index 03987c5da67..3824d404e47 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/custom-proto-access-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/custom-proto-access-throws.js @@ -25,7 +25,7 @@ info: | ... 3. Let proto be ? Get(constructor, "prototype"). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ @@ -40,4 +40,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [], newTarget); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/new-instance-extensibility.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/new-instance-extensibility.js index bc22f47eab0..ce3cd878a8d 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/new-instance-extensibility.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/new-instance-extensibility.js @@ -27,7 +27,7 @@ info: | ... 11. Set the [[Extensible]] internal slot of A to true. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -35,4 +35,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(); assert(Object.isExtensible(sample)); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/proto-from-ctor-realm.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/proto-from-ctor-realm.js index a05f153950a..1a13641fff0 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/proto-from-ctor-realm.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/proto-from-ctor-realm.js @@ -21,7 +21,7 @@ info: | a. Let realm be ? GetFunctionRealm(constructor). b. Let proto be realm's intrinsic object named intrinsicDefaultProto. 5. Return proto. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, cross-realm, Reflect, TypedArray] ---*/ @@ -33,4 +33,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/returns-object.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/returns-object.js index 01a6d57ca9e..c4d628256cb 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/returns-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/returns-object.js @@ -19,7 +19,7 @@ info: | ... 7. Return obj -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(typedArray.length, 0); assert.sameValue(typedArray.constructor, TA); assert.sameValue(Object.getPrototypeOf(typedArray), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/undefined-newtarget-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/undefined-newtarget-throws.js index 15d70a0a602..f0a813a8b82 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/undefined-newtarget-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/undefined-newtarget-throws.js @@ -12,7 +12,7 @@ info: | 1. If NewTarget is undefined, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -20,4 +20,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/use-custom-proto-if-object.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/use-custom-proto-if-object.js index 27e5626918c..a490764419d 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/use-custom-proto-if-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/use-custom-proto-if-object.js @@ -28,7 +28,7 @@ info: | 10. Set the [[Prototype]] internal slot of A to prototype. ... 12. Return A. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ @@ -41,4 +41,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, Object); assert.sameValue(Object.getPrototypeOf(ta), proto); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/use-default-proto-if-custom-proto-is-not-object.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/use-default-proto-if-custom-proto-is-not-object.js index 48e8e3004eb..ba3817b7124 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/use-default-proto-if-custom-proto-is-not-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/no-args/use-default-proto-if-custom-proto-is-not-object.js @@ -28,7 +28,7 @@ info: | 10. Set the [[Prototype]] internal slot of A to prototype. ... 12. Return A. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -40,4 +40,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/as-array-returns.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/as-array-returns.js index 48cfaf7f2a5..e2ba505967a 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/as-array-returns.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/as-array-returns.js @@ -12,12 +12,12 @@ info: | object does not have either a [[TypedArrayName]] or an [[ArrayBufferData]] internal slot. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA([7n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg([7n, 42n])); assert.sameValue(typedArray.length, 2); assert.sameValue(typedArray[0], 7n); assert.sameValue(typedArray[1], 42n); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/as-generator-iterable-returns.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/as-generator-iterable-returns.js index b5df7bc9833..f4f2052d631 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/as-generator-iterable-returns.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/as-generator-iterable-returns.js @@ -12,7 +12,7 @@ info: | object does not have either a [[TypedArrayName]] or an [[ArrayBufferData]] internal slot. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -27,4 +27,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(typedArray[1], 42n); assert.sameValue(typedArray.constructor, TA); assert.sameValue(Object.getPrototypeOf(typedArray), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/boolean-tobigint.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/boolean-tobigint.js index ea9b5bfe24b..f16edaf0cfc 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/boolean-tobigint.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/boolean-tobigint.js @@ -50,12 +50,12 @@ info: | Argument Type: Boolean Result: Return 1n if prim is true and 0n if prim is false. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA([false, true]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg([false, true])); assert.sameValue(typedArray[0], 0n); assert.sameValue(typedArray[1], 1n); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/custom-proto-access-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/custom-proto-access-throws.js index ef668514d97..69a3473e8b6 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/custom-proto-access-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/custom-proto-access-throws.js @@ -28,7 +28,7 @@ info: | ... 3. Let proto be ? Get(constructor, "prototype"). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ @@ -45,4 +45,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [o], newTarget); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/iterating-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/iterating-throws.js index bf3e5e36974..94ddd0ab738 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/iterating-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/iterating-throws.js @@ -15,7 +15,7 @@ info: | ... 4. Let arrayLike be ? IterableToArrayLike(object). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -28,4 +28,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/iterator-not-callable-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/iterator-not-callable-throws.js index 18d988ef1ec..ea299a50417 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/iterator-not-callable-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/iterator-not-callable-throws.js @@ -15,7 +15,7 @@ info: | ... 4. Let arrayLike be ? IterableToArrayLike(object). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.iterator, TypedArray] ---*/ @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/iterator-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/iterator-throws.js index 7db332def67..c654acfb0b2 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/iterator-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/iterator-throws.js @@ -15,7 +15,7 @@ info: | ... 4. Let arrayLike be ? IterableToArrayLike(object). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.iterator, TypedArray] ---*/ @@ -31,4 +31,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/length-excessive-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/length-excessive-throws.js index d7fb7216eb1..7cb73c6d75d 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/length-excessive-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/length-excessive-throws.js @@ -15,7 +15,7 @@ info: | ... 6. Perform ? AllocateTypedArrayBuffer(O, len). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -27,4 +27,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/length-is-symbol-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/length-is-symbol-throws.js index a41f8a01b53..53c5a84633b 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/length-is-symbol-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/length-is-symbol-throws.js @@ -15,7 +15,7 @@ info: | ... 5. Let len be ? ToLength(? Get(arrayLike, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -27,4 +27,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/length-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/length-throws.js index 6272147d491..4ff8fb2255b 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/length-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/length-throws.js @@ -15,7 +15,7 @@ info: | ... 5. Let len be ? ToLength(? Get(arrayLike, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -31,4 +31,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/new-instance-extensibility.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/new-instance-extensibility.js index 7332f854da6..4dc5f9368c6 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/new-instance-extensibility.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/new-instance-extensibility.js @@ -25,7 +25,7 @@ info: | ... 11. Set the [[Extensible]] internal slot of A to true. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -40,4 +40,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(obj); assert(Object.isExtensible(sample)); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/null-tobigint.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/null-tobigint.js index 378b4db1e7c..de0ddad68e7 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/null-tobigint.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/null-tobigint.js @@ -50,14 +50,14 @@ info: | Argument Type: Null Result: Throw a TypeError exception. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert.throws(TypeError, function() { - new TA([null]); + new TA(makeCtorArg([null])); }, "abrupt completion from Null"); }); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/number-tobigint.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/number-tobigint.js index 8961c0b58c1..8bdaeae63b2 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/number-tobigint.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/number-tobigint.js @@ -54,38 +54,38 @@ info: | Argument Type: Number Result: Throw a TypeError exception. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert.throws(TypeError, function() { - new TA([1]); + new TA(makeCtorArg([1])); }, "abrupt completion from Number: 1"); assert.throws(TypeError, function() { - new TA([Math.pow(2, 63)]); + new TA(makeCtorArg([Math.pow(2, 63)])); }, "abrupt completion from Number: 2**63"); assert.throws(TypeError, function() { - new TA([+0]); + new TA(makeCtorArg([+0])); }, "abrupt completion from Number: +0"); assert.throws(TypeError, function() { - new TA([-0]); + new TA(makeCtorArg([-0])); }, "abrupt completion from Number: -0"); assert.throws(TypeError, function() { - new TA([Infinity]); + new TA(makeCtorArg([Infinity])); }, "abrupt completion from Number: Infinity"); assert.throws(TypeError, function() { - new TA([-Infinity]); + new TA(makeCtorArg([-Infinity])); }, "abrupt completion from Number: -Infinity"); assert.throws(TypeError, function() { - new TA([NaN]); + new TA(makeCtorArg([NaN])); }, "abrupt completion from Number: NaN"); }); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/proto-from-ctor-realm.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/proto-from-ctor-realm.js index 19315f593fd..e8d855a1735 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/proto-from-ctor-realm.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/proto-from-ctor-realm.js @@ -22,7 +22,7 @@ info: | a. Let realm be ? GetFunctionRealm(constructor). b. Let proto be realm's intrinsic object named intrinsicDefaultProto. 5. Return proto. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, cross-realm, Reflect, TypedArray] ---*/ @@ -34,4 +34,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [{}], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/string-nan-tobigint.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/string-nan-tobigint.js index 1b17771c4da..277aed71c4c 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/string-nan-tobigint.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/string-nan-tobigint.js @@ -57,14 +57,14 @@ info: | 2. If n is NaN, throw a SyntaxError exception. 3. Return n. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert.throws(SyntaxError, function() { - new TA(["definately not a number"]); + new TA(makeCtorArg(["definately not a number"])); }, "StringToBigInt(prim) == NaN"); }); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/string-tobigint.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/string-tobigint.js index 3233817ff0f..53bca076dc8 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/string-tobigint.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/string-tobigint.js @@ -57,30 +57,30 @@ info: | 2. If n is NaN, throw a SyntaxError exception. 3. Return n. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA(['', '1']); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(['', '1'])); assert.sameValue(typedArray[0], 0n); assert.sameValue(typedArray[1], 1n); assert.throws(SyntaxError, function() { - new TA(["1n"]); + new TA(makeCtorArg(["1n"])); }, "A StringNumericLiteral may not include a BigIntLiteralSuffix."); assert.throws(SyntaxError, function() { - new TA(["Infinity"]); + new TA(makeCtorArg(["Infinity"])); }, "Replace the StrUnsignedDecimalLiteral production with DecimalDigits to not allow Infinity.."); assert.throws(SyntaxError, function() { - new TA(["1.1"]); + new TA(makeCtorArg(["1.1"])); }, "Replace the StrUnsignedDecimalLiteral production with DecimalDigits to not allow... decimal points..."); assert.throws(SyntaxError, function() { - new TA(["1e7"]); + new TA(makeCtorArg(["1e7"])); }, "Replace the StrUnsignedDecimalLiteral production with DecimalDigits to not allow... exponents..."); }); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/symbol-tobigint.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/symbol-tobigint.js index 88771c4ac8b..840c17ea229 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/symbol-tobigint.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/symbol-tobigint.js @@ -54,16 +54,16 @@ info: | Argument Type: Symbol Result: Throw a TypeError exception. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, Symbol] ---*/ var s = Symbol() -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert.throws(TypeError, function() { - new TA([s]); + new TA(makeCtorArg([s])); }, "abrupt completion from Symbol"); }); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-from-property.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-from-property.js index 758bf286d5c..6c75575733f 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-from-property.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-from-property.js @@ -17,7 +17,7 @@ info: | ... b. Let kValue be ? Get(arrayLike, Pk). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -37,4 +37,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-to-primitive-typeerror.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-to-primitive-typeerror.js index c2fa6f5dd97..b6fc615b0e8 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-to-primitive-typeerror.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-to-primitive-typeerror.js @@ -59,11 +59,11 @@ info: | b. If Type(result) is not Object, return result. c. Throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.toPrimitive, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample = new Int8Array(1); var toPrimitive = 0; var valueOf = 0; @@ -78,7 +78,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { }; assert.throws(TypeError, function() { - new TA([8n, sample]); + new TA(makeCtorArg([8n, sample])); }, "abrupt completion from sample @@toPrimitive"); assert.sameValue(toPrimitive, 1, "toPrimitive was called once"); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-to-primitive.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-to-primitive.js index 27f2e74625b..055467eb2fc 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-to-primitive.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-to-primitive.js @@ -57,11 +57,11 @@ info: | 5. If exoticToPrim is not undefined, then a. Let result be ? Call(exoticToPrim, input, « hint »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.toPrimitive, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample = new Int8Array(1); var toPrimitive = 0; var valueOf = 0; @@ -76,7 +76,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { }; assert.throws(Test262Error, function() { - new TA([8n, sample]); + new TA(makeCtorArg([8n, sample])); }, "abrupt completion from sample @@toPrimitive"); assert.sameValue(toPrimitive, 1, "toPrimitive was called once"); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-tostring.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-tostring.js index 64b75595dfe..91d91150b86 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-tostring.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-tostring.js @@ -69,11 +69,11 @@ info: | b. If IsCallable(method) is true, then i. Let result be ? Call(method, O). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample = new Int8Array(1); var valueOf = 0; var toString = 0; @@ -89,7 +89,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { }; assert.throws(Test262Error, function() { - new TA([8n, sample]); + new TA(makeCtorArg([8n, sample])); }, "abrupt completion from ToBigInt(sample)"); assert.sameValue(valueOf, 1, "valueOf called once"); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-valueof-typeerror.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-valueof-typeerror.js index 9eeec3ca6a1..5467624a2c2 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-valueof-typeerror.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-valueof-typeerror.js @@ -70,11 +70,11 @@ info: | i. Let result be ? Call(method, O). ii. If Type(result) is not Object, return result. 6. Throw a TypeError exception. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample = new Int8Array(1); var valueOf = 0; var toString = 0; @@ -90,7 +90,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { }; assert.throws(TypeError, function() { - new TA([8n, sample]); + new TA(makeCtorArg([8n, sample])); }, "abrupt completion from ToBigInt(sample)"); assert.sameValue(valueOf, 1, "valueOf called once"); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-valueof.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-valueof.js index ca2b2acbe6f..9b4fdae6ef1 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-valueof.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-obj-valueof.js @@ -70,11 +70,11 @@ info: | i. Let result be ? Call(method, O). ii. If Type(result) is not Object, return result. 6. Throw a TypeError exception. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sample = new Int8Array(1); var valueOf = 0; @@ -84,7 +84,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { }; assert.throws(Test262Error, function() { - new TA([8n, sample]); + new TA(makeCtorArg([8n, sample])); }, "abrupt completion from ToBigInt(sample)"); assert.sameValue(valueOf, 1, "valueOf called once"); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-property.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-property.js index 626472c9027..6046da62011 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-property.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-property.js @@ -18,7 +18,7 @@ info: | b. Let kValue be ? Get(arrayLike, Pk). c. Perform ? Set(O, Pk, kValue, true). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -37,4 +37,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-symbol-property.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-symbol-property.js index 0ca0cd65577..caee9bfe034 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-symbol-property.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/throws-setting-symbol-property.js @@ -18,7 +18,7 @@ info: | b. Let kValue be ? Get(arrayLike, Pk). c. Perform ? Set(O, Pk, kValue, true). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -31,4 +31,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/undefined-newtarget-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/undefined-newtarget-throws.js index 7892e3b8679..c5e17748865 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/undefined-newtarget-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/undefined-newtarget-throws.js @@ -15,16 +15,16 @@ info: | ... 2. If NewTarget is undefined, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert.throws(TypeError, function() { TA({}); }); assert.throws(TypeError, function() { - TA([]); + TA(makeCtorArg([])); }); }); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/undefined-tobigint.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/undefined-tobigint.js index ad4678c3a56..c4dff428aac 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/undefined-tobigint.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/undefined-tobigint.js @@ -50,14 +50,14 @@ info: | Argument Type: Undefined Result: Throw a TypeError exception. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { assert.throws(TypeError, function() { - new TA([undefined]); + new TA(makeCtorArg([undefined])); }, "abrupt completion from undefined"); }); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/use-custom-proto-if-object.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/use-custom-proto-if-object.js index 1a2ae7ccb79..0da1d97f1a7 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/use-custom-proto-if-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/use-custom-proto-if-object.js @@ -31,7 +31,7 @@ info: | 10. Set the [[Prototype]] internal slot of A to prototype. ... 12. Return A. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ @@ -44,4 +44,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, Object); assert.sameValue(Object.getPrototypeOf(ta), proto); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/use-default-proto-if-custom-proto-is-not-object.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/use-default-proto-if-custom-proto-is-not-object.js index a6f3a362eec..877fdcd2494 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/use-default-proto-if-custom-proto-is-not-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/object-arg/use-default-proto-if-custom-proto-is-not-object.js @@ -31,7 +31,7 @@ info: | 10. Set the [[Prototype]] internal slot of A to prototype. ... 12. Return A. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -44,4 +44,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/custom-proto-access-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/custom-proto-access-throws.js index 7e45acea194..50dc626cc67 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/custom-proto-access-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/custom-proto-access-throws.js @@ -27,7 +27,7 @@ info: | ... 3. Let proto be ? Get(constructor, "prototype"). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ @@ -44,4 +44,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [sample], newTarget); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/new-instance-extensibility.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/new-instance-extensibility.js index 5fbd869d62c..9a88c210690 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/new-instance-extensibility.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/new-instance-extensibility.js @@ -25,7 +25,7 @@ info: | ... 11. Set the [[Extensible]] internal slot of A to true. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -43,4 +43,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { Object.isExtensible(sample2), "new instance does not inherit extensibility from typedarray argument" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/other-ctor-buffer-ctor-species-null.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/other-ctor-buffer-ctor-species-null.js index 2eeb50e38bb..c0f7dc12921 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/other-ctor-buffer-ctor-species-null.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/other-ctor-buffer-ctor-species-null.js @@ -22,7 +22,7 @@ info: | 5. Let S be ? Get(C, @@species). 6. If S is either undefined or null, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ @@ -41,4 +41,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { ArrayBuffer.prototype, "buffer ctor is not called when species is null" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/other-ctor-buffer-ctor-species-undefined.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/other-ctor-buffer-ctor-species-undefined.js index 9a265f1248f..f37aaa18e90 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/other-ctor-buffer-ctor-species-undefined.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/other-ctor-buffer-ctor-species-undefined.js @@ -22,7 +22,7 @@ info: | 5. Let S be ? Get(C, @@species). 6. If S is either undefined or null, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ @@ -40,4 +40,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { ArrayBuffer.prototype, "buffer ctor is not called when species is undefined" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/other-ctor-returns-new-typedarray.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/other-ctor-returns-new-typedarray.js index c29b5356636..e1466497a18 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/other-ctor-returns-new-typedarray.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/other-ctor-returns-new-typedarray.js @@ -10,7 +10,7 @@ info: | least one argument and the Type of the first argument is Object and that object has a [[TypedArrayName]] internal slot. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.notSameValue(typedArray, sample); assert.sameValue(typedArray.constructor, TA); assert.sameValue(Object.getPrototypeOf(typedArray), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/proto-from-ctor-realm.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/proto-from-ctor-realm.js index 7e949854911..00654a3303b 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/proto-from-ctor-realm.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/proto-from-ctor-realm.js @@ -22,7 +22,7 @@ info: | a. Let realm be ? GetFunctionRealm(constructor). b. Let proto be realm's intrinsic object named intrinsicDefaultProto. 5. Return proto. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, cross-realm, Reflect, TypedArray] ---*/ @@ -34,4 +34,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [new TA()], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/same-ctor-buffer-ctor-species-null.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/same-ctor-buffer-ctor-species-null.js index 842ccd3d13b..9b567bc4f4f 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/same-ctor-buffer-ctor-species-null.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/same-ctor-buffer-ctor-species-null.js @@ -29,12 +29,12 @@ info: | 5. Let S be ? Get(C, @@species). 6. If S is either undefined or null, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(4); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(4)); var ctor = {}; sample.buffer.constructor = ctor; diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/same-ctor-buffer-ctor-species-undefined.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/same-ctor-buffer-ctor-species-undefined.js index 251a396e852..02b95f377e3 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/same-ctor-buffer-ctor-species-undefined.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/same-ctor-buffer-ctor-species-undefined.js @@ -29,12 +29,12 @@ info: | 5. Let S be ? Get(C, @@species). 6. If S is either undefined or null, return defaultConstructor. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(4); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(4)); var ctor = {}; sample.buffer.constructor = ctor; diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/same-ctor-returns-new-cloned-typedarray.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/same-ctor-returns-new-cloned-typedarray.js index 2176cebdb41..2a7f30c6483 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/same-ctor-returns-new-cloned-typedarray.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/same-ctor-returns-new-cloned-typedarray.js @@ -16,12 +16,12 @@ info: | a. Let data be ? CloneArrayBuffer(srcData, srcByteOffset). ... 23. Return O. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(7); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(7)); var typedArray = new TA(sample); assert.sameValue(typedArray.length, 7); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/src-typedarray-not-big-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/src-typedarray-not-big-throws.js index 190b2356fb3..145fe880857 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/src-typedarray-not-big-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/src-typedarray-not-big-throws.js @@ -17,17 +17,17 @@ info: | c. If one of srcType and elementType contains the substring "Big" and the other does not, throw a TypeError exception. -includes: [testBigIntTypedArray.js, testTypedArray.js] +includes: [testTypedArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ var notBigTypedArray; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { - notBigTypedArray = new TA(16); + notBigTypedArray = new TA(makeCtorArg(16)); - testWithBigIntTypedArrayConstructors(function(BTA) { + testWithBigIntTypedArrayConstructors(function(BTA, makeCtorArg) { assert.throws(TypeError, function() { new BTA(notBigTypedArray); }); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/undefined-newtarget-throws.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/undefined-newtarget-throws.js index 82fd5c823a4..486f7a9109c 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/undefined-newtarget-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/typedarray-arg/undefined-newtarget-throws.js @@ -14,12 +14,12 @@ info: | ... 2. If NewTarget is undefined, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA(4); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(4)); assert.throws(TypeError, function() { TA(typedArray); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-throws-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-throws-sab.js index 89f58a1cd94..6f09af3fda2 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-throws-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-throws-sab.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, -Infinity); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-throws.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-throws.js index 05889246593..2de04e25f6f 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-throws.js @@ -28,4 +28,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, -Infinity); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-zero-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-zero-sab.js index 1073b5af835..b4bf00149fa 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-zero-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-zero-sab.js @@ -20,4 +20,4 @@ features: [SharedArrayBuffer, TypedArray] testWithTypedArrayConstructors(function(TAConstructor) { var typedArray = new TAConstructor(new SharedArrayBuffer(8), -0); assert.sameValue(typedArray.byteOffset, +0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-zero.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-zero.js index 13d0a3e14ff..20c30895929 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-zero.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-zero.js @@ -20,4 +20,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TAConstructor) { var typedArray = new TAConstructor(new ArrayBuffer(8), -0); assert.sameValue(typedArray.byteOffset, +0); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-symbol-throws-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-symbol-throws-sab.js index b5fc270c9de..b3fde47d2bc 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-symbol-throws-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-symbol-throws-sab.js @@ -26,4 +26,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(buffer, byteOffset); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-symbol-throws.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-symbol-throws.js index 60039a1f5e8..0da033c19a9 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-symbol-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-symbol-throws.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(buffer, byteOffset); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-to-number-detachbuffer.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-to-number-detachbuffer.js index b8936e8cdfb..71162495a59 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-to-number-detachbuffer.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-to-number-detachbuffer.js @@ -18,4 +18,4 @@ testWithTypedArrayConstructors(function(TA) { var buffer = new ArrayBuffer(3 * offset); var byteOffset = { valueOf() { $DETACHBUFFER(buffer); return offset; } }; assert.throws(TypeError, () => new TA(buffer, byteOffset)); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-to-number-throws-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-to-number-throws-sab.js index e7b336c5e81..33c3c54d2fe 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-to-number-throws-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-to-number-throws-sab.js @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(buffer, byteOffset); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-to-number-throws.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-to-number-throws.js index 20cd4b796ef..5fbf2160771 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-to-number-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-to-number-throws.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(buffer, byteOffset); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/custom-proto-access-throws-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/custom-proto-access-throws-sab.js index b3ff8c56e64..d85a8b7e5a0 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/custom-proto-access-throws-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/custom-proto-access-throws-sab.js @@ -45,4 +45,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [buffer], newTarget); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/custom-proto-access-throws.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/custom-proto-access-throws.js index a1b823317f1..fff11897568 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/custom-proto-access-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/custom-proto-access-throws.js @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [buffer], newTarget); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length-and-offset-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length-and-offset-sab.js index 2107146b1f0..b7d5a366a34 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length-and-offset-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length-and-offset-sab.js @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta2.buffer, buffer, "ta2.buffer"); assert.sameValue(ta2.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta2), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length-and-offset.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length-and-offset.js index aefd48b5598..4685638c7d5 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length-and-offset.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length-and-offset.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta2.buffer, buffer, "ta2.buffer"); assert.sameValue(ta2.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta2), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length-sab.js index a06e530d0f8..bc2ea3af5cd 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length-sab.js @@ -32,4 +32,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta2.buffer, buffer); assert.sameValue(ta2.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta2), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length.js index 11fb1c4a42d..b5087666d95 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length.js @@ -31,4 +31,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta2.buffer, buffer); assert.sameValue(ta2.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta2), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-negative-length-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-negative-length-sab.js index 4d1b1d29cdc..b5f2574b286 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-negative-length-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-negative-length-sab.js @@ -26,4 +26,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, 0, -Infinity); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-negative-length.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-negative-length.js index d57d466d9f3..aa4a68d991a 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-negative-length.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-negative-length.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, 0, -Infinity); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-offset-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-offset-sab.js index 515d822c1a1..f1af90530a4 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-offset-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-offset-sab.js @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta2.buffer, buffer); assert.sameValue(ta2.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta2), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-offset.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-offset.js index 89e290b523c..5857a0c3fe3 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-offset.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-offset.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta2.buffer, buffer); assert.sameValue(ta2.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta2), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/detachedbuffer.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/detachedbuffer.js index b015d4c344f..cea268f346c 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/detachedbuffer.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/detachedbuffer.js @@ -18,4 +18,4 @@ testWithTypedArrayConstructors(function(TA) { var buffer = new ArrayBuffer(3 * offset); $DETACHBUFFER(buffer); assert.throws(TypeError, () => new TA(buffer)); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-length-throws-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-length-throws-sab.js index 2549e93fdd2..280b306edde 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-length-throws-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-length-throws-sab.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, 0, bpe * 2); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-length-throws.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-length-throws.js index 3ff3a6d6115..67d670e1d4a 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-length-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-length-throws.js @@ -28,4 +28,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, 0, bpe * 2); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-offset-throws-resizable-ab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-offset-throws-resizable-ab.js index 6de3f303251..9e4abf96d02 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-offset-throws-resizable-ab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-offset-throws-resizable-ab.js @@ -19,4 +19,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, BPE * 2, undefined); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-offset-throws-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-offset-throws-sab.js index 62cf41145f6..9a92f725593 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-offset-throws-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-offset-throws-sab.js @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, bpe * 2, undefined); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-offset-throws.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-offset-throws.js index 5daf40ce763..7a9b879cc85 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-offset-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-offset-throws.js @@ -32,4 +32,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, bpe * 2, undefined); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/invoked-with-undefined-newtarget-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/invoked-with-undefined-newtarget-sab.js index 24061049a08..ed0fd52feca 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/invoked-with-undefined-newtarget-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/invoked-with-undefined-newtarget-sab.js @@ -24,4 +24,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA(buffer); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/invoked-with-undefined-newtarget.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/invoked-with-undefined-newtarget.js index 218b7c2c085..4e0d501897c 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/invoked-with-undefined-newtarget.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/invoked-with-undefined-newtarget.js @@ -23,4 +23,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA(buffer); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/is-referenced-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/is-referenced-sab.js index 44c29229cde..37ffd66211f 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/is-referenced-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/is-referenced-sab.js @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta1.buffer, buffer); assert.sameValue(ta2.buffer, buffer); assert.sameValue(ta1.buffer, ta2.buffer); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/is-referenced.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/is-referenced.js index 0154deaf4ed..3300ee77c3a 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/is-referenced.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/is-referenced.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta1.buffer, buffer); assert.sameValue(ta2.buffer, buffer); assert.sameValue(ta1.buffer, ta2.buffer); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-access-throws-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-access-throws-sab.js index 16872f86078..112fbf2d374 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-access-throws-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-access-throws-sab.js @@ -31,4 +31,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(buffer, 0, len); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-access-throws.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-access-throws.js index ea99b8b4086..91c6b84dd8e 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-access-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-access-throws.js @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(buffer, 0, len); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-is-symbol-throws-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-is-symbol-throws-sab.js index 8b77b806d4a..96bb8c3f7ba 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-is-symbol-throws-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-is-symbol-throws-sab.js @@ -27,4 +27,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(buffer, 0, s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-is-symbol-throws.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-is-symbol-throws.js index db8ac830324..b9c682902ef 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-is-symbol-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-is-symbol-throws.js @@ -26,4 +26,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(buffer, 0, s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-to-number-detachbuffer.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-to-number-detachbuffer.js index c8c3eb34ba1..7f38f770b4f 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-to-number-detachbuffer.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-to-number-detachbuffer.js @@ -18,4 +18,4 @@ testWithTypedArrayConstructors(function(TA) { var buffer = new ArrayBuffer(3 * offset); var length = { valueOf() { $DETACHBUFFER(buffer); return 1; } }; assert.throws(TypeError, () => new TA(buffer, 0, length)); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/new-instance-extensibility-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/new-instance-extensibility-sab.js index 2b765a78f73..4f57c98d7cd 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/new-instance-extensibility-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/new-instance-extensibility-sab.js @@ -35,4 +35,4 @@ testWithTypedArrayConstructors(function(TA) { var sample = new TA(buffer); assert(Object.isExtensible(sample)); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/new-instance-extensibility.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/new-instance-extensibility.js index 74336215f83..65f302b0ad2 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/new-instance-extensibility.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/new-instance-extensibility.js @@ -34,4 +34,4 @@ testWithTypedArrayConstructors(function(TA) { var sample = new TA(buffer); assert(Object.isExtensible(sample)); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/proto-from-ctor-realm-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/proto-from-ctor-realm-sab.js index 9cab95b4738..6af6493c497 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/proto-from-ctor-realm-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/proto-from-ctor-realm-sab.js @@ -35,4 +35,4 @@ testWithTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [new SharedArrayBuffer(8)], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/proto-from-ctor-realm.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/proto-from-ctor-realm.js index d93538db460..cf72ef8cf82 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/proto-from-ctor-realm.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/proto-from-ctor-realm.js @@ -34,4 +34,4 @@ testWithTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [new ArrayBuffer(8)], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/returns-new-instance-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/returns-new-instance-sab.js index 52de9625258..8f39ba2c4f3 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/returns-new-instance-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/returns-new-instance-sab.js @@ -31,4 +31,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta2.buffer, buffer2); assert.sameValue(ta2.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta2), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/returns-new-instance.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/returns-new-instance.js index 4723e75f9fd..d2088a74558 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/returns-new-instance.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/returns-new-instance.js @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta2.buffer, buffer2); assert.sameValue(ta2.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta2), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-bytelength-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-bytelength-sab.js index 5fd87715f57..39e94d0a880 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-bytelength-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-bytelength-sab.js @@ -70,4 +70,4 @@ testWithTypedArrayConstructors(function(TA) { name + " prototype" ); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-bytelength.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-bytelength.js index ae660b820dd..ddd4d57a1d1 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-bytelength.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-bytelength.js @@ -69,4 +69,4 @@ testWithTypedArrayConstructors(function(TA) { name + " prototype" ); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-byteoffset-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-byteoffset-sab.js index 43ae9f601dc..244da24b033 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-byteoffset-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-byteoffset-sab.js @@ -84,4 +84,4 @@ testWithTypedArrayConstructors(function(TA) { new TA(buffer, true); }, "1 modulo elementSize ≠ 0, throws a RangeError"); } -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-byteoffset.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-byteoffset.js index 35a087aaf6c..4c160275958 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-byteoffset.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-byteoffset.js @@ -83,4 +83,4 @@ testWithTypedArrayConstructors(function(TA) { new TA(buffer, true); }, "1 modulo elementSize ≠ 0, throws a RangeError"); } -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/typedarray-backed-by-sharedarraybuffer.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/typedarray-backed-by-sharedarraybuffer.js index 739d1cdd21e..e20b83be483 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/typedarray-backed-by-sharedarraybuffer.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/typedarray-backed-by-sharedarraybuffer.js @@ -13,9 +13,9 @@ features: [SharedArrayBuffer, TypedArray] var sab = new SharedArrayBuffer(4); var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; -testWithTypedArrayConstructors(function(View1) { +testWithTypedArrayConstructors(function(View1, makeCtorArg) { var ta1 = new View1(sab); - testWithTypedArrayConstructors(function(View2) { + testWithTypedArrayConstructors(function(View2, makeCtorArg) { var ta2 = new View2(ta1); assert.sameValue(ta2.buffer.constructor, ArrayBuffer, "TypedArray of SharedArrayBuffer-backed TypedArray is ArrayBuffer-backed"); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-custom-proto-if-object-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-custom-proto-if-object-sab.js index c963b6bb1d9..63dd7163479 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-custom-proto-if-object-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-custom-proto-if-object-sab.js @@ -46,4 +46,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, Object); assert.sameValue(Object.getPrototypeOf(ta), proto); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-custom-proto-if-object.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-custom-proto-if-object.js index 9eefdf56daf..b6fbe2f64d8 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-custom-proto-if-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-custom-proto-if-object.js @@ -45,4 +45,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, Object); assert.sameValue(Object.getPrototypeOf(ta), proto); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-default-proto-if-custom-proto-is-not-object-sab.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-default-proto-if-custom-proto-is-not-object-sab.js index 8c91aa84d5c..4a6e477a503 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-default-proto-if-custom-proto-is-not-object-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-default-proto-if-custom-proto-is-not-object-sab.js @@ -45,4 +45,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-default-proto-if-custom-proto-is-not-object.js b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-default-proto-if-custom-proto-is-not-object.js index df4909dab34..55a3ddab335 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-default-proto-if-custom-proto-is-not-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-default-proto-if-custom-proto-is-not-object.js @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/length-arg/custom-proto-access-throws.js b/test/built-ins/TypedArrayConstructors/ctors/length-arg/custom-proto-access-throws.js index 6ad49fdabb0..99bc2fd9bc8 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/length-arg/custom-proto-access-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/length-arg/custom-proto-access-throws.js @@ -40,4 +40,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [1], newTarget); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/length-arg/init-zeros.js b/test/built-ins/TypedArrayConstructors/ctors/length-arg/init-zeros.js index b361317094d..c9ac20cf116 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/length-arg/init-zeros.js +++ b/test/built-ins/TypedArrayConstructors/ctors/length-arg/init-zeros.js @@ -40,8 +40,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var subject = new TA(9); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var subject = new TA(makeCtorArg(9)); assert.sameValue(subject[0], 0, 'index 0'); assert.sameValue(subject[1], 0, 'index 1'); diff --git a/test/built-ins/TypedArrayConstructors/ctors/length-arg/is-infinity-throws-rangeerror.js b/test/built-ins/TypedArrayConstructors/ctors/length-arg/is-infinity-throws-rangeerror.js index 0084d5d6afc..c04f79f7603 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/length-arg/is-infinity-throws-rangeerror.js +++ b/test/built-ins/TypedArrayConstructors/ctors/length-arg/is-infinity-throws-rangeerror.js @@ -24,4 +24,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(Infinity); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/length-arg/is-negative-integer-throws-rangeerror.js b/test/built-ins/TypedArrayConstructors/ctors/length-arg/is-negative-integer-throws-rangeerror.js index 0ff5d5a3f15..85153df337d 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/length-arg/is-negative-integer-throws-rangeerror.js +++ b/test/built-ins/TypedArrayConstructors/ctors/length-arg/is-negative-integer-throws-rangeerror.js @@ -34,4 +34,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(-Infinity); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/length-arg/is-symbol-throws.js b/test/built-ins/TypedArrayConstructors/ctors/length-arg/is-symbol-throws.js index 797dd4922e1..6c7be337b43 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/length-arg/is-symbol-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/length-arg/is-symbol-throws.js @@ -23,4 +23,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/length-arg/new-instance-extensibility.js b/test/built-ins/TypedArrayConstructors/ctors/length-arg/new-instance-extensibility.js index d9b03deca5d..125f7576d96 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/length-arg/new-instance-extensibility.js +++ b/test/built-ins/TypedArrayConstructors/ctors/length-arg/new-instance-extensibility.js @@ -31,8 +31,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(4); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(4)); assert(Object.isExtensible(sample)); }); diff --git a/test/built-ins/TypedArrayConstructors/ctors/length-arg/proto-from-ctor-realm.js b/test/built-ins/TypedArrayConstructors/ctors/length-arg/proto-from-ctor-realm.js index 77cef261627..c5fba35dd45 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/length-arg/proto-from-ctor-realm.js +++ b/test/built-ins/TypedArrayConstructors/ctors/length-arg/proto-from-ctor-realm.js @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [0], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/length-arg/returns-object.js b/test/built-ins/TypedArrayConstructors/ctors/length-arg/returns-object.js index 8a9121d88f0..09f3c095384 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/length-arg/returns-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors/length-arg/returns-object.js @@ -23,8 +23,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var typedArray = new TA(4); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(4)); var length = typedArray.length; assert.sameValue(length, 4, "length"); diff --git a/test/built-ins/TypedArrayConstructors/ctors/length-arg/toindex-length.js b/test/built-ins/TypedArrayConstructors/ctors/length-arg/toindex-length.js index 4d16ff711e8..8640ede4fef 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/length-arg/toindex-length.js +++ b/test/built-ins/TypedArrayConstructors/ctors/length-arg/toindex-length.js @@ -50,4 +50,4 @@ testWithTypedArrayConstructors(function(TA) { name + " prototype" ); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/length-arg/undefined-newtarget-throws.js b/test/built-ins/TypedArrayConstructors/ctors/length-arg/undefined-newtarget-throws.js index 6a238255e65..2778f401043 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/length-arg/undefined-newtarget-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/length-arg/undefined-newtarget-throws.js @@ -17,9 +17,9 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert.throws(TypeError, function() { - TA(0); + TA(makeCtorArg(0)); }); assert.throws(TypeError, function() { diff --git a/test/built-ins/TypedArrayConstructors/ctors/length-arg/use-custom-proto-if-object.js b/test/built-ins/TypedArrayConstructors/ctors/length-arg/use-custom-proto-if-object.js index b36ff7014b9..96b7a4920c4 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/length-arg/use-custom-proto-if-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors/length-arg/use-custom-proto-if-object.js @@ -41,4 +41,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, Object); assert.sameValue(Object.getPrototypeOf(ta), proto); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/length-arg/use-default-proto-if-custom-proto-is-not-object.js b/test/built-ins/TypedArrayConstructors/ctors/length-arg/use-default-proto-if-custom-proto-is-not-object.js index e5fc367c00b..837bd88e1e0 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/length-arg/use-default-proto-if-custom-proto-is-not-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors/length-arg/use-default-proto-if-custom-proto-is-not-object.js @@ -40,4 +40,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/no-args/custom-proto-access-throws.js b/test/built-ins/TypedArrayConstructors/ctors/no-args/custom-proto-access-throws.js index 6b383e32e53..842c1a93d5c 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/no-args/custom-proto-access-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/no-args/custom-proto-access-throws.js @@ -40,4 +40,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [], newTarget); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/no-args/new-instance-extensibility.js b/test/built-ins/TypedArrayConstructors/ctors/no-args/new-instance-extensibility.js index cced58d2eaa..92b1fff9a9e 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/no-args/new-instance-extensibility.js +++ b/test/built-ins/TypedArrayConstructors/ctors/no-args/new-instance-extensibility.js @@ -35,4 +35,4 @@ testWithTypedArrayConstructors(function(TA) { var sample = new TA(); assert(Object.isExtensible(sample)); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/no-args/proto-from-ctor-realm.js b/test/built-ins/TypedArrayConstructors/ctors/no-args/proto-from-ctor-realm.js index c699221854c..8a2fc97c9fe 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/no-args/proto-from-ctor-realm.js +++ b/test/built-ins/TypedArrayConstructors/ctors/no-args/proto-from-ctor-realm.js @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/no-args/returns-object.js b/test/built-ins/TypedArrayConstructors/ctors/no-args/returns-object.js index c7274e5f9be..86bdbb3f4e7 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/no-args/returns-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors/no-args/returns-object.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(typedArray.length, 0); assert.sameValue(typedArray.constructor, TA); assert.sameValue(Object.getPrototypeOf(typedArray), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/no-args/undefined-newtarget-throws.js b/test/built-ins/TypedArrayConstructors/ctors/no-args/undefined-newtarget-throws.js index a06139865db..3159551f3b8 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/no-args/undefined-newtarget-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/no-args/undefined-newtarget-throws.js @@ -20,4 +20,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/no-args/use-custom-proto-if-object.js b/test/built-ins/TypedArrayConstructors/ctors/no-args/use-custom-proto-if-object.js index 4266724f063..d407579bb50 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/no-args/use-custom-proto-if-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors/no-args/use-custom-proto-if-object.js @@ -41,4 +41,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, Object); assert.sameValue(Object.getPrototypeOf(ta), proto); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/no-args/use-default-proto-if-custom-proto-is-not-object.js b/test/built-ins/TypedArrayConstructors/ctors/no-args/use-default-proto-if-custom-proto-is-not-object.js index e76ef585e86..53217eebc03 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/no-args/use-default-proto-if-custom-proto-is-not-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors/no-args/use-default-proto-if-custom-proto-is-not-object.js @@ -40,4 +40,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/as-array-returns.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/as-array-returns.js index a5e3c3bbc84..12e10e6e93d 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/as-array-returns.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/as-array-returns.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(typedArray[1], 42); assert.sameValue(typedArray.constructor, TA); assert.sameValue(Object.getPrototypeOf(typedArray), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/as-generator-iterable-returns.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/as-generator-iterable-returns.js index f9af0defe76..7b41eaabf92 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/as-generator-iterable-returns.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/as-generator-iterable-returns.js @@ -27,4 +27,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(typedArray[1], 42); assert.sameValue(typedArray.constructor, TA); assert.sameValue(Object.getPrototypeOf(typedArray), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/conversion-operation-consistent-nan.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/conversion-operation-consistent-nan.js index cba697f882c..5e7436bbfdb 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/conversion-operation-consistent-nan.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/conversion-operation-consistent-nan.js @@ -58,13 +58,11 @@ includes: [nans.js, testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -function body(FloatArray) { +testWithTypedArrayConstructors(function body(FloatArray) { var first = new FloatArray(NaNs); var second = new FloatArray(NaNs); var firstBytes = new Uint8Array(first.buffer); var secondBytes = new Uint8Array(second.buffer); assert(compareArray(firstBytes, secondBytes)); -} - -testWithTypedArrayConstructors(body, floatArrayConstructors); +}, floatArrayConstructors); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/custom-proto-access-throws.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/custom-proto-access-throws.js index f5ced4ea443..9ae7dcf66a2 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/custom-proto-access-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/custom-proto-access-throws.js @@ -45,4 +45,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [o], newTarget); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterated-array-changed-by-tonumber.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterated-array-changed-by-tonumber.js index 1fe2a18b352..6ab839812e9 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterated-array-changed-by-tonumber.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterated-array-changed-by-tonumber.js @@ -40,4 +40,4 @@ testWithTypedArrayConstructors(function(TypedArray) { assert.sameValue(ta[0], 0); assert.sameValue(ta[1], 100); assert.sameValue(ta[2], 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterated-array-with-modified-array-iterator.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterated-array-with-modified-array-iterator.js index adaef9eaffc..61ab8738470 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterated-array-with-modified-array-iterator.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterated-array-with-modified-array-iterator.js @@ -46,4 +46,4 @@ testWithTypedArrayConstructors(function(TypedArray) { assert.sameValue(ta[1], 3); assert.sameValue(ta[2], 2); assert.sameValue(ta[3], 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterating-throws.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterating-throws.js index ca041be3d81..0e048de368b 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterating-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterating-throws.js @@ -28,4 +28,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterator-is-null-as-array-like.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterator-is-null-as-array-like.js index e5249970fb4..2dafebb04d1 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterator-is-null-as-array-like.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterator-is-null-as-array-like.js @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(function(TypedArray) { assert.sameValue(typedArray.length, 2); assert.sameValue(typedArray[0], 1); assert.sameValue(typedArray[1], 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterator-not-callable-throws.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterator-not-callable-throws.js index ad6db0877ac..8f50f4e07e4 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterator-not-callable-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterator-not-callable-throws.js @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterator-throws.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterator-throws.js index 571ad77ad84..42c39db8680 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterator-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/iterator-throws.js @@ -31,4 +31,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/length-excessive-throws.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/length-excessive-throws.js index f8279f50a7e..5ec9fde1478 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/length-excessive-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/length-excessive-throws.js @@ -27,4 +27,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/length-is-symbol-throws.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/length-is-symbol-throws.js index b452dea0357..d89c2e3b45b 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/length-is-symbol-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/length-is-symbol-throws.js @@ -27,4 +27,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/length-throws.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/length-throws.js index 08f8cd13021..f7ea309d519 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/length-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/length-throws.js @@ -31,4 +31,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/new-instance-extensibility.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/new-instance-extensibility.js index 86a2ac837be..c4ccea2f118 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/new-instance-extensibility.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/new-instance-extensibility.js @@ -40,4 +40,4 @@ testWithTypedArrayConstructors(function(TA) { var sample = new TA(obj); assert(Object.isExtensible(sample)); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/proto-from-ctor-realm.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/proto-from-ctor-realm.js index a92ceee0014..6c6c6a684aa 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/proto-from-ctor-realm.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/proto-from-ctor-realm.js @@ -34,4 +34,4 @@ testWithTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [{}], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/returns.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/returns.js index e48173a1654..380d42ea6ee 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/returns.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/returns.js @@ -42,4 +42,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(typedArray[1], 0); assert.sameValue(typedArray[4], 0); } -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-from-property.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-from-property.js index f9d384b5cf2..ded8447060f 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-from-property.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-from-property.js @@ -35,4 +35,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-to-primitive-typeerror.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-to-primitive-typeerror.js index e0eaa1f057a..c4a8148d5d5 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-to-primitive-typeerror.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-to-primitive-typeerror.js @@ -64,7 +64,7 @@ includes: [testTypedArray.js] features: [Symbol.toPrimitive, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample = new Int8Array(1); var toPrimitive = 0; var valueOf = 0; @@ -79,7 +79,7 @@ testWithTypedArrayConstructors(function(TA) { }; assert.throws(TypeError, function() { - new TA([8, sample]); + new TA(makeCtorArg([8, sample])); }, "abrupt completion from sample @@toPrimitive"); assert.sameValue(toPrimitive, 1, "toPrimitive was called once"); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-to-primitive.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-to-primitive.js index 2e347876c8c..156d3754569 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-to-primitive.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-to-primitive.js @@ -62,7 +62,7 @@ includes: [testTypedArray.js] features: [Symbol.toPrimitive, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample = new Int8Array(1); var toPrimitive = 0; var valueOf = 0; @@ -77,7 +77,7 @@ testWithTypedArrayConstructors(function(TA) { }; assert.throws(Test262Error, function() { - new TA([8, sample]); + new TA(makeCtorArg([8, sample])); }, "abrupt completion from sample @@toPrimitive"); assert.sameValue(toPrimitive, 1, "toPrimitive was called once"); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-tostring.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-tostring.js index 43dec2072a0..dc25774a2d2 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-tostring.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-tostring.js @@ -74,7 +74,7 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample = new Int8Array(1); var valueOf = 0; var toString = 0; @@ -90,7 +90,7 @@ testWithTypedArrayConstructors(function(TA) { }; assert.throws(Test262Error, function() { - new TA([8, sample]); + new TA(makeCtorArg([8, sample])); }, "abrupt completion from ToNumber(sample)"); assert.sameValue(valueOf, 1, "valueOf called once"); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-valueof-typeerror.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-valueof-typeerror.js index d7a838e7696..e5052cb1bd6 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-valueof-typeerror.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-valueof-typeerror.js @@ -75,7 +75,7 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample = new Int8Array(1); var valueOf = 0; var toString = 0; @@ -91,7 +91,7 @@ testWithTypedArrayConstructors(function(TA) { }; assert.throws(TypeError, function() { - new TA([8, sample]); + new TA(makeCtorArg([8, sample])); }, "abrupt completion from ToNumber(sample)"); assert.sameValue(valueOf, 1, "valueOf called once"); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-valueof.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-valueof.js index a23d1d62352..d3982e91b03 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-valueof.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-obj-valueof.js @@ -75,7 +75,7 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var sample = new Int8Array(1); var valueOf = 0; @@ -85,7 +85,7 @@ testWithTypedArrayConstructors(function(TA) { }; assert.throws(Test262Error, function() { - new TA([8, sample]); + new TA(makeCtorArg([8, sample])); }, "abrupt completion from ToNumber(sample)"); assert.sameValue(valueOf, 1, "valueOf called once"); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-property.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-property.js index 93f85dc9820..2a4eb291ed8 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-property.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-property.js @@ -35,4 +35,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-symbol-property.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-symbol-property.js index 42b4a54b8ab..bd3931092d6 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-symbol-property.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/throws-setting-symbol-property.js @@ -31,4 +31,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(obj); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/undefined-newtarget-throws.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/undefined-newtarget-throws.js index 36f68493ad9..91dd3ae3d61 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/undefined-newtarget-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/undefined-newtarget-throws.js @@ -19,12 +19,12 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert.throws(TypeError, function() { TA({}); }); assert.throws(TypeError, function() { - TA([]); + TA(makeCtorArg([])); }); }); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/use-custom-proto-if-object.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/use-custom-proto-if-object.js index bb5754a9c0e..841538c6162 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/use-custom-proto-if-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/use-custom-proto-if-object.js @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, Object); assert.sameValue(Object.getPrototypeOf(ta), proto); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/object-arg/use-default-proto-if-custom-proto-is-not-object.js b/test/built-ins/TypedArrayConstructors/ctors/object-arg/use-default-proto-if-custom-proto-is-not-object.js index 6aba187c2bc..bf6d44253a6 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/object-arg/use-default-proto-if-custom-proto-is-not-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors/object-arg/use-default-proto-if-custom-proto-is-not-object.js @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/custom-proto-access-throws.js b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/custom-proto-access-throws.js index 281d0935397..02b69c13b3e 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/custom-proto-access-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/custom-proto-access-throws.js @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [sample], newTarget); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/new-instance-extensibility.js b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/new-instance-extensibility.js index d29848bf81e..dcc42358551 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/new-instance-extensibility.js +++ b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/new-instance-extensibility.js @@ -43,4 +43,4 @@ testWithTypedArrayConstructors(function(TA) { Object.isExtensible(sample2), "new instance does not inherit extensibility from typedarray argument" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/other-ctor-returns-new-typedarray.js b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/other-ctor-returns-new-typedarray.js index 411248ffd41..50fca905b5a 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/other-ctor-returns-new-typedarray.js +++ b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/other-ctor-returns-new-typedarray.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { assert.notSameValue(typedArray, sample); assert.sameValue(typedArray.constructor, TA); assert.sameValue(Object.getPrototypeOf(typedArray), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/proto-from-ctor-realm.js b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/proto-from-ctor-realm.js index 6e58746cd69..9bc2db6a1c4 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/proto-from-ctor-realm.js +++ b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/proto-from-ctor-realm.js @@ -34,4 +34,4 @@ testWithTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [new TA()], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/returns-new-instance.js b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/returns-new-instance.js index 357730df552..ef59f3f3021 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/returns-new-instance.js +++ b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/returns-new-instance.js @@ -28,4 +28,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(typedArray.length, len); assert.sameValue(typedArray.constructor, TA); assert.sameValue(Object.getPrototypeOf(typedArray), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/same-ctor-buffer-ctor-species-null.js b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/same-ctor-buffer-ctor-species-null.js index e427806102b..4a52f316751 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/same-ctor-buffer-ctor-species-null.js +++ b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/same-ctor-buffer-ctor-species-null.js @@ -33,8 +33,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(4); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(4)); var ctor = {}; sample.buffer.constructor = ctor; diff --git a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/same-ctor-buffer-ctor-species-undefined.js b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/same-ctor-buffer-ctor-species-undefined.js index 339d3041b68..b33c5711990 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/same-ctor-buffer-ctor-species-undefined.js +++ b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/same-ctor-buffer-ctor-species-undefined.js @@ -33,8 +33,8 @@ includes: [testTypedArray.js] features: [Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(4); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(4)); var ctor = {}; sample.buffer.constructor = ctor; diff --git a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/same-ctor-returns-new-cloned-typedarray.js b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/same-ctor-returns-new-cloned-typedarray.js index 4d9b442c90e..67036d15b27 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/same-ctor-returns-new-cloned-typedarray.js +++ b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/same-ctor-returns-new-cloned-typedarray.js @@ -20,8 +20,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(7); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(7)); var typedArray = new TA(sample); assert.sameValue(typedArray.length, 7); diff --git a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/src-typedarray-big-throws.js b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/src-typedarray-big-throws.js index 370f392fb53..f5801a90121 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/src-typedarray-big-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/src-typedarray-big-throws.js @@ -17,17 +17,17 @@ info: | c. If one of srcType and elementType contains the substring "Big" and the other does not, throw a TypeError exception. -includes: [testBigIntTypedArray.js, testTypedArray.js] +includes: [testTypedArray.js, testTypedArray.js] features: [BigInt, TypedArray] ---*/ var bigTypedArray; -testWithBigIntTypedArrayConstructors(function(BTA) { +testWithBigIntTypedArrayConstructors(function(BTA, makeCtorArg) { - bigTypedArray = new BTA(16); + bigTypedArray = new BTA(makeCtorArg(16)); - testWithTypedArrayConstructors(function(TA) { + testWithTypedArrayConstructors(function(TA, makeCtorArg) { assert.throws(TypeError, function() { new TA(bigTypedArray); }); diff --git a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/throw-type-error-before-custom-proto-access.js b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/throw-type-error-before-custom-proto-access.js index b12249c4899..1f628f92ae2 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/throw-type-error-before-custom-proto-access.js +++ b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/throw-type-error-before-custom-proto-access.js @@ -46,4 +46,4 @@ testWithTypedArrayConstructors(function (TA) { assert.throws(TypeError, function () { Reflect.construct(TA, [Symbol()], newTarget); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/undefined-newtarget-throws.js b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/undefined-newtarget-throws.js index 12839b2d711..e96b6d1d4b6 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/undefined-newtarget-throws.js +++ b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/undefined-newtarget-throws.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var typedArray = new TA(4); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(4)); assert.throws(TypeError, function() { TA(typedArray); diff --git a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/use-custom-proto-if-object.js b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/use-custom-proto-if-object.js index 8af612edcbd..e412d2f4d25 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/use-custom-proto-if-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/use-custom-proto-if-object.js @@ -45,4 +45,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, Object); assert.sameValue(Object.getPrototypeOf(ta), proto); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/use-default-proto-if-custom-proto-is-not-object.js b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/use-default-proto-if-custom-proto-is-not-object.js index b31bd96e4de..724f22692d8 100644 --- a/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/use-default-proto-if-custom-proto-is-not-object.js +++ b/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/use-default-proto-if-custom-proto-is-not-object.js @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta.constructor, TA); assert.sameValue(Object.getPrototypeOf(ta), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/arylk-get-length-error.js b/test/built-ins/TypedArrayConstructors/from/BigInt/arylk-get-length-error.js index 2a1028aee8c..1724adf1d47 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/arylk-get-length-error.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/arylk-get-length-error.js @@ -9,7 +9,7 @@ info: | ... 7. Let len be ? ToLength(? Get(arrayLike, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(arrayLike); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/arylk-to-length-error.js b/test/built-ins/TypedArrayConstructors/from/BigInt/arylk-to-length-error.js index d000bac3940..85d31290916 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/arylk-to-length-error.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/arylk-to-length-error.js @@ -9,7 +9,7 @@ info: | ... 7. Let len be ? ToLength(? Get(arrayLike, "length")). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(arrayLike); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/custom-ctor-does-not-instantiate-ta-throws.js b/test/built-ins/TypedArrayConstructors/from/BigInt/custom-ctor-does-not-instantiate-ta-throws.js index 0571b9ac539..e617d2b015a 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/custom-ctor-does-not-instantiate-ta-throws.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/custom-ctor-does-not-instantiate-ta-throws.js @@ -16,7 +16,7 @@ info: | 1. Let newTypedArray be ? Construct(constructor, argumentList). 2. Perform ? ValidateTypedArray(newTypedArray). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -26,4 +26,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA.from.call(ctor, []); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/custom-ctor-returns-other-instance.js b/test/built-ins/TypedArrayConstructors/from/BigInt/custom-ctor-returns-other-instance.js index 6b945f530ed..56bd9430355 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/custom-ctor-returns-other-instance.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/custom-ctor-returns-other-instance.js @@ -18,11 +18,11 @@ info: | 10. Let len be ? ToLength(? Get(arrayLike, "length")). 11. Let targetObj be ? TypedArrayCreate(C, « len »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.iterator, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var sourceItor = [1n, 2n]; var sourceObj = { 0: 0n, @@ -31,7 +31,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { }; var result; - var custom = new TA(2); + var custom = new TA(makeCtorArg(2)); var ctor = function() { return custom; }; @@ -42,11 +42,11 @@ testWithBigIntTypedArrayConstructors(function(TA) { result = TypedArray.from.call(ctor, sourceObj); assert.sameValue(result, custom, "not using iterator, same length"); - custom = new TA(3); + custom = new TA(makeCtorArg(3)); result = TypedArray.from.call(ctor, sourceItor); assert.sameValue(result, custom, "using iterator, higher length"); result = TypedArray.from.call(ctor, sourceObj); assert.sameValue(result, custom, "not using iterator, higher length"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/custom-ctor-returns-smaller-instance-throws.js b/test/built-ins/TypedArrayConstructors/from/BigInt/custom-ctor-returns-smaller-instance-throws.js index f44ff8f7efb..1d49cdfa41d 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/custom-ctor-returns-smaller-instance-throws.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/custom-ctor-returns-smaller-instance-throws.js @@ -17,7 +17,7 @@ info: | 10. Let len be ? ToLength(? Get(arrayLike, "length")). 11. Let targetObj be ? TypedArrayCreate(C, « len »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.iterator, TypedArray] ---*/ @@ -26,9 +26,9 @@ var sourceObj = { length: 2 }; -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var ctor = function() { - return new TA(1); + return new TA(makeCtorArg(1)); }; assert.throws(TypeError, function() { TA.from.call(ctor, sourceItor); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/custom-ctor.js b/test/built-ins/TypedArrayConstructors/from/BigInt/custom-ctor.js index 1b98c27cfe1..6a79293f900 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/custom-ctor.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/custom-ctor.js @@ -15,7 +15,7 @@ info: | 1. Let newTypedArray be ? Construct(constructor, argumentList). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -31,4 +31,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/inherited.js b/test/built-ins/TypedArrayConstructors/from/BigInt/inherited.js index 08c921147f3..567047633a2 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/inherited.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/inherited.js @@ -9,7 +9,7 @@ info: | The %TypedArray% intrinsic object is a constructor function object that all of the TypedArray constructor object inherit from. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -22,4 +22,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { TA.hasOwnProperty("from"), false, "constructor does not define an own property named 'from'" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/invoked-as-func.js b/test/built-ins/TypedArrayConstructors/from/BigInt/invoked-as-func.js index b602a99fa9e..87fecd48c3c 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/invoked-as-func.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/invoked-as-func.js @@ -10,7 +10,7 @@ info: | 1. Let C be the this value. 2. If IsConstructor(C) is false, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -20,4 +20,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { from([]); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/iter-access-error.js b/test/built-ins/TypedArrayConstructors/from/BigInt/iter-access-error.js index 21090c3db55..1931791f14d 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/iter-access-error.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/iter-access-error.js @@ -14,7 +14,7 @@ info: | 1. Let usingIterator be ? GetMethod(items, @@iterator). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.iterator, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(iter); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/iter-invoke-error.js b/test/built-ins/TypedArrayConstructors/from/BigInt/iter-invoke-error.js index 552a6d7283e..e980b28694a 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/iter-invoke-error.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/iter-invoke-error.js @@ -16,7 +16,7 @@ info: | 2. If usingIterator is not undefined, then a. Let iterator be ? GetIterator(items, usingIterator). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.iterator, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(iter); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/iter-next-error.js b/test/built-ins/TypedArrayConstructors/from/BigInt/iter-next-error.js index 836da920c86..7df394d1979 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/iter-next-error.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/iter-next-error.js @@ -11,7 +11,7 @@ info: | d. Repeat, while next is not false i. Let next be ? IteratorStep(iterator). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.iterator, TypedArray] ---*/ @@ -28,4 +28,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(iter); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/iter-next-value-error.js b/test/built-ins/TypedArrayConstructors/from/BigInt/iter-next-value-error.js index 08936b4e1d6..61e5e01b47b 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/iter-next-value-error.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/iter-next-value-error.js @@ -13,7 +13,7 @@ info: | ii. If next is not false, then 1. Let nextValue be ? IteratorValue(next). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.iterator, TypedArray] ---*/ @@ -37,4 +37,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(iter); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-abrupt-completion.js b/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-abrupt-completion.js index 82bdcadf3f8..fa8012d8e9b 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-abrupt-completion.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-abrupt-completion.js @@ -13,7 +13,7 @@ info: | c. If mapping is true, then i. Let mappedValue be ? Call(mapfn, T, « kValue, k »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(source, mapfn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-arguments.js b/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-arguments.js index d3998582968..5317edad42a 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-arguments.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-arguments.js @@ -13,7 +13,7 @@ info: | c. If mapping is true, then i. Let mappedValue be ? Call(mapfn, T, « kValue, k »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -45,4 +45,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(results[2].kValue, 44); assert.sameValue(results[2].k, 2); assert.sameValue(results[2].argsLength, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-is-not-callable.js b/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-is-not-callable.js index 36565b495dc..9dc9fc926e7 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-is-not-callable.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-is-not-callable.js @@ -10,7 +10,7 @@ info: | 3. If mapfn was supplied and mapfn is not undefined, then a. If IsCallable(mapfn) is false, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, Symbol.iterator, TypedArray] ---*/ @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { getIterator, 0, "IsCallable(mapfn) check occurs before getting source[@@iterator]" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-this-with-thisarg.js b/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-this-with-thisarg.js index 24eebdf8188..8848f154375 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-this-with-thisarg.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-this-with-thisarg.js @@ -15,7 +15,7 @@ info: | c. If mapping is true, then i. Let mappedValue be ? Call(mapfn, T, « kValue, k »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -34,4 +34,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(results.length, 2); assert.sameValue(results[0], thisArg); assert.sameValue(results[1], thisArg); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-this-without-thisarg-non-strict.js b/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-this-without-thisarg-non-strict.js index 410c3244db0..6b6535b953d 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-this-without-thisarg-non-strict.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-this-without-thisarg-non-strict.js @@ -15,7 +15,7 @@ info: | c. If mapping is true, then i. Let mappedValue be ? Call(mapfn, T, « kValue, k »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] flags: [noStrict] features: [BigInt, TypedArray] ---*/ @@ -34,4 +34,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(results.length, 2); assert.sameValue(results[0], global); assert.sameValue(results[1], global); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-this-without-thisarg-strict.js b/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-this-without-thisarg-strict.js index f8f0b282fcc..7f92471e550 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-this-without-thisarg-strict.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/mapfn-this-without-thisarg-strict.js @@ -15,7 +15,7 @@ info: | c. If mapping is true, then i. Let mappedValue be ? Call(mapfn, T, « kValue, k »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] flags: [onlyStrict] features: [BigInt, TypedArray] ---*/ @@ -34,4 +34,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(results.length, 2); assert.sameValue(results[0], undefined); assert.sameValue(results[1], undefined); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-empty.js b/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-empty.js index e0cee67e21d..1b278fe8a11 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-empty.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-empty.js @@ -4,7 +4,7 @@ esid: sec-%typedarray%.from description: > Return a new empty TypedArray -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -14,4 +14,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(result.length, 0); assert.sameValue(result.constructor, TA); assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-from-ordinary-object.js b/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-from-ordinary-object.js index 9573521b087..002531cfeca 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-from-ordinary-object.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-from-ordinary-object.js @@ -4,7 +4,7 @@ esid: sec-%typedarray%.from description: > Return a new TypedArray from an ordinary object -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Array.prototype.values, TypedArray] ---*/ @@ -22,4 +22,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(result[1], 44n); assert.sameValue(result.constructor, TA); assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-from-sparse-array.js b/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-from-sparse-array.js index 71e7d1c294e..79116b3a0e5 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-from-sparse-array.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-from-sparse-array.js @@ -4,7 +4,7 @@ esid: sec-%typedarray%.from description: > Throws a TypeError casting undefined value from sparse array to BigInt -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -14,4 +14,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA.from(source); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-using-custom-ctor.js b/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-using-custom-ctor.js index cd012fc88b3..86da1920a50 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-using-custom-ctor.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-using-custom-ctor.js @@ -4,7 +4,7 @@ esid: sec-%typedarray%.from description: > Return a new TypedArray using a custom Constructor -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(result.constructor, TA); assert.sameValue(Object.getPrototypeOf(result), TA.prototype); assert.sameValue(called, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-with-mapfn.js b/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-with-mapfn.js index 600bf2a1fb1..45aa4e48a63 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-with-mapfn.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-with-mapfn.js @@ -4,7 +4,7 @@ esid: sec-%typedarray%.from description: > Return a new TypedArray using mapfn -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -20,4 +20,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(result[2], 84n); assert.sameValue(result.constructor, TA); assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-without-mapfn.js b/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-without-mapfn.js index 1243cb6aa69..f3fb9626022 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-without-mapfn.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/new-instance-without-mapfn.js @@ -4,7 +4,7 @@ esid: sec-%typedarray%.from description: > Return a new TypedArray -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -16,4 +16,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(result[2], 42n); assert.sameValue(result.constructor, TA); assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/property-abrupt-completion.js b/test/built-ins/TypedArrayConstructors/from/BigInt/property-abrupt-completion.js index a3bd8b44617..7d1caf5a873 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/property-abrupt-completion.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/property-abrupt-completion.js @@ -12,7 +12,7 @@ info: | ... b. Let kValue be ? Get(arrayLike, Pk). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(source); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/set-value-abrupt-completion.js b/test/built-ins/TypedArrayConstructors/from/BigInt/set-value-abrupt-completion.js index 7259e8a032f..54966a76219 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/set-value-abrupt-completion.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/set-value-abrupt-completion.js @@ -15,7 +15,7 @@ info: | d. Else, let mappedValue be kValue. e. Perform ? Set(targetObj, Pk, mappedValue, true). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -42,4 +42,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(source); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/source-value-is-symbol-throws.js b/test/built-ins/TypedArrayConstructors/from/BigInt/source-value-is-symbol-throws.js index a81995b294d..aee2fa5d9b0 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/source-value-is-symbol-throws.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/source-value-is-symbol-throws.js @@ -22,7 +22,7 @@ info: | Return NormalCompletion(undefined). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -32,4 +32,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA.from([s]); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/BigInt/this-is-not-constructor.js b/test/built-ins/TypedArrayConstructors/from/BigInt/this-is-not-constructor.js index 711f054a5cf..6c579685138 100644 --- a/test/built-ins/TypedArrayConstructors/from/BigInt/this-is-not-constructor.js +++ b/test/built-ins/TypedArrayConstructors/from/BigInt/this-is-not-constructor.js @@ -10,7 +10,7 @@ info: | 1. Let C be the this value. 2. If IsConstructor(C) is false, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -20,4 +20,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA.from.call(m, []); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/arylk-get-length-error.js b/test/built-ins/TypedArrayConstructors/from/arylk-get-length-error.js index 470d736ceec..e3a530695ce 100644 --- a/test/built-ins/TypedArrayConstructors/from/arylk-get-length-error.js +++ b/test/built-ins/TypedArrayConstructors/from/arylk-get-length-error.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(arrayLike); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/arylk-to-length-error.js b/test/built-ins/TypedArrayConstructors/from/arylk-to-length-error.js index 269bc2de0de..98c78a196b5 100644 --- a/test/built-ins/TypedArrayConstructors/from/arylk-to-length-error.js +++ b/test/built-ins/TypedArrayConstructors/from/arylk-to-length-error.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(arrayLike); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/custom-ctor-does-not-instantiate-ta-throws.js b/test/built-ins/TypedArrayConstructors/from/custom-ctor-does-not-instantiate-ta-throws.js index b3407dfd0e8..5cd2a4361bb 100644 --- a/test/built-ins/TypedArrayConstructors/from/custom-ctor-does-not-instantiate-ta-throws.js +++ b/test/built-ins/TypedArrayConstructors/from/custom-ctor-does-not-instantiate-ta-throws.js @@ -26,4 +26,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA.from.call(ctor, []); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/custom-ctor-returns-other-instance.js b/test/built-ins/TypedArrayConstructors/from/custom-ctor-returns-other-instance.js index 1a6075b897e..8d490623a4c 100644 --- a/test/built-ins/TypedArrayConstructors/from/custom-ctor-returns-other-instance.js +++ b/test/built-ins/TypedArrayConstructors/from/custom-ctor-returns-other-instance.js @@ -27,9 +27,9 @@ var sourceObj = { length: 2 }; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var result; - var custom = new TA(2); + var custom = new TA(makeCtorArg(2)); var ctor = function() { return custom; }; @@ -40,11 +40,11 @@ testWithTypedArrayConstructors(function(TA) { result = TypedArray.from.call(ctor, sourceObj); assert.sameValue(result, custom, "not using iterator, same length"); - custom = new TA(3); + custom = new TA(makeCtorArg(3)); result = TypedArray.from.call(ctor, sourceItor); assert.sameValue(result, custom, "using iterator, higher length"); result = TypedArray.from.call(ctor, sourceObj); assert.sameValue(result, custom, "not using iterator, higher length"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArrayConstructors/from/custom-ctor-returns-smaller-instance-throws.js b/test/built-ins/TypedArrayConstructors/from/custom-ctor-returns-smaller-instance-throws.js index e7c791c664b..afc86638a13 100644 --- a/test/built-ins/TypedArrayConstructors/from/custom-ctor-returns-smaller-instance-throws.js +++ b/test/built-ins/TypedArrayConstructors/from/custom-ctor-returns-smaller-instance-throws.js @@ -26,9 +26,9 @@ var sourceObj = { length: 2 }; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var ctor = function() { - return new TA(1); + return new TA(makeCtorArg(1)); }; assert.throws(TypeError, function() { TA.from.call(ctor, sourceItor); diff --git a/test/built-ins/TypedArrayConstructors/from/custom-ctor.js b/test/built-ins/TypedArrayConstructors/from/custom-ctor.js index 43ea55ccd32..81e47defa86 100644 --- a/test/built-ins/TypedArrayConstructors/from/custom-ctor.js +++ b/test/built-ins/TypedArrayConstructors/from/custom-ctor.js @@ -31,4 +31,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/inherited.js b/test/built-ins/TypedArrayConstructors/from/inherited.js index 4e13af64dc9..5f915ac1355 100644 --- a/test/built-ins/TypedArrayConstructors/from/inherited.js +++ b/test/built-ins/TypedArrayConstructors/from/inherited.js @@ -22,4 +22,4 @@ testWithTypedArrayConstructors(function(TA) { TA.hasOwnProperty("from"), false, "constructor does not define an own property named 'from'" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/invoked-as-func.js b/test/built-ins/TypedArrayConstructors/from/invoked-as-func.js index 1be6f1bc2bd..8b6ca52f7a0 100644 --- a/test/built-ins/TypedArrayConstructors/from/invoked-as-func.js +++ b/test/built-ins/TypedArrayConstructors/from/invoked-as-func.js @@ -20,4 +20,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { from([]); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/iter-access-error.js b/test/built-ins/TypedArrayConstructors/from/iter-access-error.js index 294939b5ca9..08094aa4bfe 100644 --- a/test/built-ins/TypedArrayConstructors/from/iter-access-error.js +++ b/test/built-ins/TypedArrayConstructors/from/iter-access-error.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(iter); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/iter-invoke-error.js b/test/built-ins/TypedArrayConstructors/from/iter-invoke-error.js index 64ba9ac9e1a..d4b9f01211c 100644 --- a/test/built-ins/TypedArrayConstructors/from/iter-invoke-error.js +++ b/test/built-ins/TypedArrayConstructors/from/iter-invoke-error.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(iter); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/iter-next-error.js b/test/built-ins/TypedArrayConstructors/from/iter-next-error.js index e0c04605d06..2a68a097ca7 100644 --- a/test/built-ins/TypedArrayConstructors/from/iter-next-error.js +++ b/test/built-ins/TypedArrayConstructors/from/iter-next-error.js @@ -28,4 +28,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(iter); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/iter-next-value-error.js b/test/built-ins/TypedArrayConstructors/from/iter-next-value-error.js index ff826241831..d304db95d94 100644 --- a/test/built-ins/TypedArrayConstructors/from/iter-next-value-error.js +++ b/test/built-ins/TypedArrayConstructors/from/iter-next-value-error.js @@ -37,4 +37,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(iter); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/mapfn-abrupt-completion.js b/test/built-ins/TypedArrayConstructors/from/mapfn-abrupt-completion.js index 9af6d5bbe91..c446eedc5eb 100644 --- a/test/built-ins/TypedArrayConstructors/from/mapfn-abrupt-completion.js +++ b/test/built-ins/TypedArrayConstructors/from/mapfn-abrupt-completion.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(source, mapfn); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/mapfn-arguments.js b/test/built-ins/TypedArrayConstructors/from/mapfn-arguments.js index 6d102d1b6c8..effa8ccfe7f 100644 --- a/test/built-ins/TypedArrayConstructors/from/mapfn-arguments.js +++ b/test/built-ins/TypedArrayConstructors/from/mapfn-arguments.js @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(results[2].kValue, 44); assert.sameValue(results[2].k, 2); assert.sameValue(results[2].argsLength, 2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/mapfn-is-not-callable.js b/test/built-ins/TypedArrayConstructors/from/mapfn-is-not-callable.js index 1c37d6d533f..66e4babae12 100644 --- a/test/built-ins/TypedArrayConstructors/from/mapfn-is-not-callable.js +++ b/test/built-ins/TypedArrayConstructors/from/mapfn-is-not-callable.js @@ -56,4 +56,4 @@ testWithTypedArrayConstructors(function(TA) { getIterator, 0, "IsCallable(mapfn) check occurs before getting source[@@iterator]" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/mapfn-this-with-thisarg.js b/test/built-ins/TypedArrayConstructors/from/mapfn-this-with-thisarg.js index 2fb965d08c3..21c7119247f 100644 --- a/test/built-ins/TypedArrayConstructors/from/mapfn-this-with-thisarg.js +++ b/test/built-ins/TypedArrayConstructors/from/mapfn-this-with-thisarg.js @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(results.length, 2); assert.sameValue(results[0], thisArg); assert.sameValue(results[1], thisArg); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/mapfn-this-without-thisarg-non-strict.js b/test/built-ins/TypedArrayConstructors/from/mapfn-this-without-thisarg-non-strict.js index 02eeaba113e..c2a054ea550 100644 --- a/test/built-ins/TypedArrayConstructors/from/mapfn-this-without-thisarg-non-strict.js +++ b/test/built-ins/TypedArrayConstructors/from/mapfn-this-without-thisarg-non-strict.js @@ -34,4 +34,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(results.length, 2); assert.sameValue(results[0], global); assert.sameValue(results[1], global); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/mapfn-this-without-thisarg-strict.js b/test/built-ins/TypedArrayConstructors/from/mapfn-this-without-thisarg-strict.js index 61612fa35aa..705358773c4 100644 --- a/test/built-ins/TypedArrayConstructors/from/mapfn-this-without-thisarg-strict.js +++ b/test/built-ins/TypedArrayConstructors/from/mapfn-this-without-thisarg-strict.js @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(results.length, 2); assert.sameValue(results[0], undefined); assert.sameValue(results[1], undefined); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/nan-conversion.js b/test/built-ins/TypedArrayConstructors/from/nan-conversion.js index d4fffa51898..e70e0607385 100644 --- a/test/built-ins/TypedArrayConstructors/from/nan-conversion.js +++ b/test/built-ins/TypedArrayConstructors/from/nan-conversion.js @@ -25,7 +25,7 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var result = TA.from([NaN, undefined]); assert.sameValue(result.length, 2); assert.sameValue(result[0], NaN); @@ -35,7 +35,7 @@ testWithTypedArrayConstructors(function(TA) { }, floatArrayConstructors); -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var result = TA.from([NaN, undefined]); assert.sameValue(result.length, 2); assert.sameValue(result[0], 0); diff --git a/test/built-ins/TypedArrayConstructors/from/new-instance-empty.js b/test/built-ins/TypedArrayConstructors/from/new-instance-empty.js index 28eadb43a2d..89dca79917a 100644 --- a/test/built-ins/TypedArrayConstructors/from/new-instance-empty.js +++ b/test/built-ins/TypedArrayConstructors/from/new-instance-empty.js @@ -14,4 +14,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(result.length, 0); assert.sameValue(result.constructor, TA); assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/new-instance-from-ordinary-object.js b/test/built-ins/TypedArrayConstructors/from/new-instance-from-ordinary-object.js index 159f4cf2e14..81fa075a62d 100644 --- a/test/built-ins/TypedArrayConstructors/from/new-instance-from-ordinary-object.js +++ b/test/built-ins/TypedArrayConstructors/from/new-instance-from-ordinary-object.js @@ -14,7 +14,7 @@ var source = { length: 4 }; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var result = TA.from(source); assert.sameValue(result.length, 4); @@ -27,7 +27,7 @@ testWithTypedArrayConstructors(function(TA) { }, floatArrayConstructors); -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var result = TA.from(source); assert.sameValue(result.length, 4); diff --git a/test/built-ins/TypedArrayConstructors/from/new-instance-from-sparse-array.js b/test/built-ins/TypedArrayConstructors/from/new-instance-from-sparse-array.js index 9d16823857d..c296207e038 100644 --- a/test/built-ins/TypedArrayConstructors/from/new-instance-from-sparse-array.js +++ b/test/built-ins/TypedArrayConstructors/from/new-instance-from-sparse-array.js @@ -10,7 +10,7 @@ features: [Array.prototype.values, TypedArray] var source = [,,42,,44,,]; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var result = TA.from(source); assert.sameValue(result.length, 6); @@ -25,7 +25,7 @@ testWithTypedArrayConstructors(function(TA) { }, floatArrayConstructors); -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var result = TA.from(source); assert.sameValue(result.length, 6); diff --git a/test/built-ins/TypedArrayConstructors/from/new-instance-from-zero.js b/test/built-ins/TypedArrayConstructors/from/new-instance-from-zero.js index c311eff35be..1a4f6b7435d 100644 --- a/test/built-ins/TypedArrayConstructors/from/new-instance-from-zero.js +++ b/test/built-ins/TypedArrayConstructors/from/new-instance-from-zero.js @@ -8,7 +8,7 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var result = TA.from([-0, +0]); assert.sameValue(result.length, 2); assert.sameValue(result[0], -0, "-0 => -0"); @@ -18,7 +18,7 @@ testWithTypedArrayConstructors(function(TA) { }, floatArrayConstructors); -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var result = TA.from([-0, +0]); assert.sameValue(result.length, 2); assert.sameValue(result[0], 0, "-0 => 0"); diff --git a/test/built-ins/TypedArrayConstructors/from/new-instance-using-custom-ctor.js b/test/built-ins/TypedArrayConstructors/from/new-instance-using-custom-ctor.js index 2fe53a328fc..755b670c026 100644 --- a/test/built-ins/TypedArrayConstructors/from/new-instance-using-custom-ctor.js +++ b/test/built-ins/TypedArrayConstructors/from/new-instance-using-custom-ctor.js @@ -27,4 +27,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(result.constructor, TA); assert.sameValue(Object.getPrototypeOf(result), TA.prototype); assert.sameValue(called, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/new-instance-with-mapfn.js b/test/built-ins/TypedArrayConstructors/from/new-instance-with-mapfn.js index ab8da0b98c0..49b01c093ed 100644 --- a/test/built-ins/TypedArrayConstructors/from/new-instance-with-mapfn.js +++ b/test/built-ins/TypedArrayConstructors/from/new-instance-with-mapfn.js @@ -22,4 +22,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(result[2], 84); assert.sameValue(result.constructor, TA); assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/new-instance-without-mapfn.js b/test/built-ins/TypedArrayConstructors/from/new-instance-without-mapfn.js index d7ac6abc2c5..315434867fc 100644 --- a/test/built-ins/TypedArrayConstructors/from/new-instance-without-mapfn.js +++ b/test/built-ins/TypedArrayConstructors/from/new-instance-without-mapfn.js @@ -18,4 +18,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(result[2], 42); assert.sameValue(result.constructor, TA); assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/property-abrupt-completion.js b/test/built-ins/TypedArrayConstructors/from/property-abrupt-completion.js index 74e34ce4811..89b465971af 100644 --- a/test/built-ins/TypedArrayConstructors/from/property-abrupt-completion.js +++ b/test/built-ins/TypedArrayConstructors/from/property-abrupt-completion.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(source); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/set-value-abrupt-completion.js b/test/built-ins/TypedArrayConstructors/from/set-value-abrupt-completion.js index ddde226a2b6..481df9f9c6b 100644 --- a/test/built-ins/TypedArrayConstructors/from/set-value-abrupt-completion.js +++ b/test/built-ins/TypedArrayConstructors/from/set-value-abrupt-completion.js @@ -43,4 +43,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { TA.from(source); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/source-value-is-symbol-throws.js b/test/built-ins/TypedArrayConstructors/from/source-value-is-symbol-throws.js index 75970650a49..687243b9441 100644 --- a/test/built-ins/TypedArrayConstructors/from/source-value-is-symbol-throws.js +++ b/test/built-ins/TypedArrayConstructors/from/source-value-is-symbol-throws.js @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA.from([s]); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/from/this-is-not-constructor.js b/test/built-ins/TypedArrayConstructors/from/this-is-not-constructor.js index 1dab9023556..73cee28c10d 100644 --- a/test/built-ins/TypedArrayConstructors/from/this-is-not-constructor.js +++ b/test/built-ins/TypedArrayConstructors/from/this-is-not-constructor.js @@ -20,4 +20,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA.from.call(m, []); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/desc-value-throws.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/desc-value-throws.js index aa9c1bbb920..c0dcd1c2fb4 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/desc-value-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/desc-value-throws.js @@ -33,7 +33,7 @@ info: | Return NormalCompletion(undefined). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -43,10 +43,10 @@ var obj = { } }; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n])); assert.throws(Test262Error, function() { Object.defineProperty(sample, "0", {value: obj}); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer-throws-realm.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer-throws-realm.js index f9bc46936fb..1b83c029c01 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer-throws-realm.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer-throws-realm.js @@ -18,7 +18,7 @@ info: | [...] 2. If IsDetachedBuffer(O.[[ViewedArrayBuffer]]) is true, return false. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -49,4 +49,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { Object.defineProperty(sample, "-0", desc); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer-throws.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer-throws.js index a01fd2505e1..beda8726bbe 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer-throws.js @@ -17,7 +17,7 @@ info: | [...] 2. If IsDetachedBuffer(O.[[ViewedArrayBuffer]]) is true, return false. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -45,4 +45,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { Object.defineProperty(sample, "-0", desc); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer.js index d591ea7250a..9838a5ac010 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer.js @@ -31,7 +31,7 @@ info: | Perform SetValueInBuffer(buffer, indexedPosition, elementType, numValue, true, Unordered). Return NormalCompletion(undefined). -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray] ---*/ var desc = { @@ -117,4 +117,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { enumerable: true, writable: true }), false, 'Reflect.defineProperty(sample, "6", {configurable: false, enumerable: true, writable: true}) must return false'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-greater-than-last-index.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-greater-than-last-index.js index 31770651467..2a46ff32211 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-greater-than-last-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-greater-than-last-index.js @@ -16,12 +16,12 @@ info: | v. Let length be the value of O's [[ArrayLength]] internal slot. vi. If intIndex ≥ length, return false. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); assert.sameValue( Reflect.defineProperty(sample, "2", { @@ -44,4 +44,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { false, "numericIndex > length" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-lower-than-zero.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-lower-than-zero.js index b2afcf4853c..a34931d9f63 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-lower-than-zero.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-lower-than-zero.js @@ -14,12 +14,12 @@ info: | ii. Let intIndex be numericIndex. iv. If intIndex < 0, return false. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); assert.sameValue( Reflect.defineProperty(sample, "-1", { @@ -31,4 +31,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { false, "-1" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-minus-zero.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-minus-zero.js index a45c75dbe49..8682e8f8885 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-minus-zero.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-minus-zero.js @@ -14,12 +14,12 @@ info: | ii. Let intIndex be numericIndex. iii. If intIndex = -0, return false. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.sameValue( Reflect.defineProperty(sample, "-0", { @@ -33,4 +33,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { ); assert.sameValue(sample[0], 0n, "does not change the value for [0]"); assert.sameValue(sample["-0"], undefined, "does define a value for ['-0']"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-not-canonical-index.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-not-canonical-index.js index 616875f7e0b..041a12282e0 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-not-canonical-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-not-canonical-index.js @@ -13,7 +13,7 @@ info: | ... 4. Return OrdinaryDefineOwnProperty(O, P, Desc). ... -includes: [testBigIntTypedArray.js, propertyHelper.js] +includes: [testTypedArray.js, propertyHelper.js] features: [BigInt, Reflect, TypedArray] ---*/ @@ -95,4 +95,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { ); assert.sameValue(Object.getOwnPropertyDescriptor(sample4, key), undefined); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-not-integer.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-not-integer.js index e4a90f0ec5d..7d821444421 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-not-integer.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-not-integer.js @@ -12,12 +12,12 @@ info: | b. If numericIndex is not undefined, then i. If IsInteger(numericIndex) is false, return false. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.sameValue( Reflect.defineProperty(sample, "0.1", { @@ -121,4 +121,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { "'-Infinity' - does not define a value for ['-Infinity']" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-not-numeric-index-throws.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-not-numeric-index-throws.js index 633390385f1..a23677333fd 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-not-numeric-index-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-not-numeric-index-throws.js @@ -19,12 +19,12 @@ info: | 3. If ! IsIntegralNumber(index) is false, return false. 4. If index is -0𝔽, return false. 5. If ℝ(index) < 0 or ℝ(index) ≥ O.[[ArrayLength]], return false. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([0n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0n])); var desc = Object.getOwnPropertyDescriptor(sample, "0"); assert.throws(TypeError, function() { @@ -42,4 +42,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { Object.defineProperty(sample, "-0", desc); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-not-numeric-index.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-not-numeric-index.js index b68c6553ca0..6a92f54ac0a 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-not-numeric-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-not-numeric-index.js @@ -13,12 +13,12 @@ info: | ... 4. Return OrdinaryDefineOwnProperty(O, P, Desc). ... -includes: [testBigIntTypedArray.js, propertyHelper.js] +includes: [testTypedArray.js, propertyHelper.js] features: [BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); assert.sameValue( Reflect.defineProperty(sample, "foo", {value:42}), @@ -49,4 +49,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(desc.set, fnset, "accessor's set"); verifyNotEnumerable(sample, "bar"); verifyConfigurable(sample, "bar"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-accessor-desc-throws.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-accessor-desc-throws.js index bb275cdd810..12d11aecd4f 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-accessor-desc-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-accessor-desc-throws.js @@ -13,12 +13,12 @@ info: | b. If numericIndex is not undefined, then [...] iv. If IsAccessorDescriptor(Desc) is true, return false. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([0n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0n])); assert.throws(TypeError, function() { Object.defineProperty(sample, "0", { @@ -41,4 +41,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); }, "get and set accessors"); assert.sameValue(sample[0], 0n, "get and set accessors - side effect check"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-accessor-desc.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-accessor-desc.js index 4b4b60ffd6f..b87fc1babfe 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-accessor-desc.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-accessor-desc.js @@ -14,12 +14,12 @@ info: | ... vii. If IsAccessorDescriptor(Desc) is true, return false. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.sameValue( Reflect.defineProperty(sample, "0", { @@ -55,4 +55,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { "get and set accessors" ); assert.sameValue(sample[0], 0n, "get and set accessors - side effect check"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-configurable.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-configurable.js index fc2137dc409..66d8d765f5e 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-configurable.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-configurable.js @@ -15,12 +15,12 @@ info: | Let value be Desc.[[Value]]. Return ? IntegerIndexedElementSet(O, numericIndex, value). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.sameValue( Reflect.defineProperty(sample, "0", { @@ -33,4 +33,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { "defineProperty's result" ); assert.sameValue(sample[0], 42n, "side effect check"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-configurable-throws.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-configurable-throws.js index 125ff8536a4..3ce20bcf882 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-configurable-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-configurable-throws.js @@ -13,12 +13,12 @@ info: | b. If numericIndex is not undefined, then [...] ii. If Desc has a [[Configurable]] field and if Desc.[[Configurable]] is false, return false. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([0n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0n])); assert.throws(TypeError, function() { Object.defineProperty(sample, "0", { @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }, "complete descriptor"); assert.sameValue(sample[0], 0n, "side effect check"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-enumerable-throws.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-enumerable-throws.js index 40f82e29f87..d0992d03407 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-enumerable-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-enumerable-throws.js @@ -13,12 +13,12 @@ info: | b. If numericIndex is not undefined, then [...] iii. If Desc has an [[Enumerable]] field and if Desc.[[Enumerable]] is false, return false. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([0n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0n])); assert.throws(TypeError, function() { Object.defineProperty(sample, "0", { @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }, "complete descriptor"); assert.sameValue(sample[0], 0n, "side effect check"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-enumerable.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-enumerable.js index 4b46693b01e..d7fb2b6f5be 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-enumerable.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-enumerable.js @@ -14,12 +14,12 @@ info: | ix. If Desc has an [[Enumerable]] field and if Desc.[[Enumerable]] is false, return false. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.sameValue( Reflect.defineProperty(sample, "0", { @@ -32,4 +32,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { "defineProperty's result" ); assert.sameValue(sample[0], 0n, "side effect check"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-writable-throws.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-writable-throws.js index 91121b09616..a0932f07aa7 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-writable-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-writable-throws.js @@ -13,12 +13,12 @@ info: | b. If numericIndex is not undefined, then [...] v. If Desc has a [[Writable]] field and if Desc.[[Writable]] is false, return false. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([0n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0n])); assert.throws(TypeError, function() { Object.defineProperty(sample, "0", { @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }, "complete descriptor"); assert.sameValue(sample[0], 0n, "side effect check"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-writable.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-writable.js index 8e7bdf4d561..5bc0147c55a 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-writable.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-writable.js @@ -14,12 +14,12 @@ info: | x. If Desc has a [[Writable]] field and if Desc.[[Writable]] is false, return false. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.sameValue( Reflect.defineProperty(sample, "0", { @@ -32,4 +32,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { "defineProperty's result" ); assert.sameValue(sample[0], 0n, "side effect check"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex.js index 4543aa61c7f..42dd225d347 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex.js @@ -16,11 +16,11 @@ info: | Return ? IntegerIndexedElementSet(O, numericIndex, value). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 42n])); assert.sameValue(Reflect.defineProperty(sample, '0', { value: 8n, @@ -35,4 +35,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(desc.configurable, true, 'The value of desc.configurable is true'); assert.sameValue(desc.enumerable, true, 'The value of desc.enumerable is true'); assert.sameValue(desc.writable, true, 'The value of desc.writable is true'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-symbol.js index 08c9d10647b..837d7fedbcd 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-symbol.js @@ -11,12 +11,12 @@ info: | ... 4. Return OrdinaryDefineOwnProperty(O, P, Desc). ... -includes: [testBigIntTypedArray.js, propertyHelper.js] +includes: [testTypedArray.js, propertyHelper.js] features: [BigInt, Reflect, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); var s1 = Symbol("foo"); assert.sameValue( @@ -51,4 +51,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(desc.set, fnset, "accessor's set"); assert.sameValue(desc.enumerable, true); verifyNotConfigurable(sample, s2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/non-extensible-new-key.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/non-extensible-new-key.js index d3b2694fbff..373e1763b4d 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/non-extensible-new-key.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/non-extensible-new-key.js @@ -13,12 +13,12 @@ info: | ... 4. Return OrdinaryDefineOwnProperty(O, P, Desc). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); Object.preventExtensions(sample); assert.sameValue( @@ -41,4 +41,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { ); assert.sameValue(Object.getOwnPropertyDescriptor(sample, "bar"), undefined); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/non-extensible-redefine-key.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/non-extensible-redefine-key.js index 81c7894db4c..8f1db526f67 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/non-extensible-redefine-key.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/non-extensible-redefine-key.js @@ -13,12 +13,12 @@ info: | ... 4. Return OrdinaryDefineOwnProperty(O, P, Desc). ... -includes: [testBigIntTypedArray.js, propertyHelper.js] +includes: [testTypedArray.js, propertyHelper.js] features: [BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); sample.foo = true; sample.bar = true; @@ -54,4 +54,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(desc.set, fnset, "accessor's set"); verifyNotEnumerable(sample, "bar"); verifyNotConfigurable(sample, "bar"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/set-value.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/set-value.js index 64a850bdd6e..ad5d0a338e2 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/set-value.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/set-value.js @@ -31,12 +31,12 @@ info: | Perform SetValueInBuffer(buffer, indexedPosition, elementType, numValue, true, Unordered). Return NormalCompletion(undefined). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([0n, 0n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0n, 0n])); assert.sameValue( Reflect.defineProperty(sample, "0", {value: 1n}), @@ -52,4 +52,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(sample[0], 1n, "sample[0]"); assert.sameValue(sample[1], 2n, "sample[1]"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/this-is-not-extensible.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/this-is-not-extensible.js index df15ab55646..73c31f6ff38 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/this-is-not-extensible.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/this-is-not-extensible.js @@ -13,12 +13,12 @@ info: | ... 4. Return OrdinaryDefineOwnProperty(O, P, Desc). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); Object.preventExtensions(sample); @@ -28,4 +28,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { var s = Symbol("1"); assert.sameValue(Reflect.defineProperty(sample, s, {value:42}), false); assert.sameValue(Reflect.getOwnPropertyDescriptor(sample, s), undefined); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/tonumber-value-detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/tonumber-value-detached-buffer.js index fc4fc5406bf..e8638467a8b 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/tonumber-value-detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/tonumber-value-detached-buffer.js @@ -34,7 +34,7 @@ info: | Perform SetValueInBuffer(buffer, indexedPosition, elementType, numValue, true, Unordered). Return NormalCompletion(undefined). -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { @@ -56,4 +56,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { ); assert.sameValue(ta[0], undefined, 'The value of ta[0] is expected to equal `undefined`'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/conversion-operation-consistent-nan.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/conversion-operation-consistent-nan.js index f1962a00d81..26b4b1a31c4 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/conversion-operation-consistent-nan.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/conversion-operation-consistent-nan.js @@ -68,14 +68,14 @@ includes: [nans.js, testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(FA) { +testWithTypedArrayConstructors(function(FA, makeCtorArg) { var precision = floatTypedArrayConstructorPrecision(FA); - var samples = new FA(1); + var samples = new FA(makeCtorArg(1)); var controls, idx, aNaN; for (idx = 0; idx < NaNs.length; ++idx) { aNaN = NaNs[idx]; - controls = new FA([aNaN, aNaN, aNaN]); + controls = new FA(makeCtorArg([aNaN, aNaN, aNaN])); Object.defineProperty(samples, "0", { value: aNaN }); @@ -94,5 +94,4 @@ testWithTypedArrayConstructors(function(FA) { ); } } -}, floatArrayConstructors); - +}, floatArrayConstructors, null, ["immutable"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/desc-value-throws.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/desc-value-throws.js index ecfcee533d0..2f4d3a35ec2 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/desc-value-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/desc-value-throws.js @@ -41,10 +41,10 @@ var obj = { } }; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42])); assert.throws(Test262Error, function() { Object.defineProperty(sample, "0", {value: obj}); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer-throws-realm.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer-throws-realm.js index 38253b8cf62..71c9efde783 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer-throws-realm.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer-throws-realm.js @@ -49,4 +49,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { Object.defineProperty(sample, "-0", desc); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer-throws.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer-throws.js index e5f127cd763..4ff06f327bd 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer-throws.js @@ -45,4 +45,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { Object.defineProperty(sample, "-0", desc); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer.js index f58dcdfe35a..74a15e57b50 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer.js @@ -138,4 +138,4 @@ testWithTypedArrayConstructors(function(TA) { false, 'Reflect.defineProperty(sample, "6", {configurable: false, enumerable: true, writable: true}) must return false' ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-greater-than-last-index.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-greater-than-last-index.js index afb5672b994..7ab2fe146d8 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-greater-than-last-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-greater-than-last-index.js @@ -20,8 +20,8 @@ includes: [testTypedArray.js] features: [Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); assert.sameValue( Reflect.defineProperty(sample, "2", { @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA) { false, "numericIndex > length" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-lower-than-zero.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-lower-than-zero.js index ba21aec9c5e..9cb0a2259fd 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-lower-than-zero.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-lower-than-zero.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); assert.sameValue( Reflect.defineProperty(sample, "-1", { @@ -31,4 +31,4 @@ testWithTypedArrayConstructors(function(TA) { false, "-1" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-minus-zero.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-minus-zero.js index c891f5cc1a6..d8197312090 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-minus-zero.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-minus-zero.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.sameValue( Reflect.defineProperty(sample, "-0", { @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { ); assert.sameValue(sample[0], 0, "does not change the value for [0]"); assert.sameValue(sample["-0"], undefined, "does define a value for ['-0']"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-canonical-index.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-canonical-index.js index 193d9166566..66eb3ad395e 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-canonical-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-canonical-index.js @@ -95,4 +95,4 @@ testWithTypedArrayConstructors(function(TA) { ); assert.sameValue(Object.getOwnPropertyDescriptor(sample4, key), undefined); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-integer.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-integer.js index b30fc17ece9..7c2b5592e4b 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-integer.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-integer.js @@ -16,8 +16,8 @@ includes: [testTypedArray.js] features: [Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.sameValue( Reflect.defineProperty(sample, "0.1", { @@ -121,4 +121,4 @@ testWithTypedArrayConstructors(function(TA) { "'-Infinity' - does not define a value for ['-Infinity']" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-numeric-index-throws.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-numeric-index-throws.js index 060565d3954..35a074bf5d1 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-numeric-index-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-numeric-index-throws.js @@ -23,8 +23,8 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([0]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0])); var desc = Object.getOwnPropertyDescriptor(sample, "0"); assert.throws(TypeError, function() { @@ -42,4 +42,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { Object.defineProperty(sample, "-0", desc); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-numeric-index.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-numeric-index.js index 845a9afbe29..e22db7397d3 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-numeric-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-numeric-index.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js, propertyHelper.js] features: [Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); assert.sameValue( Reflect.defineProperty(sample, "foo", {value:42}), @@ -49,4 +49,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(desc.set, fnset, "accessor's set"); verifyNotEnumerable(sample, "bar"); verifyConfigurable(sample, "bar"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-accessor-desc-throws.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-accessor-desc-throws.js index 3f0e4573aeb..5a573188f94 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-accessor-desc-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-accessor-desc-throws.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([0]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0])); assert.throws(TypeError, function() { Object.defineProperty(sample, "0", { @@ -41,4 +41,4 @@ testWithTypedArrayConstructors(function(TA) { }); }, "get and set accessors"); assert.sameValue(sample[0], 0, "get and set accessors - side effect check"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-accessor-desc.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-accessor-desc.js index 5d8be8a2a65..f7fd66d408a 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-accessor-desc.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-accessor-desc.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.sameValue( Reflect.defineProperty(sample, "0", { @@ -55,4 +55,4 @@ testWithTypedArrayConstructors(function(TA) { "get and set accessors" ); assert.sameValue(sample[0], 0, "get and set accessors - side effect check"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-configurable.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-configurable.js index f379b5c9d5f..7a385a3fd0f 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-configurable.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-configurable.js @@ -19,8 +19,8 @@ includes: [testTypedArray.js] features: [Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.sameValue( Reflect.defineProperty(sample, "0", { @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { "defineProperty's result" ); assert.sameValue(sample[0], 42, "side effect check"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-configurable-throws.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-configurable-throws.js index 8f436bc3e5e..898cf1abca7 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-configurable-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-configurable-throws.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([0]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0])); assert.throws(TypeError, function() { Object.defineProperty(sample, "0", { @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { }, "complete descriptor"); assert.sameValue(sample[0], 0, "side effect check"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-enumerable-throws.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-enumerable-throws.js index d5c1dc3cc83..cf0b3f1a3ce 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-enumerable-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-enumerable-throws.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([0]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0])); assert.throws(TypeError, function() { Object.defineProperty(sample, "0", { @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { }, "complete descriptor"); assert.sameValue(sample[0], 0, "side effect check"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-enumerable.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-enumerable.js index 09526d11f77..43ebb77ec94 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-enumerable.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-enumerable.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.sameValue( Reflect.defineProperty(sample, "0", { @@ -32,4 +32,4 @@ testWithTypedArrayConstructors(function(TA) { "defineProperty's result" ); assert.sameValue(sample[0], 0, "side effect check"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-writable-throws.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-writable-throws.js index 36813645ccf..70507812b72 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-writable-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-writable-throws.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([0]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0])); assert.throws(TypeError, function() { Object.defineProperty(sample, "0", { @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { }, "complete descriptor"); assert.sameValue(sample[0], 0, "side effect check"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-writable.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-writable.js index 08c9a1b3a72..9be636eecac 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-writable.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-writable.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(2)); assert.sameValue( Reflect.defineProperty(sample, "0", { @@ -32,4 +32,4 @@ testWithTypedArrayConstructors(function(TA) { "defineProperty's result" ); assert.sameValue(sample[0], 0, "side effect check"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex.js index 1adfaf60373..a91a2e3ddea 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex.js @@ -23,8 +23,8 @@ includes: [testTypedArray.js] features: [Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 42])); assert.sameValue( Reflect.defineProperty(sample, "0", { @@ -42,4 +42,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(descriptor0.configurable, true); assert.sameValue(descriptor0.enumerable, true); assert.sameValue(descriptor0.writable, true); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-symbol.js index c5cff6eee32..c0ca5d0a2da 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-symbol.js @@ -15,8 +15,8 @@ includes: [testTypedArray.js, propertyHelper.js] features: [Reflect, Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); var s1 = Symbol("foo"); assert.sameValue( @@ -51,4 +51,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(desc.set, fnset, "accessor's set"); assert.sameValue(desc.enumerable, true); verifyNotConfigurable(sample, s2); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/non-extensible-new-key.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/non-extensible-new-key.js index e74c95f12f5..21d8fede075 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/non-extensible-new-key.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/non-extensible-new-key.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js] features: [Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); Object.preventExtensions(sample); assert.sameValue( @@ -41,4 +41,4 @@ testWithTypedArrayConstructors(function(TA) { ); assert.sameValue(Object.getOwnPropertyDescriptor(sample, "bar"), undefined); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/non-extensible-redefine-key.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/non-extensible-redefine-key.js index a0baaf57e54..bc17c944ed3 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/non-extensible-redefine-key.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/non-extensible-redefine-key.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js, propertyHelper.js] features: [Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); sample.foo = true; sample.bar = true; @@ -54,4 +54,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(desc.set, fnset, "accessor's set"); verifyNotEnumerable(sample, "bar"); verifyNotConfigurable(sample, "bar"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/set-value.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/set-value.js index fe155ced1b9..c3b4edcd003 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/set-value.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/set-value.js @@ -35,8 +35,8 @@ includes: [testTypedArray.js] features: [Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([0, 0]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([0, 0])); assert.sameValue( Reflect.defineProperty(sample, "0", {value: 1}), @@ -52,4 +52,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(sample[0], 1, "sample[0]"); assert.sameValue(sample[1], 2, "sample[1]"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/this-is-not-extensible.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/this-is-not-extensible.js index 5e586c7759d..7fa04d17729 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/this-is-not-extensible.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/this-is-not-extensible.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js] features: [Reflect, Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); Object.preventExtensions(sample); @@ -28,4 +28,4 @@ testWithTypedArrayConstructors(function(TA) { var s = Symbol("1"); assert.sameValue(Reflect.defineProperty(sample, s, {value:42}), false); assert.sameValue(Reflect.getOwnPropertyDescriptor(sample, s), undefined); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/tonumber-value-detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/tonumber-value-detached-buffer.js index 0612728344b..8167c4941d7 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/tonumber-value-detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/tonumber-value-detached-buffer.js @@ -58,5 +58,4 @@ testWithTypedArrayConstructors(function(TA) { 'Reflect.defineProperty(ta, 0, {value: {valueOf() {$DETACHBUFFER(ta.buffer); return 42;}}} ) must return true' ); assert.sameValue(ta[0], undefined, 'The value of ta[0] is expected to equal `undefined`'); -}); - +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/detached-buffer-key-is-not-numeric-index.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/detached-buffer-key-is-not-numeric-index.js index 40358534c97..fe3d346fa63 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/detached-buffer-key-is-not-numeric-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/detached-buffer-key-is-not-numeric-index.js @@ -16,7 +16,7 @@ info: | If IsDetachedBuffer(O.[[ViewedArrayBuffer]]) is true, return true. ... Return ? OrdinaryDelete(O, P) -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(delete sample.string, true, 'The value of `delete sample.string` is true'); assert.sameValue(delete sample.undef, true, 'The value of `delete sample.undef` is true'); assert.sameValue(delete sample[0], true, 'The value of `delete sample[0]` is true'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/detached-buffer-key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/detached-buffer-key-is-symbol.js index 1f62ae3f653..ccd1a96b08d 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/detached-buffer-key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/detached-buffer-key-is-symbol.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { sample[s] = 1; assert.sameValue(delete sample[s], true, 'The value of `delete sample[s]` is true'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/detached-buffer-realm.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/detached-buffer-realm.js index cd3eb985f9d..8ee182ad3fc 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/detached-buffer-realm.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/detached-buffer-realm.js @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { $DETACHBUFFER(sample.buffer); assert.sameValue(delete sample[0], true, 'The value of `delete sample[0]` is true'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/detached-buffer.js index f516f2a5e7f..869dec4467e 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/detached-buffer.js @@ -15,7 +15,7 @@ info: | If numericIndex is not undefined, then If IsDetachedBuffer(O.[[ViewedArrayBuffer]]) is true, return true. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -28,4 +28,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(delete sample["-1"], true, 'The value of `delete sample["-1"]` is true'); assert.sameValue(delete sample["1"], true, 'The value of `delete sample["1"]` is true'); assert.sameValue(delete sample["2"], true, 'The value of `delete sample["2"]` is true'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-ab-non-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-ab-non-strict.js index 70e14499841..fd6a510f80a 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-ab-non-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-ab-non-strict.js @@ -18,11 +18,11 @@ info: | Return false. ... flags: [noStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { let proto = TypedArray.prototype; let descriptorGetterThrows = { configurable: true, @@ -35,7 +35,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { ["1"]: descriptorGetterThrows, }); - let sample = new TA(2); + let sample = new TA(makeCtorArg(2)); assert.sameValue(delete sample["0"], false, 'The value of `delete sample["0"]` is false'); assert.sameValue(delete sample[0], false, 'The value of `delete sample[0]` is false'); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-ab-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-ab-strict.js index 140206bf7c3..31ec04f12f0 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-ab-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-ab-strict.js @@ -18,11 +18,11 @@ info: | Return false. ... flags: [onlyStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { let proto = TypedArray.prototype; let descriptorGetterThrows = { configurable: true, @@ -35,7 +35,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { ["1"]: descriptorGetterThrows, }); - let sample = new TA(2); + let sample = new TA(makeCtorArg(2)); assert.throws(TypeError, () => { delete sample["0"]; diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-sab-non-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-sab-non-strict.js index 3e1f355fee7..7b86533a93a 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-sab-non-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-sab-non-strict.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(delete sample[0], false, 'The value of `delete sample["0"]` is false'); assert.sameValue(delete sample["1"], false, 'The value of `delete sample["1"]` is false'); assert.sameValue(delete sample[1], false, 'The value of `delete sample["1"]` is false'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-sab-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-sab-strict.js index c14e26dd088..d2f8ddc756a 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-sab-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-sab-strict.js @@ -37,4 +37,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, () => { delete sample[1]; }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/infinity-detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/infinity-detached-buffer.js index c654bd6b5a7..993f9d6f819 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/infinity-detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/infinity-detached-buffer.js @@ -21,7 +21,7 @@ info: | If SameValue(! ToString(n), argument) is false, return undefined. Return n. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -30,4 +30,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { $DETACHBUFFER(sample.buffer); assert.sameValue(delete sample.Infinity, true, 'The value of `delete sample.Infinity` is true'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-canonical-index-non-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-canonical-index-non-strict.js index 440648aee9c..360bf946a44 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-canonical-index-non-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-canonical-index-non-strict.js @@ -19,7 +19,7 @@ info: | ... Return ? OrdinaryDelete(O, P). flags: [noStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -64,4 +64,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { delete TypedArray.prototype[key]; }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-canonical-index-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-canonical-index-strict.js index 0732874a0a7..1c011386453 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-canonical-index-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-canonical-index-strict.js @@ -19,7 +19,7 @@ info: | ... Return ? OrdinaryDelete(O, P). flags: [onlyStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -63,4 +63,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { delete TypedArray.prototype[key]; }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-minus-zero-non-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-minus-zero-non-strict.js index 94066d866cc..8c2a8d8301b 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-minus-zero-non-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-minus-zero-non-strict.js @@ -25,11 +25,11 @@ info: | If ! IsValidIntegerIndex(O, index) is false, return undefined. ... flags: [noStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { let proto = TypedArray.prototype; Object.defineProperty(proto, "-0", { configurable: true, @@ -37,8 +37,8 @@ testWithBigIntTypedArrayConstructors(function(TA) { throw new Test262Error("OrdinaryGet was called!"); } }); - let sample = new TA(1); + let sample = new TA(makeCtorArg(1)); assert.sameValue(delete sample["-0"], true, 'The value of `delete sample["-0"]` is true'); assert.sameValue(delete sample[-0], false, 'The value of `delete sample[-0]` is false'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-minus-zero-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-minus-zero-strict.js index 632f565e76b..04ec904c144 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-minus-zero-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-minus-zero-strict.js @@ -25,11 +25,11 @@ info: | If ! IsValidIntegerIndex(O, index) is false, return undefined. ... flags: [onlyStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { let proto = TypedArray.prototype; Object.defineProperty(proto, "-0", { configurable: true, @@ -37,10 +37,10 @@ testWithBigIntTypedArrayConstructors(function(TA) { throw new Test262Error("OrdinaryGet was called!"); } }); - let sample = new TA(1); + let sample = new TA(makeCtorArg(1)); assert.sameValue(delete sample["-0"], true, 'The value of `delete sample["-0"]` is true'); assert.throws(TypeError, () => { delete sample[-0]; }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-numeric-index-get-throws.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-numeric-index-get-throws.js index b627c94ca98..21306834400 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-numeric-index-get-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-numeric-index-get-throws.js @@ -19,12 +19,12 @@ info: | ... Return ? OrdinaryDelete(O, P). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - let sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + let sample = new TA(makeCtorArg(1)); Object.defineProperty(sample, "foo", { get() { @@ -35,4 +35,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, () => { sample.foo; }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-numeric-index-non-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-numeric-index-non-strict.js index d707ea72423..2e78eaf1f6c 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-numeric-index-non-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-numeric-index-non-strict.js @@ -19,13 +19,13 @@ info: | ... Return ? OrdinaryDelete(O, P). flags: [noStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { TypedArray.prototype.baz = "baz"; - let sample = new TA(1); + let sample = new TA(makeCtorArg(1)); assert.sameValue( delete sample.foo, true, @@ -41,4 +41,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(delete sample.bar, false, 'The value of `delete sample.bar` is false'); assert.sameValue(delete sample.baz, true, 'The value of `delete sample.baz` is true'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-numeric-index-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-numeric-index-strict.js index 8405f1af551..9cb02ad7a42 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-numeric-index-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-not-numeric-index-strict.js @@ -19,13 +19,13 @@ info: | ... Return ? OrdinaryDelete(O, P). flags: [onlyStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { TypedArray.prototype.baz = "baz"; - let sample = new TA(1); + let sample = new TA(makeCtorArg(1)); assert.sameValue( delete sample.foo, true, @@ -44,4 +44,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(delete sample.baz, true, 'The value of `delete sample.baz` is true'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-out-of-bounds-non-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-out-of-bounds-non-strict.js index 8f68d69bdca..c5e16fc84d9 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-out-of-bounds-non-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-out-of-bounds-non-strict.js @@ -20,11 +20,11 @@ info: | Return ? OrdinaryDelete(O, P). flags: [noStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { let proto = TypedArray.prototype; let descriptorGetterThrows = { configurable: true, @@ -37,7 +37,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { ["1"]: descriptorGetterThrows, }); - let sample = new TA(1); + let sample = new TA(makeCtorArg(1)); assert.sameValue(delete sample["-1"], true, 'The value of `delete sample["-1"]` is true'); assert.sameValue(delete sample[-1], true, 'The value of `delete sample[-1]` is true'); assert.sameValue(delete sample["0"], false, 'The value of `delete sample["0"]` is false'); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-out-of-bounds-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-out-of-bounds-strict.js index bff67c0e04f..b0e89e7b4d8 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-out-of-bounds-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-out-of-bounds-strict.js @@ -20,11 +20,11 @@ info: | Return ? OrdinaryDelete(O, P). flags: [onlyStrict] -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { let proto = TypedArray.prototype; let descriptorGetterThrows = { configurable: true, @@ -37,7 +37,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { ["1"]: descriptorGetterThrows, }); - let sample = new TA(1); + let sample = new TA(makeCtorArg(1)); assert.sameValue(delete sample["-1"], true, 'The value of `delete sample["-1"]` is true'); assert.sameValue(delete sample[-1], true, 'The value of `delete sample[-1]` is true'); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-symbol.js index 014165b973a..36f4d49db9f 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/BigInt/key-is-symbol.js @@ -14,12 +14,12 @@ info: | ... Return ? OrdinaryDelete(O, P). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - let sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + let sample = new TA(makeCtorArg(1)); let s = Symbol("1"); assert.sameValue(delete sample[s], true, 'The value of `delete sample[s]` is true'); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/detached-buffer-key-is-not-numeric-index.js b/test/built-ins/TypedArrayConstructors/internals/Delete/detached-buffer-key-is-not-numeric-index.js index 5bad57b2e4d..627e607134c 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/detached-buffer-key-is-not-numeric-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/detached-buffer-key-is-not-numeric-index.js @@ -31,4 +31,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(delete sample.undef, true, 'The value of `delete sample.undef` is true'); assert.sameValue(delete sample[key], true, 'The value of `delete sample.string` is true'); assert.sameValue(delete sample["undef"], true, 'The value of `delete sample.undef` is true'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/detached-buffer-key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/Delete/detached-buffer-key-is-symbol.js index 1f62ae3f653..ccd1a96b08d 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/detached-buffer-key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/detached-buffer-key-is-symbol.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { sample[s] = 1; assert.sameValue(delete sample[s], true, 'The value of `delete sample[s]` is true'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/detached-buffer-realm.js b/test/built-ins/TypedArrayConstructors/internals/Delete/detached-buffer-realm.js index cd3eb985f9d..8ee182ad3fc 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/detached-buffer-realm.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/detached-buffer-realm.js @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { $DETACHBUFFER(sample.buffer); assert.sameValue(delete sample[0], true, 'The value of `delete sample[0]` is true'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/Delete/detached-buffer.js index 64adf3eb7db..c9bb5a83077 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/detached-buffer.js @@ -28,4 +28,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(delete sample["-1"], true, 'The value of `delete sample["-1"]` is true'); assert.sameValue(delete sample["1"], true, 'The value of `delete sample["1"]` is true'); assert.sameValue(delete sample["2"], true, 'The value of `delete sample["2"]` is true'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-ab-non-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-ab-non-strict.js index 4ebaf4b4a52..ef0071fc8b7 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-ab-non-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-ab-non-strict.js @@ -22,7 +22,7 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { let proto = TypedArray.prototype; let descriptorGetterThrows = { configurable: true, @@ -35,7 +35,7 @@ testWithTypedArrayConstructors(function(TA) { ["1"]: descriptorGetterThrows, }); - let sample = new TA(2); + let sample = new TA(makeCtorArg(2)); assert.sameValue(delete sample["0"], false, 'The value of `delete sample["0"]` is false'); assert.sameValue(delete sample[0], false, 'The value of `delete sample[0]` is false'); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-ab-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-ab-strict.js index 6947cbc890a..6b1f0d2ef0b 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-ab-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-ab-strict.js @@ -22,7 +22,7 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { let proto = TypedArray.prototype; let descriptorGetterThrows = { configurable: true, @@ -35,7 +35,7 @@ testWithTypedArrayConstructors(function(TA) { ["1"]: descriptorGetterThrows, }); - let sample = new TA(2); + let sample = new TA(makeCtorArg(2)); assert.throws(TypeError, () => { delete sample["0"]; diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-sab-non-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-sab-non-strict.js index 3e1f355fee7..7b86533a93a 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-sab-non-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-sab-non-strict.js @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(delete sample[0], false, 'The value of `delete sample["0"]` is false'); assert.sameValue(delete sample["1"], false, 'The value of `delete sample["1"]` is false'); assert.sameValue(delete sample[1], false, 'The value of `delete sample["1"]` is false'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-sab-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-sab-strict.js index c14e26dd088..d2f8ddc756a 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-sab-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-sab-strict.js @@ -37,4 +37,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, () => { delete sample[1]; }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/infinity-detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/Delete/infinity-detached-buffer.js index 72e5e99fa3b..8abd2a2ce03 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/infinity-detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/infinity-detached-buffer.js @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { $DETACHBUFFER(sample.buffer); assert.sameValue(delete sample.Infinity, true, 'The value of `delete sample.Infinity` is true'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-canonical-index-non-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-canonical-index-non-strict.js index 620e0a37114..228ac32e3f6 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-canonical-index-non-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-canonical-index-non-strict.js @@ -64,4 +64,4 @@ testWithTypedArrayConstructors(function(TA) { delete TypedArray.prototype[key]; }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-canonical-index-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-canonical-index-strict.js index 16ab4397817..06974366ecf 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-canonical-index-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-canonical-index-strict.js @@ -63,4 +63,4 @@ testWithTypedArrayConstructors(function(TA) { delete TypedArray.prototype[key]; }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-integer.js b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-integer.js index 1f181fbee4e..f94299e5f4d 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-integer.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-integer.js @@ -27,7 +27,7 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { let proto = TypedArray.prototype; Object.defineProperty(proto, "1.1", { configurable: true, @@ -35,8 +35,8 @@ testWithTypedArrayConstructors(function(TA) { throw new Test262Error("OrdinaryGet was called!"); } }); - let sample = new TA(1); + let sample = new TA(makeCtorArg(1)); assert.sameValue(delete sample["1.1"], true, 'The value of `delete sample["1.1"]` is true'); assert.sameValue(delete sample[1.1], true, 'The value of `delete sample[1.1]` is true'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-minus-zero-non-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-minus-zero-non-strict.js index aedbbbc5a94..dda8910e955 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-minus-zero-non-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-minus-zero-non-strict.js @@ -29,7 +29,7 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { let proto = TypedArray.prototype; Object.defineProperty(proto, "-0", { configurable: true, @@ -37,8 +37,8 @@ testWithTypedArrayConstructors(function(TA) { throw new Test262Error("OrdinaryGet was called!"); } }); - let sample = new TA(1); + let sample = new TA(makeCtorArg(1)); assert.sameValue(delete sample["-0"], true, 'The value of `delete sample["-0"]` is true'); assert.sameValue(delete sample[-0], false, 'The value of `delete sample[-0]` is false'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-minus-zero-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-minus-zero-strict.js index c13080dc101..d9300768792 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-minus-zero-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-minus-zero-strict.js @@ -29,7 +29,7 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { let proto = TypedArray.prototype; Object.defineProperty(proto, "-0", { configurable: true, @@ -37,10 +37,10 @@ testWithTypedArrayConstructors(function(TA) { throw new Test262Error("OrdinaryGet was called!"); } }); - let sample = new TA(1); + let sample = new TA(makeCtorArg(1)); assert.sameValue(delete sample["-0"], true, 'The value of `delete sample["-0"]` is true'); assert.throws(TypeError, () => { delete sample[-0]; }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-numeric-index-get-throws.js b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-numeric-index-get-throws.js index 1b9badead43..ce81abbffd7 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-numeric-index-get-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-numeric-index-get-throws.js @@ -23,8 +23,8 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - let sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + let sample = new TA(makeCtorArg(1)); Object.defineProperty(sample, "foo", { get() { @@ -35,4 +35,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, () => { sample.foo; }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-numeric-index-non-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-numeric-index-non-strict.js index 24c46e23b3e..63e76ed7870 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-numeric-index-non-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-numeric-index-non-strict.js @@ -23,9 +23,9 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { TypedArray.prototype.baz = "baz"; - let sample = new TA(1); + let sample = new TA(makeCtorArg(1)); assert.sameValue( delete sample.foo, true, @@ -41,4 +41,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(delete sample.bar, false, 'The value of `delete sample.bar` is false'); assert.sameValue(delete sample.baz, true, 'The value of `delete sample.baz` is true'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-numeric-index-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-numeric-index-strict.js index 20096f0aedf..2de09815ce6 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-numeric-index-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-not-numeric-index-strict.js @@ -23,9 +23,9 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { TypedArray.prototype.baz = "baz"; - let sample = new TA(1); + let sample = new TA(makeCtorArg(1)); assert.sameValue( delete sample.foo, true, @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(delete sample.baz, true, 'The value of `delete sample.baz` is true'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-out-of-bounds-non-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-out-of-bounds-non-strict.js index 75594718baf..929823da50c 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-out-of-bounds-non-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-out-of-bounds-non-strict.js @@ -24,7 +24,7 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { let proto = TypedArray.prototype; let descriptorGetterThrows = { configurable: true, @@ -37,7 +37,7 @@ testWithTypedArrayConstructors(function(TA) { ["1"]: descriptorGetterThrows, }); - let sample = new TA(1); + let sample = new TA(makeCtorArg(1)); assert.sameValue(delete sample["-1"], true, 'The value of `delete sample["-1"]` is true'); assert.sameValue(delete sample[-1], true, 'The value of `delete sample[-1]` is true'); assert.sameValue(delete sample["0"], false, 'The value of `delete sample["0"]` is false'); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-out-of-bounds-strict.js b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-out-of-bounds-strict.js index 072098a0d49..d5aef85a896 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-out-of-bounds-strict.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-out-of-bounds-strict.js @@ -24,7 +24,7 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { let proto = TypedArray.prototype; let descriptorGetterThrows = { configurable: true, @@ -37,7 +37,7 @@ testWithTypedArrayConstructors(function(TA) { ["1"]: descriptorGetterThrows, }); - let sample = new TA(1); + let sample = new TA(makeCtorArg(1)); assert.sameValue(delete sample["-1"], true, 'The value of `delete sample["-1"]` is true'); assert.sameValue(delete sample[-1], true, 'The value of `delete sample[-1]` is true'); diff --git a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-symbol.js index d05870f939c..d11552b29c1 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-symbol.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - let sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + let sample = new TA(makeCtorArg(1)); let s = Symbol("1"); assert.sameValue(delete sample[s], true, 'The value of `delete sample[s]` is true'); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer-key-is-not-numeric-index.js b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer-key-is-not-numeric-index.js index 21b3b11b171..2f2362ce5ae 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer-key-is-not-numeric-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer-key-is-not-numeric-index.js @@ -13,7 +13,7 @@ info: | b. If numericIndex is not undefined, then ... 3. Return ? OrdinaryGet(O, P, Receiver -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(sample.undef, undefined); assert.sameValue(sample.foo, "test262"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer-key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer-key-is-symbol.js index fe0e8c412df..324220d98eb 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer-key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer-key-is-symbol.js @@ -11,7 +11,7 @@ info: | 2. If Type(P) is String, then ... 3. Return ? OrdinaryGet(O, P, Receiver). -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample[s] = "test262"; assert.sameValue(sample[s], "test262"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer-realm.js b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer-realm.js index f6290325e70..aafc506dcc2 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer-realm.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer-realm.js @@ -20,7 +20,7 @@ info: | Let buffer be O.[[ViewedArrayBuffer]]. If IsDetachedBuffer(buffer) is true, return undefined. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, cross-realm, TypedArray] ---*/ @@ -33,4 +33,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { $DETACHBUFFER(sample.buffer); assert.sameValue(sample[0], undefined, 'The value of sample[0] is expected to equal `undefined`'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer.js index a1dd95226ba..439e06a51b9 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/detached-buffer.js @@ -19,7 +19,7 @@ info: | Let buffer be O.[[ViewedArrayBuffer]]. If IsDetachedBuffer(buffer) is true, return undefined. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -33,4 +33,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(sample["-1"], undefined, 'The value of sample["-1"] is expected to equal `undefined`'); assert.sameValue(sample["1"], undefined, 'The value of sample["1"] is expected to equal `undefined`'); assert.sameValue(sample["2"], undefined, 'The value of sample["2"] is expected to equal `undefined`'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/indexed-value-sab.js b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/indexed-value-sab.js index e8e27c666cc..66fb253d8db 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/indexed-value-sab.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/indexed-value-sab.js @@ -5,7 +5,7 @@ esid: sec-integer-indexed-exotic-objects-get-p-receiver description: > Return value from valid numeric index, with SharedArrayBuffer -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, SharedArrayBuffer] ---*/ @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(sample["0"], 42n); assert.sameValue(sample["1"], 1n); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/indexed-value.js b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/indexed-value.js index 6cc015407a6..362a9be9574 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/indexed-value.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/indexed-value.js @@ -13,7 +13,7 @@ info: | b. If numericIndex is not undefined, then i. Return ? IntegerIndexedElementGet(O, numericIndex). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -26,9 +26,9 @@ var throwDesc = { Object.defineProperty(proto, "0", throwDesc); Object.defineProperty(proto, "1", throwDesc); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 1n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 1n])); assert.sameValue(sample["0"], 42n); assert.sameValue(sample["1"], 1n); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/infinity-detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/infinity-detached-buffer.js index 97ed2a2da6d..6135724848e 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/infinity-detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/infinity-detached-buffer.js @@ -26,7 +26,7 @@ info: | 4. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -35,4 +35,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { $DETACHBUFFER(sample.buffer); assert.sameValue(sample.Infinity, undefined, 'The value of sample.Infinity is expected to equal `undefined`'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-canonical-index.js b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-canonical-index.js index 760f2bd4ce0..bcfd5c1011f 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-canonical-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-canonical-index.js @@ -13,7 +13,7 @@ info: | b. If numericIndex is not undefined, then ... 3. Return ? OrdinaryGet(O, P, Receiver). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -58,4 +58,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { delete TypedArray.prototype[key]; }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-integer.js b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-integer.js index 862178d0387..396533875cc 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-integer.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-integer.js @@ -19,7 +19,7 @@ info: | ... 5. If IsInteger(index) is false, return undefined. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -30,8 +30,8 @@ Object.defineProperty(proto, "1.1", { } }); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); assert.sameValue(sample["1.1"], undefined); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-minus-zero.js b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-minus-zero.js index 792e320649f..466774f6994 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-minus-zero.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-minus-zero.js @@ -19,7 +19,7 @@ info: | ... 6. If index = -0, return undefined. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -30,8 +30,8 @@ Object.defineProperty(proto, "-0", { } }); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); assert.sameValue(sample["-0"], undefined); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-numeric-index-get-throws.js b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-numeric-index-get-throws.js index 1218afe1e5c..1136d6550f3 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-numeric-index-get-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-numeric-index-get-throws.js @@ -19,12 +19,12 @@ info: | ... 8. Return ? Call(getter, Receiver). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); Object.defineProperty(sample, "test262", { get: function() { @@ -35,4 +35,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.test262; }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-numeric-index.js b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-numeric-index.js index f60f3b0a6a8..872d37bf805 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-numeric-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-not-numeric-index.js @@ -13,14 +13,14 @@ info: | b. If numericIndex is not undefined, then ... 3. Return ? OrdinaryGet(O, P, Receiver). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ TypedArray.prototype.baz = "test262"; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); assert.sameValue( sample.foo, undefined, @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(sample.bar, "baz", "return value from get accessor"); assert.sameValue(sample.baz, "test262", "return value from inherited key"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-out-of-bounds.js b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-out-of-bounds.js index 583b7c54974..2bc24b43537 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-out-of-bounds.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-out-of-bounds.js @@ -20,7 +20,7 @@ info: | 7. Let length be the value of O's [[ArrayLength]] internal slot. 8. If index < 0 or index ≥ length, return undefined. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -34,10 +34,10 @@ Object.defineProperty(proto, "-1", throwDesc); Object.defineProperty(proto, "2", throwDesc); Object.defineProperty(proto, "3", throwDesc); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); assert.sameValue(sample["-1"], undefined); assert.sameValue(sample["2"], undefined); assert.sameValue(sample["3"], undefined); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-symbol.js index 80c550a0d58..e737b70f614 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/BigInt/key-is-symbol.js @@ -11,15 +11,15 @@ info: | 2. If Type(P) is String, then ... 3. Return ? OrdinaryGet(O, P, Receiver). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Symbol, TypedArray] ---*/ var parentKey = Symbol("2"); TypedArray.prototype[parentKey] = "test262"; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n])); var s1 = Symbol("1"); @@ -37,4 +37,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(sample[s1], "bar", "return value from get accessor"); assert.sameValue(sample[parentKey], "test262", "value from parent key"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/detached-buffer-key-is-not-numeric-index.js b/test/built-ins/TypedArrayConstructors/internals/Get/detached-buffer-key-is-not-numeric-index.js index b0032bad71f..4071bbdf092 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/detached-buffer-key-is-not-numeric-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/detached-buffer-key-is-not-numeric-index.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(sample.undef, undefined); assert.sameValue(sample.foo, "test262"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/detached-buffer-key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/Get/detached-buffer-key-is-symbol.js index 2b18a93ea5f..f0280adcf4f 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/detached-buffer-key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/detached-buffer-key-is-symbol.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { sample[s] = "test262"; assert.sameValue(sample[s], "test262"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/detached-buffer-realm.js b/test/built-ins/TypedArrayConstructors/internals/Get/detached-buffer-realm.js index 60d73bee31f..b69575704bf 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/detached-buffer-realm.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/detached-buffer-realm.js @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { $DETACHBUFFER(sample.buffer); assert.sameValue(sample[0], undefined, 'The value of sample[0] is expected to equal `undefined`'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/Get/detached-buffer.js index e753209cd7b..a427e14b9dc 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/detached-buffer.js @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(sample["-1"], undefined, 'The value of sample["-1"] is expected to equal `undefined`'); assert.sameValue(sample["1"], undefined, 'The value of sample["1"] is expected to equal `undefined`'); assert.sameValue(sample["2"], undefined, 'The value of sample["2"] is expected to equal `undefined`'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/indexed-value-sab.js b/test/built-ins/TypedArrayConstructors/internals/Get/indexed-value-sab.js index 6145da9e24e..b0c189a30b3 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/indexed-value-sab.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/indexed-value-sab.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(sample["0"], 42); assert.sameValue(sample["1"], 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/indexed-value.js b/test/built-ins/TypedArrayConstructors/internals/Get/indexed-value.js index f58c528b6a7..02b16361028 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/indexed-value.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/indexed-value.js @@ -26,9 +26,9 @@ var throwDesc = { Object.defineProperty(proto, "0", throwDesc); Object.defineProperty(proto, "1", throwDesc); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 1]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 1])); assert.sameValue(sample["0"], 42); assert.sameValue(sample["1"], 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/infinity-detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/Get/infinity-detached-buffer.js index d5c6d5377b9..6b0973d156b 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/infinity-detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/infinity-detached-buffer.js @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { $DETACHBUFFER(sample.buffer); assert.sameValue(sample.Infinity, undefined, 'The value of sample.Infinity is expected to equal `undefined`'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-canonical-index.js b/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-canonical-index.js index f6e37eeb748..9ab5556aed2 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-canonical-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-canonical-index.js @@ -58,4 +58,4 @@ testWithTypedArrayConstructors(function(TA) { delete TypedArray.prototype[key]; }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-integer.js b/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-integer.js index 5ad684b7871..ba0433d1553 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-integer.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-integer.js @@ -30,8 +30,8 @@ Object.defineProperty(proto, "1.1", { } }); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); assert.sameValue(sample["1.1"], undefined); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-minus-zero.js b/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-minus-zero.js index 851cf72b44e..eaaf4c1bdd3 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-minus-zero.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-minus-zero.js @@ -30,8 +30,8 @@ Object.defineProperty(proto, "-0", { } }); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); assert.sameValue(sample["-0"], undefined); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-numeric-index-get-throws.js b/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-numeric-index-get-throws.js index ce1a313ca48..4aa642e3d05 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-numeric-index-get-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-numeric-index-get-throws.js @@ -23,8 +23,8 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); Object.defineProperty(sample, "test262", { get: function() { @@ -35,4 +35,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.test262; }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-numeric-index.js b/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-numeric-index.js index 7b23bc2a554..237e575d61f 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-numeric-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-numeric-index.js @@ -19,8 +19,8 @@ features: [align-detached-buffer-semantics-with-web-reality, TypedArray] TypedArray.prototype.baz = "test262"; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); assert.sameValue( sample.foo, undefined, @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(sample.bar, "baz", "return value from get accessor"); assert.sameValue(sample.baz, "test262", "return value from inherited key"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/key-is-out-of-bounds.js b/test/built-ins/TypedArrayConstructors/internals/Get/key-is-out-of-bounds.js index a6eaa05dfc2..929dd74a506 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/key-is-out-of-bounds.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/key-is-out-of-bounds.js @@ -34,10 +34,10 @@ Object.defineProperty(proto, "-1", throwDesc); Object.defineProperty(proto, "2", throwDesc); Object.defineProperty(proto, "3", throwDesc); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); assert.sameValue(sample["-1"], undefined); assert.sameValue(sample["2"], undefined); assert.sameValue(sample["3"], undefined); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Get/key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/Get/key-is-symbol.js index 39180cf9ca0..f78893eecbd 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Get/key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/Get/key-is-symbol.js @@ -18,8 +18,8 @@ features: [align-detached-buffer-semantics-with-web-reality, Symbol, TypedArray] var parentKey = Symbol("2"); TypedArray.prototype[parentKey] = "test262"; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42])); var s1 = Symbol("1"); @@ -37,4 +37,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(sample[s1], "bar", "return value from get accessor"); assert.sameValue(sample[parentKey], "test262", "value from parent key"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer-key-is-not-number.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer-key-is-not-number.js index 6f7ad44abfb..c71b16f581d 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer-key-is-not-number.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer-key-is-not-number.js @@ -13,7 +13,7 @@ info: | b. If numericIndex is not undefined, then ... 4. Return OrdinaryGetOwnProperty(O, P). -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ @@ -35,4 +35,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { "bar", "return value from a String key" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer-key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer-key-is-symbol.js index e316218f5f4..4c60fceba89 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer-key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer-key-is-symbol.js @@ -13,7 +13,7 @@ info: | b. If numericIndex is not undefined, then ... 4. Return OrdinaryGetOwnProperty(O, P). -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -28,4 +28,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { "baz", "return value from a Symbol key" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer-realm.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer-realm.js index c602b245ab8..84c8442cfe9 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer-realm.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer-realm.js @@ -21,7 +21,7 @@ info: | Let buffer be the value of O's [[ViewedArrayBuffer]] internal slot. If IsDetachedBuffer(buffer) is true, return undefined. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, cross-realm, TypedArray] ---*/ @@ -38,4 +38,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { undefined, 'Object.getOwnPropertyDescriptor("new OtherTA(1)", 0) must return undefined' ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer.js index 0178b73930e..8c0e8e76af1 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/detached-buffer.js @@ -20,7 +20,7 @@ info: | Let buffer be the value of O's [[ViewedArrayBuffer]] internal slot. If IsDetachedBuffer(buffer) is true, return undefined. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -33,4 +33,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { undefined, 'Object.getOwnPropertyDescriptor(sample, 0) must return undefined' ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/enumerate-detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/enumerate-detached-buffer.js index 84b2f7df930..0449c8f1f1f 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/enumerate-detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/enumerate-detached-buffer.js @@ -26,7 +26,7 @@ info: | Property attributes of the target object must be obtained by calling its [[GetOwnProperty]] internal method. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ @@ -39,4 +39,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { counter++; } assert.sameValue(counter, 0, 'The value of `counter` is 0'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/index-prop-desc.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/index-prop-desc.js index ac2eca2f882..a8c91cec542 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/index-prop-desc.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/index-prop-desc.js @@ -15,11 +15,11 @@ info: | iii. Return a PropertyDescriptor{[[Value]]: value, [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true}. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); let descriptor0 = Object.getOwnPropertyDescriptor(sample, "0"); let descriptor1 = Object.getOwnPropertyDescriptor(sample, "1"); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-minus-zero.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-minus-zero.js index 598deda2ca9..d91165c6322 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-minus-zero.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-minus-zero.js @@ -25,12 +25,12 @@ info: | ... 6. If index = -0, return undefined. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n])); // -0 as a number value is converted to "0" before calling [[GetOwnProperty]] assert.sameValue(Object.getOwnPropertyDescriptor(sample, "-0"), undefined); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-not-canonical-index.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-not-canonical-index.js index 02f46bd6df5..710a2e5e777 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-not-canonical-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-not-canonical-index.js @@ -15,7 +15,7 @@ info: | ... 4. Return OrdinaryGetOwnProperty(O, P). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -26,9 +26,9 @@ var keys = [ "0.0000001" ]; -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { keys.forEach(function(key) { - var sample = new TA([42n, 43n]); + var sample = new TA(makeCtorArg([42n, 43n])); assert.sameValue( Object.getOwnPropertyDescriptor(sample, key), @@ -45,4 +45,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { "return value from a ordinary property key [" + key + "]" ); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-not-integer.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-not-integer.js index e52e033aa1a..e91242093a9 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-not-integer.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-not-integer.js @@ -19,12 +19,12 @@ info: | ... 5. If IsInteger(index) is false, return undefined. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); assert.sameValue(Object.getOwnPropertyDescriptor(sample, "1.1"), undefined); assert.sameValue(Object.getOwnPropertyDescriptor(sample, "0.1"), undefined); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-not-numeric-index.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-not-numeric-index.js index e65c23ad918..7471acdbff6 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-not-numeric-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-not-numeric-index.js @@ -14,12 +14,12 @@ info: | ... 4. Return OrdinaryGetOwnProperty(O, P). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); assert.sameValue( Object.getOwnPropertyDescriptor(sample, "undef"), @@ -35,4 +35,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { "bar", "return value from a String key" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-out-of-bounds.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-out-of-bounds.js index 71e5d5ef785..12d6d31d65f 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-out-of-bounds.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-out-of-bounds.js @@ -20,12 +20,12 @@ info: | 7. Let length be the value of O's [[ArrayLength]] internal slot. 8. If index < 0 or index ≥ length, return undefined. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n])); assert.sameValue(Object.getOwnPropertyDescriptor(sample, "-1"), undefined); assert.sameValue(Object.getOwnPropertyDescriptor(sample, "-42"), undefined); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-symbol.js index c5509a0d924..48c9c6d4634 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/key-is-symbol.js @@ -14,12 +14,12 @@ info: | ... 4. Return OrdinaryGetOwnProperty(O, P). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); var s = Symbol("foo"); Object.defineProperty(sample, s, { value: "baz" }); @@ -28,4 +28,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { "baz", "return value from a Symbol key" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer-key-is-not-number.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer-key-is-not-number.js index 81b274361f4..b100a7251e4 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer-key-is-not-number.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer-key-is-not-number.js @@ -35,4 +35,4 @@ testWithTypedArrayConstructors(function(TA) { "bar", "return value from a String key" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer-key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer-key-is-symbol.js index 308a2973f14..6150964b3dd 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer-key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer-key-is-symbol.js @@ -28,4 +28,4 @@ testWithTypedArrayConstructors(function(TA) { "baz", "return value from a Symbol key" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer-realm.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer-realm.js index 955124b3949..09d62052de6 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer-realm.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer-realm.js @@ -38,4 +38,4 @@ testWithTypedArrayConstructors(function(TA) { undefined, 'Object.getOwnPropertyDescriptor(sample, 0) must return undefined' ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer.js index e38dbb3b0f6..5b0a6610ea3 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/detached-buffer.js @@ -33,4 +33,4 @@ testWithTypedArrayConstructors(function(TA) { undefined, 'Object.getOwnPropertyDescriptor(sample, 0) must return undefined' ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/enumerate-detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/enumerate-detached-buffer.js index 28e1af6f31c..f09a05aa2b9 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/enumerate-detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/enumerate-detached-buffer.js @@ -39,4 +39,4 @@ testWithTypedArrayConstructors(function(TA) { count++; } assert.sameValue(count, 0, 'The value of `count` is 0'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/index-prop-desc.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/index-prop-desc.js index 222c3ce2012..c7f18eaa6f5 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/index-prop-desc.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/index-prop-desc.js @@ -20,8 +20,8 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); let descriptor0 = Object.getOwnPropertyDescriptor(sample, "0"); let descriptor1 = Object.getOwnPropertyDescriptor(sample, "1"); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-minus-zero.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-minus-zero.js index 1b1c828abc2..f07b54c2147 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-minus-zero.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-minus-zero.js @@ -29,8 +29,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42])); // -0 as a number value is converted to "0" before calling [[GetOwnProperty]] assert.sameValue(Object.getOwnPropertyDescriptor(sample, "-0"), undefined); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-not-canonical-index.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-not-canonical-index.js index 35b6fa01c5e..1c9350f7839 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-not-canonical-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-not-canonical-index.js @@ -26,9 +26,9 @@ var keys = [ "0.0000001" ]; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { keys.forEach(function(key) { - var sample = new TA([42, 43]); + var sample = new TA(makeCtorArg([42, 43])); assert.sameValue( Object.getOwnPropertyDescriptor(sample, key), @@ -45,4 +45,4 @@ testWithTypedArrayConstructors(function(TA) { "return value from a ordinary property key [" + key + "]" ); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-not-integer.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-not-integer.js index f77950d728a..d1fd8479c2c 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-not-integer.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-not-integer.js @@ -23,8 +23,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); assert.sameValue(Object.getOwnPropertyDescriptor(sample, "1.1"), undefined); assert.sameValue(Object.getOwnPropertyDescriptor(sample, "0.1"), undefined); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-not-numeric-index.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-not-numeric-index.js index 57fd606ae59..fd099e971ab 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-not-numeric-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-not-numeric-index.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); assert.sameValue( Object.getOwnPropertyDescriptor(sample, "undef"), @@ -35,4 +35,4 @@ testWithTypedArrayConstructors(function(TA) { "bar", "return value from a String key" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-out-of-bounds.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-out-of-bounds.js index 891bc7184de..4acf20f6ee9 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-out-of-bounds.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-out-of-bounds.js @@ -24,8 +24,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42])); assert.sameValue(Object.getOwnPropertyDescriptor(sample, "-1"), undefined); assert.sameValue(Object.getOwnPropertyDescriptor(sample, "-42"), undefined); diff --git a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-symbol.js index 6b440e1194c..f679b72ed14 100644 --- a/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-symbol.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); var s = Symbol("foo"); Object.defineProperty(sample, s, { value: "baz" }); @@ -28,4 +28,4 @@ testWithTypedArrayConstructors(function(TA) { "baz", "return value from a Symbol key" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/abrupt-from-ordinary-has-parent-hasproperty.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/abrupt-from-ordinary-has-parent-hasproperty.js index 569c50d16b4..72e5d24fbcd 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/abrupt-from-ordinary-has-parent-hasproperty.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/abrupt-from-ordinary-has-parent-hasproperty.js @@ -23,7 +23,7 @@ info: | 5. If parent is not null, then a. Return ? parent.[[HasProperty]](P). 6. Return false. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, Proxy, TypedArray] ---*/ @@ -35,8 +35,8 @@ var handler = { var proxy = new Proxy(TypedArray.prototype, handler); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); Object.setPrototypeOf(sample, proxy); @@ -60,4 +60,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { true, 'Reflect.has(sample, "foo") must return true' ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer-key-is-not-number.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer-key-is-not-number.js index aeda046b0af..b427d5dd937 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer-key-is-not-number.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer-key-is-not-number.js @@ -14,7 +14,7 @@ info: | b. If numericIndex is not undefined, then ... 4. Return ? OrdinaryHasProperty(O, P). -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, Reflect, TypedArray] ---*/ @@ -26,4 +26,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(Reflect.has(sample, "foo"), false); assert.sameValue(Reflect.has(sample, "bar"), true); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer-key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer-key-is-symbol.js index 44475d9aa7b..813f135a047 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer-key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer-key-is-symbol.js @@ -13,7 +13,7 @@ info: | b. If numericIndex is not undefined, then ... 4. Return ? OrdinaryHasProperty(O, P). -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [BigInt, Reflect, Symbol, TypedArray] ---*/ @@ -28,4 +28,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(Reflect.has(sample, s1), true); assert.sameValue(Reflect.has(sample, s2), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer-realm.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer-realm.js index 411a63bdcea..5fb608b1b61 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer-realm.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer-realm.js @@ -15,7 +15,7 @@ info: | i. Let buffer be O.[[ViewedArrayBuffer]]. ii. If IsDetachedBuffer(buffer) is true, return false. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, cross-realm, Reflect, TypedArray] ---*/ @@ -28,4 +28,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { $DETACHBUFFER(sample.buffer); assert.sameValue(Reflect.has(sample, '0'), false, 'Reflect.has(sample, "0") must return false'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer.js index 907b68a3a3d..3266c079078 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/detached-buffer.js @@ -13,7 +13,7 @@ info: | i. Let buffer be O.[[ViewedArrayBuffer]]. ii. If IsDetachedBuffer(buffer) is true, return false. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray] ---*/ @@ -24,4 +24,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(Reflect.has(sample, "0"), false, 'Reflect.has(sample, "0") must return false'); assert.sameValue(Reflect.has(sample, "-0"), false, 'Reflect.has(sample, "-0") must return false'); assert.sameValue(Reflect.has(sample, "1.1"), false, 'Reflect.has(sample, "1.1") must return false'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/indexed-value.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/indexed-value.js index 7f933a360c1..62d8fc81a79 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/indexed-value.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/indexed-value.js @@ -16,11 +16,11 @@ info: | iii. If ! IsValidIntegerIndex(O, numericIndex) is false, return false. iv. Return true. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n, 43n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n, 43n])); assert.sameValue(Reflect.has(sample, 0), true, 'Reflect.has(sample, 0) must return true'); assert.sameValue(Reflect.has(sample, 1), true, 'Reflect.has(sample, 1) must return true'); }); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/infinity-with-detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/infinity-with-detached-buffer.js index 8e7265318c7..df661cbb38e 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/infinity-with-detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/infinity-with-detached-buffer.js @@ -21,7 +21,7 @@ info: | 5. Return n. flags: [noStrict] -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { @@ -43,4 +43,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { Infinity; assert.sameValue(counter, 1, 'The value of `counter` is 1'); } -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/inherited-property.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/inherited-property.js index 6407c2644c4..aad677d64bd 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/inherited-property.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/inherited-property.js @@ -14,15 +14,15 @@ info: | ... 4. Return ? OrdinaryHasProperty(O, P). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ TypedArray.prototype.foo = 42; TypedArray.prototype[42] = true; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); TA.prototype.bar = 42; diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-greater-than-last-index.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-greater-than-last-index.js index 1f19f0ed389..5c66bdeb798 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-greater-than-last-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-greater-than-last-index.js @@ -13,15 +13,15 @@ info: | ... iii. If ! IsValidIntegerIndex(O, numericIndex) is false, return false. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray] ---*/ // Prevents false positives using OrdinaryHasProperty TypedArray.prototype[1] = "test262"; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.sameValue(Reflect.has(sample, "1"), false, 'Reflect.has(sample, "1") must return false'); }); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-lower-than-zero.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-lower-than-zero.js index 4d33614014f..4ef329ef962 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-lower-than-zero.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-lower-than-zero.js @@ -13,7 +13,7 @@ info: | ... iii. If ! IsValidIntegerIndex(O, numericIndex) is false, return false. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray] ---*/ @@ -21,8 +21,8 @@ features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, Ty // Prevents false positives using OrdinaryHasProperty TypedArray.prototype[-1] = "test262"; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.sameValue(Reflect.has(sample, "-1"), false, 'Reflect.has(sample, "-1") must return false'); }); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-minus-zero.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-minus-zero.js index fe332665c59..78f4c868184 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-minus-zero.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-minus-zero.js @@ -13,7 +13,7 @@ info: | ... iii. If ! IsValidIntegerIndex(O, numericIndex) is false, return false. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray] ---*/ @@ -21,8 +21,8 @@ features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, Ty // Prevents false positives using OrdinaryHasProperty TypedArray.prototype["-0"] = "test262"; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.sameValue(Reflect.has(sample, "-0"), false, 'Reflect.has(sample, "-0") must return false'); }); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-not-canonical-index.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-not-canonical-index.js index a92f3346e06..1ee2203b15c 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-not-canonical-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-not-canonical-index.js @@ -14,7 +14,7 @@ info: | ... 4. Return ? OrdinaryHasProperty(O, P). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ @@ -25,9 +25,9 @@ var keys = [ "0.0000001" ]; -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { keys.forEach(function(key) { - var sample = new TA(1); + var sample = new TA(makeCtorArg(1)); assert.sameValue( Reflect.has(sample, key), false, @@ -50,4 +50,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { "returns true with own key [" + key + "]" ); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-not-integer.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-not-integer.js index 303b6027810..404d3abb726 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-not-integer.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-not-integer.js @@ -13,7 +13,7 @@ info: | ... iii. If IsInteger(numericIndex) is false, return false. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ @@ -22,8 +22,8 @@ features: [BigInt, Reflect, TypedArray] TypedArray.prototype["1.1"] = "test262"; TypedArray.prototype["0.000001"] = "test262"; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.sameValue(Reflect.has(sample, "1.1"), false, "1.1"); assert.sameValue(Reflect.has(sample, "0.000001"), false, "0.000001"); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-not-numeric-index.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-not-numeric-index.js index d960abfdd5b..741f172be07 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-not-numeric-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-not-numeric-index.js @@ -14,16 +14,16 @@ info: | ... 4. Return ? OrdinaryHasProperty(O, P). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.sameValue(Reflect.has(sample, "foo"), false); Object.defineProperty(sample, "foo", { value: 42 }); assert.sameValue(Reflect.has(sample, "foo"), true); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-symbol.js index 0f6d7448779..491211881ef 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/BigInt/key-is-symbol.js @@ -11,18 +11,18 @@ info: | 3. If Type(P) is String, then ... 4. Return ? OrdinaryHasProperty(O, P). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Reflect, Symbol, TypedArray] ---*/ var s = Symbol("foo"); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.sameValue(Reflect.has(sample, s), false); Object.defineProperty(sample, s, { value: 42 }); assert.sameValue(Reflect.has(sample, s), true); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/abrupt-from-ordinary-has-parent-hasproperty.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/abrupt-from-ordinary-has-parent-hasproperty.js index 8e49cca9aee..ba7d3a38314 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/abrupt-from-ordinary-has-parent-hasproperty.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/abrupt-from-ordinary-has-parent-hasproperty.js @@ -35,8 +35,8 @@ var handler = { var proxy = new Proxy(TypedArray.prototype, handler); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); Object.setPrototypeOf(sample, proxy); @@ -60,4 +60,4 @@ testWithTypedArrayConstructors(function(TA) { true, 'Reflect.has(sample, "foo") must return true' ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer-key-is-not-number.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer-key-is-not-number.js index 011e80c0b61..99e3785fb8f 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer-key-is-not-number.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer-key-is-not-number.js @@ -26,4 +26,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(Reflect.has(sample, "foo"), false); assert.sameValue(Reflect.has(sample, "bar"), true); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer-key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer-key-is-symbol.js index 2c34c3caa0f..1a5c40ce03e 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer-key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer-key-is-symbol.js @@ -28,4 +28,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(Reflect.has(sample, s1), true); assert.sameValue(Reflect.has(sample, s2), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer-realm.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer-realm.js index 85bc63cec64..31cdede94ec 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer-realm.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer-realm.js @@ -27,4 +27,4 @@ testWithTypedArrayConstructors(function(TA) { $DETACHBUFFER(sample.buffer); assert.sameValue(Reflect.has(sample, '0'), false, 'Reflect.has(sample, "0") must return false'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer.js index cf11570210e..e140f456605 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/detached-buffer.js @@ -24,4 +24,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(Reflect.has(sample, "0"), false, 'Reflect.has(sample, "0") must return false'); assert.sameValue(Reflect.has(sample, "-0"), false, 'Reflect.has(sample, "-0") must return false'); assert.sameValue(Reflect.has(sample, "1.1"), false, 'Reflect.has(sample, "1.1") must return false'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/indexed-value.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/indexed-value.js index afb57ba3acf..87af9b07210 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/indexed-value.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/indexed-value.js @@ -20,9 +20,9 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42, 43]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42, 43])); - assert.sameValue(Reflect.has(sample, 0), true, 'Reflect.has("new TA([42, 43])", 0) must return true'); - assert.sameValue(Reflect.has(sample, 1), true, 'Reflect.has("new TA([42, 43])", 1) must return true'); + assert.sameValue(Reflect.has(sample, 0), true, 'Reflect.has("new TA(makeCtorArg([42, 43]))", 0) must return true'); + assert.sameValue(Reflect.has(sample, 1), true, 'Reflect.has("new TA(makeCtorArg([42, 43]))", 1) must return true'); }); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/infinity-with-detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/infinity-with-detached-buffer.js index 4c4a6ffd0d5..5b515da52e2 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/infinity-with-detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/infinity-with-detached-buffer.js @@ -47,4 +47,4 @@ testWithTypedArrayConstructors(function(TA) { Infinity; assert.sameValue(counter, 1, 'The value of `counter` is 1'); } -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/inherited-property.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/inherited-property.js index 237c333f2fe..e2a52dff0a4 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/inherited-property.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/inherited-property.js @@ -21,8 +21,8 @@ features: [Reflect, TypedArray] TypedArray.prototype.foo = 42; TypedArray.prototype[42] = true; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); TA.prototype.bar = 42; diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-greater-than-last-index.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-greater-than-last-index.js index 3975bb0a51e..ab0c1c07a47 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-greater-than-last-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-greater-than-last-index.js @@ -20,8 +20,8 @@ features: [align-detached-buffer-semantics-with-web-reality, Reflect, TypedArray // Prevents false positives using OrdinaryHasProperty TypedArray.prototype[1] = "test262"; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.sameValue(Reflect.has(sample, "1"), false, 'Reflect.has(sample, "1") must return false'); }); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-lower-than-zero.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-lower-than-zero.js index 920f8eaf6e7..3291abf06d1 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-lower-than-zero.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-lower-than-zero.js @@ -21,8 +21,8 @@ features: [align-detached-buffer-semantics-with-web-reality, Reflect, TypedArray // Prevents false positives using OrdinaryHasProperty TypedArray.prototype[-1] = "test262"; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.sameValue(Reflect.has(sample, "-1"), false, 'Reflect.has(sample, "-1") must return false'); }); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-minus-zero.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-minus-zero.js index 13ba336ca03..b9ff57d3266 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-minus-zero.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-minus-zero.js @@ -21,8 +21,8 @@ features: [align-detached-buffer-semantics-with-web-reality, Reflect, TypedArray // Prevents false positives using OrdinaryHasProperty TypedArray.prototype["-0"] = "test262"; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.sameValue(Reflect.has(sample, "-0"), false, 'Reflect.has(sample, "-0") must return false'); }); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-not-canonical-index.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-not-canonical-index.js index 7e20c5b24fb..5706f58e723 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-not-canonical-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-not-canonical-index.js @@ -25,9 +25,9 @@ var keys = [ "0.0000001" ]; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { keys.forEach(function(key) { - var sample = new TA(1); + var sample = new TA(makeCtorArg(1)); assert.sameValue( Reflect.has(sample, key), false, @@ -50,4 +50,4 @@ testWithTypedArrayConstructors(function(TA) { "returns true with own key [" + key + "]" ); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-not-integer.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-not-integer.js index f59edefae49..73175a35cd5 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-not-integer.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-not-integer.js @@ -22,8 +22,8 @@ features: [Reflect, TypedArray] TypedArray.prototype["1.1"] = "test262"; TypedArray.prototype["0.000001"] = "test262"; -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.sameValue(Reflect.has(sample, "1.1"), false, "1.1"); assert.sameValue(Reflect.has(sample, "0.000001"), false, "0.000001"); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-not-numeric-index.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-not-numeric-index.js index 53cfc576815..3e331efa44f 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-not-numeric-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-not-numeric-index.js @@ -18,12 +18,12 @@ includes: [testTypedArray.js] features: [Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.sameValue(Reflect.has(sample, "foo"), false); Object.defineProperty(sample, "foo", { value: 42 }); assert.sameValue(Reflect.has(sample, "foo"), true); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-symbol.js index f3b6e6758b0..184d21af832 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-symbol.js @@ -17,12 +17,12 @@ features: [Reflect, Symbol, TypedArray] var s = Symbol("foo"); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); assert.sameValue(Reflect.has(sample, s), false); Object.defineProperty(sample, s, { value: 42 }); assert.sameValue(Reflect.has(sample, s), true); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/resizable-array-buffer-auto.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/resizable-array-buffer-auto.js index 0fbc6d59102..2cf28f36328 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/resizable-array-buffer-auto.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/resizable-array-buffer-auto.js @@ -58,4 +58,4 @@ testWithTypedArrayConstructors(function(TA) { } catch (_) {} assert.sameValue(inspect(array), expected, "following shrink (out of bounds)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/HasProperty/resizable-array-buffer-fixed.js b/test/built-ins/TypedArrayConstructors/internals/HasProperty/resizable-array-buffer-fixed.js index 175688252b4..7927aa3b8ba 100644 --- a/test/built-ins/TypedArrayConstructors/internals/HasProperty/resizable-array-buffer-fixed.js +++ b/test/built-ins/TypedArrayConstructors/internals/HasProperty/resizable-array-buffer-fixed.js @@ -51,4 +51,4 @@ testWithTypedArrayConstructors(function(TA) { } assert.sameValue(inspect(array), expected, "following shrink (out of bounds)"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-and-symbol-keys-.js b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-and-symbol-keys-.js index 6f64fa646ae..a58a9dd695f 100644 --- a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-and-symbol-keys-.js +++ b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-and-symbol-keys-.js @@ -13,7 +13,7 @@ info: | 4. For each integer i starting with 0 such that i < len, in ascending order, a. Add ! ToString(i) as the last element of keys. ... -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, Reflect, Symbol, TypedArray] ---*/ @@ -23,8 +23,8 @@ var s2 = Symbol("2"); TypedArray.prototype[3] = 42; TypedArray.prototype.bar = 42; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample1 = new TA([42n, 42n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg([42n, 42n, 42n])); sample1[s1] = 42; sample1[s2] = 42; sample1.test262 = 42; @@ -35,7 +35,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { "result1" ); - var sample2 = new TA(4).subarray(2); + var sample2 = new TA(makeCtorArg(4)).subarray(2); sample2[s1] = 42; sample2[s2] = 42; sample2.test262 = 42; diff --git a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-keys.js b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-keys.js index 8de17148be1..89b8edfbc91 100644 --- a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-keys.js +++ b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-keys.js @@ -13,15 +13,15 @@ info: | 4. For each integer i starting with 0 such that i < len, in ascending order, a. Add ! ToString(i) as the last element of keys. ... -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, Reflect, TypedArray] ---*/ TypedArray.prototype[3] = 42; TypedArray.prototype.bar = 42; -testWithBigIntTypedArrayConstructors(function(TA) { - var sample1 = new TA([42n, 42n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg([42n, 42n, 42n])); sample1.test262 = 42; sample1.ecma262 = 42; var result1 = Reflect.ownKeys(sample1); @@ -30,7 +30,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { "result1" ); - var sample2 = new TA(4).subarray(2); + var sample2 = new TA(makeCtorArg(4)).subarray(2); sample2.test262 = 42; sample2.ecma262 = 42; var result2 = Reflect.ownKeys(sample2); diff --git a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/BigInt/integer-indexes.js b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/BigInt/integer-indexes.js index 88f6f3b8fbb..eafa7fe63dd 100644 --- a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/BigInt/integer-indexes.js +++ b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/BigInt/integer-indexes.js @@ -13,20 +13,20 @@ info: | 4. For each integer i starting with 0 such that i < len, in ascending order, a. Add ! ToString(i) as the last element of keys. ... -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample1 = new TA([42n, 42n, 42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg([42n, 42n, 42n])); var result1 = Reflect.ownKeys(sample1); assert(compareArray(result1, ["0", "1", "2"]), "result1"); - var sample2 = new TA(4); + var sample2 = new TA(makeCtorArg(4)); var result2 = Reflect.ownKeys(sample2); assert(compareArray(result2, ["0", "1", "2", "3"]), "result2"); - var sample3 = new TA(4).subarray(2); + var sample3 = new TA(makeCtorArg(4)).subarray(2); var result3 = Reflect.ownKeys(sample3); assert(compareArray(result3, ["0", "1"]), "result3"); diff --git a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/BigInt/not-enumerable-keys.js b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/BigInt/not-enumerable-keys.js index d50d2d20f9c..dc637aa66b2 100644 --- a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/BigInt/not-enumerable-keys.js +++ b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/BigInt/not-enumerable-keys.js @@ -13,7 +13,7 @@ info: | 4. For each integer i starting with 0 such that i < len, in ascending order, a. Add ! ToString(i) as the last element of keys. ... -includes: [testBigIntTypedArray.js, compareArray.js] +includes: [testTypedArray.js, compareArray.js] features: [BigInt, Reflect, Symbol, TypedArray] ---*/ @@ -32,4 +32,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); var result = Reflect.ownKeys(sample); assert(compareArray(result, ["test262", s])); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-and-string-and-symbol-keys-.js b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-and-string-and-symbol-keys-.js index 9060bee4d74..5ee1543c3da 100644 --- a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-and-string-and-symbol-keys-.js +++ b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-and-string-and-symbol-keys-.js @@ -23,8 +23,8 @@ var s2 = Symbol("2"); TypedArray.prototype[3] = 42; TypedArray.prototype.bar = 42; -testWithTypedArrayConstructors(function(TA) { - var sample1 = new TA([42, 42, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg([42, 42, 42])); sample1[s1] = 42; sample1[s2] = 42; sample1.test262 = 42; @@ -35,7 +35,7 @@ testWithTypedArrayConstructors(function(TA) { "result1" ); - var sample2 = new TA(4).subarray(2); + var sample2 = new TA(makeCtorArg(4)).subarray(2); sample2[s1] = 42; sample2[s2] = 42; sample2.test262 = 42; diff --git a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-and-string-keys.js b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-and-string-keys.js index b227ef6f226..50aa3abfe75 100644 --- a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-and-string-keys.js +++ b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-and-string-keys.js @@ -20,8 +20,8 @@ features: [Reflect, TypedArray] TypedArray.prototype[3] = 42; TypedArray.prototype.bar = 42; -testWithTypedArrayConstructors(function(TA) { - var sample1 = new TA([42, 42, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg([42, 42, 42])); sample1.test262 = 42; sample1.ecma262 = 42; var result1 = Reflect.ownKeys(sample1); @@ -30,7 +30,7 @@ testWithTypedArrayConstructors(function(TA) { "result1" ); - var sample2 = new TA(4).subarray(2); + var sample2 = new TA(makeCtorArg(4)).subarray(2); sample2.test262 = 42; sample2.ecma262 = 42; var result2 = Reflect.ownKeys(sample2); diff --git a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-resizable-array-buffer-auto.js b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-resizable-array-buffer-auto.js index abb0836ea11..cb44a842136 100644 --- a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-resizable-array-buffer-auto.js +++ b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-resizable-array-buffer-auto.js @@ -64,4 +64,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue( Reflect.ownKeys(array).join(","), expected, "following shrink (out of bounds)" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-resizable-array-buffer-fixed.js b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-resizable-array-buffer-fixed.js index 3e50a8fc6ff..f25c2005c27 100644 --- a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-resizable-array-buffer-fixed.js +++ b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-resizable-array-buffer-fixed.js @@ -55,4 +55,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue( Reflect.ownKeys(array).join(","), expected, "following shrink (out of bounds)" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes.js b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes.js index 00e57de342d..c9048d97b23 100644 --- a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes.js +++ b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes.js @@ -17,16 +17,16 @@ includes: [testTypedArray.js, compareArray.js] features: [Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample1 = new TA([42, 42, 42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample1 = new TA(makeCtorArg([42, 42, 42])); var result1 = Reflect.ownKeys(sample1); assert(compareArray(result1, ["0", "1", "2"]), "result1"); - var sample2 = new TA(4); + var sample2 = new TA(makeCtorArg(4)); var result2 = Reflect.ownKeys(sample2); assert(compareArray(result2, ["0", "1", "2", "3"]), "result2"); - var sample3 = new TA(4).subarray(2); + var sample3 = new TA(makeCtorArg(4)).subarray(2); var result3 = Reflect.ownKeys(sample3); assert(compareArray(result3, ["0", "1"]), "result3"); diff --git a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/not-enumerable-keys.js b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/not-enumerable-keys.js index ad030c21eea..a5b53472d80 100644 --- a/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/not-enumerable-keys.js +++ b/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/not-enumerable-keys.js @@ -32,4 +32,4 @@ testWithTypedArrayConstructors(function(TA) { }); var result = Reflect.ownKeys(sample); assert(compareArray(result, ["test262", s])); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/boolean-tobigint.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/boolean-tobigint.js index d51fe11a173..40ebe0115c4 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/boolean-tobigint.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/boolean-tobigint.js @@ -47,13 +47,13 @@ info: | Argument Type: Boolean Result: Return 1n if prim is true and 0n if prim is false. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(2)); typedArray[0] = false; typedArray[1] = true; assert.sameValue(typedArray[0], 0n, 'The value of typedArray[0] is 0n'); assert.sameValue(typedArray[1], 1n, 'The value of typedArray[1] is 1n'); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer-key-is-not-numeric-index.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer-key-is-not-numeric-index.js index deb182e788a..63f4fa07ffd 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer-key-is-not-numeric-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer-key-is-not-numeric-index.js @@ -13,7 +13,7 @@ info: | b. If numericIndex is not undefined, then ... 3. Return ? OrdinarySet(O, P, V, Receiver). -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { @@ -27,4 +27,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { ); assert.sameValue(sample.foo, 'test262', 'The value of sample.foo is "test262"'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer-key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer-key-is-symbol.js index cd2b88a24bc..a9b545e4726 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer-key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer-key-is-symbol.js @@ -11,7 +11,7 @@ info: | 2. If Type(P) is String, then ... 3. Return ? OrdinarySet(O, P, V, Receiver). -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Symbol, Reflect, TypedArray] ---*/ var s = Symbol('1'); @@ -27,4 +27,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { ); assert.sameValue(sample[s], 'test262', 'The value of sample[s] is "test262"'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer-realm.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer-realm.js index ecf27052bcf..e4ccd56b86d 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer-realm.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer-realm.js @@ -25,7 +25,7 @@ info: | Let buffer be O.[[ViewedArrayBuffer]]. If IsDetachedBuffer(buffer) is true, return false. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, cross-realm, TypedArray] ---*/ @@ -36,4 +36,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { $DETACHBUFFER(sample.buffer); sample[0] = 1n; assert.sameValue(sample[0], undefined, '`sample[0]` is undefined'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer.js index 5e6465bce89..6fdc3a97adf 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/detached-buffer.js @@ -23,7 +23,7 @@ info: | Let buffer be O.[[ViewedArrayBuffer]]. If IsDetachedBuffer(buffer) is true, return false. -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { @@ -51,4 +51,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample['0'] = obj; }, '`sample["0"] = obj` throws Test262Error'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/indexed-value.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/indexed-value.js index 0b1994182df..e789a91537b 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/indexed-value.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/indexed-value.js @@ -15,7 +15,7 @@ info: | ii. Return true. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray] ---*/ @@ -29,10 +29,10 @@ let throwDesc = { Object.defineProperty(proto, '0', throwDesc); Object.defineProperty(proto, '1', throwDesc); -testWithBigIntTypedArrayConstructors(function(TA) { - let sample = new TA(2); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + let sample = new TA(makeCtorArg(2)); assert.sameValue(Reflect.set(sample, '0', 1n), true, 'Reflect.set(sample, "0", 1n) must return true'); assert.sameValue(sample[0], 1n, 'The value of sample[0] is 1n'); assert.sameValue(Reflect.set(sample, '1', 42n), true, 'Reflect.set(sample, "1", 42n) must return true'); assert.sameValue(sample[1], 42n, 'The value of sample[1] is 42n'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-canonical-invalid-index-prototype-chain-set.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-canonical-invalid-index-prototype-chain-set.js index a329672afd4..0730df707c8 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-canonical-invalid-index-prototype-chain-set.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-canonical-invalid-index-prototype-chain-set.js @@ -15,7 +15,7 @@ info: | i. If ! SameValue(O, Receiver) is true [...] ii. 1. Else if ! IsValidIntegerIndex(_O_, _numericIndex_) is *false*, return *true*. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, Proxy] ---*/ @@ -27,7 +27,7 @@ var value = { }, }; -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var target, receiver; [1, 1.5, -1].forEach(function(key) { @@ -38,7 +38,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = Object.create(target); receiver[key] = value; assert(!target.hasOwnProperty(key), "target[" + key + "] should not be created (receiver: empty object)"); @@ -46,7 +46,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { var proxyTrapCalls = 0; - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = new Proxy(Object.create(target), { defineProperty(_target, key, desc) { ++proxyTrapCalls; @@ -60,7 +60,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(proxyTrapCalls, 0, "Proxy's [[DefineOwnProperty]] exotic method should not be called (key: " + key + ")"); - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = Object.preventExtensions(Object.create(target)); receiver[key] = value; assert(!target.hasOwnProperty(key), "target[" + key + "] should not be created (receiver: non-extensible empty object)"); @@ -71,7 +71,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = Object.setPrototypeOf([], target); receiver[1] = value; assert(!target.hasOwnProperty(1), "target[1] should not be created (receiver: regular array)"); @@ -79,11 +79,11 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(receiver.length, 0, "Array's [[DefineOwnProperty]] exotic method should not be called"); - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = Object.setPrototypeOf(new String(""), target); receiver[1] = value; assert(!target.hasOwnProperty(1), "target[1] should not be created (receiver: empty String object)"); assert(!receiver.hasOwnProperty(1), "receiver[1] should remain unchanged (receiver: empty String object)"); -}); +}, null, ["passthrough"]); assert.sameValue(valueOfCalls, 0, "value should not be coerced"); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-canonical-invalid-index-reflect-set.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-canonical-invalid-index-reflect-set.js index 7be2b2356ce..6bcb0e46bbf 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-canonical-invalid-index-reflect-set.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-canonical-invalid-index-reflect-set.js @@ -15,7 +15,7 @@ info: | i. If ! SameValue(O, Receiver) is true [...] ii. 1. Else if ! IsValidIntegerIndex(_O_, _numericIndex_) is *false*, return *true*. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, Reflect] ---*/ @@ -27,7 +27,7 @@ var value = { }, }; -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var target, receiver; [1, 1.5, -1].forEach(function(key) { @@ -38,21 +38,21 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = {}; assert(Reflect.set(target, key, value, receiver), "Reflect.set should succeed (key: " + key + ", receiver: empty object)"); assert(!target.hasOwnProperty(key), "target[" + key + "] should not be created (receiver: empty object)"); assert(!receiver.hasOwnProperty(key), "receiver[" + key + "] should not be created (receiver: empty object)"); - target = new TA([0n]); - receiver = new TA([1n]); + target = new TA(makeCtorArg([0n])); + receiver = new TA(makeCtorArg([1n])); assert(Reflect.set(target, key, value, receiver), "Reflect.set should succeed (key: " + key + ", receiver: another typed array of the same length)"); assert(!target.hasOwnProperty(key), "target[" + key + "] should not be created (receiver: another typed array of the same length)"); assert(!receiver.hasOwnProperty(key), "receiver[" + key + "] should not be created (receiver: another typed array of the same length)"); - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = Object.defineProperty({}, key, { get: function() { return 1n; }, set: function(_v) { throw new Test262Error(key + " setter should be unreachable!"); }, @@ -63,14 +63,14 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(receiver[key], 1n, "receiver[" + key + "] should remain unchanged (receiver: plain object with " + key + " accessor)"); - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = Object.defineProperty({}, key, { value: 1n, writable: false, configurable: true }); assert(Reflect.set(target, key, value, receiver), "Reflect.set should succeed (receiver: plain object with non-writable " + key + ")"); assert(!target.hasOwnProperty(key), "target[" + key + "] should not be created (receiver: plain object with non-writable " + key + ")"); assert.sameValue(receiver[key], 1n, "receiver[" + key + "] should remain unchanged (receiver: plain object with non-writable " + key + ")"); - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = Object.preventExtensions({}); assert(Reflect.set(target, key, value, receiver), "Reflect.set should fail (key: " + key + ", receiver: non-extensible empty object)"); assert(!target.hasOwnProperty(key), "target[" + key + "] should not be created (receiver: non-extensible empty object)"); @@ -81,11 +81,11 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); - target = new TA([0n]); - receiver = new TA([1n, 1n]); + target = new TA(makeCtorArg([0n])); + receiver = new TA(makeCtorArg([1n, 1n])); assert(Reflect.set(target, 1, value, receiver), "Reflect.set should succeed (receiver: another typed array of greater length)"); assert(!target.hasOwnProperty(1), "target[1] should not be created (receiver: another typed array of greater length)"); assert.sameValue(receiver[1], 1n, "receiver[1] should remain unchanged (receiver: another typed array of greater length)"); -}); +}, null, ["passthrough"]); assert.sameValue(valueOfCalls, 0, "value should not be coerced"); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-minus-zero.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-minus-zero.js index 52bb09a3f7a..f8529f8b675 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-minus-zero.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-minus-zero.js @@ -14,11 +14,11 @@ info: | i. Perform ? IntegerIndexedElementSet(O, numericIndex, V). ii. Return true. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n]); - assert.sameValue(Reflect.set(sample, '-0', 1n), true, 'Reflect.set("new TA([42n])", "-0", 1n) must return true'); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n])); + assert.sameValue(Reflect.set(sample, '-0', 1n), true, 'Reflect.set("new TA(makeCtorArg([42n]))", "-0", 1n) must return true'); assert.sameValue(sample.hasOwnProperty('-0'), false, 'sample.hasOwnProperty("-0") must return false'); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-not-canonical-index.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-not-canonical-index.js index 2710580f0e7..0390b10b2ba 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-not-canonical-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-not-canonical-index.js @@ -13,19 +13,19 @@ info: | b. If numericIndex is not undefined, then ... 3. Return ? OrdinarySet(O, P, V, Receiver). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray] ---*/ var keys = ['1.0', '+1', '1000000000000000000000', '0.0000001']; -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { keys.forEach(function(key) { - var sample = new TA([42n]); + var sample = new TA(makeCtorArg([42n])); assert.sameValue( Reflect.set(sample, key, 'ecma262'), true, - 'Reflect.set("new TA([42n])", key, "ecma262") must return true' + 'Reflect.set("new TA(makeCtorArg([42n]))", key, "ecma262") must return true' ); assert.sameValue(sample[key], 'ecma262', 'The value of sample[key] is "ecma262"'); @@ -33,7 +33,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue( Reflect.set(sample, key, 'es3000'), true, - 'Reflect.set("new TA([42n])", key, "es3000") must return true' + 'Reflect.set("new TA(makeCtorArg([42n]))", key, "es3000") must return true' ); assert.sameValue(sample[key], 'es3000', 'The value of sample[key] is "es3000"'); @@ -43,7 +43,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { value: undefined }); - assert.sameValue(Reflect.set(sample, key, 42), false, 'Reflect.set("new TA([42n])", key, 42) must return false'); + assert.sameValue(Reflect.set(sample, key, 42), false, 'Reflect.set("new TA(makeCtorArg([42n]))", key, 42) must return false'); assert.sameValue(sample[key], undefined, 'The value of sample[key] is expected to equal `undefined`'); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-not-integer.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-not-integer.js index 50596494ed2..a450c4a5c17 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-not-integer.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-not-integer.js @@ -15,19 +15,19 @@ info: | ii. Return true. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n]); - assert.sameValue(Reflect.set(sample, '1.1', 1n), true, 'Reflect.set("new TA([42n])", "1.1", 1n) must return true'); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n])); + assert.sameValue(Reflect.set(sample, '1.1', 1n), true, 'Reflect.set("new TA(makeCtorArg([42n]))", "1.1", 1n) must return true'); assert.sameValue( Reflect.set(sample, '0.0001', 1n), true, - 'Reflect.set("new TA([42n])", "0.0001", 1n) must return true' + 'Reflect.set("new TA(makeCtorArg([42n]))", "0.0001", 1n) must return true' ); assert.sameValue(sample.hasOwnProperty('1.1'), false, 'sample.hasOwnProperty("1.1") must return false'); assert.sameValue(sample.hasOwnProperty('0.0001'), false, 'sample.hasOwnProperty("0.0001") must return false'); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-not-numeric-index-set-throws.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-not-numeric-index-set-throws.js index 2fc95708b2d..4c228bc348a 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-not-numeric-index-set-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-not-numeric-index-set-throws.js @@ -19,12 +19,12 @@ info: | ... 8. Perform ? Call(setter, Receiver, « V »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); Object.defineProperty(sample, "test262", { set: function() { @@ -37,4 +37,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(sample.test262, undefined, 'The value of sample.test262 is expected to equal `undefined`'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-not-numeric-index.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-not-numeric-index.js index 84b9a214aad..94d4103641a 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-not-numeric-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-not-numeric-index.js @@ -13,16 +13,16 @@ info: | b. If numericIndex is not undefined, then ... 3. Return ? OrdinarySet(O, P, V, Receiver). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n])); assert.sameValue( Reflect.set(sample, 'test262', 'ecma262'), true, - 'Reflect.set("new TA([42n])", "test262", "ecma262") must return true' + 'Reflect.set("new TA(makeCtorArg([42n]))", "test262", "ecma262") must return true' ); assert.sameValue(sample.test262, 'ecma262', 'The value of sample.test262 is "ecma262"'); @@ -30,7 +30,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue( Reflect.set(sample, 'test262', 'es3000'), true, - 'Reflect.set("new TA([42n])", "test262", "es3000") must return true' + 'Reflect.set("new TA(makeCtorArg([42n]))", "test262", "es3000") must return true' ); assert.sameValue(sample.test262, 'es3000', 'The value of sample.test262 is "es3000"'); @@ -40,6 +40,6 @@ testWithBigIntTypedArrayConstructors(function(TA) { value: undefined }); - assert.sameValue(Reflect.set(sample, 'foo', 42), false, 'Reflect.set("new TA([42n])", "foo", 42) must return false'); + assert.sameValue(Reflect.set(sample, 'foo', 42), false, 'Reflect.set("new TA(makeCtorArg([42n]))", "foo", 42) must return false'); assert.sameValue(sample.foo, undefined, 'The value of sample.foo is expected to equal `undefined`'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-out-of-bounds.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-out-of-bounds.js index 0dc44998476..08d15742b76 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-out-of-bounds.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-out-of-bounds.js @@ -21,15 +21,15 @@ info: | 8. Let length be the value of O's [[ArrayLength]] internal slot. 9. If index < 0 or index ≥ length, return false. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n]); - assert.sameValue(Reflect.set(sample, '-1', 1n), true, 'Reflect.set("new TA([42n])", "-1", 1n) must return false'); - assert.sameValue(Reflect.set(sample, '1', 1n), true, 'Reflect.set("new TA([42n])", "1", 1n) must return false'); - assert.sameValue(Reflect.set(sample, '2', 1n), true, 'Reflect.set("new TA([42n])", "2", 1n) must return false'); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n])); + assert.sameValue(Reflect.set(sample, '-1', 1n), true, 'Reflect.set("new TA(makeCtorArg([42n]))", "-1", 1n) must return false'); + assert.sameValue(Reflect.set(sample, '1', 1n), true, 'Reflect.set("new TA(makeCtorArg([42n]))", "1", 1n) must return false'); + assert.sameValue(Reflect.set(sample, '2', 1n), true, 'Reflect.set("new TA(makeCtorArg([42n]))", "2", 1n) must return false'); assert.sameValue(sample.hasOwnProperty('-1'), false, 'sample.hasOwnProperty("-1") must return false'); assert.sameValue(sample.hasOwnProperty('1'), false, 'sample.hasOwnProperty("1") must return false'); assert.sameValue(sample.hasOwnProperty('2'), false, 'sample.hasOwnProperty("2") must return false'); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-symbol.js index a16e78826f1..fe4775149d3 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-symbol.js @@ -11,19 +11,19 @@ info: | 2. If Type(P) is String, then ... 3. Return ? OrdinarySet(O, P, V, Receiver). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, Symbol, TypedArray] ---*/ var s1 = Symbol('1'); var s2 = Symbol('2'); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42n])); assert.sameValue( Reflect.set(sample, s1, 'ecma262'), true, - 'Reflect.set("new TA([42n])", "Symbol(\\"1\\")", "ecma262") must return true' + 'Reflect.set("new TA(makeCtorArg([42n]))", "Symbol(\\"1\\")", "ecma262") must return true' ); assert.sameValue(sample[s1], 'ecma262', 'The value of sample[s1] is "ecma262"'); @@ -31,7 +31,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue( Reflect.set(sample, s1, 'es3000'), true, - 'Reflect.set("new TA([42n])", "Symbol(\\"1\\")", "es3000") must return true' + 'Reflect.set("new TA(makeCtorArg([42n]))", "Symbol(\\"1\\")", "es3000") must return true' ); assert.sameValue(sample[s1], 'es3000', 'The value of sample[s1] is "es3000"'); @@ -44,8 +44,8 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue( Reflect.set(sample, s2, 42), false, - 'Reflect.set("new TA([42n])", "Symbol(\\"2\\")", 42) must return false' + 'Reflect.set("new TA(makeCtorArg([42n]))", "Symbol(\\"2\\")", 42) must return false' ); assert.sameValue(sample[s2], undefined, 'The value of sample[s2] is expected to equal `undefined`'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-valid-index-prototype-chain-set.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-valid-index-prototype-chain-set.js index 15b80e4f97c..77f4a8eefc7 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-valid-index-prototype-chain-set.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-valid-index-prototype-chain-set.js @@ -14,7 +14,7 @@ info: | b. If numericIndex is not undefined, then [...] 3. Return ? OrdinarySet(O, P, V, Receiver). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, Proxy] ---*/ @@ -26,7 +26,7 @@ var value = { }, }; -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var target, receiver; Object.defineProperty(TA.prototype, 0, { @@ -36,7 +36,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = Object.create(target); receiver[0] = value; assert.sameValue(target[0], 0n, "target[0] should remain unchanged (receiver: empty object)"); @@ -44,7 +44,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { var proxyTrapCalls = 0; - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = new Proxy(Object.create(target), { defineProperty(_target, key, desc) { ++proxyTrapCalls; @@ -58,7 +58,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(proxyTrapCalls, 1, "Proxy's [[DefineOwnProperty]] exotic method should be called"); - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = Object.preventExtensions(Object.create(target)); assert.throws(TypeError, function() { "use strict"; receiver[0] = value; }, "setting receiver[0] should throw in strict mode (receiver: non-extensible empty object)"); @@ -66,7 +66,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert(!receiver.hasOwnProperty(0), "receiver[0] should not be created (receiver: non-extensible empty object)"); - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = Object.setPrototypeOf([], target); receiver[0] = value; assert.sameValue(target[0], 0n, "target[0] should remain unchanged (receiver: regular array)"); @@ -74,7 +74,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(receiver.length, 1, "Array's [[DefineOwnProperty]] exotic method should be called"); - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = Object.setPrototypeOf(new String(""), target); receiver[0] = value; assert.sameValue(target[0], 0n, "target[0] should remain unchanged (receiver: empty String object)"); @@ -82,6 +82,6 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert(delete TA.prototype[0]); -}); +}, null, ["passthrough"]); assert.sameValue(valueOfCalls, 0, "value should not be coerced"); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-valid-index-reflect-set.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-valid-index-reflect-set.js index 0a0cae6a3c9..4c3559d4742 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-valid-index-reflect-set.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/key-is-valid-index-reflect-set.js @@ -14,7 +14,7 @@ info: | b. If numericIndex is not undefined, then [...] 3. Return ? OrdinarySet(O, P, V, Receiver). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray, Reflect] ---*/ @@ -26,7 +26,7 @@ var value = { }, }; -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var target, receiver; Object.defineProperty(TA.prototype, 0, { @@ -36,35 +36,35 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = {}; assert(Reflect.set(target, 0, value, receiver), "Reflect.set should succeed (receiver: empty object)"); assert.sameValue(target[0], 0n, "target[0] should remain unchanged (receiver: empty object)"); assert.sameValue(receiver[0], value, "receiver[0] should be created (receiver: empty object)"); - target = new TA([0n]); - receiver = new TA([1n]); + target = new TA(makeCtorArg([0n])); + receiver = new TA(makeCtorArg([1n])); assert(Reflect.set(target, 0, Object(2n), receiver), "Reflect.set should succeed (receiver: another typed array of the same length)"); assert.sameValue(target[0], 0n, "target[0] should remain unchanged (receiver: another typed array of the same length)"); assert.sameValue(receiver[0], 2n, "receiver[0] should be updated (receiver: another typed array of the same length)"); - target = new TA([0n, 0n]); - receiver = new TA([1n]); + target = new TA(makeCtorArg([0n, 0n])); + receiver = new TA(makeCtorArg([1n])); assert(!Reflect.set(target, 1, value, receiver), "Reflect.set should fail (receiver: another typed array of shorter length)"); assert.sameValue(target[1], 0n, "target[1] should remain unchanged (receiver: another typed array of shorter length)"); assert(!receiver.hasOwnProperty(1), "receiver[1] should not be created (receiver: another typed array of shorter length)"); - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = Object.preventExtensions({}); assert(!Reflect.set(target, 0, value, receiver), "Reflect.set should fail (receiver: non-extensible empty object)"); assert.sameValue(target[0], 0n, "target[0] should remain unchanged (receiver: non-extensible empty object)"); assert(!receiver.hasOwnProperty(0), "receiver[0] should not be created (receiver: non-extensible empty object)"); - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = { get 0() { return 1n; }, set 0(_v) { throw new Test262Error("0 setter should be unreachable!"); }, @@ -74,7 +74,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(receiver[0], 1n, "receiver[0] should remain unchanged (receiver: plain object with 0 accessor)"); - target = new TA([0n]); + target = new TA(makeCtorArg([0n])); receiver = Object.defineProperty({}, 0, { value: 1n, writable: false, configurable: true }); assert(!Reflect.set(target, 0, value, receiver), "Reflect.set should fail (receiver: plain object with non-writable 0)"); assert.sameValue(target[0], 0n, "target[0] should remain unchanged (receiver: plain object with non-writable 0)"); @@ -82,6 +82,6 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert(delete TA.prototype[0]); -}); +}, null, ["passthrough"]); assert.sameValue(valueOfCalls, 0, "value should not be coerced"); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/null-tobigint.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/null-tobigint.js index 31e0045a4b6..500e99db5f3 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/null-tobigint.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/null-tobigint.js @@ -47,12 +47,12 @@ info: | Argument Type: Null Result: Throw a TypeError exception. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(1)); assert.throws(TypeError, function() { typedArray[0] = null; diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/number-tobigint.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/number-tobigint.js index 5adb9a6d198..89e39ea4cdb 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/number-tobigint.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/number-tobigint.js @@ -47,12 +47,12 @@ info: | Argument Type: Number Result: Throw a TypeError exception. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(1)); assert.throws(TypeError, function() { typedArray[0] = 1; diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/string-nan-tobigint.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/string-nan-tobigint.js index cafa32df253..ac112ff2827 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/string-nan-tobigint.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/string-nan-tobigint.js @@ -51,12 +51,12 @@ info: | 2. If n is NaN, throw a SyntaxError exception. 3. Return n. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(1)); assert.throws(SyntaxError, function() { typedArray[0] = "definately not a number"; diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/string-tobigint.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/string-tobigint.js index d8384b67c2d..e7cb51c0237 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/string-tobigint.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/string-tobigint.js @@ -57,11 +57,11 @@ info: | * If the MV is NaN, return NaN, otherwise return the BigInt which exactly corresponds to the MV, rather than rounding to a Number. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(1)); typedArray[0] = ''; assert.sameValue(typedArray[0], 0n, 'The value of typedArray[0] is 0n'); typedArray[0] = '1'; @@ -82,4 +82,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(SyntaxError, function() { typedArray[0] = '1e7'; }, '`typedArray[0] = "1e7"` throws SyntaxError'); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/symbol-tobigint.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/symbol-tobigint.js index a2e5cdc55cf..e6a655ecfbd 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/symbol-tobigint.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/symbol-tobigint.js @@ -47,14 +47,14 @@ info: | Argument Type: Symbol Result: Throw a TypeError exception. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray, Symbol] ---*/ var s = Symbol() -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA(1) +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(1)) assert.throws(TypeError, function() { typedArray[0] = s; diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/tonumber-value-detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/tonumber-value-detached-buffer.js index a72877157f9..b03effd01e1 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/tonumber-value-detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/tonumber-value-detached-buffer.js @@ -17,7 +17,7 @@ info: | i. Perform ? IntegerIndexedElementSet(O, numericIndex, V). ii. Return true. ... -includes: [testBigIntTypedArray.js, detachArrayBuffer.js] +includes: [testTypedArray.js, detachArrayBuffer.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray] ---*/ @@ -35,4 +35,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(result, true); assert.sameValue(ta[0], undefined); assert.sameValue(isDetached, true); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/tonumber-value-throws.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/tonumber-value-throws.js index 5f4230839b9..17bcb4e8d7b 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/tonumber-value-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/tonumber-value-throws.js @@ -22,11 +22,11 @@ info: | If O.[[ContentType]] is BigInt, let numValue be ? ToBigInt(value). Otherwise, let numValue be ? ToNumber(value). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - let sample = new TA([42n]); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + let sample = new TA(makeCtorArg([42n])); let obj = { valueOf() { diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/undefined-tobigint.js b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/undefined-tobigint.js index 2232e5d3ab1..d8507a8f82a 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/undefined-tobigint.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/BigInt/undefined-tobigint.js @@ -48,12 +48,12 @@ info: | Argument Type: Undefined Result: Throw a TypeError exception. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { - var typedArray = new TA(1); +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(1)); assert.throws(TypeError, function() { typedArray[0] = undefined; diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/bigint-tonumber.js b/test/built-ins/TypedArrayConstructors/internals/Set/bigint-tonumber.js index fd172e27863..bb6851ef4f9 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/bigint-tonumber.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/bigint-tonumber.js @@ -50,8 +50,8 @@ info: | includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var typedArray = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var typedArray = new TA(makeCtorArg(1)); assert.throws(TypeError, function() { typedArray[0] = 1n; diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/conversion-operation-consistent-nan.js b/test/built-ins/TypedArrayConstructors/internals/Set/conversion-operation-consistent-nan.js index 1d98c334089..c04983de4b6 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/conversion-operation-consistent-nan.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/conversion-operation-consistent-nan.js @@ -75,14 +75,14 @@ includes: [nans.js, testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, TypedArray] ---*/ -testWithTypedArrayConstructors(function(FA) { +testWithTypedArrayConstructors(function(FA, makeCtorArg) { var precision = floatTypedArrayConstructorPrecision(FA); - var samples = new FA(1); + var samples = new FA(makeCtorArg(1)); var controls, idx, aNaN; for (idx = 0; idx < NaNs.length; ++idx) { aNaN = NaNs[idx]; - controls = new FA([aNaN, aNaN, aNaN]); + controls = new FA(makeCtorArg([aNaN, aNaN, aNaN])); samples[0] = aNaN; @@ -101,5 +101,4 @@ testWithTypedArrayConstructors(function(FA) { ); } } -}, floatArrayConstructors); - +}, floatArrayConstructors, null, ["immutable"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/detached-buffer-key-is-not-numeric-index.js b/test/built-ins/TypedArrayConstructors/internals/Set/detached-buffer-key-is-not-numeric-index.js index 83db822da77..a2af5950533 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/detached-buffer-key-is-not-numeric-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/detached-buffer-key-is-not-numeric-index.js @@ -27,4 +27,4 @@ testWithTypedArrayConstructors(function(TA) { 'Reflect.set(sample, "foo", "test262") must return true' ); assert.sameValue(sample.foo, "test262", 'The value of sample.foo is "test262"'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/detached-buffer-key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/Set/detached-buffer-key-is-symbol.js index 86b31561a66..8bbb2ad3435 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/detached-buffer-key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/detached-buffer-key-is-symbol.js @@ -27,4 +27,4 @@ testWithTypedArrayConstructors(function(TA) { 'Reflect.set(sample, "Symbol(\\"1\\")", "test262") must return true' ); assert.sameValue(sample[s], "test262", 'The value of sample[s] is "test262"'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/detached-buffer-realm.js b/test/built-ins/TypedArrayConstructors/internals/Set/detached-buffer-realm.js index 82732c41fad..f2c1d4820d1 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/detached-buffer-realm.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/detached-buffer-realm.js @@ -36,4 +36,4 @@ testWithTypedArrayConstructors(function(TA) { $DETACHBUFFER(sample.buffer); sample[0] = 1; assert.sameValue(sample[0], undefined, '`sample[0]` is undefined'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/Set/detached-buffer.js index 0029fd07c8e..ec17ae829d3 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/detached-buffer.js @@ -52,4 +52,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample['0'] = obj; }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/indexed-value.js b/test/built-ins/TypedArrayConstructors/internals/Set/indexed-value.js index 205ddedbcff..10051e2743e 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/indexed-value.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/indexed-value.js @@ -44,10 +44,10 @@ let throwDesc = { Object.defineProperty(proto, '0', throwDesc); Object.defineProperty(proto, '1', throwDesc); -testWithTypedArrayConstructors(function(TA) { - let sample = new TA(2); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + let sample = new TA(makeCtorArg(2)); assert.sameValue(Reflect.set(sample, '0', 1), true, 'Reflect.set(sample, "0", 1) must return true'); assert.sameValue(sample[0], 1, 'The value of sample[0] is 1'); assert.sameValue(Reflect.set(sample, '1', 42), true, 'Reflect.set(sample, "1", 42) must return true'); assert.sameValue(sample[1], 42, 'The value of sample[1] is 42'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-canonical-invalid-index-prototype-chain-set.js b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-canonical-invalid-index-prototype-chain-set.js index 3771fe645ee..e7c655768e2 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-canonical-invalid-index-prototype-chain-set.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-canonical-invalid-index-prototype-chain-set.js @@ -27,7 +27,7 @@ var value = { }, }; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var target, receiver; [1, 1.5, -1].forEach(function(key) { @@ -38,7 +38,7 @@ testWithTypedArrayConstructors(function(TA) { }); - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = Object.create(target); receiver[key] = value; assert(!target.hasOwnProperty(key), "target[" + key + "] should not be created (receiver: empty object)"); @@ -46,7 +46,7 @@ testWithTypedArrayConstructors(function(TA) { var proxyTrapCalls = 0; - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = new Proxy(Object.create(target), { defineProperty(_target, key, desc) { ++proxyTrapCalls; @@ -60,7 +60,7 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(proxyTrapCalls, 0, "Proxy's [[DefineOwnProperty]] exotic method should not be called (key: " + key + ")"); - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = Object.preventExtensions(Object.create(target)); receiver[key] = value; assert(!target.hasOwnProperty(key), "target[" + key + "] should not be created (receiver: non-extensible empty object)"); @@ -71,7 +71,7 @@ testWithTypedArrayConstructors(function(TA) { }); - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = Object.setPrototypeOf([], target); receiver[1] = value; assert(!target.hasOwnProperty(1), "target[1] should not be created (receiver: regular array)"); @@ -79,11 +79,11 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(receiver.length, 0, "Array's [[DefineOwnProperty]] exotic method should not be called"); - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = Object.setPrototypeOf(new String(""), target); receiver[1] = value; assert(!target.hasOwnProperty(1), "target[1] should not be created (receiver: empty String object)"); assert(!receiver.hasOwnProperty(1), "receiver[1] should remain unchanged (receiver: empty String object)"); -}); +}, null, ["passthrough"]); assert.sameValue(valueOfCalls, 0, "value should not be coerced"); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-canonical-invalid-index-reflect-set.js b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-canonical-invalid-index-reflect-set.js index fa319037ded..17447172141 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-canonical-invalid-index-reflect-set.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-canonical-invalid-index-reflect-set.js @@ -27,7 +27,7 @@ var value = { }, }; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var target, receiver; [1, 1.5, -1].forEach(function(key) { @@ -38,21 +38,21 @@ testWithTypedArrayConstructors(function(TA) { }); - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = {}; assert(Reflect.set(target, key, value, receiver), "Reflect.set should succeed (key: " + key + ", receiver: empty object)"); assert(!target.hasOwnProperty(key), "target[" + key + "] should not be created (receiver: empty object)"); assert(!receiver.hasOwnProperty(key), "receiver[" + key + "] should not be created (receiver: empty object)"); - target = new TA([0]); - receiver = new TA([1]); + target = new TA(makeCtorArg([0])); + receiver = new TA(makeCtorArg([1])); assert(Reflect.set(target, key, value, receiver), "Reflect.set should succeed (key: " + key + ", receiver: another typed array of the same length)"); assert(!target.hasOwnProperty(key), "target[" + key + "] should not be created (receiver: another typed array of the same length)"); assert(!receiver.hasOwnProperty(key), "receiver[" + key + "] should not be created (receiver: another typed array of the same length)"); - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = Object.defineProperty({}, key, { get: function() { return 1; }, set: function(_v) { throw new Test262Error(key + " setter should be unreachable!"); }, @@ -63,14 +63,14 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(receiver[key], 1, "receiver[" + key + "] should remain unchanged (receiver: plain object with " + key + " accessor)"); - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = Object.defineProperty({}, key, { value: 1, writable: false, configurable: true }); assert(Reflect.set(target, key, value, receiver), "Reflect.set should succeed (receiver: plain object with non-writable " + key + ")"); assert(!target.hasOwnProperty(key), "target[" + key + "] should not be created (receiver: plain object with non-writable " + key + ")"); assert.sameValue(receiver[key], 1, "receiver[" + key + "] should remain unchanged (receiver: plain object with non-writable " + key + ")"); - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = Object.preventExtensions({}); assert(Reflect.set(target, key, value, receiver), "Reflect.set should fail (key: " + key + ", receiver: non-extensible empty object)"); assert(!target.hasOwnProperty(key), "target[" + key + "] should not be created (receiver: non-extensible empty object)"); @@ -81,11 +81,11 @@ testWithTypedArrayConstructors(function(TA) { }); - target = new TA([0]); - receiver = new TA([1, 1]); + target = new TA(makeCtorArg([0])); + receiver = new TA(makeCtorArg([1, 1])); assert(Reflect.set(target, 1, value, receiver), "Reflect.set should succeed (receiver: another typed array of greater length)"); assert(!target.hasOwnProperty(1), "target[1] should not be created (receiver: another typed array of greater length)"); assert.sameValue(receiver[1], 1, "receiver[1] should remain unchanged (receiver: another typed array of greater length)"); -}); +}, null, ["passthrough"]); assert.sameValue(valueOfCalls, 0, "value should not be coerced"); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-minus-zero.js b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-minus-zero.js index 30c54b706f7..680d2eb95b2 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-minus-zero.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-minus-zero.js @@ -19,9 +19,9 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42])); assert.sameValue(Reflect.set(sample, "-0", 1), true, 'Reflect.set(sample, "-0", 1) must return true'); assert.sameValue(sample.hasOwnProperty("-0"), false, 'sample.hasOwnProperty("-0") must return false'); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-not-canonical-index.js b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-not-canonical-index.js index 3a57ae900fa..7795fbc7ae3 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-not-canonical-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-not-canonical-index.js @@ -24,9 +24,9 @@ var keys = [ "0.0000001" ]; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { keys.forEach(function(key) { - var sample = new TA([42]); + var sample = new TA(makeCtorArg([42])); assert.sameValue( Reflect.set(sample, key, "ecma262"), @@ -55,4 +55,4 @@ testWithTypedArrayConstructors(function(TA) { sample[key], undefined, 'The value of sample[key] is expected to equal `undefined`' ); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-not-integer.js b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-not-integer.js index c83325bb26f..663f628927a 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-not-integer.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-not-integer.js @@ -19,8 +19,8 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42])); assert.sameValue(Reflect.set(sample, "1.1", 1), true, 'Reflect.set(sample, "1.1", 1) must return true'); assert.sameValue(Reflect.set(sample, "0.0001", 1), true, 'Reflect.set(sample, "0.0001", 1) must return true'); @@ -31,4 +31,4 @@ testWithTypedArrayConstructors(function(TA) { false, 'sample.hasOwnProperty("0.0001") must return false' ); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-not-numeric-index-set-throws.js b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-not-numeric-index-set-throws.js index c1bd92e8f3c..bcd4082c799 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-not-numeric-index-set-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-not-numeric-index-set-throws.js @@ -23,8 +23,8 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(1); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg(1)); Object.defineProperty(sample, "test262", { set: function() { @@ -37,4 +37,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(sample.test262, undefined, 'The value of sample.test262 is expected to equal `undefined`'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-not-numeric-index.js b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-not-numeric-index.js index f3705432c75..9164a8bfbee 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-not-numeric-index.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-not-numeric-index.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42])); assert.sameValue( Reflect.set(sample, "test262", "ecma262"), @@ -44,4 +44,4 @@ testWithTypedArrayConstructors(function(TA) { 'Reflect.set(sample, "foo", 42) must return false' ); assert.sameValue(sample.foo, undefined, 'The value of sample.foo is expected to equal `undefined`'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-out-of-bounds.js b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-out-of-bounds.js index 9e0317dd6b0..f5c073e5d1f 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-out-of-bounds.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-out-of-bounds.js @@ -19,8 +19,8 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, Reflect, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42])); assert.sameValue(Reflect.set(sample, "-1", 1), true, 'Reflect.set(sample, "-1", 1) must return true'); assert.sameValue(Reflect.set(sample, "1", 1), true, 'Reflect.set(sample, "1", 1) must return true'); @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(sample.hasOwnProperty("-1"), false, 'sample.hasOwnProperty("-1") must return false'); assert.sameValue(sample.hasOwnProperty("1"), false, 'sample.hasOwnProperty("1") must return false'); assert.sameValue(sample.hasOwnProperty("2"), false, 'sample.hasOwnProperty("2") must return false'); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-symbol.js b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-symbol.js index 029fcac82d2..e6207a8dc19 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-symbol.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-symbol.js @@ -18,8 +18,8 @@ features: [align-detached-buffer-semantics-with-web-reality, Reflect, Symbol, Ty var s1 = Symbol("1"); var s2 = Symbol("2"); -testWithTypedArrayConstructors(function(TA) { - var sample = new TA([42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var sample = new TA(makeCtorArg([42])); assert.sameValue( Reflect.set(sample, s1, "ecma262"), @@ -45,4 +45,4 @@ testWithTypedArrayConstructors(function(TA) { 'Reflect.set(sample, "Symbol(\\"2\\")", 42) must return false' ); assert.sameValue(sample[s2], undefined, 'The value of sample[s2] is expected to equal `undefined`'); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-valid-index-prototype-chain-set.js b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-valid-index-prototype-chain-set.js index 38165490541..314e79e871f 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-valid-index-prototype-chain-set.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-valid-index-prototype-chain-set.js @@ -26,7 +26,7 @@ var value = { }, }; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var target, receiver; Object.defineProperty(TA.prototype, 0, { @@ -36,7 +36,7 @@ testWithTypedArrayConstructors(function(TA) { }); - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = Object.create(target); receiver[0] = value; assert.sameValue(target[0], 0, "target[0] should remain unchanged (receiver: empty object)"); @@ -44,7 +44,7 @@ testWithTypedArrayConstructors(function(TA) { var proxyTrapCalls = 0; - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = new Proxy(Object.create(target), { defineProperty(_target, key, desc) { ++proxyTrapCalls; @@ -58,7 +58,7 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(proxyTrapCalls, 1, "Proxy's [[DefineOwnProperty]] exotic method should be called"); - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = Object.preventExtensions(Object.create(target)); assert.throws(TypeError, function() { "use strict"; receiver[0] = value; }, "setting receiver[0] should throw in strict mode (receiver: non-extensible empty object)"); @@ -66,7 +66,7 @@ testWithTypedArrayConstructors(function(TA) { assert(!receiver.hasOwnProperty(0), "receiver[0] should not be created (receiver: non-extensible empty object)"); - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = Object.setPrototypeOf([], target); receiver[0] = value; assert.sameValue(target[0], 0, "target[0] should remain unchanged (receiver: regular array)"); @@ -74,7 +74,7 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(receiver.length, 1, "Array's [[DefineOwnProperty]] exotic method should be called"); - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = Object.setPrototypeOf(new String(""), target); receiver[0] = value; assert.sameValue(target[0], 0, "target[0] should remain unchanged (receiver: empty String object)"); @@ -82,6 +82,6 @@ testWithTypedArrayConstructors(function(TA) { assert(delete TA.prototype[0]); -}); +}, null, ["passthrough"]); assert.sameValue(valueOfCalls, 0, "value should not be coerced"); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-valid-index-reflect-set.js b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-valid-index-reflect-set.js index 67d2be655c0..f475998b12e 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/key-is-valid-index-reflect-set.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/key-is-valid-index-reflect-set.js @@ -26,8 +26,8 @@ var value = { }, }; -testWithTypedArrayConstructors(function(TA) { - function coerceValue(value) { return new TA([value])[0]; } +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + function coerceValue(value) { return new TA(makeCtorArg([value]))[0]; } var target, receiver; @@ -38,35 +38,35 @@ testWithTypedArrayConstructors(function(TA) { }); - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = {}; assert(Reflect.set(target, 0, value, receiver), "Reflect.set should succeed (receiver: empty object)"); assert.sameValue(target[0], 0, "target[0] should remain unchanged (receiver: empty object)"); assert.sameValue(receiver[0], value, "receiver[0] should be created (receiver: empty object)"); - target = new TA([0]); - receiver = new TA([1]); + target = new TA(makeCtorArg([0])); + receiver = new TA(makeCtorArg([1])); assert(Reflect.set(target, 0, new Number(2.3), receiver), "Reflect.set should succeed (receiver: another typed array of the same length)"); assert.sameValue(target[0], 0, "target[0] should remain unchanged (receiver: another typed array of the same length)"); assert.sameValue(receiver[0], coerceValue(new Number(2.3)), "receiver[0] should be updated (receiver: another typed array of the same length)"); - target = new TA([0, 0]); - receiver = new TA([1]); + target = new TA(makeCtorArg([0, 0])); + receiver = new TA(makeCtorArg([1])); assert(!Reflect.set(target, 1, value, receiver), "Reflect.set should fail (receiver: another typed array of shorter length)"); assert.sameValue(target[1], 0, "target[1] should remain unchanged (receiver: another typed array of shorter length)"); assert(!receiver.hasOwnProperty(1), "receiver[1] should not be created (receiver: another typed array of shorter length)"); - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = Object.preventExtensions({}); assert(!Reflect.set(target, 0, value, receiver), "Reflect.set should fail (receiver: non-extensible empty object)"); assert.sameValue(target[0], 0, "target[0] should remain unchanged (receiver: non-extensible empty object)"); assert(!receiver.hasOwnProperty(0), "receiver[0] should not be created (receiver: non-extensible empty object)"); - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = { get 0() { return 1; }, set 0(_v) { throw new Test262Error("0 setter should be unreachable!"); }, @@ -76,7 +76,7 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(receiver[0], 1, "receiver[0] should remain unchanged (receiver: plain object with 0 accessor)"); - target = new TA([0]); + target = new TA(makeCtorArg([0])); receiver = Object.defineProperty({}, 0, { value: 1, writable: false, configurable: true }); assert(!Reflect.set(target, 0, value, receiver), "Reflect.set should fail (receiver: plain object with non-writable 0)"); assert.sameValue(target[0], 0, "target[0] should remain unchanged (receiver: plain object with non-writable 0)"); @@ -84,6 +84,6 @@ testWithTypedArrayConstructors(function(TA) { assert(delete TA.prototype[0]); -}); +}, null, ["passthrough"]); assert.sameValue(valueOfCalls, 0, "value should not be coerced"); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/tonumber-value-detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/Set/tonumber-value-detached-buffer.js index 9836a2ab5cc..e782c9fc143 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/tonumber-value-detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/tonumber-value-detached-buffer.js @@ -47,4 +47,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(result, true); assert.sameValue(ta[0], undefined); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/internals/Set/tonumber-value-throws.js b/test/built-ins/TypedArrayConstructors/internals/Set/tonumber-value-throws.js index 2c91acaa26f..beabcd95fcb 100644 --- a/test/built-ins/TypedArrayConstructors/internals/Set/tonumber-value-throws.js +++ b/test/built-ins/TypedArrayConstructors/internals/Set/tonumber-value-throws.js @@ -26,8 +26,8 @@ includes: [testTypedArray.js] features: [align-detached-buffer-semantics-with-web-reality, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - let sample = new TA([42]); +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + let sample = new TA(makeCtorArg([42])); let obj = { valueOf() { diff --git a/test/built-ins/TypedArrayConstructors/of/BigInt/argument-is-symbol-throws.js b/test/built-ins/TypedArrayConstructors/of/BigInt/argument-is-symbol-throws.js index 3f999901914..7e9b4d84f10 100644 --- a/test/built-ins/TypedArrayConstructors/of/BigInt/argument-is-symbol-throws.js +++ b/test/built-ins/TypedArrayConstructors/of/BigInt/argument-is-symbol-throws.js @@ -20,7 +20,7 @@ info: | Perform SetValueInBuffer(buffer, indexedPosition, elementType, numValue, true, Unordered). Return NormalCompletion(undefined). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ @@ -30,4 +30,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA.of(s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/BigInt/argument-number-value-throws.js b/test/built-ins/TypedArrayConstructors/of/BigInt/argument-number-value-throws.js index 01bf097b6af..d7f6a1aa801 100644 --- a/test/built-ins/TypedArrayConstructors/of/BigInt/argument-number-value-throws.js +++ b/test/built-ins/TypedArrayConstructors/of/BigInt/argument-number-value-throws.js @@ -12,7 +12,7 @@ info: | ... c. Perform ? Set(newObj, Pk, kValue, true). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -37,5 +37,5 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(lastValue, "obj2"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/BigInt/custom-ctor-does-not-instantiate-ta-throws.js b/test/built-ins/TypedArrayConstructors/of/BigInt/custom-ctor-does-not-instantiate-ta-throws.js index 9e7b97b73b1..532fca0ed01 100644 --- a/test/built-ins/TypedArrayConstructors/of/BigInt/custom-ctor-does-not-instantiate-ta-throws.js +++ b/test/built-ins/TypedArrayConstructors/of/BigInt/custom-ctor-does-not-instantiate-ta-throws.js @@ -16,7 +16,7 @@ info: | 1. Let newTypedArray be ? Construct(constructor, argumentList). 2. Perform ? ValidateTypedArray(newTypedArray). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -26,4 +26,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA.of.call(ctor, 42n); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/BigInt/custom-ctor-returns-other-instance.js b/test/built-ins/TypedArrayConstructors/of/BigInt/custom-ctor-returns-other-instance.js index 0137233954d..b0adf28e2e6 100644 --- a/test/built-ins/TypedArrayConstructors/of/BigInt/custom-ctor-returns-other-instance.js +++ b/test/built-ins/TypedArrayConstructors/of/BigInt/custom-ctor-returns-other-instance.js @@ -13,13 +13,13 @@ info: | ... 5. Let newObj be ? TypedArrayCreate(C, « len »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var result; - var custom = new TA(3); + var custom = new TA(makeCtorArg(3)); var ctor = function() { return custom; }; @@ -29,4 +29,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { result = TypedArray.of.call(ctor, 1n, 2n); assert.sameValue(result, custom, "using iterator, higher length"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArrayConstructors/of/BigInt/custom-ctor-returns-smaller-instance-throws.js b/test/built-ins/TypedArrayConstructors/of/BigInt/custom-ctor-returns-smaller-instance-throws.js index 001f102d0c3..45bc21643e7 100644 --- a/test/built-ins/TypedArrayConstructors/of/BigInt/custom-ctor-returns-smaller-instance-throws.js +++ b/test/built-ins/TypedArrayConstructors/of/BigInt/custom-ctor-returns-smaller-instance-throws.js @@ -12,13 +12,13 @@ info: | ... 5. Let newObj be ? TypedArrayCreate(C, « len »). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithBigIntTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA, makeCtorArg) { var ctor = function() { - return new TA(1); + return new TA(makeCtorArg(1)); }; assert.throws(TypeError, function() { diff --git a/test/built-ins/TypedArrayConstructors/of/BigInt/custom-ctor.js b/test/built-ins/TypedArrayConstructors/of/BigInt/custom-ctor.js index cb770d55fea..197b371ae7a 100644 --- a/test/built-ins/TypedArrayConstructors/of/BigInt/custom-ctor.js +++ b/test/built-ins/TypedArrayConstructors/of/BigInt/custom-ctor.js @@ -16,7 +16,7 @@ info: | 1. Let newTypedArray be ? Construct(constructor, argumentList). 2. Perform ? ValidateTypedArray(newTypedArray). ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -32,4 +32,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/BigInt/inherited.js b/test/built-ins/TypedArrayConstructors/of/BigInt/inherited.js index d00bec61a2b..c5575856ef1 100644 --- a/test/built-ins/TypedArrayConstructors/of/BigInt/inherited.js +++ b/test/built-ins/TypedArrayConstructors/of/BigInt/inherited.js @@ -9,7 +9,7 @@ info: | The %TypedArray% intrinsic object is a constructor function object that all of the TypedArray constructor object inherit from. -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -22,4 +22,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { TA.hasOwnProperty("of"), false, "constructor does not define an own property named 'of'" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/BigInt/invoked-as-func.js b/test/built-ins/TypedArrayConstructors/of/BigInt/invoked-as-func.js index 05d1a841f87..20ed9af89bb 100644 --- a/test/built-ins/TypedArrayConstructors/of/BigInt/invoked-as-func.js +++ b/test/built-ins/TypedArrayConstructors/of/BigInt/invoked-as-func.js @@ -11,7 +11,7 @@ info: | 3. Let C be the this value. 4. If IsConstructor(C) is false, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -21,4 +21,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { of(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/BigInt/new-instance-empty.js b/test/built-ins/TypedArrayConstructors/of/BigInt/new-instance-empty.js index 592f3ced355..a207179eed4 100644 --- a/test/built-ins/TypedArrayConstructors/of/BigInt/new-instance-empty.js +++ b/test/built-ins/TypedArrayConstructors/of/BigInt/new-instance-empty.js @@ -4,7 +4,7 @@ esid: sec-%typedarray%.of description: > Return a new empty TypedArray -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -13,4 +13,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(result.length, 0); assert.sameValue(result.constructor, TA); assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/BigInt/new-instance-using-custom-ctor.js b/test/built-ins/TypedArrayConstructors/of/BigInt/new-instance-using-custom-ctor.js index ff9b68a7ad3..6688d92c6b4 100644 --- a/test/built-ins/TypedArrayConstructors/of/BigInt/new-instance-using-custom-ctor.js +++ b/test/built-ins/TypedArrayConstructors/of/BigInt/new-instance-using-custom-ctor.js @@ -4,7 +4,7 @@ esid: sec-%typedarray%.of description: > Return a new TypedArray using a custom Constructor -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -25,4 +25,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(result[2], 42n); assert.sameValue(result.constructor, TA); assert.sameValue(called, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/BigInt/new-instance.js b/test/built-ins/TypedArrayConstructors/of/BigInt/new-instance.js index 12b7b2ab75b..277e5b0b261 100644 --- a/test/built-ins/TypedArrayConstructors/of/BigInt/new-instance.js +++ b/test/built-ins/TypedArrayConstructors/of/BigInt/new-instance.js @@ -30,7 +30,7 @@ info: | Perform SetValueInBuffer(buffer, indexedPosition, elementType, numValue, true, Unordered). Return NormalCompletion(undefined). -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -42,4 +42,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(result[2], 0n); assert.sameValue(result.constructor, TA); assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/BigInt/this-is-not-constructor.js b/test/built-ins/TypedArrayConstructors/of/BigInt/this-is-not-constructor.js index 1811c1a7509..7281bb0998d 100644 --- a/test/built-ins/TypedArrayConstructors/of/BigInt/this-is-not-constructor.js +++ b/test/built-ins/TypedArrayConstructors/of/BigInt/this-is-not-constructor.js @@ -11,7 +11,7 @@ info: | 3. Let C be the this value. 4. If IsConstructor(C) is false, throw a TypeError exception. ... -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ @@ -21,4 +21,4 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA.of.call(m, 0n); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/argument-is-symbol-throws.js b/test/built-ins/TypedArrayConstructors/of/argument-is-symbol-throws.js index 07874ae471d..f04d26b0a8a 100644 --- a/test/built-ins/TypedArrayConstructors/of/argument-is-symbol-throws.js +++ b/test/built-ins/TypedArrayConstructors/of/argument-is-symbol-throws.js @@ -30,4 +30,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA.of(s); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/argument-number-value-throws.js b/test/built-ins/TypedArrayConstructors/of/argument-number-value-throws.js index bda57f8cd45..d4aa75114d2 100644 --- a/test/built-ins/TypedArrayConstructors/of/argument-number-value-throws.js +++ b/test/built-ins/TypedArrayConstructors/of/argument-number-value-throws.js @@ -39,5 +39,5 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(lastValue, "obj2"); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/custom-ctor-does-not-instantiate-ta-throws.js b/test/built-ins/TypedArrayConstructors/of/custom-ctor-does-not-instantiate-ta-throws.js index 62344d90470..fbfc9d645cd 100644 --- a/test/built-ins/TypedArrayConstructors/of/custom-ctor-does-not-instantiate-ta-throws.js +++ b/test/built-ins/TypedArrayConstructors/of/custom-ctor-does-not-instantiate-ta-throws.js @@ -26,4 +26,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA.of.call(ctor, 42); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/custom-ctor-returns-other-instance.js b/test/built-ins/TypedArrayConstructors/of/custom-ctor-returns-other-instance.js index b479d6df3bc..12cf8af04b8 100644 --- a/test/built-ins/TypedArrayConstructors/of/custom-ctor-returns-other-instance.js +++ b/test/built-ins/TypedArrayConstructors/of/custom-ctor-returns-other-instance.js @@ -17,9 +17,9 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var result; - var custom = new TA(3); + var custom = new TA(makeCtorArg(3)); var ctor = function() { return custom; }; @@ -29,4 +29,4 @@ testWithTypedArrayConstructors(function(TA) { result = TypedArray.of.call(ctor, 1, 2); assert.sameValue(result, custom, "using iterator, higher length"); -}); +}, null, null, ["immutable"]); diff --git a/test/built-ins/TypedArrayConstructors/of/custom-ctor-returns-smaller-instance-throws.js b/test/built-ins/TypedArrayConstructors/of/custom-ctor-returns-smaller-instance-throws.js index 93e669d0283..69440217109 100644 --- a/test/built-ins/TypedArrayConstructors/of/custom-ctor-returns-smaller-instance-throws.js +++ b/test/built-ins/TypedArrayConstructors/of/custom-ctor-returns-smaller-instance-throws.js @@ -16,9 +16,9 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var ctor = function() { - return new TA(1); + return new TA(makeCtorArg(1)); }; assert.throws(TypeError, function() { diff --git a/test/built-ins/TypedArrayConstructors/of/custom-ctor.js b/test/built-ins/TypedArrayConstructors/of/custom-ctor.js index c794f7962d7..04a703c32b0 100644 --- a/test/built-ins/TypedArrayConstructors/of/custom-ctor.js +++ b/test/built-ins/TypedArrayConstructors/of/custom-ctor.js @@ -32,4 +32,4 @@ testWithTypedArrayConstructors(function(TA) { }); assert.sameValue(called, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/inherited.js b/test/built-ins/TypedArrayConstructors/of/inherited.js index 6a7ee304b3d..bd09a8461f2 100644 --- a/test/built-ins/TypedArrayConstructors/of/inherited.js +++ b/test/built-ins/TypedArrayConstructors/of/inherited.js @@ -22,4 +22,4 @@ testWithTypedArrayConstructors(function(TA) { TA.hasOwnProperty("of"), false, "constructor does not define an own property named 'of'" ); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/invoked-as-func.js b/test/built-ins/TypedArrayConstructors/of/invoked-as-func.js index 261d47e104f..e76ab016d44 100644 --- a/test/built-ins/TypedArrayConstructors/of/invoked-as-func.js +++ b/test/built-ins/TypedArrayConstructors/of/invoked-as-func.js @@ -21,4 +21,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { of(); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/nan-conversion.js b/test/built-ins/TypedArrayConstructors/of/nan-conversion.js index 452c2e965bd..5197f3105da 100644 --- a/test/built-ins/TypedArrayConstructors/of/nan-conversion.js +++ b/test/built-ins/TypedArrayConstructors/of/nan-conversion.js @@ -26,7 +26,7 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var result = TA.of(NaN, undefined); assert.sameValue(result.length, 2); assert.sameValue(result[0], NaN); @@ -36,7 +36,7 @@ testWithTypedArrayConstructors(function(TA) { }, floatArrayConstructors); -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var result = TA.of(NaN, undefined); assert.sameValue(result.length, 2); assert.sameValue(result[0], 0); diff --git a/test/built-ins/TypedArrayConstructors/of/new-instance-empty.js b/test/built-ins/TypedArrayConstructors/of/new-instance-empty.js index 75c7feb8a18..f9a38df4258 100644 --- a/test/built-ins/TypedArrayConstructors/of/new-instance-empty.js +++ b/test/built-ins/TypedArrayConstructors/of/new-instance-empty.js @@ -13,4 +13,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(result.length, 0); assert.sameValue(result.constructor, TA); assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/new-instance-from-zero.js b/test/built-ins/TypedArrayConstructors/of/new-instance-from-zero.js index bba815645e3..c819dc5fac5 100644 --- a/test/built-ins/TypedArrayConstructors/of/new-instance-from-zero.js +++ b/test/built-ins/TypedArrayConstructors/of/new-instance-from-zero.js @@ -8,7 +8,7 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var result = TA.of(-0, +0); assert.sameValue(result.length, 2); assert.sameValue(result[0], -0, "-0 => 0"); @@ -18,7 +18,7 @@ testWithTypedArrayConstructors(function(TA) { }, floatArrayConstructors); -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { var result = TA.of(-0, +0); assert.sameValue(result.length, 2); assert.sameValue(result[0], 0, "-0 => 0"); diff --git a/test/built-ins/TypedArrayConstructors/of/new-instance-using-custom-ctor.js b/test/built-ins/TypedArrayConstructors/of/new-instance-using-custom-ctor.js index 7cc95230eb3..f6def52b2c6 100644 --- a/test/built-ins/TypedArrayConstructors/of/new-instance-using-custom-ctor.js +++ b/test/built-ins/TypedArrayConstructors/of/new-instance-using-custom-ctor.js @@ -25,4 +25,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(result[2], 42); assert.sameValue(result.constructor, TA); assert.sameValue(called, 1); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/new-instance.js b/test/built-ins/TypedArrayConstructors/of/new-instance.js index 9cbba9811f8..aa75294f40c 100644 --- a/test/built-ins/TypedArrayConstructors/of/new-instance.js +++ b/test/built-ins/TypedArrayConstructors/of/new-instance.js @@ -42,4 +42,4 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(result[2], 0); assert.sameValue(result.constructor, TA); assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/of/this-is-not-constructor.js b/test/built-ins/TypedArrayConstructors/of/this-is-not-constructor.js index be5b3b65af7..1dc50405840 100644 --- a/test/built-ins/TypedArrayConstructors/of/this-is-not-constructor.js +++ b/test/built-ins/TypedArrayConstructors/of/this-is-not-constructor.js @@ -21,4 +21,4 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA.of.call(m, []); }); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/Symbol.iterator.js b/test/built-ins/TypedArrayConstructors/prototype/Symbol.iterator.js index 46590fe4d59..ca8f63f620b 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/Symbol.iterator.js +++ b/test/built-ins/TypedArrayConstructors/prototype/Symbol.iterator.js @@ -10,4 +10,4 @@ features: [Symbol.iterator, TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty(Symbol.iterator), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/Symbol.toStringTag/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/Symbol.toStringTag/bigint-inherited.js index 476af1cff5f..93c72e52294 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/Symbol.toStringTag/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/Symbol.toStringTag/bigint-inherited.js @@ -5,10 +5,10 @@ esid: sec-get-%typedarray%.prototype-@@tostringtag description: > _TypedArray_.prototype[@@toStringTag] is inherited from %TypedArray% _TypedArray_.prototype has no own property @@toStringTag -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.toStringTag, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty(Symbol.toStringTag), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/Symbol.toStringTag/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/Symbol.toStringTag/inherited.js index e0372adb729..1956834a7e5 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/Symbol.toStringTag/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/Symbol.toStringTag/inherited.js @@ -11,4 +11,4 @@ features: [Symbol.toStringTag, TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty(Symbol.toStringTag), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/bigint-Symbol.iterator.js b/test/built-ins/TypedArrayConstructors/prototype/bigint-Symbol.iterator.js index 149575d658c..cd5c8c438d5 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/bigint-Symbol.iterator.js +++ b/test/built-ins/TypedArrayConstructors/prototype/bigint-Symbol.iterator.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype-@@iterator description: > _TypedArray_.prototype has no own property @@iterator -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, Symbol.iterator, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty(Symbol.iterator), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/buffer/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/buffer/bigint-inherited.js index 6fe2efdd5f2..98e3161d8ed 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/buffer/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/buffer/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-get-%typedarray%.prototype.buffer description: > _TypedArray_.prototype has no own property "buffer" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("buffer"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/buffer/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/buffer/inherited.js index 323b7476fc8..27832564c1b 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/buffer/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/buffer/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("buffer"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/byteLength/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/byteLength/bigint-inherited.js index a379f2a83de..63d2ad589e8 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/byteLength/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/byteLength/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-get-%typedarray%.prototype.bytelength description: > _TypedArray_.prototype has no own property "byteLength" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("byteLength"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/byteLength/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/byteLength/inherited.js index 52b34326535..d6428218c65 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/byteLength/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/byteLength/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("byteLength"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/byteOffset/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/byteOffset/bigint-inherited.js index c93aeab8cb9..2014ea8503b 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/byteOffset/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/byteOffset/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-get-%typedarray%.prototype.byteoffset description: > _TypedArray_.prototype has no own property "byteOffset" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("byteOffset"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/byteOffset/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/byteOffset/inherited.js index 1d60311e03f..5afd6ad8064 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/byteOffset/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/byteOffset/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("byteOffset"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/copyWithin/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/copyWithin/bigint-inherited.js index 68d44622ac4..3fb46d78ac7 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/copyWithin/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/copyWithin/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.copywithin description: > _TypedArray_.prototype has no own property "copyWithin" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("copyWithin"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/copyWithin/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/copyWithin/inherited.js index db5105ac69d..b34ab522fbd 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/copyWithin/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/copyWithin/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("copyWithin"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/entries/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/entries/bigint-inherited.js index 03017f07c5e..49866714500 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/entries/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/entries/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.entries description: > _TypedArray_.prototype has no own property "entries" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("entries"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/entries/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/entries/inherited.js index 8601bc26834..920cb1b45fd 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/entries/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/entries/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("entries"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/every/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/every/bigint-inherited.js index 95c15ca6312..71853aabb2b 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/every/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/every/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.every description: > _TypedArray_.prototype has no own property "every" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("every"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/every/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/every/inherited.js index 9b3da52bf21..07a1ed68a76 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/every/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/every/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("every"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/fill/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/fill/bigint-inherited.js index 82845b596f4..32e4c63e13f 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/fill/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/fill/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.fill description: > _TypedArray_.prototype has no own property "fill" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("fill"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/fill/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/fill/inherited.js index b6862164edf..c13dd4a01f6 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/fill/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/fill/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("fill"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/filter/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/filter/bigint-inherited.js index cbff2a5d63d..9179703032e 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/filter/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/filter/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.filter description: > _TypedArray_.prototype has no own property "filter" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("filter"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/filter/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/filter/inherited.js index 36d9019de38..f29de75a95b 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/filter/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/filter/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("filter"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/find/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/find/bigint-inherited.js index ac94cd8013e..c475fc90e76 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/find/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/find/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.find description: > _TypedArray_.prototype has no own property "find" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("find"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/find/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/find/inherited.js index 828c4f4c476..ddcdd6b0bee 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/find/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/find/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("find"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/findIndex/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/findIndex/bigint-inherited.js index 4a62779233e..f7caed4d1b9 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/findIndex/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/findIndex/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.findindex description: > _TypedArray_.prototype has no own property "findIndex" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("findIndex"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/findIndex/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/findIndex/inherited.js index 63f6f2279a2..71daa511276 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/findIndex/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/findIndex/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("findIndex"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/forEach/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/forEach/bigint-inherited.js index 409132fb142..de8a1da7a99 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/forEach/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/forEach/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.foreach description: > _TypedArray_.prototype has no own property "forEach" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("forEach"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/forEach/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/forEach/inherited.js index de6e9371d76..fa80b250940 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/forEach/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/forEach/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("forEach"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/indexOf/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/indexOf/bigint-inherited.js index 7f403c3df41..7670dbf7abd 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/indexOf/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/indexOf/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.indexof description: > _TypedArray_.prototype has no own property "indexOf" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("indexOf"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/indexOf/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/indexOf/inherited.js index 362ef22a98d..9b0cc198c6d 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/indexOf/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/indexOf/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("indexOf"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/join/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/join/bigint-inherited.js index 45e858aef71..ff560328288 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/join/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/join/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.join description: > _TypedArray_.prototype has no own property "join" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("join"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/join/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/join/inherited.js index cc649c89fd8..b4c270dd400 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/join/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/join/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("join"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/keys/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/keys/bigint-inherited.js index 6b25ac07814..5803925fa7e 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/keys/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/keys/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.keys description: > _TypedArray_.prototype has no own property "keys" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("keys"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/keys/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/keys/inherited.js index f4c800c5e31..62df1d94462 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/keys/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/keys/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("keys"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/lastIndexOf/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/lastIndexOf/bigint-inherited.js index 2a7dd2912e8..840fd723855 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/lastIndexOf/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/lastIndexOf/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.lastindexof description: > _TypedArray_.prototype has no own property "lastIndexOf" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("lastIndexOf"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/lastIndexOf/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/lastIndexOf/inherited.js index 5a68f3fa3e4..23a2218168e 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/lastIndexOf/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/lastIndexOf/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("lastIndexOf"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/length/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/length/bigint-inherited.js index 36244e7c574..ae22c804d49 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/length/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/length/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-get-%typedarray%.prototype.length description: > _TypedArray_.prototype has no own property "length" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("length"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/length/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/length/inherited.js index b75ccb8317d..1e5d9f72697 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/length/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/length/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("length"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/map/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/map/bigint-inherited.js index ace5d810d3c..70d095e4036 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/map/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/map/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.map description: > _TypedArray_.prototype has no own property "map" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("map"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/map/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/map/inherited.js index 2d5d48aaeef..abcf3b019f4 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/map/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/map/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("map"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/reduce/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/reduce/bigint-inherited.js index ac0a6b751f4..de27a5bc154 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/reduce/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/reduce/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-get-%typedarray%.prototype.reduce description: > _TypedArray_.prototype has no own property "reduce" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("reduce"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/reduce/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/reduce/inherited.js index d01bda70971..cbdfab02c57 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/reduce/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/reduce/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("reduce"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/reduceRight/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/reduceRight/bigint-inherited.js index 64c043026f3..bcb96bc0931 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/reduceRight/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/reduceRight/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.reduceright description: > _TypedArray_.prototype has no own property "reduceRight" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("reduceRight"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/reduceRight/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/reduceRight/inherited.js index 784e4c2b705..9f43b6632ba 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/reduceRight/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/reduceRight/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("reduceRight"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/reverse/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/reverse/bigint-inherited.js index b839ed24584..d55861a7ef6 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/reverse/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/reverse/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.reverse description: > _TypedArray_.prototype has no own property "reverse" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("reverse"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/reverse/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/reverse/inherited.js index 7d8a7d6e229..63ccc20cf10 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/reverse/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/reverse/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("reverse"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/set/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/set/bigint-inherited.js index 722e5849065..0bd53dac985 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/set/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/set/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.set description: > _TypedArray_.prototype has no own property "set" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("set"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/set/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/set/inherited.js index 411b66fdaf1..4f7ddce3bb6 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/set/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/set/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("set"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/slice/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/slice/bigint-inherited.js index 09ad236fee0..2ccfc600d79 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/slice/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/slice/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.slice description: > _TypedArray_.prototype has no own property "slice" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("slice"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/slice/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/slice/inherited.js index a1ae44026d2..eca6b8cd917 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/slice/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/slice/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("slice"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/some/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/some/bigint-inherited.js index 5dcd257a38f..f2acb0024f6 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/some/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/some/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.some description: > _TypedArray_.prototype has no own property "some" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("some"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/some/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/some/inherited.js index 4b75f87f2e5..88c20516a44 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/some/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/some/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("some"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/sort/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/sort/bigint-inherited.js index 57d26122a2e..6addde52a8e 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/sort/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/sort/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.sort description: > _TypedArray_.prototype has no own property "sort" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("sort"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/sort/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/sort/inherited.js index 37aab5255d1..a4a4fa793a9 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/sort/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/sort/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("sort"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/subarray/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/subarray/bigint-inherited.js index 53901a6cbcb..5c598fbc7e5 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/subarray/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/subarray/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.subarray description: > _TypedArray_.prototype has no own property "subarray" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("subarray"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/subarray/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/subarray/inherited.js index 2416208a3f7..e424299e58a 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/subarray/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/subarray/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("subarray"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/toLocaleString/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/toLocaleString/bigint-inherited.js index b2b742d24e9..e6a68b6f144 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/toLocaleString/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/toLocaleString/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.tolocalestring description: > _TypedArray_.prototype has no own property "toLocaleString" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("toLocaleString"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/toLocaleString/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/toLocaleString/inherited.js index d4a48e25d65..99a0bf075a2 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/toLocaleString/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/toLocaleString/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("toLocaleString"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/toString/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/toString/bigint-inherited.js index 5a2319fd876..b38393177bd 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/toString/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/toString/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.tostring description: > _TypedArray_.prototype has no own property "toString" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("toString"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/toString/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/toString/inherited.js index 9f1b0e21778..74166d89ca4 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/toString/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/toString/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("toString"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/values/bigint-inherited.js b/test/built-ins/TypedArrayConstructors/prototype/values/bigint-inherited.js index 65b5bbf7e1e..92105d3c9d4 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/values/bigint-inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/values/bigint-inherited.js @@ -4,10 +4,10 @@ esid: sec-%typedarray%.prototype.values description: > _TypedArray_.prototype has no own property "values" -includes: [testBigIntTypedArray.js] +includes: [testTypedArray.js] features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("values"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/TypedArrayConstructors/prototype/values/inherited.js b/test/built-ins/TypedArrayConstructors/prototype/values/inherited.js index bd4aaec70aa..f040e26c3ba 100644 --- a/test/built-ins/TypedArrayConstructors/prototype/values/inherited.js +++ b/test/built-ins/TypedArrayConstructors/prototype/values/inherited.js @@ -10,4 +10,4 @@ features: [TypedArray] testWithTypedArrayConstructors(function(TA) { assert.sameValue(TA.prototype.hasOwnProperty("values"), false); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Uint8Array/prototype/toBase64/receiver-not-uint8array.js b/test/built-ins/Uint8Array/prototype/toBase64/receiver-not-uint8array.js index 0ade97bad21..80da809add2 100644 --- a/test/built-ins/Uint8Array/prototype/toBase64/receiver-not-uint8array.js +++ b/test/built-ins/Uint8Array/prototype/toBase64/receiver-not-uint8array.js @@ -16,18 +16,18 @@ Object.defineProperty(options, "alphabet", { } }); -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { if (TA === Uint8Array) return; - var sample = new TA(2); + var sample = new TA(makeCtorArg(2)); assert.throws(TypeError, function() { Uint8Array.prototype.toBase64.call(sample, options); }); -}); +}, null, ["passthrough"]); assert.throws(TypeError, function() { Uint8Array.prototype.toBase64.call([], options); -}); +}, null, ["passthrough"]); assert.throws(TypeError, function() { toBase64(options); -}); +}, null, ["passthrough"]); diff --git a/test/built-ins/Uint8Array/prototype/toHex/receiver-not-uint8array.js b/test/built-ins/Uint8Array/prototype/toHex/receiver-not-uint8array.js index 42ac67ec977..b9fc2eae98f 100644 --- a/test/built-ins/Uint8Array/prototype/toHex/receiver-not-uint8array.js +++ b/test/built-ins/Uint8Array/prototype/toHex/receiver-not-uint8array.js @@ -9,9 +9,9 @@ features: [uint8array-base64, TypedArray] var toHex = Uint8Array.prototype.toHex; -testWithTypedArrayConstructors(function(TA) { +testWithTypedArrayConstructors(function(TA, makeCtorArg) { if (TA === Uint8Array) return; - var sample = new TA(2); + var sample = new TA(makeCtorArg(2)); assert.throws(TypeError, function() { Uint8Array.prototype.toHex.call(sample); }); diff --git a/test/harness/testTypedArray.js b/test/harness/testTypedArray.js index 796ec7a989b..a4bab4bbae0 100644 --- a/test/harness/testTypedArray.js +++ b/test/harness/testTypedArray.js @@ -10,30 +10,40 @@ description: > testWithTypedArrayConstructors() testTypedArrayConversions() -includes: [testTypedArray.js] +includes: [compareArray.js, testTypedArray.js] features: [TypedArray] ---*/ assert(typeof TypedArray === "function"); assert.sameValue(TypedArray, Object.getPrototypeOf(Uint8Array)); -var hasFloat16Array = typeof Float16Array !== 'undefined'; - -var callCount = 0; -testWithTypedArrayConstructors(() => callCount++); -assert.sameValue(callCount, 9 + hasFloat16Array); - -var index = 0; - -assert.sameValue(typedArrayConstructors[index++], Float64Array); -assert.sameValue(typedArrayConstructors[index++], Float32Array); -if (hasFloat16Array) { - assert.sameValue(typedArrayConstructors[index++], Float16Array); +var hasFloat16Array = typeof Float16Array !== "undefined"; +var expectCtors = [ + Float64Array, + Float32Array, + hasFloat16Array ? Float16Array : undefined, + Int32Array, + Int16Array, + Int8Array, + Uint32Array, + Uint16Array, + Uint8Array, + Uint8ClampedArray +]; +if (!hasFloat16Array) expectCtors.splice(2, 1); +assert.compareArray(typedArrayConstructors, expectCtors, "typedArrayConstructors"); + +var callCounts = {}; +var totalCallCount = 0; +testWithTypedArrayConstructors(function(TA, makeCtorArg) { + var name = TA.name; + callCounts[name] = (callCounts[name] || 0) + 1; + totalCallCount++; +}); +assert(totalCallCount > typedArrayConstructors.length, "total call count"); + +var expectEachCallCount = totalCallCount / typedArrayConstructors.length; +for (var i = 0; i < typedArrayConstructors.length; i++) { + var name = typedArrayConstructors[i].name; + assert.sameValue(callCounts[name], expectEachCallCount, name + " call count"); } -assert.sameValue(typedArrayConstructors[index++], Int32Array); -assert.sameValue(typedArrayConstructors[index++], Int16Array); -assert.sameValue(typedArrayConstructors[index++], Int8Array); -assert.sameValue(typedArrayConstructors[index++], Uint32Array); -assert.sameValue(typedArrayConstructors[index++], Uint16Array); -assert.sameValue(typedArrayConstructors[index++], Uint8Array); -assert.sameValue(typedArrayConstructors[index++], Uint8ClampedArray);