Skip to content
Snippets Groups Projects
Commit 79ac4b3f authored by Brady James Garvin's avatar Brady James Garvin
Browse files

Patched test cases that inadvertently enforced a specific tie-breaking.

parent 5b903229
Branches main
No related tags found
No related merge requests found
...@@ -64,7 +64,7 @@ describe('the findLongestSuitableSequence function', () => { ...@@ -64,7 +64,7 @@ describe('the findLongestSuitableSequence function', () => {
}); });
test('finds increasing terms at stride 1 in a length-7 list', () => { test('finds increasing terms at stride 1 in a length-7 list', () => {
expect(findLongestSuitableSequence([ expect(findLongestSuitableSequence([
20, 50, 0, 30, 40, 10, 60, 60, 40, 0, 20, 50, 10, 30,
])).toEqual([ ])).toEqual([
2, 3, 4, 2, 3, 4,
]); ]);
...@@ -134,7 +134,7 @@ describe('the findLongestSuitableSequence function', () => { ...@@ -134,7 +134,7 @@ describe('the findLongestSuitableSequence function', () => {
}); });
test('finds increasing terms at stride 1 in a length-10 list', () => { test('finds increasing terms at stride 1 in a length-10 list', () => {
expect(findLongestSuitableSequence([ expect(findLongestSuitableSequence([
30, 10, 20, 40, 0, 90, 50, 60, 70, 80, 40, 10, 20, 30, 0, 90, 50, 60, 70, 80,
])).toEqual([ ])).toEqual([
6, 7, 8, 9, 6, 7, 8, 9,
]); ]);
...@@ -176,7 +176,7 @@ describe('the findLongestSuitableSequence function', () => { ...@@ -176,7 +176,7 @@ describe('the findLongestSuitableSequence function', () => {
}); });
test('finds increasing terms at stride 3 in a length-11 list', () => { test('finds increasing terms at stride 3 in a length-11 list', () => {
expect(findLongestSuitableSequence([ expect(findLongestSuitableSequence([
70, 90, 80, 10, 0, 50, 40, 30, 20, 100, 60, 70, 90, 80, 10, 0, 60, 40, 50, 20, 100, 30,
])).toEqual([ ])).toEqual([
3, 6, 9, 3, 6, 9,
]); ]);
...@@ -302,7 +302,7 @@ describe('the findLongestSuitableSequence function', () => { ...@@ -302,7 +302,7 @@ describe('the findLongestSuitableSequence function', () => {
}); });
test('finds increasing terms at stride 5 in a length-14 list', () => { test('finds increasing terms at stride 5 in a length-14 list', () => {
expect(findLongestSuitableSequence([ expect(findLongestSuitableSequence([
50, 90, 30, 0, 130, 110, 60, 80, 70, 20, 40, 10, 120, 100, 80, 90, 30, 0, 130, 110, 60, 50, 100, 20, 40, 10, 120, 70,
])).toEqual([ ])).toEqual([
2, 7, 12, 2, 7, 12,
]); ]);
...@@ -323,7 +323,7 @@ describe('the findLongestSuitableSequence function', () => { ...@@ -323,7 +323,7 @@ describe('the findLongestSuitableSequence function', () => {
}); });
test('finds increasing terms at stride 2 in a length-15 list', () => { test('finds increasing terms at stride 2 in a length-15 list', () => {
expect(findLongestSuitableSequence([ expect(findLongestSuitableSequence([
110, 40, 70, 50, 10, 80, 60, 20, 130, 30, 120, 90, 100, 140, 0, 110, 40, 70, 50, 120, 80, 60, 20, 130, 30, 10, 100, 90, 140, 0,
])).toEqual([ ])).toEqual([
7, 9, 11, 13, 7, 9, 11, 13,
]); ]);
...@@ -344,7 +344,7 @@ describe('the findLongestSuitableSequence function', () => { ...@@ -344,7 +344,7 @@ describe('the findLongestSuitableSequence function', () => {
}); });
test('finds increasing terms at stride 5 in a length-15 list', () => { test('finds increasing terms at stride 5 in a length-15 list', () => {
expect(findLongestSuitableSequence([ expect(findLongestSuitableSequence([
90, 120, 40, 10, 140, 0, 130, 60, 70, 50, 110, 20, 100, 30, 80, 90, 120, 40, 10, 140, 0, 130, 60, 80, 50, 110, 20, 100, 30, 70,
])).toEqual([ ])).toEqual([
2, 7, 12, 2, 7, 12,
]); ]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment