/** Test method for {@link testing.Ex1a#find_min(int[])}. */ @Test public void testFind_min() { int[] a1 = {1}; int r1 = Ex1a.find_min(a1); assertEquals(1, r1); int[] a2 = {1, 2, 3, 4}; int r2 = Ex1a.find_min(a2); assertEquals(1, r2); int[] a3 = {3, 2, 1}; int r3 = Ex1a.find_min(a3); assertEquals(1, r3); int[] a4 = {1, -1, 0}; int r4 = Ex1a.find_min(a4); assertEquals(-1, r4); int[] a5 = {Integer.MAX_VALUE, Integer.MIN_VALUE}; int r5 = Ex1a.find_min(a5); assertEquals(Integer.MIN_VALUE, r5); }
@Test(expected = Exception.class) public void testFind_min_empty() { int[] a = {}; int r = Ex1a.find_min(a); }
@Test(expected = Exception.class) public void testFind_min_null() { int[] a = null; int r = Ex1a.find_min(a); }