| 80 | // ---------------------------------------------------------------------------------------- |
| 81 | |
| 82 | void test_collisions() |
| 83 | { |
| 84 | // With one bucket, every n-gram lands in bucket 0. |
| 85 | DLIB_TEST(hash_word_ngrams(std::vector<std::string>{"a", "b", "c"}, 1, 2, 1) == |
| 86 | sparse_type({{0, 5}})); |
| 87 | DLIB_TEST(hash_char_ngrams(std::vector<std::string>{"ab"}, 3, 5, 1) == |
| 88 | sparse_type({{0, 3}})); |
| 89 | } |
| 90 | |
| 91 | // ---------------------------------------------------------------------------------------- |
| 92 |
no test coverage detected