mirror of https://github.com/tc39/test262.git
fixup! Atomics.and will operate on TA when TA.buffer is not a SharedArrayBuffer
This commit is contained in:
parent
9e7b4e733d
commit
e1c71a65e2
|
@ -13,4 +13,4 @@ const i64a = new BigInt64Array(
|
|||
);
|
||||
|
||||
assert.sameValue(Atomics.and(i64a, 0, 1n), 0n);
|
||||
assert.sameValue(Atomics.load(i64a, 0), 1n);
|
||||
assert.sameValue(Atomics.load(i64a, 0), 0n);
|
||||
|
|
|
@ -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.and(view, 0, 1);
|
||||
}, `Atomics.and(new ${TA.name}(buffer), 0, 1) throws TypeError`);
|
||||
Atomics.and(view, 0, 1n);
|
||||
}, `Atomics.and(new ${TA.name}(buffer), 0, 1n) throws TypeError`);
|
||||
});
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testTypedArray.js]
|
|||
features: [ArrayBuffer, Atomics, TypedArray]
|
||||
---*/
|
||||
|
||||
const buffer = new ArrayBuffer(16);
|
||||
const buffer = new ArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4);
|
||||
|
||||
testWithNonSharableTypedArrayConstructors(function(TA) {
|
||||
const view = new TA(buffer);
|
||||
|
|
Loading…
Reference in New Issue