Add Tests for FindMin (#3079)
This commit is contained in:
parent
2fb87c37fc
commit
8e8d11a63c
17
src/test/java/com/thealgorithms/maths/FindMinTest.java
Normal file
17
src/test/java/com/thealgorithms/maths/FindMinTest.java
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
package com.thealgorithms.maths;
|
||||||
|
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
|
public class FindMinTest {
|
||||||
|
@Test
|
||||||
|
public void test1(){
|
||||||
|
assertEquals(1, FindMin.findMin(new int[] {1, 3, 5, 7, 9}));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test2(){
|
||||||
|
assertEquals(0, FindMin.findMin(new int[] {0, 192, 384, 576}));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user