| 1 |
// Copyright (C) 2017 Mozilla Corporation. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
esid: sec-atomics.wake |
| 6 |
description: > |
| 7 |
Allowed boundary cases of the third 'count' argument to Atomics.wake |
| 8 |
---*/ |
| 9 |
|
| 10 |
var sab = new SharedArrayBuffer(4); |
| 11 |
var view = new Int32Array(sab); |
| 12 |
|
| 13 |
assert.sameValue(Atomics.wake(view, 0, -3), 0); |
| 14 |
assert.sameValue(Atomics.wake(view, 0, Number.POSITIVE_INFINITY), 0); |
| 15 |
assert.sameValue(Atomics.wake(view, 0, undefined), 0); |
| 16 |
assert.sameValue(Atomics.wake(view, 0, "33"), 0); |
| 17 |
assert.sameValue(Atomics.wake(view, 0, { valueOf: 8 }), 0); |
| 18 |
assert.sameValue(Atomics.wake(view, 0), 0); |