11package com .thealgorithms .strings ;
22
3- import static org .junit .jupiter .api .Assertions .*;
4-
3+ import static org .junit .jupiter .api .Assertions .assertEquals ;
54import java .util .List ;
65import 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