mirror of https://github.com/tc39/test262.git
Atomics: fix test info contents to match definition as it appears in ES2020. Fixes gh-2721
This commit is contained in:
parent
e8cdf923ef
commit
1c22e0b2f2
|
@ -3,15 +3,21 @@
|
|||
/*---
|
||||
esid: sec-atomics.notify
|
||||
description: >
|
||||
A null value for bufferData throws a TypeError
|
||||
A null value for bufferData (detached) throws a TypeError
|
||||
info: |
|
||||
Atomics.notify( typedArray, index, count )
|
||||
|
||||
1.Let buffer be ? ValidateSharedIntegerTypedArray(typedArray, true).
|
||||
Let buffer be ? ValidateIntegerTypedArray(typedArray, true).
|
||||
...
|
||||
|
||||
Let buffer be ? ValidateTypedArray(typedArray).
|
||||
...
|
||||
9.If IsSharedArrayBuffer(buffer) is false, throw a TypeError exception.
|
||||
...
|
||||
3.If bufferData is null, return false.
|
||||
|
||||
If IsDetachedBuffer(buffer) is true, throw a TypeError exception.
|
||||
...
|
||||
|
||||
If arrayBuffer.[[ArrayBufferData]] is null, return true.
|
||||
|
||||
includes: [detachArrayBuffer.js]
|
||||
features: [ArrayBuffer, Atomics, TypedArray]
|
||||
---*/
|
||||
|
@ -29,7 +35,7 @@ const poisoned = {
|
|||
try {
|
||||
$DETACHBUFFER(i32a.buffer); // Detaching a non-shared ArrayBuffer sets the [[ArrayBufferData]] value to null
|
||||
} catch (error) {
|
||||
$ERROR(`An unexpected error occurred when detaching ArrayBuffer: ${error}`);
|
||||
$ERROR(`An unexpected error occurred when detaching ArrayBuffer: ${error.message}`);
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
|
|
|
@ -3,15 +3,21 @@
|
|||
/*---
|
||||
esid: sec-atomics.wait
|
||||
description: >
|
||||
A null value for bufferData throws a TypeError
|
||||
A null value for bufferData (detached) throws a TypeError
|
||||
info: |
|
||||
Atomics.wait( typedArray, index, value, timeout )
|
||||
|
||||
1.Let buffer be ? ValidateSharedIntegerTypedArray(typedArray, true).
|
||||
Let buffer be ? ValidateIntegerTypedArray(typedArray, true).
|
||||
...
|
||||
|
||||
Let buffer be ? ValidateTypedArray(typedArray).
|
||||
...
|
||||
9.If IsSharedArrayBuffer(buffer) is false, throw a TypeError exception.
|
||||
...
|
||||
3.If bufferData is null, return false.
|
||||
|
||||
If IsDetachedBuffer(buffer) is true, throw a TypeError exception.
|
||||
...
|
||||
|
||||
If arrayBuffer.[[ArrayBufferData]] is null, return true.
|
||||
|
||||
includes: [detachArrayBuffer.js]
|
||||
features: [ArrayBuffer, Atomics, TypedArray]
|
||||
---*/
|
||||
|
|
Loading…
Reference in New Issue