non-shared-bufferdata.js (772B)
1 // |reftest| skip-if(!this.hasOwnProperty('Atomics')) -- Atomics is not enabled unconditionally 2 // Copyright (C) 2020 Rick Waldron. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 /*--- 5 esid: sec-atomics.xor 6 description: > 7 Atomics.xor will operate on TA when TA.buffer is not a SharedArrayBuffer 8 includes: [testBigIntTypedArray.js] 9 features: [ArrayBuffer, Atomics, BigInt, TypedArray] 10 ---*/ 11 testWithBigIntTypedArrayConstructors(TA => { 12 const buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT * 4); 13 const view = new TA(buffer); 14 assert.sameValue(Atomics.xor(view, 0, 1n), 0n, 'Atomics.xor(view, 0, 1n) returns 0n'); 15 assert.sameValue(Atomics.load(view, 0), 1n, 'Atomics.load(view, 0) returns 1n'); 16 }); 17 18 reportCompare(0, 0);