2017-02-07 17:17:31 +01:00
|
|
|
// Copyright (C) 2017 Mozilla Corporation. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
2017-07-26 23:49:55 +02:00
|
|
|
esid: sec-atomics.wake
|
2017-02-07 17:17:31 +01:00
|
|
|
description: >
|
|
|
|
Allowed boundary cases of the third 'count' argument to Atomics.wake
|
|
|
|
---*/
|
|
|
|
|
|
|
|
var sab = new SharedArrayBuffer(4);
|
|
|
|
var view = new Int32Array(sab);
|
|
|
|
|
|
|
|
assert.sameValue(Atomics.wake(view, 0, -3), 0);
|
|
|
|
assert.sameValue(Atomics.wake(view, 0, Number.POSITIVE_INFINITY), 0);
|
|
|
|
assert.sameValue(Atomics.wake(view, 0, undefined), 0);
|
|
|
|
assert.sameValue(Atomics.wake(view, 0, "33"), 0);
|
2018-02-09 17:35:37 +01:00
|
|
|
assert.sameValue(Atomics.wake(view, 0, {
|
|
|
|
valueOf: 8
|
|
|
|
}), 0);
|
2017-02-07 17:17:31 +01:00
|
|
|
assert.sameValue(Atomics.wake(view, 0), 0);
|