Atomics: remove BigInt condition from existing tests.

This commit is contained in:
Rick Waldron 2018-04-25 11:33:53 -04:00
parent 6c2503a810
commit 8a78bb09a7
21 changed files with 21 additions and 126 deletions

View File

@ -6,17 +6,12 @@ esid: sec-atomics.add
description: >
Test range checking of Atomics.add on arrays that allow atomic operations
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 views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
let view = new TA(buffer);
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {

View File

@ -6,17 +6,12 @@ esid: sec-atomics.add
description: >
Test Atomics.add on non-shared integer TypedArrays
includes: [testTypedArray.js]
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
features: [ArrayBuffer, Atomics, TypedArray]
---*/
var ab = new ArrayBuffer(16);
var views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
assert.throws(TypeError, (() => Atomics.add(new TA(ab), 0, 0)));
}, views);

View File

@ -6,17 +6,12 @@ esid: sec-atomics.and
description: >
Test range checking of Atomics.and on arrays that allow atomic operations
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 views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
let view = new TA(buffer);
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {

View File

@ -6,17 +6,12 @@ esid: sec-atomics.and
description: >
Test Atomics.and on non-shared integer TypedArrays
includes: [testTypedArray.js]
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
features: [ArrayBuffer, Atomics, TypedArray]
---*/
var buffer = new ArrayBuffer(16);
var views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
assert.throws(TypeError, (() => Atomics.and(new TA(buffer), 0, 0)));
}, views);

View File

@ -6,17 +6,12 @@ esid: sec-atomics.compareexchange
description: >
Test range checking of Atomics.compareExchange on arrays that allow atomic operations
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 views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
let view = new TA(buffer);
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {

View File

@ -6,17 +6,12 @@ esid: sec-atomics.compareexchange
description: >
Test Atomics.compareExchange on non-shared integer TypedArrays
includes: [testTypedArray.js]
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
features: [ArrayBuffer, Atomics, TypedArray]
---*/
var buffer = new ArrayBuffer(16);
var views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
assert.throws(TypeError, (() => Atomics.compareExchange(new TA(buffer), 0, 0, 0)));
}, views);

View File

@ -6,17 +6,12 @@ esid: sec-atomics.exchange
description: >
Test range checking of Atomics.exchange on arrays that allow atomic operations
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 views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
let view = new TA(buffer);
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {

View File

@ -6,17 +6,12 @@ esid: sec-atomics.exchange
description: >
Test Atomics.exchange on non-shared integer TypedArrays
includes: [testTypedArray.js]
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
features: [ArrayBuffer, Atomics, TypedArray]
---*/
var buffer = new ArrayBuffer(16);
var views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
assert.throws(TypeError, (() => Atomics.exchange(new TA(buffer), 0, 0)));
}, views);

View File

@ -6,17 +6,12 @@ esid: sec-atomics.load
description: >
Test range checking of Atomics.load on arrays that allow atomic operations
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 views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
let view = new TA(buffer);
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {

View File

@ -6,18 +6,13 @@ esid: sec-atomics.load
description: >
Test Atomics.load on non-shared integer TypedArrays
includes: [testTypedArray.js]
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
features: [ArrayBuffer, Atomics, TypedArray]
---*/
var ab = new ArrayBuffer(16);
var views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
var view = new TA(ab);

View File

@ -6,17 +6,12 @@ esid: sec-atomics.or
description: >
Test range checking of Atomics.or on arrays that allow atomic operations
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 views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
let view = new TA(buffer);
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {

View File

@ -6,17 +6,12 @@ esid: sec-atomics.or
description: >
Test Atomics.or on non-shared integer TypedArrays
includes: [testTypedArray.js]
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
features: [ArrayBuffer, Atomics, TypedArray]
---*/
var buffer = new ArrayBuffer(16);
var views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
assert.throws(TypeError, (() => Atomics.or(new TA(buffer), 0, 0)));
}, views);

View File

@ -6,17 +6,12 @@ esid: sec-atomics.store
description: >
Test range checking of Atomics.store on arrays that allow atomic operations
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 views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
let view = new TA(buffer);
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {

View File

@ -6,17 +6,12 @@ esid: sec-atomics.store
description: >
Test Atomics.store on non-shared integer TypedArrays
includes: [testTypedArray.js]
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
features: [ArrayBuffer, Atomics, TypedArray]
---*/
var buffer = new ArrayBuffer(16);
var views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
assert.throws(TypeError, (() => Atomics.store(new TA(buffer), 0, 0)));
}, views);

View File

@ -6,17 +6,12 @@ esid: sec-atomics.sub
description: >
Test range checking of Atomics.sub on arrays that allow atomic operations
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 views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
let view = new TA(buffer);
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {

View File

@ -6,17 +6,12 @@ esid: sec-atomics.sub
description: >
Test Atomics.sub on non-shared integer TypedArrays
includes: [testTypedArray.js]
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
features: [ArrayBuffer, Atomics, TypedArray]
---*/
var buffer = new ArrayBuffer(16);
var views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
assert.throws(TypeError, (() => Atomics.sub(new TA(buffer), 0, 0)));
}, views);

View File

@ -12,17 +12,12 @@ info: |
...
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 views = [Int32Array];
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
let view = new TA(sab);
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {

View File

@ -12,17 +12,12 @@ info: |
..
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 views = [Int32Array];
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
let view = new TA(sab);
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {

View File

@ -6,17 +6,12 @@ esid: sec-atomics.wake
description: >
Test Atomics.wake on non-shared integer TypedArrays
includes: [testTypedArray.js]
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
features: [ArrayBuffer, Atomics, TypedArray]
---*/
var buffer = new ArrayBuffer(16);
var views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
// Should fail even if waking zero waiters
assert.throws(TypeError, (() => Atomics.wake(new TA(buffer), 0, 0)));

View File

@ -6,17 +6,12 @@ esid: sec-atomics.xor
description: >
Test range checking of Atomics.xor on arrays that allow atomic operations
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 views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
let view = new TA(sab);
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {

View File

@ -6,17 +6,12 @@ esid: sec-atomics.xor
description: >
Test Atomics.xor on non-shared integer TypedArrays
includes: [testTypedArray.js]
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
features: [ArrayBuffer, Atomics, TypedArray]
---*/
var buffer = new ArrayBuffer(16);
var views = intArrayConstructors.slice();
if (typeof BigInt !== "undefined") {
views.push(BigInt64Array);
views.push(BigUint64Array);
}
testWithTypedArrayConstructors(function(TA) {
assert.throws(TypeError, (() => Atomics.xor(new TA(buffer), 0, 0)));
}, views);