summaryrefslogtreecommitdiff
path: root/test/built-ins/Atomics/store/shared-nonint-views.js
blob: 950e1d44267c86d3e727ee285fedb3859174ce9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (C) 2017 Mozilla Corporation.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-atomics.store
description: >
  Test Atomics.store on shared non-integer TypedArrays
includes: [testTypedArray.js]
features: [TypedArray]
---*/

var sab = new SharedArrayBuffer(1024);

var other_views = [Uint8ClampedArray, Float32Array, Float64Array];

testWithTypedArrayConstructors(function(View) {
    var view = new View(sab);

    assert.throws(TypeError, (() => Atomics.store(view, 0, 0)));
}, other_views);