mirror of https://github.com/tc39/test262.git
Atomics: remove BigInt condition from existing tests.
This commit is contained in:
parent
6c2503a810
commit
8a78bb09a7
|
@ -6,17 +6,12 @@ esid: sec-atomics.add
|
||||||
description: >
|
description: >
|
||||||
Test range checking of Atomics.add on arrays that allow atomic operations
|
Test range checking of Atomics.add on arrays that allow atomic operations
|
||||||
includes: [testAtomics.js, testTypedArray.js]
|
includes: [testAtomics.js, testTypedArray.js]
|
||||||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var buffer = new SharedArrayBuffer(8);
|
var buffer = new SharedArrayBuffer(8);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
let view = new TA(buffer);
|
let view = new TA(buffer);
|
||||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||||
|
|
|
@ -6,17 +6,12 @@ esid: sec-atomics.add
|
||||||
description: >
|
description: >
|
||||||
Test Atomics.add on non-shared integer TypedArrays
|
Test Atomics.add on non-shared integer TypedArrays
|
||||||
includes: [testTypedArray.js]
|
includes: [testTypedArray.js]
|
||||||
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
|
features: [ArrayBuffer, Atomics, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var ab = new ArrayBuffer(16);
|
var ab = new ArrayBuffer(16);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
assert.throws(TypeError, (() => Atomics.add(new TA(ab), 0, 0)));
|
assert.throws(TypeError, (() => Atomics.add(new TA(ab), 0, 0)));
|
||||||
}, views);
|
}, views);
|
||||||
|
|
|
@ -6,17 +6,12 @@ esid: sec-atomics.and
|
||||||
description: >
|
description: >
|
||||||
Test range checking of Atomics.and on arrays that allow atomic operations
|
Test range checking of Atomics.and on arrays that allow atomic operations
|
||||||
includes: [testAtomics.js, testTypedArray.js]
|
includes: [testAtomics.js, testTypedArray.js]
|
||||||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var buffer = new SharedArrayBuffer(8);
|
var buffer = new SharedArrayBuffer(8);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
let view = new TA(buffer);
|
let view = new TA(buffer);
|
||||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||||
|
|
|
@ -6,17 +6,12 @@ esid: sec-atomics.and
|
||||||
description: >
|
description: >
|
||||||
Test Atomics.and on non-shared integer TypedArrays
|
Test Atomics.and on non-shared integer TypedArrays
|
||||||
includes: [testTypedArray.js]
|
includes: [testTypedArray.js]
|
||||||
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
|
features: [ArrayBuffer, Atomics, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var buffer = new ArrayBuffer(16);
|
var buffer = new ArrayBuffer(16);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
assert.throws(TypeError, (() => Atomics.and(new TA(buffer), 0, 0)));
|
assert.throws(TypeError, (() => Atomics.and(new TA(buffer), 0, 0)));
|
||||||
}, views);
|
}, views);
|
||||||
|
|
|
@ -6,17 +6,12 @@ esid: sec-atomics.compareexchange
|
||||||
description: >
|
description: >
|
||||||
Test range checking of Atomics.compareExchange on arrays that allow atomic operations
|
Test range checking of Atomics.compareExchange on arrays that allow atomic operations
|
||||||
includes: [testAtomics.js, testTypedArray.js]
|
includes: [testAtomics.js, testTypedArray.js]
|
||||||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var buffer = new SharedArrayBuffer(8);
|
var buffer = new SharedArrayBuffer(8);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
let view = new TA(buffer);
|
let view = new TA(buffer);
|
||||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||||
|
|
|
@ -6,17 +6,12 @@ esid: sec-atomics.compareexchange
|
||||||
description: >
|
description: >
|
||||||
Test Atomics.compareExchange on non-shared integer TypedArrays
|
Test Atomics.compareExchange on non-shared integer TypedArrays
|
||||||
includes: [testTypedArray.js]
|
includes: [testTypedArray.js]
|
||||||
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
|
features: [ArrayBuffer, Atomics, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var buffer = new ArrayBuffer(16);
|
var buffer = new ArrayBuffer(16);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
assert.throws(TypeError, (() => Atomics.compareExchange(new TA(buffer), 0, 0, 0)));
|
assert.throws(TypeError, (() => Atomics.compareExchange(new TA(buffer), 0, 0, 0)));
|
||||||
}, views);
|
}, views);
|
||||||
|
|
|
@ -6,17 +6,12 @@ esid: sec-atomics.exchange
|
||||||
description: >
|
description: >
|
||||||
Test range checking of Atomics.exchange on arrays that allow atomic operations
|
Test range checking of Atomics.exchange on arrays that allow atomic operations
|
||||||
includes: [testAtomics.js, testTypedArray.js]
|
includes: [testAtomics.js, testTypedArray.js]
|
||||||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var buffer = new SharedArrayBuffer(8);
|
var buffer = new SharedArrayBuffer(8);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
let view = new TA(buffer);
|
let view = new TA(buffer);
|
||||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||||
|
|
|
@ -6,17 +6,12 @@ esid: sec-atomics.exchange
|
||||||
description: >
|
description: >
|
||||||
Test Atomics.exchange on non-shared integer TypedArrays
|
Test Atomics.exchange on non-shared integer TypedArrays
|
||||||
includes: [testTypedArray.js]
|
includes: [testTypedArray.js]
|
||||||
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
|
features: [ArrayBuffer, Atomics, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var buffer = new ArrayBuffer(16);
|
var buffer = new ArrayBuffer(16);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
assert.throws(TypeError, (() => Atomics.exchange(new TA(buffer), 0, 0)));
|
assert.throws(TypeError, (() => Atomics.exchange(new TA(buffer), 0, 0)));
|
||||||
}, views);
|
}, views);
|
||||||
|
|
|
@ -6,17 +6,12 @@ esid: sec-atomics.load
|
||||||
description: >
|
description: >
|
||||||
Test range checking of Atomics.load on arrays that allow atomic operations
|
Test range checking of Atomics.load on arrays that allow atomic operations
|
||||||
includes: [testAtomics.js, testTypedArray.js]
|
includes: [testAtomics.js, testTypedArray.js]
|
||||||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var buffer = new SharedArrayBuffer(8);
|
var buffer = new SharedArrayBuffer(8);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
let view = new TA(buffer);
|
let view = new TA(buffer);
|
||||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||||
|
|
|
@ -6,18 +6,13 @@ esid: sec-atomics.load
|
||||||
description: >
|
description: >
|
||||||
Test Atomics.load on non-shared integer TypedArrays
|
Test Atomics.load on non-shared integer TypedArrays
|
||||||
includes: [testTypedArray.js]
|
includes: [testTypedArray.js]
|
||||||
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
|
features: [ArrayBuffer, Atomics, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var ab = new ArrayBuffer(16);
|
var ab = new ArrayBuffer(16);
|
||||||
|
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
var view = new TA(ab);
|
var view = new TA(ab);
|
||||||
|
|
||||||
|
|
|
@ -6,17 +6,12 @@ esid: sec-atomics.or
|
||||||
description: >
|
description: >
|
||||||
Test range checking of Atomics.or on arrays that allow atomic operations
|
Test range checking of Atomics.or on arrays that allow atomic operations
|
||||||
includes: [testAtomics.js, testTypedArray.js]
|
includes: [testAtomics.js, testTypedArray.js]
|
||||||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var buffer = new SharedArrayBuffer(8);
|
var buffer = new SharedArrayBuffer(8);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
let view = new TA(buffer);
|
let view = new TA(buffer);
|
||||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||||
|
|
|
@ -6,17 +6,12 @@ esid: sec-atomics.or
|
||||||
description: >
|
description: >
|
||||||
Test Atomics.or on non-shared integer TypedArrays
|
Test Atomics.or on non-shared integer TypedArrays
|
||||||
includes: [testTypedArray.js]
|
includes: [testTypedArray.js]
|
||||||
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
|
features: [ArrayBuffer, Atomics, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var buffer = new ArrayBuffer(16);
|
var buffer = new ArrayBuffer(16);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
assert.throws(TypeError, (() => Atomics.or(new TA(buffer), 0, 0)));
|
assert.throws(TypeError, (() => Atomics.or(new TA(buffer), 0, 0)));
|
||||||
}, views);
|
}, views);
|
||||||
|
|
|
@ -6,17 +6,12 @@ esid: sec-atomics.store
|
||||||
description: >
|
description: >
|
||||||
Test range checking of Atomics.store on arrays that allow atomic operations
|
Test range checking of Atomics.store on arrays that allow atomic operations
|
||||||
includes: [testAtomics.js, testTypedArray.js]
|
includes: [testAtomics.js, testTypedArray.js]
|
||||||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var buffer = new SharedArrayBuffer(8);
|
var buffer = new SharedArrayBuffer(8);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
let view = new TA(buffer);
|
let view = new TA(buffer);
|
||||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||||
|
|
|
@ -6,17 +6,12 @@ esid: sec-atomics.store
|
||||||
description: >
|
description: >
|
||||||
Test Atomics.store on non-shared integer TypedArrays
|
Test Atomics.store on non-shared integer TypedArrays
|
||||||
includes: [testTypedArray.js]
|
includes: [testTypedArray.js]
|
||||||
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
|
features: [ArrayBuffer, Atomics, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var buffer = new ArrayBuffer(16);
|
var buffer = new ArrayBuffer(16);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
assert.throws(TypeError, (() => Atomics.store(new TA(buffer), 0, 0)));
|
assert.throws(TypeError, (() => Atomics.store(new TA(buffer), 0, 0)));
|
||||||
}, views);
|
}, views);
|
||||||
|
|
|
@ -6,17 +6,12 @@ esid: sec-atomics.sub
|
||||||
description: >
|
description: >
|
||||||
Test range checking of Atomics.sub on arrays that allow atomic operations
|
Test range checking of Atomics.sub on arrays that allow atomic operations
|
||||||
includes: [testAtomics.js, testTypedArray.js]
|
includes: [testAtomics.js, testTypedArray.js]
|
||||||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var buffer = new SharedArrayBuffer(8);
|
var buffer = new SharedArrayBuffer(8);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
let view = new TA(buffer);
|
let view = new TA(buffer);
|
||||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||||
|
|
|
@ -6,17 +6,12 @@ esid: sec-atomics.sub
|
||||||
description: >
|
description: >
|
||||||
Test Atomics.sub on non-shared integer TypedArrays
|
Test Atomics.sub on non-shared integer TypedArrays
|
||||||
includes: [testTypedArray.js]
|
includes: [testTypedArray.js]
|
||||||
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
|
features: [ArrayBuffer, Atomics, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var buffer = new ArrayBuffer(16);
|
var buffer = new ArrayBuffer(16);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
assert.throws(TypeError, (() => Atomics.sub(new TA(buffer), 0, 0)));
|
assert.throws(TypeError, (() => Atomics.sub(new TA(buffer), 0, 0)));
|
||||||
}, views);
|
}, views);
|
||||||
|
|
|
@ -12,17 +12,12 @@ info: |
|
||||||
...
|
...
|
||||||
|
|
||||||
includes: [testAtomics.js, testTypedArray.js]
|
includes: [testAtomics.js, testTypedArray.js]
|
||||||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var sab = new SharedArrayBuffer(8);
|
var sab = new SharedArrayBuffer(8);
|
||||||
var views = [Int32Array];
|
var views = [Int32Array];
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
let view = new TA(sab);
|
let view = new TA(sab);
|
||||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||||
|
|
|
@ -12,17 +12,12 @@ info: |
|
||||||
..
|
..
|
||||||
|
|
||||||
includes: [testAtomics.js, testTypedArray.js]
|
includes: [testAtomics.js, testTypedArray.js]
|
||||||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var sab = new SharedArrayBuffer(8);
|
var sab = new SharedArrayBuffer(8);
|
||||||
var views = [Int32Array];
|
var views = [Int32Array];
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
let view = new TA(sab);
|
let view = new TA(sab);
|
||||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||||
|
|
|
@ -6,17 +6,12 @@ esid: sec-atomics.wake
|
||||||
description: >
|
description: >
|
||||||
Test Atomics.wake on non-shared integer TypedArrays
|
Test Atomics.wake on non-shared integer TypedArrays
|
||||||
includes: [testTypedArray.js]
|
includes: [testTypedArray.js]
|
||||||
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
|
features: [ArrayBuffer, Atomics, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var buffer = new ArrayBuffer(16);
|
var buffer = new ArrayBuffer(16);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
// Should fail even if waking zero waiters
|
// Should fail even if waking zero waiters
|
||||||
assert.throws(TypeError, (() => Atomics.wake(new TA(buffer), 0, 0)));
|
assert.throws(TypeError, (() => Atomics.wake(new TA(buffer), 0, 0)));
|
||||||
|
|
|
@ -6,17 +6,12 @@ esid: sec-atomics.xor
|
||||||
description: >
|
description: >
|
||||||
Test range checking of Atomics.xor on arrays that allow atomic operations
|
Test range checking of Atomics.xor on arrays that allow atomic operations
|
||||||
includes: [testAtomics.js, testTypedArray.js]
|
includes: [testAtomics.js, testTypedArray.js]
|
||||||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var sab = new SharedArrayBuffer(8);
|
var sab = new SharedArrayBuffer(8);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
let view = new TA(sab);
|
let view = new TA(sab);
|
||||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||||
|
|
|
@ -6,17 +6,12 @@ esid: sec-atomics.xor
|
||||||
description: >
|
description: >
|
||||||
Test Atomics.xor on non-shared integer TypedArrays
|
Test Atomics.xor on non-shared integer TypedArrays
|
||||||
includes: [testTypedArray.js]
|
includes: [testTypedArray.js]
|
||||||
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
|
features: [ArrayBuffer, Atomics, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var buffer = new ArrayBuffer(16);
|
var buffer = new ArrayBuffer(16);
|
||||||
var views = intArrayConstructors.slice();
|
var views = intArrayConstructors.slice();
|
||||||
|
|
||||||
if (typeof BigInt !== "undefined") {
|
|
||||||
views.push(BigInt64Array);
|
|
||||||
views.push(BigUint64Array);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
assert.throws(TypeError, (() => Atomics.xor(new TA(buffer), 0, 0)));
|
assert.throws(TypeError, (() => Atomics.xor(new TA(buffer), 0, 0)));
|
||||||
}, views);
|
}, views);
|
||||||
|
|
Loading…
Reference in New Issue