mirror of
https://github.com/tc39/test262.git
synced 2025-05-28 18:50:28 +02:00
20 lines
484 B
JavaScript
20 lines
484 B
JavaScript
// Copyright 2024 the V8 project authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
esid: sec-atomics.pause
|
|
description: Atomics.pause throws on negative argument values
|
|
features: [Atomics.pause]
|
|
---*/
|
|
|
|
const values = [
|
|
-1,
|
|
Number.MIN_SAFE_INTEGER,
|
|
Number.MIN_SAFE_INTEGER - 1
|
|
];
|
|
|
|
for (const v of values) {
|
|
assert.throws(RangeError, () => { Atomics.pause(v); },
|
|
`${v} is an illegal iterationNumber`);
|
|
}
|