BigInt: fix, make sure to correctly use different typedarray ctor

This commit is contained in:
Valerie R Young 2018-03-13 15:23:39 -04:00
parent 3f96092cb9
commit cc86629301
1 changed files with 2 additions and 1 deletions

View File

@ -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;