Skip to content

Commit

Permalink
chore(tests): add some edge tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sozelfist authored and vil02 committed Oct 9, 2024
1 parent f78013a commit fee6eb4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/string/rabin_karp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ mod tests {
target_is_multiple_patterns: ("abcabcabc", "abc", vec![0, 3, 6]),
empty_text: ("", "abc", vec![]),
empty_pattern: ("abc", "", vec![]),
empty_text_and_pattern: ("", "", vec![]),
pattern_larger_than_text: ("abc", "abcd", vec![]),
large_text_small_pattern: (&("a".repeat(1000) + "b"), "b", vec![1000]),
single_char_match: ("a", "a", vec![0]),
single_char_no_match: ("a", "b", vec![]),
large_pattern_no_match: ("abc", "defghi", vec![]),
Expand Down

0 comments on commit fee6eb4

Please sign in to comment.