/** Test of indexOf method, of class ArrayUtil. */ @Test public void testIndexOf_byte_byteArr() { byte x = Integer.valueOf(this.random.nextInt()).byteValue(); byte y = x++; byte[] test = new byte[] {y, y, x, y}; assertEquals(2, ArrayUtil.indexOf(x, test)); }
/** Test of indexOf method, of class ArrayUtil. */ @Test public void testIndexOf_float_floatArr() { System.out.println("indexOf"); float value = 0.0F; float[] array = null; int expResult = 0; int result = ArrayUtil.indexOf(value, array); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
/** Test of indexOf method, of class ArrayUtil. */ @Test public void testIndexOf_short_shortArr() { short x = 'c'; short[] test = new short[] {'a', 'b', x, 'd'}; assertEquals(2, ArrayUtil.indexOf(x, test)); }
/** Test of indexOf method, of class ArrayUtil. */ @Test public void testIndexOf_char_charArr() { char x = 'c'; char[] test = new char[] {'a', 'b', x, 'd'}; assertEquals(2, ArrayUtil.indexOf(x, test)); }
/** Test of indexOf method, of class ArrayUtil. */ @Test public void testIndexOf_boolean_booleanArr() { boolean[] test = new boolean[] {false, false, true, false}; assertEquals(2, ArrayUtil.indexOf(true, test)); }