diff --git a/test/built-ins/Array/prototype/every/resizable-buffer-grow-mid-iteration.js b/test/built-ins/Array/prototype/every/resizable-buffer-grow-mid-iteration.js index 86335ebbb0..0ecc02e9ed 100644 --- a/test/built-ins/Array/prototype/every/resizable-buffer-grow-mid-iteration.js +++ b/test/built-ins/Array/prototype/every/resizable-buffer-grow-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset // before calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { // Returns true by default. return CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); } @@ -35,7 +35,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert(Array.prototype.every.call(fixedLength, ResizeBufferMidIteration)); + assert(Array.prototype.every.call(fixedLength, ResizeMidIteration)); assert.compareArray(values, [ 0, 2, @@ -49,7 +49,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert(Array.prototype.every.call(fixedLengthWithOffset, ResizeBufferMidIteration)); + assert(Array.prototype.every.call(fixedLengthWithOffset, ResizeMidIteration)); assert.compareArray(values, [ 4, 6 @@ -61,7 +61,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert(Array.prototype.every.call(lengthTracking, ResizeBufferMidIteration)); + assert(Array.prototype.every.call(lengthTracking, ResizeMidIteration)); assert.compareArray(values, [ 0, 2, @@ -75,7 +75,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert(Array.prototype.every.call(lengthTrackingWithOffset, ResizeBufferMidIteration)); + assert(Array.prototype.every.call(lengthTrackingWithOffset, ResizeMidIteration)); assert.compareArray(values, [ 4, 6 diff --git a/test/built-ins/Array/prototype/every/resizable-buffer-shrink-mid-iteration.js b/test/built-ins/Array/prototype/every/resizable-buffer-shrink-mid-iteration.js index 69179672a1..46ff82de6d 100644 --- a/test/built-ins/Array/prototype/every/resizable-buffer-shrink-mid-iteration.js +++ b/test/built-ins/Array/prototype/every/resizable-buffer-shrink-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset // before calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { // Returns true by default. return CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); } @@ -35,7 +35,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert(Array.prototype.every.call(fixedLength, ResizeBufferMidIteration)); + assert(Array.prototype.every.call(fixedLength, ResizeMidIteration)); assert.compareArray(values, [ 0, 2 @@ -47,7 +47,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert(Array.prototype.every.call(fixedLengthWithOffset, ResizeBufferMidIteration)); + assert(Array.prototype.every.call(fixedLengthWithOffset, ResizeMidIteration)); assert.compareArray(values, [4]); } for (let ctor of ctors) { @@ -56,7 +56,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert(Array.prototype.every.call(lengthTracking, ResizeBufferMidIteration)); + assert(Array.prototype.every.call(lengthTracking, ResizeMidIteration)); assert.compareArray(values, [ 0, 2, @@ -69,6 +69,6 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert(Array.prototype.every.call(lengthTrackingWithOffset, ResizeBufferMidIteration)); + assert(Array.prototype.every.call(lengthTrackingWithOffset, ResizeMidIteration)); assert.compareArray(values, [4]); } diff --git a/test/built-ins/Array/prototype/filter/resizable-buffer-grow-mid-iteration.js b/test/built-ins/Array/prototype/filter/resizable-buffer-grow-mid-iteration.js index 5a24fc9b2c..5ce7c6b2fc 100644 --- a/test/built-ins/Array/prototype/filter/resizable-buffer-grow-mid-iteration.js +++ b/test/built-ins/Array/prototype/filter/resizable-buffer-grow-mid-iteration.js @@ -4,8 +4,8 @@ /*--- esid: sec-array.prototype.filter description: > - Array.p.filter behaves correctly on receivers backed by resizable - buffers that grow mid-iteration + Array.p.filter behaves correctly on TypedArrays backed by resizable buffers + that grow mid-iteration. includes: [compareArray.js, resizableArrayBufferUtils.js] features: [resizable-arraybuffer] ---*/ @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset // before calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -36,7 +36,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.compareArray(ToNumbers(Array.prototype.filter.call(fixedLength, ResizeBufferMidIteration)), []); + assert.compareArray(ToNumbers(Array.prototype.filter.call(fixedLength, ResizeMidIteration)), []); assert.compareArray(values, [ 0, 2, @@ -50,7 +50,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.compareArray(ToNumbers(Array.prototype.filter.call(fixedLengthWithOffset, ResizeBufferMidIteration)), []); + assert.compareArray(ToNumbers(Array.prototype.filter.call(fixedLengthWithOffset, ResizeMidIteration)), []); assert.compareArray(values, [ 4, 6 @@ -62,7 +62,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.compareArray(ToNumbers(Array.prototype.filter.call(lengthTracking, ResizeBufferMidIteration)), []); + assert.compareArray(ToNumbers(Array.prototype.filter.call(lengthTracking, ResizeMidIteration)), []); assert.compareArray(values, [ 0, 2, @@ -76,10 +76,9 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.compareArray(ToNumbers(Array.prototype.filter.call(lengthTrackingWithOffset, ResizeBufferMidIteration)), []); + assert.compareArray(ToNumbers(Array.prototype.filter.call(lengthTrackingWithOffset, ResizeMidIteration)), []); assert.compareArray(values, [ 4, 6 ]); } - diff --git a/test/built-ins/Array/prototype/filter/resizable-buffer-shrink-mid-iteration.js b/test/built-ins/Array/prototype/filter/resizable-buffer-shrink-mid-iteration.js new file mode 100644 index 0000000000..5af5f62412 --- /dev/null +++ b/test/built-ins/Array/prototype/filter/resizable-buffer-shrink-mid-iteration.js @@ -0,0 +1,79 @@ +// Copyright 2023 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-%array%.prototype.filter +description: > + Array.p.filter behaves correctly on TypedArrays backed by resizable buffers + that shrink mid-iteration. +includes: [compareArray.js, resizableArrayBufferUtils.js] +features: [resizable-arraybuffer] +---*/ + +let values; +let rab; +let resizeAfter; +let resizeTo; +// Collects the view of the resizable array buffer rab into values, with an +// iteration during which, after resizeAfter steps, rab is resized to length +// resizeTo. To be called by a method of the view being collected. +// Note that rab, values, resizeAfter, and resizeTo may need to be reset +// before calling this. +function ResizeMidIteration(n) { + CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); + return false; +} + +// Orig. array: [0, 2, 4, 6] +// [0, 2, 4, 6] << fixedLength +// [4, 6] << fixedLengthWithOffset +// [0, 2, 4, 6, ...] << lengthTracking +// [4, 6, ...] << lengthTrackingWithOffset + +for (let ctor of ctors) { + rab = CreateRabForTest(ctor); + const fixedLength = new ctor(rab, 0, 4); + values = []; + resizeAfter = 2; + resizeTo = 3 * ctor.BYTES_PER_ELEMENT; + assert.compareArray(ToNumbers(Array.prototype.filter.call(fixedLength, ResizeMidIteration)),[]); + assert.compareArray(values, [ + 0, + 2 + ]); +} +for (let ctor of ctors) { + rab = CreateRabForTest(ctor); + const fixedLengthWithOffset = new ctor(rab, 2 * ctor.BYTES_PER_ELEMENT, 2); + values = []; + resizeAfter = 1; + resizeTo = 3 * ctor.BYTES_PER_ELEMENT; + assert.compareArray(ToNumbers(Array.prototype.filter.call(fixedLengthWithOffset, ResizeMidIteration)),[]); + assert.compareArray(values, [ + 4 + ]); +} +for (let ctor of ctors) { + rab = CreateRabForTest(ctor); + const lengthTracking = new ctor(rab, 0); + values = []; + resizeAfter = 2; + resizeTo = 3 * ctor.BYTES_PER_ELEMENT; + assert.compareArray(ToNumbers(Array.prototype.filter.call(lengthTracking, ResizeMidIteration)),[]); + assert.compareArray(values, [ + 0, + 2, + 4 + ]); +} +for (let ctor of ctors) { + rab = CreateRabForTest(ctor); + const lengthTrackingWithOffset = new ctor(rab, 2 * ctor.BYTES_PER_ELEMENT); + values = []; + resizeAfter = 1; + resizeTo = 3 * ctor.BYTES_PER_ELEMENT; + assert.compareArray(ToNumbers(Array.prototype.filter.call(lengthTrackingWithOffset, ResizeMidIteration)),[]); + assert.compareArray(values, [ + 4 + ]); +} diff --git a/test/built-ins/Array/prototype/filter/resizable-buffer.js b/test/built-ins/Array/prototype/filter/resizable-buffer.js index 85174a5f20..df38c65791 100644 --- a/test/built-ins/Array/prototype/filter/resizable-buffer.js +++ b/test/built-ins/Array/prototype/filter/resizable-buffer.js @@ -4,8 +4,7 @@ /*--- esid: sec-array.prototype.filter description: > - Array.p.filter behaves correctly on receivers backed by resizable - buffers + Array.p.filter behaves correctly on TypedArrays backed by resizable buffers. includes: [compareArray.js, resizableArrayBufferUtils.js] features: [resizable-arraybuffer] ---*/ diff --git a/test/built-ins/Array/prototype/find/resizable-buffer-grow-mid-iteration.js b/test/built-ins/Array/prototype/find/resizable-buffer-grow-mid-iteration.js index 06cb0df6af..ab2a3dbc3b 100644 --- a/test/built-ins/Array/prototype/find/resizable-buffer-grow-mid-iteration.js +++ b/test/built-ins/Array/prototype/find/resizable-buffer-grow-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset // before calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -36,7 +36,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.find.call(fixedLength, ResizeBufferMidIteration), undefined); + assert.sameValue(Array.prototype.find.call(fixedLength, ResizeMidIteration), undefined); assert.compareArray(values, [ 0, 2, @@ -50,7 +50,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.find.call(fixedLengthWithOffset, ResizeBufferMidIteration), undefined); + assert.sameValue(Array.prototype.find.call(fixedLengthWithOffset, ResizeMidIteration), undefined); assert.compareArray(values, [ 4, 6 @@ -62,7 +62,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.find.call(lengthTracking, ResizeBufferMidIteration), undefined); + assert.sameValue(Array.prototype.find.call(lengthTracking, ResizeMidIteration), undefined); assert.compareArray(values, [ 0, 2, @@ -76,7 +76,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.find.call(lengthTrackingWithOffset, ResizeBufferMidIteration), undefined); + assert.sameValue(Array.prototype.find.call(lengthTrackingWithOffset, ResizeMidIteration), undefined); assert.compareArray(values, [ 4, 6 diff --git a/test/built-ins/Array/prototype/findIndex/resizable-buffer-grow-mid-iteration.js b/test/built-ins/Array/prototype/findIndex/resizable-buffer-grow-mid-iteration.js index 587f874640..4833103f71 100644 --- a/test/built-ins/Array/prototype/findIndex/resizable-buffer-grow-mid-iteration.js +++ b/test/built-ins/Array/prototype/findIndex/resizable-buffer-grow-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset before // calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -35,7 +35,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findIndex.call(fixedLength, ResizeBufferMidIteration), -1); + assert.sameValue(Array.prototype.findIndex.call(fixedLength, ResizeMidIteration), -1); assert.compareArray(values, [ 0, 2, @@ -49,7 +49,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findIndex.call(fixedLengthWithOffset, ResizeBufferMidIteration), -1); + assert.sameValue(Array.prototype.findIndex.call(fixedLengthWithOffset, ResizeMidIteration), -1); assert.compareArray(values, [ 4, 6 @@ -61,7 +61,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findIndex.call(lengthTracking, ResizeBufferMidIteration), -1); + assert.sameValue(Array.prototype.findIndex.call(lengthTracking, ResizeMidIteration), -1); assert.compareArray(values, [ 0, 2, @@ -75,7 +75,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findIndex.call(lengthTrackingWithOffset, ResizeBufferMidIteration), -1); + assert.sameValue(Array.prototype.findIndex.call(lengthTrackingWithOffset, ResizeMidIteration), -1); assert.compareArray(values, [ 4, 6 diff --git a/test/built-ins/Array/prototype/findIndex/resizable-buffer-shrink-mid-iteration.js b/test/built-ins/Array/prototype/findIndex/resizable-buffer-shrink-mid-iteration.js index d24f825c7c..ace51c60e1 100644 --- a/test/built-ins/Array/prototype/findIndex/resizable-buffer-shrink-mid-iteration.js +++ b/test/built-ins/Array/prototype/findIndex/resizable-buffer-shrink-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset before // calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -35,7 +35,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findIndex.call(fixedLength, ResizeBufferMidIteration), -1); + assert.sameValue(Array.prototype.findIndex.call(fixedLength, ResizeMidIteration), -1); assert.compareArray(values, [ 0, 2, @@ -49,7 +49,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findIndex.call(fixedLengthWithOffset, ResizeBufferMidIteration), -1); + assert.sameValue(Array.prototype.findIndex.call(fixedLengthWithOffset, ResizeMidIteration), -1); assert.compareArray(values, [ 4, undefined @@ -61,7 +61,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findIndex.call(lengthTracking, ResizeBufferMidIteration), -1); + assert.sameValue(Array.prototype.findIndex.call(lengthTracking, ResizeMidIteration), -1); assert.compareArray(values, [ 0, 2, @@ -75,7 +75,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findIndex.call(lengthTrackingWithOffset, ResizeBufferMidIteration), -1); + assert.sameValue(Array.prototype.findIndex.call(lengthTrackingWithOffset, ResizeMidIteration), -1); assert.compareArray(values, [ 4, undefined diff --git a/test/built-ins/Array/prototype/findLast/resizable-buffer-grow-mid-iteration.js b/test/built-ins/Array/prototype/findLast/resizable-buffer-grow-mid-iteration.js index d2b63ecab6..4244a317c0 100644 --- a/test/built-ins/Array/prototype/findLast/resizable-buffer-grow-mid-iteration.js +++ b/test/built-ins/Array/prototype/findLast/resizable-buffer-grow-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset before // calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -35,7 +35,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findLast.call(fixedLength, ResizeBufferMidIteration), undefined); + assert.sameValue(Array.prototype.findLast.call(fixedLength, ResizeMidIteration), undefined); assert.compareArray(values, [ 6, 4, @@ -49,7 +49,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findLast.call(fixedLengthWithOffset, ResizeBufferMidIteration), undefined); + assert.sameValue(Array.prototype.findLast.call(fixedLengthWithOffset, ResizeMidIteration), undefined); assert.compareArray(values, [ 6, 4 @@ -61,7 +61,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findLast.call(lengthTracking, ResizeBufferMidIteration), undefined); + assert.sameValue(Array.prototype.findLast.call(lengthTracking, ResizeMidIteration), undefined); assert.compareArray(values, [ 6, 4, @@ -75,7 +75,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findLast.call(lengthTrackingWithOffset, ResizeBufferMidIteration), undefined); + assert.sameValue(Array.prototype.findLast.call(lengthTrackingWithOffset, ResizeMidIteration), undefined); assert.compareArray(values, [ 6, 4 diff --git a/test/built-ins/Array/prototype/findLast/resizable-buffer-shrink-mid-iteration.js b/test/built-ins/Array/prototype/findLast/resizable-buffer-shrink-mid-iteration.js index 6c27e7cb09..2f00ad2061 100644 --- a/test/built-ins/Array/prototype/findLast/resizable-buffer-shrink-mid-iteration.js +++ b/test/built-ins/Array/prototype/findLast/resizable-buffer-shrink-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset before // calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -36,7 +36,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findLast.call(fixedLength, ResizeBufferMidIteration), undefined); + assert.sameValue(Array.prototype.findLast.call(fixedLength, ResizeMidIteration), undefined); assert.compareArray(values, [ 6, 4, @@ -50,7 +50,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findLast.call(fixedLengthWithOffset, ResizeBufferMidIteration), undefined); + assert.sameValue(Array.prototype.findLast.call(fixedLengthWithOffset, ResizeMidIteration), undefined); assert.compareArray(values, [ 6, undefined @@ -62,7 +62,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findLast.call(lengthTracking, ResizeBufferMidIteration), undefined); + assert.sameValue(Array.prototype.findLast.call(lengthTracking, ResizeMidIteration), undefined); assert.compareArray(values, [ 6, 4, @@ -76,7 +76,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findLast.call(lengthTrackingWithOffset, ResizeBufferMidIteration), undefined); + assert.sameValue(Array.prototype.findLast.call(lengthTrackingWithOffset, ResizeMidIteration), undefined); assert.compareArray(values, [ 6, 4 diff --git a/test/built-ins/Array/prototype/findLastIndex/resizable-buffer-grow-mid-iteration.js b/test/built-ins/Array/prototype/findLastIndex/resizable-buffer-grow-mid-iteration.js index 7c8e1c873c..3de0da3c5e 100644 --- a/test/built-ins/Array/prototype/findLastIndex/resizable-buffer-grow-mid-iteration.js +++ b/test/built-ins/Array/prototype/findLastIndex/resizable-buffer-grow-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset before // calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -35,7 +35,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findLastIndex.call(fixedLength, ResizeBufferMidIteration), -1); + assert.sameValue(Array.prototype.findLastIndex.call(fixedLength, ResizeMidIteration), -1); assert.compareArray(values, [ 6, 4, @@ -49,7 +49,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findLastIndex.call(fixedLengthWithOffset, ResizeBufferMidIteration), -1); + assert.sameValue(Array.prototype.findLastIndex.call(fixedLengthWithOffset, ResizeMidIteration), -1); assert.compareArray(values, [ 6, 4 @@ -61,7 +61,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findLastIndex.call(lengthTracking, ResizeBufferMidIteration), -1); + assert.sameValue(Array.prototype.findLastIndex.call(lengthTracking, ResizeMidIteration), -1); assert.compareArray(values, [ 6, 4, @@ -75,7 +75,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findLastIndex.call(lengthTrackingWithOffset, ResizeBufferMidIteration), -1); + assert.sameValue(Array.prototype.findLastIndex.call(lengthTrackingWithOffset, ResizeMidIteration), -1); assert.compareArray(values, [ 6, 4 diff --git a/test/built-ins/Array/prototype/findLastIndex/resizable-buffer-shrink-mid-iteration.js b/test/built-ins/Array/prototype/findLastIndex/resizable-buffer-shrink-mid-iteration.js index 0823629c90..918454c40b 100644 --- a/test/built-ins/Array/prototype/findLastIndex/resizable-buffer-shrink-mid-iteration.js +++ b/test/built-ins/Array/prototype/findLastIndex/resizable-buffer-shrink-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset before // calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -35,7 +35,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findLastIndex.call(fixedLength, ResizeBufferMidIteration), -1); + assert.sameValue(Array.prototype.findLastIndex.call(fixedLength, ResizeMidIteration), -1); assert.compareArray(values, [ 6, 4, @@ -49,7 +49,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findLastIndex.call(fixedLengthWithOffset, ResizeBufferMidIteration), -1); + assert.sameValue(Array.prototype.findLastIndex.call(fixedLengthWithOffset, ResizeMidIteration), -1); assert.compareArray(values, [ 6, undefined @@ -61,7 +61,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findLastIndex.call(lengthTracking, ResizeBufferMidIteration), -1); + assert.sameValue(Array.prototype.findLastIndex.call(lengthTracking, ResizeMidIteration), -1); assert.compareArray(values, [ 6, 4, @@ -75,7 +75,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 2 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findLastIndex.call(lengthTracking, ResizeBufferMidIteration), -1); + assert.sameValue(Array.prototype.findLastIndex.call(lengthTracking, ResizeMidIteration), -1); assert.compareArray(values, [ 6, undefined, @@ -89,7 +89,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(Array.prototype.findLastIndex.call(lengthTrackingWithOffset, ResizeBufferMidIteration), -1); + assert.sameValue(Array.prototype.findLastIndex.call(lengthTrackingWithOffset, ResizeMidIteration), -1); assert.compareArray(values, [ 6, 4 diff --git a/test/built-ins/TypedArray/prototype/every/resizable-buffer-grow-mid-iteration.js b/test/built-ins/TypedArray/prototype/every/resizable-buffer-grow-mid-iteration.js index e588f165be..9427d5f1fc 100644 --- a/test/built-ins/TypedArray/prototype/every/resizable-buffer-grow-mid-iteration.js +++ b/test/built-ins/TypedArray/prototype/every/resizable-buffer-grow-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset // before calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { // Returns true by default. return CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); } @@ -35,7 +35,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert(fixedLength.every(ResizeBufferMidIteration)); + assert(fixedLength.every(ResizeMidIteration)); assert.compareArray(values, [ 0, 2, @@ -49,7 +49,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert(fixedLengthWithOffset.every(ResizeBufferMidIteration)); + assert(fixedLengthWithOffset.every(ResizeMidIteration)); assert.compareArray(values, [ 4, 6 @@ -61,7 +61,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert(lengthTracking.every(ResizeBufferMidIteration)); + assert(lengthTracking.every(ResizeMidIteration)); assert.compareArray(values, [ 0, 2, @@ -75,7 +75,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert(lengthTrackingWithOffset.every(ResizeBufferMidIteration)); + assert(lengthTrackingWithOffset.every(ResizeMidIteration)); assert.compareArray(values, [ 4, 6 diff --git a/test/built-ins/TypedArray/prototype/every/resizable-buffer-shrink-mid-iteration.js b/test/built-ins/TypedArray/prototype/every/resizable-buffer-shrink-mid-iteration.js index b677ae1db8..889d56f193 100644 --- a/test/built-ins/TypedArray/prototype/every/resizable-buffer-shrink-mid-iteration.js +++ b/test/built-ins/TypedArray/prototype/every/resizable-buffer-shrink-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset // before calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { // Returns true by default. return CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); } @@ -35,7 +35,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert(fixedLength.every(ResizeBufferMidIteration)); + assert(fixedLength.every(ResizeMidIteration)); assert.compareArray(values, [ 0, 2, @@ -49,7 +49,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert(fixedLengthWithOffset.every(ResizeBufferMidIteration)); + assert(fixedLengthWithOffset.every(ResizeMidIteration)); assert.compareArray(values, [ 4, undefined @@ -61,7 +61,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert(lengthTracking.every(ResizeBufferMidIteration)); + assert(lengthTracking.every(ResizeMidIteration)); assert.compareArray(values, [ 0, 2, @@ -75,7 +75,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert(lengthTrackingWithOffset.every(ResizeBufferMidIteration)); + assert(lengthTrackingWithOffset.every(ResizeMidIteration)); assert.compareArray(values, [ 4, undefined diff --git a/test/built-ins/TypedArray/prototype/filter/resizable-buffer-grow-mid-iteration.js b/test/built-ins/TypedArray/prototype/filter/resizable-buffer-grow-mid-iteration.js index b3a75ea5cc..d0ad21029a 100644 --- a/test/built-ins/TypedArray/prototype/filter/resizable-buffer-grow-mid-iteration.js +++ b/test/built-ins/TypedArray/prototype/filter/resizable-buffer-grow-mid-iteration.js @@ -4,8 +4,8 @@ /*--- esid: sec-%typedarray%.prototype.filter description: > - TypedArray.p.filter behaves correctly on receivers backed by resizable - buffers that grow mid-iteration + TypedArray.p.filter behaves correctly on TypedArrays backed by resizable + buffers that grow mid-iteration. includes: [compareArray.js, resizableArrayBufferUtils.js] features: [resizable-arraybuffer] ---*/ @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset // before calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -36,7 +36,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.compareArray(ToNumbers(fixedLength.filter(ResizeBufferMidIteration)), []); + assert.compareArray(ToNumbers(fixedLength.filter(ResizeMidIteration)), []); assert.compareArray(values, [ 0, 2, @@ -50,7 +50,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.compareArray(ToNumbers(fixedLengthWithOffset.filter(ResizeBufferMidIteration)), []); + assert.compareArray(ToNumbers(fixedLengthWithOffset.filter(ResizeMidIteration)), []); assert.compareArray(values, [ 4, 6 @@ -62,7 +62,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.compareArray(ToNumbers(lengthTracking.filter(ResizeBufferMidIteration)), []); + assert.compareArray(ToNumbers(lengthTracking.filter(ResizeMidIteration)), []); assert.compareArray(values, [ 0, 2, @@ -76,7 +76,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.compareArray(ToNumbers(lengthTrackingWithOffset.filter(ResizeBufferMidIteration)), []); + assert.compareArray(ToNumbers(lengthTrackingWithOffset.filter(ResizeMidIteration)), []); assert.compareArray(values, [ 4, 6 diff --git a/test/built-ins/TypedArray/prototype/filter/resizable-buffer-shrink-mid-iteration.js b/test/built-ins/TypedArray/prototype/filter/resizable-buffer-shrink-mid-iteration.js index 1e72a7ff8e..409a138890 100644 --- a/test/built-ins/TypedArray/prototype/filter/resizable-buffer-shrink-mid-iteration.js +++ b/test/built-ins/TypedArray/prototype/filter/resizable-buffer-shrink-mid-iteration.js @@ -4,8 +4,8 @@ /*--- esid: sec-%typedarray%.prototype.filter description: > - TypedArray.p.filter behaves correctly when receiver is backed by resizable - buffer that is shrunk mid-iteration + TypedArray.p.filter behaves correctly on TypedArrays backed by resizable + buffers that are shrunk mid-iteration. includes: [compareArray.js, resizableArrayBufferUtils.js] features: [resizable-arraybuffer] ---*/ @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset // before calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -36,7 +36,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.compareArray(ToNumbers(fixedLength.filter(ResizeBufferMidIteration)),[]); + assert.compareArray(ToNumbers(fixedLength.filter(ResizeMidIteration)),[]); assert.compareArray(values, [ 0, 2, @@ -50,7 +50,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.compareArray(ToNumbers(fixedLengthWithOffset.filter(ResizeBufferMidIteration)),[]); + assert.compareArray(ToNumbers(fixedLengthWithOffset.filter(ResizeMidIteration)),[]); assert.compareArray(values, [ 4, undefined @@ -62,7 +62,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.compareArray(ToNumbers(lengthTracking.filter(ResizeBufferMidIteration)),[]); + assert.compareArray(ToNumbers(lengthTracking.filter(ResizeMidIteration)),[]); assert.compareArray(values, [ 0, 2, @@ -76,10 +76,9 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.compareArray(ToNumbers(lengthTrackingWithOffset.filter(ResizeBufferMidIteration)),[]); + assert.compareArray(ToNumbers(lengthTrackingWithOffset.filter(ResizeMidIteration)),[]); assert.compareArray(values, [ 4, undefined ]); } - diff --git a/test/built-ins/TypedArray/prototype/filter/resizable-buffer.js b/test/built-ins/TypedArray/prototype/filter/resizable-buffer.js index da2111408c..de536e2912 100644 --- a/test/built-ins/TypedArray/prototype/filter/resizable-buffer.js +++ b/test/built-ins/TypedArray/prototype/filter/resizable-buffer.js @@ -4,7 +4,7 @@ /*--- esid: sec-%typedarray%.prototype.filter description: > - TypedArray.p.filter behaves correctly on receivers backed by resizable + TypedArray.p.filter behaves correctly on TypedArrays backed by resizable buffers includes: [compareArray.js, resizableArrayBufferUtils.js] features: [resizable-arraybuffer] diff --git a/test/built-ins/TypedArray/prototype/find/resizable-buffer-grow-mid-iteration.js b/test/built-ins/TypedArray/prototype/find/resizable-buffer-grow-mid-iteration.js index d1a148f91c..c68659605c 100644 --- a/test/built-ins/TypedArray/prototype/find/resizable-buffer-grow-mid-iteration.js +++ b/test/built-ins/TypedArray/prototype/find/resizable-buffer-grow-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset before // calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -36,7 +36,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(fixedLength.find(ResizeBufferMidIteration), undefined); + assert.sameValue(fixedLength.find(ResizeMidIteration), undefined); assert.compareArray(values, [ 0, 2, @@ -50,7 +50,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(fixedLengthWithOffset.find(ResizeBufferMidIteration), undefined); + assert.sameValue(fixedLengthWithOffset.find(ResizeMidIteration), undefined); assert.compareArray(values, [ 4, 6 @@ -62,7 +62,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(lengthTracking.find(ResizeBufferMidIteration), undefined); + assert.sameValue(lengthTracking.find(ResizeMidIteration), undefined); assert.compareArray(values, [ 0, 2, @@ -76,7 +76,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(lengthTrackingWithOffset.find(ResizeBufferMidIteration), undefined); + assert.sameValue(lengthTrackingWithOffset.find(ResizeMidIteration), undefined); assert.compareArray(values, [ 4, 6 diff --git a/test/built-ins/TypedArray/prototype/find/resizable-buffer-shrink-mid-iteration.js b/test/built-ins/TypedArray/prototype/find/resizable-buffer-shrink-mid-iteration.js index 5fa0823d73..57adb7eddc 100644 --- a/test/built-ins/TypedArray/prototype/find/resizable-buffer-shrink-mid-iteration.js +++ b/test/built-ins/TypedArray/prototype/find/resizable-buffer-shrink-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset before // calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -36,7 +36,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(fixedLength.find(ResizeBufferMidIteration), undefined); + assert.sameValue(fixedLength.find(ResizeMidIteration), undefined); assert.compareArray(values, [ 0, 2, @@ -50,7 +50,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(fixedLengthWithOffset.find(ResizeBufferMidIteration), undefined); + assert.sameValue(fixedLengthWithOffset.find(ResizeMidIteration), undefined); assert.compareArray(values, [ 4, undefined @@ -62,7 +62,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(lengthTracking.find(ResizeBufferMidIteration), undefined); + assert.sameValue(lengthTracking.find(ResizeMidIteration), undefined); assert.compareArray(values, [ 0, 2, @@ -76,7 +76,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(lengthTrackingWithOffset.find(ResizeBufferMidIteration), undefined); + assert.sameValue(lengthTrackingWithOffset.find(ResizeMidIteration), undefined); assert.compareArray(values, [ 4, undefined diff --git a/test/built-ins/TypedArray/prototype/findIndex/resizable-buffer-grow-mid-iteration.js b/test/built-ins/TypedArray/prototype/findIndex/resizable-buffer-grow-mid-iteration.js index 505578bc19..a1753720e8 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/resizable-buffer-grow-mid-iteration.js +++ b/test/built-ins/TypedArray/prototype/findIndex/resizable-buffer-grow-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset before // calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -36,7 +36,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(fixedLength.findIndex(ResizeBufferMidIteration), -1); + assert.sameValue(fixedLength.findIndex(ResizeMidIteration), -1); assert.compareArray(values, [ 0, 2, @@ -50,7 +50,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(fixedLengthWithOffset.findIndex(ResizeBufferMidIteration), -1); + assert.sameValue(fixedLengthWithOffset.findIndex(ResizeMidIteration), -1); assert.compareArray(values, [ 4, 6 @@ -62,7 +62,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(lengthTracking.findIndex(ResizeBufferMidIteration), -1); + assert.sameValue(lengthTracking.findIndex(ResizeMidIteration), -1); assert.compareArray(values, [ 0, 2, @@ -76,7 +76,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(lengthTrackingWithOffset.findIndex(ResizeBufferMidIteration), -1); + assert.sameValue(lengthTrackingWithOffset.findIndex(ResizeMidIteration), -1); assert.compareArray(values, [ 4, 6 diff --git a/test/built-ins/TypedArray/prototype/findIndex/resizable-buffer-shrink-mid-iteration.js b/test/built-ins/TypedArray/prototype/findIndex/resizable-buffer-shrink-mid-iteration.js index 1601e2a59b..21e47be0ce 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/resizable-buffer-shrink-mid-iteration.js +++ b/test/built-ins/TypedArray/prototype/findIndex/resizable-buffer-shrink-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset before // calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -36,7 +36,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(fixedLength.findIndex(ResizeBufferMidIteration), -1); + assert.sameValue(fixedLength.findIndex(ResizeMidIteration), -1); assert.compareArray(values, [ 0, 2, @@ -50,7 +50,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(fixedLengthWithOffset.findIndex(ResizeBufferMidIteration), -1); + assert.sameValue(fixedLengthWithOffset.findIndex(ResizeMidIteration), -1); assert.compareArray(values, [ 4, undefined @@ -62,7 +62,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(lengthTracking.findIndex(ResizeBufferMidIteration), -1); + assert.sameValue(lengthTracking.findIndex(ResizeMidIteration), -1); assert.compareArray(values, [ 0, 2, @@ -76,7 +76,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(lengthTrackingWithOffset.findIndex(ResizeBufferMidIteration), -1); + assert.sameValue(lengthTrackingWithOffset.findIndex(ResizeMidIteration), -1); assert.compareArray(values, [ 4, undefined diff --git a/test/built-ins/TypedArray/prototype/findLast/resizable-buffer-grow-mid-iteration.js b/test/built-ins/TypedArray/prototype/findLast/resizable-buffer-grow-mid-iteration.js index 87fe0cc24e..756d48236c 100644 --- a/test/built-ins/TypedArray/prototype/findLast/resizable-buffer-grow-mid-iteration.js +++ b/test/built-ins/TypedArray/prototype/findLast/resizable-buffer-grow-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset before // calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -35,7 +35,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(fixedLength.findLast(ResizeBufferMidIteration), undefined); + assert.sameValue(fixedLength.findLast(ResizeMidIteration), undefined); assert.compareArray(values, [ 6, 4, @@ -49,7 +49,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(fixedLengthWithOffset.findLast(ResizeBufferMidIteration), undefined); + assert.sameValue(fixedLengthWithOffset.findLast(ResizeMidIteration), undefined); assert.compareArray(values, [ 6, 4 @@ -61,7 +61,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(lengthTracking.findLast(ResizeBufferMidIteration), undefined); + assert.sameValue(lengthTracking.findLast(ResizeMidIteration), undefined); assert.compareArray(values, [ 6, 4, @@ -75,7 +75,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(lengthTrackingWithOffset.findLast(ResizeBufferMidIteration), undefined); + assert.sameValue(lengthTrackingWithOffset.findLast(ResizeMidIteration), undefined); assert.compareArray(values, [ 6, 4 diff --git a/test/built-ins/TypedArray/prototype/findLast/resizable-buffer-shrink-mid-iteration.js b/test/built-ins/TypedArray/prototype/findLast/resizable-buffer-shrink-mid-iteration.js index 0bbe4c4d74..fffdfe55bc 100644 --- a/test/built-ins/TypedArray/prototype/findLast/resizable-buffer-shrink-mid-iteration.js +++ b/test/built-ins/TypedArray/prototype/findLast/resizable-buffer-shrink-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset before // calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -36,7 +36,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(fixedLength.findLast(ResizeBufferMidIteration), undefined); + assert.sameValue(fixedLength.findLast(ResizeMidIteration), undefined); assert.compareArray(values, [ 6, 4, @@ -50,7 +50,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(fixedLengthWithOffset.findLast(ResizeBufferMidIteration), undefined); + assert.sameValue(fixedLengthWithOffset.findLast(ResizeMidIteration), undefined); assert.compareArray(values, [ 6, undefined @@ -62,7 +62,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(lengthTracking.findLast(ResizeBufferMidIteration), undefined); + assert.sameValue(lengthTracking.findLast(ResizeMidIteration), undefined); assert.compareArray(values, [ 6, 4, @@ -76,7 +76,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(lengthTrackingWithOffset.findLast(ResizeBufferMidIteration), undefined); + assert.sameValue(lengthTrackingWithOffset.findLast(ResizeMidIteration), undefined); assert.compareArray(values, [ 6, 4 diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/resizable-buffer-grow-mid-iteration.js b/test/built-ins/TypedArray/prototype/findLastIndex/resizable-buffer-grow-mid-iteration.js index b8d2f75474..964fdb6865 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/resizable-buffer-grow-mid-iteration.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/resizable-buffer-grow-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset before // calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -35,7 +35,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(fixedLength.findLastIndex(ResizeBufferMidIteration), -1); + assert.sameValue(fixedLength.findLastIndex(ResizeMidIteration), -1); assert.compareArray(values, [ 6, 4, @@ -49,7 +49,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(fixedLengthWithOffset.findLastIndex(ResizeBufferMidIteration), -1); + assert.sameValue(fixedLengthWithOffset.findLastIndex(ResizeMidIteration), -1); assert.compareArray(values, [ 6, 4 @@ -61,7 +61,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(lengthTracking.findLastIndex(ResizeBufferMidIteration), -1); + assert.sameValue(lengthTracking.findLastIndex(ResizeMidIteration), -1); assert.compareArray(values, [ 6, 4, @@ -75,7 +75,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 5 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(lengthTrackingWithOffset.findLastIndex(ResizeBufferMidIteration), -1); + assert.sameValue(lengthTrackingWithOffset.findLastIndex(ResizeMidIteration), -1); assert.compareArray(values, [ 6, 4 diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/resizable-buffer-shrink-mid-iteration.js b/test/built-ins/TypedArray/prototype/findLastIndex/resizable-buffer-shrink-mid-iteration.js index 409c12f23b..c216f34267 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/resizable-buffer-shrink-mid-iteration.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/resizable-buffer-shrink-mid-iteration.js @@ -19,7 +19,7 @@ let resizeTo; // resizeTo. To be called by a method of the view being collected. // Note that rab, values, resizeAfter, and resizeTo may need to be reset before // calling this. -function ResizeBufferMidIteration(n) { +function ResizeMidIteration(n) { CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo); return false; } @@ -35,7 +35,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(fixedLength.findLastIndex(ResizeBufferMidIteration), -1); + assert.sameValue(fixedLength.findLastIndex(ResizeMidIteration), -1); assert.compareArray(values, [ 6, 4, @@ -49,7 +49,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(fixedLengthWithOffset.findLastIndex(ResizeBufferMidIteration), -1); + assert.sameValue(fixedLengthWithOffset.findLastIndex(ResizeMidIteration), -1); assert.compareArray(values, [ 6, undefined @@ -61,7 +61,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 2; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(lengthTracking.findLastIndex(ResizeBufferMidIteration), -1); + assert.sameValue(lengthTracking.findLastIndex(ResizeMidIteration), -1); assert.compareArray(values, [ 6, 4, @@ -75,7 +75,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 2 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(lengthTracking.findLastIndex(ResizeBufferMidIteration), -1); + assert.sameValue(lengthTracking.findLastIndex(ResizeMidIteration), -1); assert.compareArray(values, [ 6, undefined, @@ -89,7 +89,7 @@ for (let ctor of ctors) { values = []; resizeAfter = 1; resizeTo = 3 * ctor.BYTES_PER_ELEMENT; - assert.sameValue(lengthTrackingWithOffset.findLastIndex(ResizeBufferMidIteration), -1); + assert.sameValue(lengthTrackingWithOffset.findLastIndex(ResizeMidIteration), -1); assert.compareArray(values, [ 6, 4