mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 22:15:24 +02:00
Atomics: fix Atomics.xor for BigInt64Array and BigUint64Array
This commit is contained in:
parent
feab96e601
commit
64be6186be
@ -9,12 +9,13 @@ includes: [testAtomics.js, testBigIntTypedArray.js]
|
|||||||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const i64a = new BigInt64Array(
|
var buffer = new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 2);
|
||||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
|
||||||
);
|
|
||||||
|
|
||||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
testWithBigIntTypedArrayConstructors(function(TA) {
|
||||||
assert.throws(RangeError, function() {
|
let view = new TA(buffer);
|
||||||
Atomics.xor(i64a, IdxGen(i64a), 0);
|
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||||
}, 'Atomics.xor(i64a, IdxGen(i64a), 0) throws RangeError');
|
assert.throws(RangeError, function() {
|
||||||
|
Atomics.xor(view, IdxGen(view), 10);
|
||||||
|
}, 'Atomics.xor(view, IdxGen(view), 10) throws RangeError');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user