Skip to content

Commit 1764f78

Browse files
authored
Updated NaivePatternSearchTest.java
1 parent 5ff6891 commit 1764f78

File tree

1 file changed

+1
-32
lines changed

1 file changed

+1
-32
lines changed
Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.thealgorithms.strings;
22

3-
import static org.junit.jupiter.api.Assertions.*;
4-
3+
import static org.junit.jupiter.api.Assertions.assertEquals;
54
import java.util.List;
65
import org.junit.jupiter.api.Test;
76

@@ -12,34 +11,4 @@ void testPatternFound() {
1211
List<Integer> result = NaivePatternSearch.search("abcdxabchjikabc", "abc");
1312
assertEquals(List.of(0, 5, 12), result);
1413
}
15-
16-
@Test
17-
void testPatternNotFound() {
18-
List<Integer> result = NaivePatternSearch.search("abcdefg", "xyz");
19-
assertTrue(result.isEmpty());
20-
}
21-
22-
@Test
23-
void testPatternAtEnd() {
24-
List<Integer> result = NaivePatternSearch.search("helloworld", "world");
25-
assertEquals(List.of(5), result);
26-
}
27-
28-
@Test
29-
void testPatternEqualsText() {
30-
List<Integer> result = NaivePatternSearch.search("abc", "abc");
31-
assertEquals(List.of(0), result);
32-
}
33-
34-
@Test
35-
void testEmptyPattern() {
36-
List<Integer> result = NaivePatternSearch.search("abcdef", "");
37-
assertTrue(result.isEmpty());
38-
}
39-
40-
@Test
41-
void testPatternLongerThanText() {
42-
List<Integer> result = NaivePatternSearch.search("abc", "abcd");
43-
assertTrue(result.isEmpty());
44-
}
4514
}

0 commit comments

Comments
 (0)