mirror of https://github.com/tc39/test262.git
19 lines
515 B
JavaScript
19 lines
515 B
JavaScript
|
// Copyright (C) 2017 Mozilla Corporation. All rights reserved.
|
||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||
|
|
||
|
/*---
|
||
|
description: >
|
||
|
Test Atomics.and on shared non-integer TypedArrays
|
||
|
includes: [testTypedArray.js]
|
||
|
---*/
|
||
|
|
||
|
var sab = new SharedArrayBuffer(1024);
|
||
|
|
||
|
var other_views = [Uint8ClampedArray, Float32Array, Float64Array];
|
||
|
|
||
|
testWithTypedArrayConstructors(function(View) {
|
||
|
var view = new View(sab);
|
||
|
|
||
|
assert.throws(TypeError, (() => Atomics.and(view, 0, 0)));
|
||
|
}, other_views);
|