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 e958faa975..6a51ee50dc 100644 --- a/test/built-ins/Atomics/store/bigint/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/store/bigint/non-shared-bufferdata.js @@ -12,4 +12,5 @@ const i64a = new BigInt64Array( new ArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 4) ); -assert.sameValue(Atomics.store(i64a, 0, 1), 1); +assert.sameValue(Atomics.store(i64a, 0, 1n), 1n); +assert.sameValue(Atomics.load(i64a, 0), 1n); diff --git a/test/built-ins/Atomics/store/bigint/non-shared-int-views-throws.js b/test/built-ins/Atomics/store/bigint/non-shared-int-views-throws.js index 57bdb21246..a5d3ada9c9 100644 --- a/test/built-ins/Atomics/store/bigint/non-shared-int-views-throws.js +++ b/test/built-ins/Atomics/store/bigint/non-shared-int-views-throws.js @@ -14,6 +14,6 @@ const buffer = new ArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 4); testWithNonShareableBigIntTypedArrayConstructors(function(TA) { const view = new TA(buffer); assert.throws(TypeError, function() { - Atomics.store(view, 0, 1); - }, `Atomics.store(new ${TA.name}(buffer), 0, 1) throws TypeError`); + Atomics.store(view, 0, 1n); + }, `Atomics.store(new ${TA.name}(buffer), 0, 1n) throws TypeError`); }); diff --git a/test/built-ins/Atomics/store/non-shared-bufferdata.js b/test/built-ins/Atomics/store/non-shared-bufferdata.js index fa18f7237c..e0d733f28c 100644 --- a/test/built-ins/Atomics/store/non-shared-bufferdata.js +++ b/test/built-ins/Atomics/store/non-shared-bufferdata.js @@ -13,3 +13,5 @@ const i32a = new Int32Array( ); assert.sameValue(Atomics.store(i32a, 0, 1), 1); +assert.sameValue(Atomics.load(i32a, 0), 1); + diff --git a/test/built-ins/Atomics/store/non-shared-views-throws.js b/test/built-ins/Atomics/store/non-shared-int-views-throws.js similarity index 76% rename from test/built-ins/Atomics/store/non-shared-views-throws.js rename to test/built-ins/Atomics/store/non-shared-int-views-throws.js index 05973feb06..ac5e57cc55 100644 --- a/test/built-ins/Atomics/store/non-shared-views-throws.js +++ b/test/built-ins/Atomics/store/non-shared-int-views-throws.js @@ -1,4 +1,4 @@ -// Copyright (C) 2017 Mozilla Corporation. All rights reserved. +// Copyright (C) 2020 Rick Waldron. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- @@ -10,10 +10,11 @@ features: [ArrayBuffer, Atomics, TypedArray] ---*/ const buffer = new ArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4); -const views = intArrayConstructors.slice(); testWithNonSharableTypedArrayConstructors(function(TA) { + const view = new TA(buffer); + assert.throws(TypeError, function() { - Atomics.store(new TA(buffer), 0, 0); + Atomics.store(view, 0, 1); }, `Atomics.store(new ${TA.name}(buffer), 0, 1) throws TypeError`); -}, views); +});