Skip to content

Commit fee6eb4

Browse files
sozelfistvil02
authored andcommitted
chore(tests): add some edge tests
1 parent f78013a commit fee6eb4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/string/rabin_karp.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ mod tests {
109109
target_is_multiple_patterns: ("abcabcabc", "abc", vec![0, 3, 6]),
110110
empty_text: ("", "abc", vec![]),
111111
empty_pattern: ("abc", "", vec![]),
112+
empty_text_and_pattern: ("", "", vec![]),
112113
pattern_larger_than_text: ("abc", "abcd", vec![]),
114+
large_text_small_pattern: (&("a".repeat(1000) + "b"), "b", vec![1000]),
113115
single_char_match: ("a", "a", vec![0]),
114116
single_char_no_match: ("a", "b", vec![]),
115117
large_pattern_no_match: ("abc", "defghi", vec![]),

0 commit comments

Comments
 (0)