mirror of https://github.com/tc39/test262.git
Atomics tests for BigInt
This commit is contained in:
parent
baa5d94bc5
commit
8b71c5fea5
|
@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of]
|
||||
---*/
|
||||
|
||||
var sab = new SharedArrayBuffer(4);
|
||||
var sab = new SharedArrayBuffer(8);
|
||||
var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
views.push(BigInt64Array);
|
||||
views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
let view = new View(sab);
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
|
|
|
@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16);
|
|||
|
||||
var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
int_views.push(BigInt64Array);
|
||||
int_views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
var view = new View(ab);
|
||||
|
||||
|
|
|
@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of]
|
||||
---*/
|
||||
|
||||
var sab = new SharedArrayBuffer(4);
|
||||
var sab = new SharedArrayBuffer(8);
|
||||
var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
views.push(BigInt64Array);
|
||||
views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
let view = new View(sab);
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
|
|
|
@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16);
|
|||
|
||||
var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
int_views.push(BigInt64Array);
|
||||
int_views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
var view = new View(ab);
|
||||
|
||||
|
|
|
@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of]
|
||||
---*/
|
||||
|
||||
var sab = new SharedArrayBuffer(4);
|
||||
var sab = new SharedArrayBuffer(8);
|
||||
var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
views.push(BigInt64Array);
|
||||
views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
let view = new View(sab);
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
|
|
|
@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16);
|
|||
|
||||
var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
int_views.push(BigInt64Array);
|
||||
int_views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
var view = new View(ab);
|
||||
|
||||
|
|
|
@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of]
|
||||
---*/
|
||||
|
||||
var sab = new SharedArrayBuffer(4);
|
||||
var sab = new SharedArrayBuffer(8);
|
||||
var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
views.push(BigInt64Array);
|
||||
views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
let view = new View(sab);
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
|
|
|
@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16);
|
|||
|
||||
var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
int_views.push(BigInt64Array);
|
||||
int_views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
var view = new View(ab);
|
||||
|
||||
|
|
|
@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of]
|
||||
---*/
|
||||
|
||||
var sab = new SharedArrayBuffer(4);
|
||||
var sab = new SharedArrayBuffer(8);
|
||||
var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
views.push(BigInt64Array);
|
||||
views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
let view = new View(sab);
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
|
|
|
@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16);
|
|||
|
||||
var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
int_views.push(BigInt64Array);
|
||||
int_views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
var view = new View(ab);
|
||||
|
||||
|
|
|
@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of]
|
||||
---*/
|
||||
|
||||
var sab = new SharedArrayBuffer(4);
|
||||
var sab = new SharedArrayBuffer(8);
|
||||
var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
views.push(BigInt64Array);
|
||||
views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
let view = new View(sab);
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
|
|
|
@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16);
|
|||
|
||||
var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
int_views.push(BigInt64Array);
|
||||
int_views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
var view = new View(ab);
|
||||
|
||||
|
|
|
@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of]
|
||||
---*/
|
||||
|
||||
var sab = new SharedArrayBuffer(4);
|
||||
var sab = new SharedArrayBuffer(8);
|
||||
var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
views.push(BigInt64Array);
|
||||
views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
let view = new View(sab);
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
|
|
|
@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16);
|
|||
|
||||
var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
int_views.push(BigInt64Array);
|
||||
int_views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
var view = new View(ab);
|
||||
|
||||
|
|
|
@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of]
|
||||
---*/
|
||||
|
||||
var sab = new SharedArrayBuffer(4);
|
||||
var sab = new SharedArrayBuffer(8);
|
||||
var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
views.push(BigInt64Array);
|
||||
views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
let view = new View(sab);
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
|
|
|
@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16);
|
|||
|
||||
var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
int_views.push(BigInt64Array);
|
||||
int_views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
var view = new View(ab);
|
||||
|
||||
|
|
|
@ -5,14 +5,21 @@
|
|||
esid: sec-atomics.wait
|
||||
description: >
|
||||
Test range checking of Atomics.wait on arrays that allow atomic operations
|
||||
includes: [testAtomics.js]
|
||||
features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, for-of]
|
||||
includes: [testAtomics.js, testTypedArray.js]
|
||||
features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, TypedArray, arrow-function, let, for-of]
|
||||
---*/
|
||||
|
||||
var sab = new SharedArrayBuffer(4);
|
||||
var view = new Int32Array(sab);
|
||||
var sab = new SharedArrayBuffer(8);
|
||||
var views = [Int32Array];
|
||||
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
if (typeof BigInt !== "undefined") {
|
||||
views.push(BigInt64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
let view = new View(sab);
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
let Idx = IdxGen(view);
|
||||
assert.throws(RangeError, () => Atomics.wait(view, Idx, 10, 0)); // Even with zero timeout
|
||||
});
|
||||
});
|
||||
}, views);
|
||||
|
|
|
@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16);
|
|||
|
||||
var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
int_views.push(BigInt64Array);
|
||||
int_views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
var view = new View(ab);
|
||||
|
||||
|
|
|
@ -5,14 +5,21 @@
|
|||
esid: sec-atomics.wake
|
||||
description: >
|
||||
Test range checking of Atomics.wake on arrays that allow atomic operations
|
||||
includes: [testAtomics.js]
|
||||
features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, for-of]
|
||||
includes: [testAtomics.js, testTypedArray.js]
|
||||
features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, TypedArray, arrow-function, let, for-of]
|
||||
---*/
|
||||
|
||||
var sab = new SharedArrayBuffer(4);
|
||||
var view = new Int32Array(sab);
|
||||
var sab = new SharedArrayBuffer(8);
|
||||
var views = [Int32Array];
|
||||
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
if (typeof BigInt !== "undefined") {
|
||||
views.push(BigInt64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
let view = new View(sab);
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
let Idx = IdxGen(view);
|
||||
assert.throws(RangeError, () => Atomics.wake(view, Idx, 0)); // Even with waking zero
|
||||
});
|
||||
});
|
||||
}, views);
|
||||
|
|
|
@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16);
|
|||
|
||||
var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
int_views.push(BigInt64Array);
|
||||
int_views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
var view = new View(ab);
|
||||
|
||||
|
|
|
@ -9,9 +9,14 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [SharedArrayBuffer, ArrayBuffer, DataView, Atomics, arrow-function, let, TypedArray, for-of]
|
||||
---*/
|
||||
|
||||
var sab = new SharedArrayBuffer(4);
|
||||
var sab = new SharedArrayBuffer(8);
|
||||
var views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
views.push(BigInt64Array);
|
||||
views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
let view = new View(sab);
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
|
|
|
@ -13,6 +13,11 @@ var ab = new ArrayBuffer(16);
|
|||
|
||||
var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array];
|
||||
|
||||
if (typeof BigInt !== "undefined") {
|
||||
int_views.push(BigInt64Array);
|
||||
int_views.push(BigUint64Array);
|
||||
}
|
||||
|
||||
testWithTypedArrayConstructors(function(View) {
|
||||
var view = new View(ab);
|
||||
|
||||
|
|
Loading…
Reference in New Issue