2017-02-07 17:17:31 +01:00
|
|
|
// Copyright (C) 2017 Mozilla Corporation. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
2017-07-26 23:49:55 +02:00
|
|
|
esid: sec-atomics.xor
|
2017-02-07 17:17:31 +01:00
|
|
|
description: >
|
|
|
|
Test Atomics.xor on non-shared integer TypedArrays
|
|
|
|
includes: [testTypedArray.js]
|
2018-04-19 16:11:50 +02:00
|
|
|
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
|
2017-02-07 17:17:31 +01:00
|
|
|
---*/
|
|
|
|
|
2018-04-19 16:11:50 +02:00
|
|
|
var buffer = new ArrayBuffer(16);
|
|
|
|
var views = intArrayConstructors.slice();
|
2017-02-07 17:17:31 +01:00
|
|
|
|
2018-01-23 02:40:35 +01:00
|
|
|
if (typeof BigInt !== "undefined") {
|
2018-04-19 16:11:50 +02:00
|
|
|
views.push(BigInt64Array);
|
|
|
|
views.push(BigUint64Array);
|
2018-01-23 02:40:35 +01:00
|
|
|
}
|
|
|
|
|
2018-04-19 16:11:50 +02:00
|
|
|
testWithTypedArrayConstructors(function(TA) {
|
|
|
|
assert.throws(TypeError, (() => Atomics.xor(new TA(buffer), 0, 0)));
|
|
|
|
}, views);
|