mirror of
https://github.com/tc39/test262.git
synced 2025-05-28 10:40:33 +02:00
21 lines
715 B
JavaScript
21 lines
715 B
JavaScript
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
esid: sec-atomics.xor
|
|
description: >
|
|
Test range checking of Atomics.xor on arrays that allow atomic operations
|
|
includes: [testAtomics.js, testBigIntTypedArray.js]
|
|
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
|
---*/
|
|
|
|
const i64a = new BigInt64Array(
|
|
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
|
);
|
|
|
|
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
|
assert.throws(RangeError, function() {
|
|
Atomics.xor(i64a, IdxGen(i64a), 0);
|
|
}, 'Atomics.xor(i64a, IdxGen(i64a), 0) throws RangeError');
|
|
});
|