mirror of https://github.com/tc39/test262.git
Atomics: fix invalid index; print error
This commit is contained in:
parent
be21156542
commit
a1ff358a06
|
@ -29,7 +29,7 @@ const poisoned = {
|
||||||
try {
|
try {
|
||||||
$DETACHBUFFER(i32a.buffer); // Detaching a non-shared ArrayBuffer sets the [[ArrayBufferData]] value to null
|
$DETACHBUFFER(i32a.buffer); // Detaching a non-shared ArrayBuffer sets the [[ArrayBufferData]] value to null
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
$ERROR(`An unexpected error occurred when detaching ArrayBuffer: ${error.message}`);
|
$ERROR(`An unexpected error occurred when detaching ArrayBuffer: ${error}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
|
|
|
@ -30,8 +30,8 @@ assert.throws(RangeError, function() {
|
||||||
Atomics.wake(i32a, Infinity, poisoned);
|
Atomics.wake(i32a, Infinity, poisoned);
|
||||||
}, '`Atomics.wake(i32a, Infinity, poisoned)` throws RangeError');
|
}, '`Atomics.wake(i32a, Infinity, poisoned)` throws RangeError');
|
||||||
assert.throws(RangeError, function() {
|
assert.throws(RangeError, function() {
|
||||||
Atomics.wake(i32a, 2, poisoned);
|
Atomics.wake(i32a, 4, poisoned);
|
||||||
}, '`Atomics.wake(i32a, 2, poisoned)` throws RangeError');
|
}, '`Atomics.wake(i32a, 4, poisoned)` throws RangeError');
|
||||||
assert.throws(RangeError, function() {
|
assert.throws(RangeError, function() {
|
||||||
Atomics.wake(i32a, 200, poisoned);
|
Atomics.wake(i32a, 200, poisoned);
|
||||||
}, '`Atomics.wake(i32a, 200, poisoned)` throws RangeError');
|
}, '`Atomics.wake(i32a, 200, poisoned)` throws RangeError');
|
||||||
|
|
Loading…
Reference in New Issue