diff --git a/test/built-ins/Atomics/add/bad-range.js b/test/built-ins/Atomics/add/bad-range.js index cfac2ccb86..fd02ea5ae3 100644 --- a/test/built-ins/Atomics/add/bad-range.js +++ b/test/built-ins/Atomics/add/bad-range.js @@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var buffer = new SharedArrayBuffer(8); +var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2); var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { diff --git a/test/built-ins/Atomics/add/bigint/bad-range.js b/test/built-ins/Atomics/add/bigint/bad-range.js index ad275c9696..2cc2155d67 100644 --- a/test/built-ins/Atomics/add/bigint/bad-range.js +++ b/test/built-ins/Atomics/add/bigint/bad-range.js @@ -9,7 +9,7 @@ includes: [testAtomics.js, testBigIntTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var buffer = new SharedArrayBuffer(8); +var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2); testWithBigIntTypedArrayConstructors(function(TA) { let view = new TA(buffer); diff --git a/test/built-ins/Atomics/and/bad-range.js b/test/built-ins/Atomics/and/bad-range.js index f81a25df22..d44b4b4fbf 100644 --- a/test/built-ins/Atomics/and/bad-range.js +++ b/test/built-ins/Atomics/and/bad-range.js @@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var buffer = new SharedArrayBuffer(8); +var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2); var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { diff --git a/test/built-ins/Atomics/and/bigint/bad-range.js b/test/built-ins/Atomics/and/bigint/bad-range.js index 5f72a1945b..6e688ed178 100644 --- a/test/built-ins/Atomics/and/bigint/bad-range.js +++ b/test/built-ins/Atomics/and/bigint/bad-range.js @@ -9,7 +9,7 @@ includes: [testAtomics.js, testBigIntTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var buffer = new SharedArrayBuffer(8); +var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2); testWithBigIntTypedArrayConstructors(function(TA) { let view = new TA(buffer); diff --git a/test/built-ins/Atomics/compareExchange/bad-range.js b/test/built-ins/Atomics/compareExchange/bad-range.js index 8bac9a2f0b..9f1bcb0105 100644 --- a/test/built-ins/Atomics/compareExchange/bad-range.js +++ b/test/built-ins/Atomics/compareExchange/bad-range.js @@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var buffer = new SharedArrayBuffer(8); +var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2); var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { diff --git a/test/built-ins/Atomics/compareExchange/bigint/bad-range.js b/test/built-ins/Atomics/compareExchange/bigint/bad-range.js index fa314956cb..d28f9e861d 100644 --- a/test/built-ins/Atomics/compareExchange/bigint/bad-range.js +++ b/test/built-ins/Atomics/compareExchange/bigint/bad-range.js @@ -9,7 +9,7 @@ includes: [testAtomics.js, testBigIntTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var buffer = new SharedArrayBuffer(8); +var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2); testWithBigIntTypedArrayConstructors(function(TA) { let view = new TA(buffer); diff --git a/test/built-ins/Atomics/exchange/bad-range.js b/test/built-ins/Atomics/exchange/bad-range.js index 2723e699e8..80163b287f 100644 --- a/test/built-ins/Atomics/exchange/bad-range.js +++ b/test/built-ins/Atomics/exchange/bad-range.js @@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var buffer = new SharedArrayBuffer(8); +var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2); var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { diff --git a/test/built-ins/Atomics/exchange/bigint/bad-range.js b/test/built-ins/Atomics/exchange/bigint/bad-range.js index cab5f3bd59..659d375970 100644 --- a/test/built-ins/Atomics/exchange/bigint/bad-range.js +++ b/test/built-ins/Atomics/exchange/bigint/bad-range.js @@ -9,7 +9,7 @@ includes: [testAtomics.js, testBigIntTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var buffer = new SharedArrayBuffer(8); +var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2); testWithBigIntTypedArrayConstructors(function(TA) { let view = new TA(buffer); diff --git a/test/built-ins/Atomics/load/bad-range.js b/test/built-ins/Atomics/load/bad-range.js index 5f6a901f0f..14054e0dbc 100644 --- a/test/built-ins/Atomics/load/bad-range.js +++ b/test/built-ins/Atomics/load/bad-range.js @@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var buffer = new SharedArrayBuffer(8); +var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2); var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { diff --git a/test/built-ins/Atomics/load/bigint/bad-range.js b/test/built-ins/Atomics/load/bigint/bad-range.js index 6ec13f2a5b..3f25785087 100644 --- a/test/built-ins/Atomics/load/bigint/bad-range.js +++ b/test/built-ins/Atomics/load/bigint/bad-range.js @@ -9,7 +9,7 @@ includes: [testAtomics.js, testBigIntTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var buffer = new SharedArrayBuffer(8); +var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2); testWithBigIntTypedArrayConstructors(function(TA) { let view = new TA(buffer); diff --git a/test/built-ins/Atomics/or/bad-range.js b/test/built-ins/Atomics/or/bad-range.js index f9e5c3b872..679eae4895 100644 --- a/test/built-ins/Atomics/or/bad-range.js +++ b/test/built-ins/Atomics/or/bad-range.js @@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var buffer = new SharedArrayBuffer(8); +var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2); var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { diff --git a/test/built-ins/Atomics/or/bigint/bad-range.js b/test/built-ins/Atomics/or/bigint/bad-range.js index 9c5693233d..81d866a55f 100644 --- a/test/built-ins/Atomics/or/bigint/bad-range.js +++ b/test/built-ins/Atomics/or/bigint/bad-range.js @@ -9,7 +9,7 @@ includes: [testAtomics.js, testBigIntTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var buffer = new SharedArrayBuffer(8); +var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2); testWithBigIntTypedArrayConstructors(function(TA) { let view = new TA(buffer); diff --git a/test/built-ins/Atomics/store/bad-range.js b/test/built-ins/Atomics/store/bad-range.js index 7511001408..224347fd36 100644 --- a/test/built-ins/Atomics/store/bad-range.js +++ b/test/built-ins/Atomics/store/bad-range.js @@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var buffer = new SharedArrayBuffer(8); +var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2); var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { diff --git a/test/built-ins/Atomics/store/bigint/bad-range.js b/test/built-ins/Atomics/store/bigint/bad-range.js index 7f7551ec50..38527f23c5 100644 --- a/test/built-ins/Atomics/store/bigint/bad-range.js +++ b/test/built-ins/Atomics/store/bigint/bad-range.js @@ -9,7 +9,7 @@ includes: [testAtomics.js, testBigIntTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var buffer = new SharedArrayBuffer(8); +var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2); testWithBigIntTypedArrayConstructors(function(TA) { let view = new TA(buffer); diff --git a/test/built-ins/Atomics/sub/bad-range.js b/test/built-ins/Atomics/sub/bad-range.js index dfbcb672d7..6d9871bb9d 100644 --- a/test/built-ins/Atomics/sub/bad-range.js +++ b/test/built-ins/Atomics/sub/bad-range.js @@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var buffer = new SharedArrayBuffer(8); +var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2); var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { diff --git a/test/built-ins/Atomics/sub/bigint/bad-range.js b/test/built-ins/Atomics/sub/bigint/bad-range.js index 040f4f4e73..d033c212e0 100644 --- a/test/built-ins/Atomics/sub/bigint/bad-range.js +++ b/test/built-ins/Atomics/sub/bigint/bad-range.js @@ -9,7 +9,7 @@ includes: [testAtomics.js, testBigIntTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var buffer = new SharedArrayBuffer(8); +var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2); testWithBigIntTypedArrayConstructors(function(TA) { let view = new TA(buffer); diff --git a/test/built-ins/Atomics/xor/bad-range.js b/test/built-ins/Atomics/xor/bad-range.js index 6679bdbda3..fd5858533b 100644 --- a/test/built-ins/Atomics/xor/bad-range.js +++ b/test/built-ins/Atomics/xor/bad-range.js @@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var sab = new SharedArrayBuffer(8); +var sab = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2); var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { diff --git a/test/built-ins/Atomics/xor/bigint/bad-range.js b/test/built-ins/Atomics/xor/bigint/bad-range.js index faff7b0bb6..1f0447ea21 100644 --- a/test/built-ins/Atomics/xor/bigint/bad-range.js +++ b/test/built-ins/Atomics/xor/bigint/bad-range.js @@ -9,13 +9,12 @@ includes: [testAtomics.js, testBigIntTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray] ---*/ -var sab = new SharedArrayBuffer(8); +const i64a = new BigInt64Array( + new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8) +); -testWithBigIntTypedArrayConstructors(function(TA) { - let view = new TA(sab); - testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws(RangeError, function() { - Atomics.xor(view, IdxGen(view), 0); - }, 'Atomics.xor(view, IdxGen(view), 0) throws RangeError'); - }); +testWithAtomicsOutOfBoundsIndices(function(IdxGen) { + assert.throws(RangeError, function() { + Atomics.xor(i64a, IdxGen(i64a), 0); + }, 'Atomics.xor(i64a, IdxGen(i64a), 0) throws RangeError'); }); diff --git a/test/built-ins/Atomics/xor/bigint/nonshared-int-views.js b/test/built-ins/Atomics/xor/bigint/nonshared-int-views.js index e90630be34..3648a8e3df 100644 --- a/test/built-ins/Atomics/xor/bigint/nonshared-int-views.js +++ b/test/built-ins/Atomics/xor/bigint/nonshared-int-views.js @@ -9,7 +9,7 @@ includes: [testBigIntTypedArray.js] features: [ArrayBuffer, arrow-function, Atomics, BigInt, TypedArray] ---*/ -var buffer = new ArrayBuffer(16); +var buffer = new ArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 4); testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() {