Skip to content

Commit 07eb5ae

Browse files
github-actionsgithub-actions
authored andcommitted
Formatted with Google Java Formatter
1 parent e79fd1d commit 07eb5ae

File tree

2 files changed

+20
-22
lines changed

2 files changed

+20
-22
lines changed

src/test/java/com/examplehub/maths/SumOfFactorialTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package com.examplehub.maths;
22

3-
import org.junit.jupiter.api.Test;
4-
53
import static org.junit.jupiter.api.Assertions.*;
64

5+
import org.junit.jupiter.api.Test;
6+
77
class SumOfFactorialTest {
88
@Test
99
void testSum() {
Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
11
package com.examplehub.searches;
22

3-
import com.examplehub.utils.SortUtils;
4-
import org.junit.jupiter.api.BeforeEach;
5-
import org.junit.jupiter.api.Test;
3+
import static org.junit.jupiter.api.Assertions.*;
64

75
import java.util.stream.IntStream;
8-
9-
import static org.junit.jupiter.api.Assertions.*;
6+
import org.junit.jupiter.api.BeforeEach;
7+
import org.junit.jupiter.api.Test;
108

119
class JumpSearchTest {
12-
private Search search;
10+
private Search search;
1311

14-
@BeforeEach
15-
void setup() {
16-
search = new JumpSearch();
17-
}
12+
@BeforeEach
13+
void setup() {
14+
search = new JumpSearch();
15+
}
1816

19-
@Test
20-
void testLinearSearch() {
21-
int[] ints = IntStream.range(0, 10).toArray();
22-
for (int i = 0; i < ints.length; ++i) {
23-
assertEquals(i, search.search(ints, i));
24-
}
25-
assertEquals(-1, search.search(ints, 10));
26-
assertEquals(-1, search.search(ints, 100));
27-
assertEquals(-1, search.search(ints, -1));
17+
@Test
18+
void testLinearSearch() {
19+
int[] ints = IntStream.range(0, 10).toArray();
20+
for (int i = 0; i < ints.length; ++i) {
21+
assertEquals(i, search.search(ints, i));
2822
}
29-
}
23+
assertEquals(-1, search.search(ints, 10));
24+
assertEquals(-1, search.search(ints, 100));
25+
assertEquals(-1, search.search(ints, -1));
26+
}
27+
}

0 commit comments

Comments
 (0)