Skip to content

Commit 83f7eea

Browse files
authored
Add Clang format BoyerMooreTest.java
1 parent a685d22 commit 83f7eea

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/test/java/com/thealgorithms/searches/BoyerMooreTest.java

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

33
import static org.junit.jupiter.api.Assertions.assertEquals;
4+
45
import org.junit.jupiter.api.Test;
56

67
public class BoyerMooreTest {
@@ -34,22 +35,21 @@ public void testPatternAtEnd() {
3435
BoyerMoore bm = new BoyerMoore("CDE");
3536
String text = "ABCDEFGCDE";
3637
int index = bm.search(text);
37-
assertEquals(2, index);
38-
}
39-
38+
assertEquals(7, index);
39+
}
4040

4141
@Test
4242
public void testEmptyPattern() {
4343
BoyerMoore bm = new BoyerMoore("");
4444
String text = "Hello world";
4545
int index = bm.search(text);
46-
assertEquals(0, index);
46+
assertEquals(0, index);
4747
}
4848

4949
@Test
5050
public void testStaticSearchMethod() {
51-
int index = BoyerMoore.search("ABCDEFGCDE", "CDE");
52-
assertEquals(2, index);
51+
String text = "ABCDEFGCDE";
52+
int index = BoyerMoore.search(text, "CDE");
53+
assertEquals(7, index);
5354
}
54-
5555
}

0 commit comments

Comments
 (0)