Skip to content

Commit

Permalink
Fix accidental call of .map instead of .reduce
Browse files Browse the repository at this point in the history
Addresses review comments
  • Loading branch information
ioannad committed Jul 29, 2024
1 parent 55cb42b commit b0e7a7d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ for (let ctor of ctors) {
const fixedLength = new ctor(rab, 0, 4);
resizeAfter = 2;
resizeTo = 5 * ctor.BYTES_PER_ELEMENT;
fixedLength.map(ResizeMidIteration, 'initial value');
fixedLength.reduce(ResizeMidIteration, 'initial value');
assert.compareArray(values, [
0,
2,
Expand All @@ -50,7 +50,7 @@ for (let ctor of ctors) {
const fixedLengthWithOffset = new ctor(rab, 2 * ctor.BYTES_PER_ELEMENT, 2);
resizeAfter = 1;
resizeTo = 5 * ctor.BYTES_PER_ELEMENT;
fixedLengthWithOffset.map(ResizeMidIteration, 'initial value');
fixedLengthWithOffset.reduce(ResizeMidIteration, 'initial value');
assert.compareArray(values, [
4,
6
Expand All @@ -62,7 +62,7 @@ for (let ctor of ctors) {
const lengthTracking = new ctor(rab, 0);
resizeAfter = 2;
resizeTo = 5 * ctor.BYTES_PER_ELEMENT;
lengthTracking.map(ResizeMidIteration, 'initial value');
lengthTracking.reduce(ResizeMidIteration, 'initial value');
assert.compareArray(values, [
0,
2,
Expand All @@ -76,7 +76,7 @@ for (let ctor of ctors) {
const lengthTrackingWithOffset = new ctor(rab, 2 * ctor.BYTES_PER_ELEMENT);
resizeAfter = 1;
resizeTo = 5 * ctor.BYTES_PER_ELEMENT;
lengthTrackingWithOffset.map(ResizeMidIteration, 'initial value');
lengthTrackingWithOffset.reduce(ResizeMidIteration, 'initial value');
assert.compareArray(values, [
4,
6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ for (let ctor of ctors) {
const fixedLength = new ctor(rab, 0, 4);
resizeAfter = 2;
resizeTo = 3 * ctor.BYTES_PER_ELEMENT;
fixedLength.map(ResizeMidIteration, 'initial value');
fixedLength.reduce(ResizeMidIteration, 'initial value');
assert.compareArray(values, [
0,
2,
Expand All @@ -49,7 +49,7 @@ for (let ctor of ctors) {
const fixedLengthWithOffset = new ctor(rab, 2 * ctor.BYTES_PER_ELEMENT, 2);
resizeAfter = 1;
resizeTo = 3 * ctor.BYTES_PER_ELEMENT;
fixedLengthWithOffset.map(ResizeMidIteration, 'initial value');
fixedLengthWithOffset.reduce(ResizeMidIteration, 'initial value');
assert.compareArray(values, [
4,
undefined
Expand All @@ -61,7 +61,7 @@ for (let ctor of ctors) {
const lengthTracking = new ctor(rab, 0);
resizeAfter = 2;
resizeTo = 3 * ctor.BYTES_PER_ELEMENT;
lengthTracking.map(ResizeMidIteration, 'initial value');
lengthTracking.reduce(ResizeMidIteration, 'initial value');
assert.compareArray(values, [
0,
2,
Expand All @@ -75,7 +75,7 @@ for (let ctor of ctors) {
const lengthTrackingWithOffset = new ctor(rab, 2 * ctor.BYTES_PER_ELEMENT);
resizeAfter = 1;
resizeTo = 3 * ctor.BYTES_PER_ELEMENT;
lengthTrackingWithOffset.map(ResizeMidIteration, 'initial value');
lengthTrackingWithOffset.reduce(ResizeMidIteration, 'initial value');
assert.compareArray(values, [
4,
undefined
Expand Down

0 comments on commit b0e7a7d

Please sign in to comment.