From 07fdc340a4d9bb6276507d630b6b8ddc62f82021 Mon Sep 17 00:00:00 2001 From: Valerie R Young Date: Tue, 13 Mar 2018 14:37:15 -0400 Subject: [PATCH] BigInt: fix make buffer size BYTES_PER_ELEMENT --- .../buffer-arg/invoked-with-undefined-newtarget-sab.js | 2 +- .../ctors-bigint/buffer-arg/invoked-with-undefined-newtarget.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget-sab.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget-sab.js index 10f1c12faf..4b242832d9 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget-sab.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget-sab.js @@ -20,7 +20,7 @@ features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { - var buffer = new SharedArrayBuffer(4); + var buffer = new SharedArrayBuffer(TA.BYTES_PER_ELEMENT); assert.throws(TypeError, function() { TA(buffer); }); diff --git a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget.js b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget.js index c746dc1889..623c193af7 100644 --- a/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget.js +++ b/test/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget.js @@ -19,7 +19,7 @@ features: [BigInt, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { - var buffer = new ArrayBuffer(4); + var buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT); assert.throws(TypeError, function() { TA(buffer); });