mirror of
https://github.com/tc39/test262.git
synced 2025-07-26 23:44:27 +02:00
BigInt: fix, make sure to correctly use different typedarray ctor
This commit is contained in:
parent
3f96092cb9
commit
cc86629301
@ -13,7 +13,8 @@ features: [BigInt, SharedArrayBuffer, TypedArray]
|
|||||||
|
|
||||||
testWithBigIntTypedArrayConstructors(function(TA) {
|
testWithBigIntTypedArrayConstructors(function(TA) {
|
||||||
var sab = new SharedArrayBuffer(2 * BigInt64Array.BYTES_PER_ELEMENT);
|
var sab = new SharedArrayBuffer(2 * BigInt64Array.BYTES_PER_ELEMENT);
|
||||||
var src = new BigInt64Array(sab);
|
var otherCtor = TA === BigInt64Array ? BigUint64Array : BigInt64Array;
|
||||||
|
var src = new otherCtor(sab);
|
||||||
src[0] = 42n;
|
src[0] = 42n;
|
||||||
src[1] = 43n;
|
src[1] = 43n;
|
||||||
var sample, result;
|
var sample, result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user