| 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.or |
| 6 |
description: > |
| 7 |
Test Atomics.or on non-shared integer TypedArrays |
| 8 |
includes: [testTypedArray.js] |
| 9 |
features: [TypedArray] |
| 10 |
---*/ |
| 11 |
|
| 12 |
var ab = new ArrayBuffer(16); |
| 13 |
|
| 14 |
var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; |
| 15 |
|
| 16 |
if (typeof BigInt !== "undefined") { |
| 17 |
int_views.push(BigInt64Array); |
| 18 |
int_views.push(BigUint64Array); |
| 19 |
} |
| 20 |
|
| 21 |
testWithTypedArrayConstructors(function(View) { |
| 22 |
var view = new View(ab); |
| 23 |
|
| 24 |
assert.throws(TypeError, (() => Atomics.or(view, 0, 0))); |
| 25 |
}, int_views); |