Fix copy-paste errors in Atomics tests

This commit is contained in:
André Bargull 2025-05-15 11:12:29 +02:00 committed by Ms2ger
parent 453887559d
commit 49a4e1e7c8
18 changed files with 30 additions and 30 deletions

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.add
esid: sec-atomics.and
description: >
TypedArray type is validated before `index` argument is coerced.
info: |

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.add
esid: sec-atomics.and
description: >
TypedArray type is validated before `value` argument is coerced.
info: |

View File

@ -1,7 +1,7 @@
// Copyright (C) 2020 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.compareExchange
esid: sec-atomics.compareexchange
description: >
Atomics.compareExchange will operate on TA when TA.buffer is not a SharedArrayBuffer
includes: [testBigIntTypedArray.js]

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.compareExchange
esid: sec-atomics.compareexchange
description: >
Atomics.compareExchange returns the value that existed at the
index prior to the operation.

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.compareExchange
esid: sec-atomics.compareexchange
description: >
Atomics.compareExchange will operate on TA when TA.buffer is not a SharedArrayBuffer
includes: [testTypedArray.js]

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.compareExchange
esid: sec-atomics.compareexchange
description: >
Atomics.compareExchange throws when operating on non-sharable integer TypedArrays
includes: [testTypedArray.js]

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.compareExchange
esid: sec-atomics.compareexchange
description: >
TypedArray type is validated before `expectedValue` argument is coerced.
info: |

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.compareExchange
esid: sec-atomics.compareexchange
description: >
TypedArray type is validated before `index` argument is coerced.
info: |

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.compareExchange
esid: sec-atomics.compareexchange
description: >
TypedArray type is validated before `replacementValue` argument is coerced.
info: |

View File

@ -2,9 +2,9 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.add
esid: sec-atomics.exchange
description: >
Atomics.add throws when operating on non-sharable integer TypedArrays
Atomics.exchange throws when operating on non-sharable integer TypedArrays
includes: [testTypedArray.js]
features: [ArrayBuffer, Atomics, TypedArray]
---*/
@ -12,6 +12,6 @@ testWithNonAtomicsFriendlyTypedArrayConstructors(TA => {
const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4);
const view = new TA(buffer);
assert.throws(TypeError, function() {
Atomics.add(view, 0, 1);
}, `Atomics.add(new ${TA.name}(buffer), 0, 1) throws TypeError`);
Atomics.exchange(view, 0, 1);
}, `Atomics.exchange(new ${TA.name}(buffer), 0, 1) throws TypeError`);
});

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.isLockFree
esid: sec-atomics.islockfree
description: >
Atomics.isLockFree returns a boolean that indicates whether
operations on datum of size will be performed without the agent

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.store
esid: sec-atomics.load
description: >
TypedArray type is validated before `index` argument is coerced.
info: |

View File

@ -2,9 +2,9 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.and
esid: sec-atomics.or
description: >
Atomics.and throws when operating on non-sharable integer TypedArrays
Atomics.or throws when operating on non-sharable integer TypedArrays
includes: [testTypedArray.js]
features: [ArrayBuffer, Atomics, TypedArray]
---*/
@ -13,6 +13,6 @@ testWithNonAtomicsFriendlyTypedArrayConstructors(TA => {
const view = new TA(buffer);
assert.throws(TypeError, function() {
Atomics.and(view, 0, 1);
}, `Atomics.and(new ${TA.name}(buffer), 0, 1) throws TypeError`);
Atomics.or(view, 0, 1);
}, `Atomics.or(new ${TA.name}(buffer), 0, 1) throws TypeError`);
});

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.notify
esid: sec-atomics.wait
description: >
TypedArray type is validated before `timeout` argument is coerced.
info: |

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.notify
esid: sec-atomics.wait
description: >
TypedArray type is validated before `value` argument is coerced.
info: |

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.notify
esid: sec-atomics.waitasync
description: >
TypedArray type is validated before `value` argument is coerced.
info: |

View File

@ -2,9 +2,9 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.and
esid: sec-atomics.xor
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]
features: [ArrayBuffer, Atomics, TypedArray]
---*/
@ -13,6 +13,6 @@ testWithAtomicsFriendlyTypedArrayConstructors(TA => {
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.load(view, 0), 0, 'Atomics.load(view, 0) returns 0');
assert.sameValue(Atomics.xor(view, 0, 1), 0, 'Atomics.xor(view, 0, 1) returns 0');
assert.sameValue(Atomics.load(view, 0), 1, 'Atomics.load(view, 0) returns 1');
});

View File

@ -2,9 +2,9 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.and
esid: sec-atomics.xor
description: >
Atomics.and throws when operating on non-sharable integer TypedArrays
Atomics.xor throws when operating on non-sharable integer TypedArrays
includes: [testTypedArray.js]
features: [ArrayBuffer, Atomics, TypedArray]
---*/
@ -13,6 +13,6 @@ testWithNonAtomicsFriendlyTypedArrayConstructors(TA => {
const view = new TA(buffer);
assert.throws(TypeError, function() {
Atomics.and(view, 0, 1);
}, `Atomics.and(new ${TA.name}(buffer), 0, 1) throws TypeError`);
Atomics.xor(view, 0, 1);
}, `Atomics.xor(new ${TA.name}(buffer), 0, 1) throws TypeError`);
});