1
1
package com .thealgorithms .strings ;
2
2
3
- import static org .junit .jupiter .api .Assertions .*;
4
-
3
+ import static org .junit .jupiter .api .Assertions .assertEquals ;
5
4
import java .util .List ;
6
5
import org .junit .jupiter .api .Test ;
7
6
@@ -12,34 +11,4 @@ void testPatternFound() {
12
11
List <Integer > result = NaivePatternSearch .search ("abcdxabchjikabc" , "abc" );
13
12
assertEquals (List .of (0 , 5 , 12 ), result );
14
13
}
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
- }
45
14
}
0 commit comments