| 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.store |
| 6 |
description: > |
| 7 |
Test Atomics.store 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 = [Uint8ClampedArray, Float32Array, Float64Array]; |
| 15 |
|
| 16 |
testWithTypedArrayConstructors(function(View) { |
| 17 |
var view = new View(sab); |
| 18 |
|
| 19 |
assert.throws(TypeError, (() => Atomics.store(view, 0, 0))); |
| 20 |
}, other_views); |