diff options
Diffstat (limited to 'test/built-ins/Atomics/wait/shared-nonint-views.js')
-rw-r--r-- | test/built-ins/Atomics/wait/shared-nonint-views.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/built-ins/Atomics/wait/shared-nonint-views.js b/test/built-ins/Atomics/wait/shared-nonint-views.js new file mode 100644 index 000000000..bfc9b34a0 --- /dev/null +++ b/test/built-ins/Atomics/wait/shared-nonint-views.js @@ -0,0 +1,20 @@ +// Copyright (C) 2017 Mozilla Corporation. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: > + Test Atomics.wait on shared non-integer TypedArrays +includes: [testTypedArray.js] +---*/ + +var sab = new SharedArrayBuffer(1024); + +var other_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Uint32Array, + Uint8ClampedArray, Float32Array, Float64Array]; + +testWithTypedArrayConstructors(function(View) { + var view = new View(sab); + + // Even with timout zero this should fail + assert.throws(TypeError, (() => Atomics.wait(view, 0, 0, 0))); +}, other_views); |