Skip to content

Commit

Permalink
remove obsolete test
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg committed Dec 13, 2024
1 parent 9cba20a commit 555e884
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions tests/unit/SuffixUkkonenTreeTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,4 @@ describe('SuffixUkkonenTree', () => {
// "2" in ASCII is 50, so base26(50) = [0, 23]
expect(Array.from(numeric)).toEqual([SuffixUkkonenTree.SPECIAL_CHAR_CODE, 0, 23]);
});

it('should have prefix matches first, then substring matches', () => {
const strings = ['abcdef', 'cdef', 'def'];
const numericIntArray = helperStringsToNumericForTree(strings);
const tree = SuffixUkkonenTree.makeTree(numericIntArray);
tree.build();
const searchValue = SuffixUkkonenTree.stringToNumeric('def', {clamp: true}).numeric;
expect(tree.findSubstring(Array.from(searchValue))).toEqual(expect.arrayContaining([18, 15, 10]));
});
});

0 comments on commit 555e884

Please sign in to comment.