Formatted with Google Java Formatter

This commit is contained in:
github-actions 2021-09-20 18:58:35 +00:00
parent c7fa087e02
commit c8504151d9

View File

@ -1,4 +1,3 @@
import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@ -10,21 +9,24 @@ public class IterativeBinarySearch_Test {
// dua theo tieu chi all-du path tim dc 4 tescase // dua theo tieu chi all-du path tim dc 4 tescase
Integer[] arr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; Integer[] arr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
IterativeBinarySearch search = new IterativeBinarySearch(); IterativeBinarySearch search = new IterativeBinarySearch();
@Test @Test
void tc1_key_khong_co_trong_mang() { void tc1_key_khong_co_trong_mang() {
assertTrue(search.find(arr, 11) == -1); assertTrue(search.find(arr, 11) == -1);
} }
@Test @Test
void tc2_key_nam_chinh_giua_mang() { void tc2_key_nam_chinh_giua_mang() {
assertTrue(search.find(arr, 5) == 5); assertTrue(search.find(arr, 5) == 5);
} }
@Test @Test
void tc3_key_nam_cuoi_mang() { void tc3_key_nam_cuoi_mang() {
assertTrue(search.find(arr, 10) == 10); assertTrue(search.find(arr, 10) == 10);
} }
@Test @Test
void tc4_key_nam_dau_mang() { void tc4_key_nam_dau_mang() {
assertTrue(search.find(arr, 0) == 0); assertTrue(search.find(arr, 0) == 0);
} }
} }