mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-28 15:02:46 +08:00
style: enable TypeName
(#5214)
* style: enable `TypeName` in checkstyle * style: enable `TypeName` in checkstyle * Update directory * style: use proper formatting --------- Co-authored-by: StarDxxx <StarDxxx@users.noreply.github.com> Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
This commit is contained in:
@ -4,13 +4,13 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class sortOrderAgnosticBinarySearchTest {
|
||||
public class SortOrderAgnosticBinarySearchTest {
|
||||
|
||||
@Test
|
||||
public void testAscending() {
|
||||
int[] arr = {1, 2, 3, 4, 5}; // for ascending order.
|
||||
int target = 2;
|
||||
int ans = sortOrderAgnosticBinarySearch.find(arr, target);
|
||||
int ans = SortOrderAgnosticBinarySearch.find(arr, target);
|
||||
int excepted = 1;
|
||||
assertEquals(excepted, ans);
|
||||
}
|
||||
@ -19,7 +19,7 @@ public class sortOrderAgnosticBinarySearchTest {
|
||||
public void testDescending() {
|
||||
int[] arr = {5, 4, 3, 2, 1}; // for descending order.
|
||||
int target = 2;
|
||||
int ans = sortOrderAgnosticBinarySearch.find(arr, target);
|
||||
int ans = SortOrderAgnosticBinarySearch.find(arr, target);
|
||||
int excepted = 3;
|
||||
assertEquals(excepted, ans);
|
||||
}
|
Reference in New Issue
Block a user