Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Atomics/wait/shared-nonint-views.js

raw
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.wait
6 description: >
7 Test Atomics.wait on shared non-integer TypedArrays
8 includes: [testTypedArray.js]
9 features: [TypedArray]
10 ---*/
11
12 var sab = new SharedArrayBuffer(1024);
13
14 var other_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Uint32Array,
15 Uint8ClampedArray, Float32Array, Float64Array];
16
17 testWithTypedArrayConstructors(function(View) {
18 var view = new View(sab);
19
20 // Even with timout zero this should fail
21 assert.throws(TypeError, (() => Atomics.wait(view, 0, 0, 0)));
22 }, other_views);