Skip to content

Commit 23c1dda

Browse files
author
alxkm
committed
checkstyle: formatting
1 parent 5048c2c commit 23c1dda

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/test/java/com/thealgorithms/maths/FindKthNumberTest.java

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,32 @@
1111
public class FindKthNumberTest {
1212
@Test
1313
public void testFindKthMaxTypicalCases() {
14-
int[] array1 = { 3, 2, 1, 4, 5 };
14+
int[] array1 = {3, 2, 1, 4, 5};
1515
assertEquals(3, FindKthNumber.findKthMax(array1, 3));
1616
assertEquals(4, FindKthNumber.findKthMax(array1, 2));
1717
assertEquals(5, FindKthNumber.findKthMax(array1, 1));
1818

19-
int[] array2 = { 7, 5, 8, 2, 1, 6 };
19+
int[] array2 = {7, 5, 8, 2, 1, 6};
2020
assertEquals(5, FindKthNumber.findKthMax(array2, 4));
2121
assertEquals(6, FindKthNumber.findKthMax(array2, 3));
2222
assertEquals(8, FindKthNumber.findKthMax(array2, 1));
2323
}
2424

2525
@Test
2626
public void testFindKthMaxEdgeCases() {
27-
int[] array1 = { 1 };
27+
int[] array1 = {1};
2828
assertEquals(1, FindKthNumber.findKthMax(array1, 1));
2929

30-
int[] array2 = { 5, 3 };
30+
int[] array2 = {5, 3};
3131
assertEquals(5, FindKthNumber.findKthMax(array2, 1));
3232
assertEquals(3, FindKthNumber.findKthMax(array2, 2));
3333
}
3434

3535
@Test
3636
public void testFindKthMaxInvalidK() {
37-
int[] array = { 1, 2, 3, 4, 5 };
38-
assertThrows(IllegalArgumentException.class, () -> {
39-
FindKthNumber.findKthMax(array, 0);
40-
});
41-
assertThrows(IllegalArgumentException.class, () -> {
42-
FindKthNumber.findKthMax(array, 6);
43-
});
37+
int[] array = {1, 2, 3, 4, 5};
38+
assertThrows(IllegalArgumentException.class, () -> FindKthNumber.findKthMax(array, 0));
39+
assertThrows(IllegalArgumentException.class, () -> FindKthNumber.findKthMax(array, 6));
4440
}
4541

4642
@Test

0 commit comments

Comments
 (0)