mirror of
https://github.com/tc39/test262.git
synced 2025-07-27 07:54:41 +02:00
Fix copy-paste errors in Atomics tests
This commit is contained in:
parent
453887559d
commit
49a4e1e7c8
@ -2,7 +2,7 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.add
|
esid: sec-atomics.and
|
||||||
description: >
|
description: >
|
||||||
TypedArray type is validated before `index` argument is coerced.
|
TypedArray type is validated before `index` argument is coerced.
|
||||||
info: |
|
info: |
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.add
|
esid: sec-atomics.and
|
||||||
description: >
|
description: >
|
||||||
TypedArray type is validated before `value` argument is coerced.
|
TypedArray type is validated before `value` argument is coerced.
|
||||||
info: |
|
info: |
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.compareExchange
|
esid: sec-atomics.compareexchange
|
||||||
description: >
|
description: >
|
||||||
Atomics.compareExchange will operate on TA when TA.buffer is not a SharedArrayBuffer
|
Atomics.compareExchange will operate on TA when TA.buffer is not a SharedArrayBuffer
|
||||||
includes: [testBigIntTypedArray.js]
|
includes: [testBigIntTypedArray.js]
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.compareExchange
|
esid: sec-atomics.compareexchange
|
||||||
description: >
|
description: >
|
||||||
Atomics.compareExchange returns the value that existed at the
|
Atomics.compareExchange returns the value that existed at the
|
||||||
index prior to the operation.
|
index prior to the operation.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.compareExchange
|
esid: sec-atomics.compareexchange
|
||||||
description: >
|
description: >
|
||||||
Atomics.compareExchange will operate on TA when TA.buffer is not a SharedArrayBuffer
|
Atomics.compareExchange will operate on TA when TA.buffer is not a SharedArrayBuffer
|
||||||
includes: [testTypedArray.js]
|
includes: [testTypedArray.js]
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.compareExchange
|
esid: sec-atomics.compareexchange
|
||||||
description: >
|
description: >
|
||||||
Atomics.compareExchange throws when operating on non-sharable integer TypedArrays
|
Atomics.compareExchange throws when operating on non-sharable integer TypedArrays
|
||||||
includes: [testTypedArray.js]
|
includes: [testTypedArray.js]
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.compareExchange
|
esid: sec-atomics.compareexchange
|
||||||
description: >
|
description: >
|
||||||
TypedArray type is validated before `expectedValue` argument is coerced.
|
TypedArray type is validated before `expectedValue` argument is coerced.
|
||||||
info: |
|
info: |
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.compareExchange
|
esid: sec-atomics.compareexchange
|
||||||
description: >
|
description: >
|
||||||
TypedArray type is validated before `index` argument is coerced.
|
TypedArray type is validated before `index` argument is coerced.
|
||||||
info: |
|
info: |
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.compareExchange
|
esid: sec-atomics.compareexchange
|
||||||
description: >
|
description: >
|
||||||
TypedArray type is validated before `replacementValue` argument is coerced.
|
TypedArray type is validated before `replacementValue` argument is coerced.
|
||||||
info: |
|
info: |
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.add
|
esid: sec-atomics.exchange
|
||||||
description: >
|
description: >
|
||||||
Atomics.add throws when operating on non-sharable integer TypedArrays
|
Atomics.exchange throws when operating on non-sharable integer TypedArrays
|
||||||
includes: [testTypedArray.js]
|
includes: [testTypedArray.js]
|
||||||
features: [ArrayBuffer, Atomics, TypedArray]
|
features: [ArrayBuffer, Atomics, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
@ -12,6 +12,6 @@ testWithNonAtomicsFriendlyTypedArrayConstructors(TA => {
|
|||||||
const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4);
|
const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4);
|
||||||
const view = new TA(buffer);
|
const view = new TA(buffer);
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
Atomics.add(view, 0, 1);
|
Atomics.exchange(view, 0, 1);
|
||||||
}, `Atomics.add(new ${TA.name}(buffer), 0, 1) throws TypeError`);
|
}, `Atomics.exchange(new ${TA.name}(buffer), 0, 1) throws TypeError`);
|
||||||
});
|
});
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.isLockFree
|
esid: sec-atomics.islockfree
|
||||||
description: >
|
description: >
|
||||||
Atomics.isLockFree returns a boolean that indicates whether
|
Atomics.isLockFree returns a boolean that indicates whether
|
||||||
operations on datum of size will be performed without the agent
|
operations on datum of size will be performed without the agent
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.store
|
esid: sec-atomics.load
|
||||||
description: >
|
description: >
|
||||||
TypedArray type is validated before `index` argument is coerced.
|
TypedArray type is validated before `index` argument is coerced.
|
||||||
info: |
|
info: |
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.and
|
esid: sec-atomics.or
|
||||||
description: >
|
description: >
|
||||||
Atomics.and throws when operating on non-sharable integer TypedArrays
|
Atomics.or throws when operating on non-sharable integer TypedArrays
|
||||||
includes: [testTypedArray.js]
|
includes: [testTypedArray.js]
|
||||||
features: [ArrayBuffer, Atomics, TypedArray]
|
features: [ArrayBuffer, Atomics, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
@ -13,6 +13,6 @@ testWithNonAtomicsFriendlyTypedArrayConstructors(TA => {
|
|||||||
const view = new TA(buffer);
|
const view = new TA(buffer);
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
Atomics.and(view, 0, 1);
|
Atomics.or(view, 0, 1);
|
||||||
}, `Atomics.and(new ${TA.name}(buffer), 0, 1) throws TypeError`);
|
}, `Atomics.or(new ${TA.name}(buffer), 0, 1) throws TypeError`);
|
||||||
});
|
});
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.notify
|
esid: sec-atomics.wait
|
||||||
description: >
|
description: >
|
||||||
TypedArray type is validated before `timeout` argument is coerced.
|
TypedArray type is validated before `timeout` argument is coerced.
|
||||||
info: |
|
info: |
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.notify
|
esid: sec-atomics.wait
|
||||||
description: >
|
description: >
|
||||||
TypedArray type is validated before `value` argument is coerced.
|
TypedArray type is validated before `value` argument is coerced.
|
||||||
info: |
|
info: |
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.notify
|
esid: sec-atomics.waitasync
|
||||||
description: >
|
description: >
|
||||||
TypedArray type is validated before `value` argument is coerced.
|
TypedArray type is validated before `value` argument is coerced.
|
||||||
info: |
|
info: |
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.and
|
esid: sec-atomics.xor
|
||||||
description: >
|
description: >
|
||||||
Atomics.and will operate on TA when TA.buffer is not a SharedArrayBuffer
|
Atomics.xor will operate on TA when TA.buffer is not a SharedArrayBuffer
|
||||||
includes: [testTypedArray.js]
|
includes: [testTypedArray.js]
|
||||||
features: [ArrayBuffer, Atomics, TypedArray]
|
features: [ArrayBuffer, Atomics, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
@ -13,6 +13,6 @@ testWithAtomicsFriendlyTypedArrayConstructors(TA => {
|
|||||||
new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4)
|
new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4)
|
||||||
);
|
);
|
||||||
|
|
||||||
assert.sameValue(Atomics.and(view, 0, 1), 0, 'Atomics.and(view, 0, 1) returns 0');
|
assert.sameValue(Atomics.xor(view, 0, 1), 0, 'Atomics.xor(view, 0, 1) returns 0');
|
||||||
assert.sameValue(Atomics.load(view, 0), 0, 'Atomics.load(view, 0) returns 0');
|
assert.sameValue(Atomics.load(view, 0), 1, 'Atomics.load(view, 0) returns 1');
|
||||||
});
|
});
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.and
|
esid: sec-atomics.xor
|
||||||
description: >
|
description: >
|
||||||
Atomics.and throws when operating on non-sharable integer TypedArrays
|
Atomics.xor throws when operating on non-sharable integer TypedArrays
|
||||||
includes: [testTypedArray.js]
|
includes: [testTypedArray.js]
|
||||||
features: [ArrayBuffer, Atomics, TypedArray]
|
features: [ArrayBuffer, Atomics, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
@ -13,6 +13,6 @@ testWithNonAtomicsFriendlyTypedArrayConstructors(TA => {
|
|||||||
const view = new TA(buffer);
|
const view = new TA(buffer);
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
Atomics.and(view, 0, 1);
|
Atomics.xor(view, 0, 1);
|
||||||
}, `Atomics.and(new ${TA.name}(buffer), 0, 1) throws TypeError`);
|
}, `Atomics.xor(new ${TA.name}(buffer), 0, 1) throws TypeError`);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user