diff --git a/test/built-ins/TypedArray/prototype/byteOffset/BigInt/resizable-array-buffer-auto.js b/test/built-ins/TypedArray/prototype/byteOffset/BigInt/resizable-array-buffer-auto.js index c32a223d4a..a38c163e7a 100644 --- a/test/built-ins/TypedArray/prototype/byteOffset/BigInt/resizable-array-buffer-auto.js +++ b/test/built-ins/TypedArray/prototype/byteOffset/BigInt/resizable-array-buffer-auto.js @@ -34,13 +34,17 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(array.byteOffset, BPE, "following shrink (within bounds)"); - var expected; try { ab.resize(BPE); + } catch (_) {} + + assert.sameValue(array.byteOffset, BPE, "following shrink (on boundary)"); + + var expected = BPE; + try { + ab.resize(0); expected = 0; - } catch (_) { - expected = BPE; - } + } catch (_) {} assert.sameValue(array.byteOffset, expected, "following shrink (out of bounds)"); }); diff --git a/test/built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-auto.js b/test/built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-auto.js index 364e17ad4c..bc71db907f 100644 --- a/test/built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-auto.js +++ b/test/built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-auto.js @@ -34,14 +34,13 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(array.byteOffset, BPE, "following shrink (within bounds)"); - var expected = BPE; try { ab.resize(BPE); - expected = 0; } catch (_) {} - assert.sameValue(array.byteOffset, expected, "following shrink (on boundary)"); + assert.sameValue(array.byteOffset, BPE, "following shrink (on boundary)"); + var expected = BPE; try { ab.resize(0); expected = 0;