Debian Codegraph @

js/src/tests/test262/built-ins/Atomics/load/bigint/non-shared-bufferdata.js

raw
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.load
6 description: >
7 Atomics.load 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.load(view, 0), 0n, 'Atomics.load(view, 0) returns 0n');
15 });
16
17 reportCompare(0, 0);