diff --git a/test/built-ins/Atomics/add/bad-range.js b/test/built-ins/Atomics/add/bad-range.js index a887c35481..2139e57c23 100644 --- a/test/built-ins/Atomics/add/bad-range.js +++ b/test/built-ins/Atomics/add/bad-range.js @@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js] features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of] ---*/ -var sab = new SharedArrayBuffer(4); +var sab = new SharedArrayBuffer(8); var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + views.push(BigInt64Array); + views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { let view = new View(sab); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { diff --git a/test/built-ins/Atomics/add/nonshared-int-views.js b/test/built-ins/Atomics/add/nonshared-int-views.js index eb7b682fe3..1528abd3a0 100644 --- a/test/built-ins/Atomics/add/nonshared-int-views.js +++ b/test/built-ins/Atomics/add/nonshared-int-views.js @@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16); var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + int_views.push(BigInt64Array); + int_views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { var view = new View(ab); diff --git a/test/built-ins/Atomics/and/bad-range.js b/test/built-ins/Atomics/and/bad-range.js index 6215a6c47e..fe91ae8019 100644 --- a/test/built-ins/Atomics/and/bad-range.js +++ b/test/built-ins/Atomics/and/bad-range.js @@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js] features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of] ---*/ -var sab = new SharedArrayBuffer(4); +var sab = new SharedArrayBuffer(8); var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + views.push(BigInt64Array); + views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { let view = new View(sab); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { diff --git a/test/built-ins/Atomics/and/nonshared-int-views.js b/test/built-ins/Atomics/and/nonshared-int-views.js index 20e75cd53a..7184954bf3 100644 --- a/test/built-ins/Atomics/and/nonshared-int-views.js +++ b/test/built-ins/Atomics/and/nonshared-int-views.js @@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16); var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + int_views.push(BigInt64Array); + int_views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { var view = new View(ab); diff --git a/test/built-ins/Atomics/compareExchange/bad-range.js b/test/built-ins/Atomics/compareExchange/bad-range.js index ddf0b61dc9..11824fc576 100644 --- a/test/built-ins/Atomics/compareExchange/bad-range.js +++ b/test/built-ins/Atomics/compareExchange/bad-range.js @@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js] features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of] ---*/ -var sab = new SharedArrayBuffer(4); +var sab = new SharedArrayBuffer(8); var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + views.push(BigInt64Array); + views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { let view = new View(sab); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { diff --git a/test/built-ins/Atomics/compareExchange/nonshared-int-views.js b/test/built-ins/Atomics/compareExchange/nonshared-int-views.js index ea5b990784..c3a95b239f 100644 --- a/test/built-ins/Atomics/compareExchange/nonshared-int-views.js +++ b/test/built-ins/Atomics/compareExchange/nonshared-int-views.js @@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16); var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + int_views.push(BigInt64Array); + int_views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { var view = new View(ab); diff --git a/test/built-ins/Atomics/exchange/bad-range.js b/test/built-ins/Atomics/exchange/bad-range.js index cbafaecef6..4392c1d782 100644 --- a/test/built-ins/Atomics/exchange/bad-range.js +++ b/test/built-ins/Atomics/exchange/bad-range.js @@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js] features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of] ---*/ -var sab = new SharedArrayBuffer(4); +var sab = new SharedArrayBuffer(8); var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + views.push(BigInt64Array); + views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { let view = new View(sab); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { diff --git a/test/built-ins/Atomics/exchange/nonshared-int-views.js b/test/built-ins/Atomics/exchange/nonshared-int-views.js index 7e71daf75a..30b7617d15 100644 --- a/test/built-ins/Atomics/exchange/nonshared-int-views.js +++ b/test/built-ins/Atomics/exchange/nonshared-int-views.js @@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16); var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + int_views.push(BigInt64Array); + int_views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { var view = new View(ab); diff --git a/test/built-ins/Atomics/load/bad-range.js b/test/built-ins/Atomics/load/bad-range.js index f09217eac5..d13ef4b5e3 100644 --- a/test/built-ins/Atomics/load/bad-range.js +++ b/test/built-ins/Atomics/load/bad-range.js @@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js] features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of] ---*/ -var sab = new SharedArrayBuffer(4); +var sab = new SharedArrayBuffer(8); var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + views.push(BigInt64Array); + views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { let view = new View(sab); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { diff --git a/test/built-ins/Atomics/load/nonshared-int-views.js b/test/built-ins/Atomics/load/nonshared-int-views.js index 2beec220a0..05eff959c4 100644 --- a/test/built-ins/Atomics/load/nonshared-int-views.js +++ b/test/built-ins/Atomics/load/nonshared-int-views.js @@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16); var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + int_views.push(BigInt64Array); + int_views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { var view = new View(ab); diff --git a/test/built-ins/Atomics/or/bad-range.js b/test/built-ins/Atomics/or/bad-range.js index 0c17b9eb95..a9fab884a6 100644 --- a/test/built-ins/Atomics/or/bad-range.js +++ b/test/built-ins/Atomics/or/bad-range.js @@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js] features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of] ---*/ -var sab = new SharedArrayBuffer(4); +var sab = new SharedArrayBuffer(8); var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + views.push(BigInt64Array); + views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { let view = new View(sab); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { diff --git a/test/built-ins/Atomics/or/nonshared-int-views.js b/test/built-ins/Atomics/or/nonshared-int-views.js index 1560e57662..033174fcf9 100644 --- a/test/built-ins/Atomics/or/nonshared-int-views.js +++ b/test/built-ins/Atomics/or/nonshared-int-views.js @@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16); var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + int_views.push(BigInt64Array); + int_views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { var view = new View(ab); diff --git a/test/built-ins/Atomics/store/bad-range.js b/test/built-ins/Atomics/store/bad-range.js index ebc42e894b..69a402646c 100644 --- a/test/built-ins/Atomics/store/bad-range.js +++ b/test/built-ins/Atomics/store/bad-range.js @@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js] features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of] ---*/ -var sab = new SharedArrayBuffer(4); +var sab = new SharedArrayBuffer(8); var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + views.push(BigInt64Array); + views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { let view = new View(sab); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { diff --git a/test/built-ins/Atomics/store/nonshared-int-views.js b/test/built-ins/Atomics/store/nonshared-int-views.js index bb9bdc51b8..0153ed2fc1 100644 --- a/test/built-ins/Atomics/store/nonshared-int-views.js +++ b/test/built-ins/Atomics/store/nonshared-int-views.js @@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16); var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + int_views.push(BigInt64Array); + int_views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { var view = new View(ab); diff --git a/test/built-ins/Atomics/sub/bad-range.js b/test/built-ins/Atomics/sub/bad-range.js index d390e5a7e3..dabd7789e7 100644 --- a/test/built-ins/Atomics/sub/bad-range.js +++ b/test/built-ins/Atomics/sub/bad-range.js @@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js] features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of] ---*/ -var sab = new SharedArrayBuffer(4); +var sab = new SharedArrayBuffer(8); var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + views.push(BigInt64Array); + views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { let view = new View(sab); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { diff --git a/test/built-ins/Atomics/sub/nonshared-int-views.js b/test/built-ins/Atomics/sub/nonshared-int-views.js index 7961f0faaf..7383307f7d 100644 --- a/test/built-ins/Atomics/sub/nonshared-int-views.js +++ b/test/built-ins/Atomics/sub/nonshared-int-views.js @@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16); var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + int_views.push(BigInt64Array); + int_views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { var view = new View(ab); diff --git a/test/built-ins/Atomics/wait/bad-range.js b/test/built-ins/Atomics/wait/bad-range.js index 9e0cdfffd4..680caf7bac 100644 --- a/test/built-ins/Atomics/wait/bad-range.js +++ b/test/built-ins/Atomics/wait/bad-range.js @@ -5,14 +5,21 @@ esid: sec-atomics.wait description: > Test range checking of Atomics.wait on arrays that allow atomic operations -includes: [testAtomics.js] -features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, for-of] +includes: [testAtomics.js, testTypedArray.js] +features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, TypedArray, arrow-function, let, for-of] ---*/ -var sab = new SharedArrayBuffer(4); -var view = new Int32Array(sab); +var sab = new SharedArrayBuffer(8); +var views = [Int32Array]; -testWithAtomicsOutOfBoundsIndices(function(IdxGen) { +if (typeof BigInt !== "undefined") { + views.push(BigInt64Array); +} + +testWithTypedArrayConstructors(function(View) { + let view = new View(sab); + testWithAtomicsOutOfBoundsIndices(function(IdxGen) { let Idx = IdxGen(view); assert.throws(RangeError, () => Atomics.wait(view, Idx, 10, 0)); // Even with zero timeout -}); + }); +}, views); diff --git a/test/built-ins/Atomics/wait/nonshared-int-views.js b/test/built-ins/Atomics/wait/nonshared-int-views.js index 4001928290..c4a5fb4b02 100644 --- a/test/built-ins/Atomics/wait/nonshared-int-views.js +++ b/test/built-ins/Atomics/wait/nonshared-int-views.js @@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16); var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + int_views.push(BigInt64Array); + int_views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { var view = new View(ab); diff --git a/test/built-ins/Atomics/wake/bad-range.js b/test/built-ins/Atomics/wake/bad-range.js index bdd5d282a6..248501b53e 100644 --- a/test/built-ins/Atomics/wake/bad-range.js +++ b/test/built-ins/Atomics/wake/bad-range.js @@ -5,14 +5,21 @@ esid: sec-atomics.wake description: > Test range checking of Atomics.wake on arrays that allow atomic operations -includes: [testAtomics.js] -features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, for-of] +includes: [testAtomics.js, testTypedArray.js] +features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, TypedArray, arrow-function, let, for-of] ---*/ -var sab = new SharedArrayBuffer(4); -var view = new Int32Array(sab); +var sab = new SharedArrayBuffer(8); +var views = [Int32Array]; -testWithAtomicsOutOfBoundsIndices(function(IdxGen) { +if (typeof BigInt !== "undefined") { + views.push(BigInt64Array); +} + +testWithTypedArrayConstructors(function(View) { + let view = new View(sab); + testWithAtomicsOutOfBoundsIndices(function(IdxGen) { let Idx = IdxGen(view); assert.throws(RangeError, () => Atomics.wake(view, Idx, 0)); // Even with waking zero -}); + }); +}, views); diff --git a/test/built-ins/Atomics/wake/nonshared-int-views.js b/test/built-ins/Atomics/wake/nonshared-int-views.js index d4e197846e..8e86e23858 100644 --- a/test/built-ins/Atomics/wake/nonshared-int-views.js +++ b/test/built-ins/Atomics/wake/nonshared-int-views.js @@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16); var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + int_views.push(BigInt64Array); + int_views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { var view = new View(ab); diff --git a/test/built-ins/Atomics/xor/bad-range.js b/test/built-ins/Atomics/xor/bad-range.js index 643b8138d4..1519869263 100644 --- a/test/built-ins/Atomics/xor/bad-range.js +++ b/test/built-ins/Atomics/xor/bad-range.js @@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js] features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of] ---*/ -var sab = new SharedArrayBuffer(4); +var sab = new SharedArrayBuffer(8); var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + views.push(BigInt64Array); + views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { let view = new View(sab); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { diff --git a/test/built-ins/Atomics/xor/nonshared-int-views.js b/test/built-ins/Atomics/xor/nonshared-int-views.js index 0c1dca77b9..0ab8b408e0 100644 --- a/test/built-ins/Atomics/xor/nonshared-int-views.js +++ b/test/built-ins/Atomics/xor/nonshared-int-views.js @@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16); var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +if (typeof BigInt !== "undefined") { + int_views.push(BigInt64Array); + int_views.push(BigUint64Array); +} + testWithTypedArrayConstructors(function(View) { var view = new View(ab);