mirror of https://github.com/tc39/test262.git
Atomics: ensure all SharedArrayBuffer sizes are uniform (r3)
This commit is contained in:
parent
d9084b98e7
commit
feab96e601
|
@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(8);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
|
||||
var views = intArrayConstructors.slice();
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testAtomics.js, testBigIntTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(8);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
|
||||
|
||||
testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
let view = new TA(buffer);
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(8);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
|
||||
var views = intArrayConstructors.slice();
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testAtomics.js, testBigIntTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(8);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
|
||||
|
||||
testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
let view = new TA(buffer);
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(8);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
|
||||
var views = intArrayConstructors.slice();
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testAtomics.js, testBigIntTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(8);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
|
||||
|
||||
testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
let view = new TA(buffer);
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(8);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
|
||||
var views = intArrayConstructors.slice();
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testAtomics.js, testBigIntTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(8);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
|
||||
|
||||
testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
let view = new TA(buffer);
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(8);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
|
||||
var views = intArrayConstructors.slice();
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testAtomics.js, testBigIntTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(8);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
|
||||
|
||||
testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
let view = new TA(buffer);
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(8);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
|
||||
var views = intArrayConstructors.slice();
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testAtomics.js, testBigIntTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(8);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
|
||||
|
||||
testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
let view = new TA(buffer);
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(8);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
|
||||
var views = intArrayConstructors.slice();
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testAtomics.js, testBigIntTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(8);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
|
||||
|
||||
testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
let view = new TA(buffer);
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(8);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
|
||||
var views = intArrayConstructors.slice();
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testAtomics.js, testBigIntTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(8);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
|
||||
|
||||
testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
let view = new TA(buffer);
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testAtomics.js, testTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var sab = new SharedArrayBuffer(8);
|
||||
var sab = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
|
||||
var views = intArrayConstructors.slice();
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
|
|
|
@ -9,13 +9,12 @@ includes: [testAtomics.js, testBigIntTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var sab = new SharedArrayBuffer(8);
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
let view = new TA(sab);
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.xor(view, IdxGen(view), 0);
|
||||
}, 'Atomics.xor(view, IdxGen(view), 0) throws RangeError');
|
||||
});
|
||||
Atomics.xor(i64a, IdxGen(i64a), 0);
|
||||
}, 'Atomics.xor(i64a, IdxGen(i64a), 0) throws RangeError');
|
||||
});
|
||||
|
|
|
@ -9,7 +9,7 @@ includes: [testBigIntTypedArray.js]
|
|||
features: [ArrayBuffer, arrow-function, Atomics, BigInt, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new ArrayBuffer(16);
|
||||
var buffer = new ArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 4);
|
||||
|
||||
testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
assert.throws(TypeError, function() {
|
||||
|
|
Loading…
Reference in New Issue