non-shared-bufferdata.js (779B)
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.store 6 description: > 7 Atomics.store 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.store(view, 0, 1n), 1n, 'Atomics.store(view, 0, 1n) returns 1n'); 15 assert.sameValue(Atomics.load(view, 0), 1n, 'Atomics.load(view, 0) returns 1n'); 16 }); 17 18 reportCompare(0, 0);