Example #1
0
 /** 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));
 }
Example #2
0
 /** 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.");
 }
Example #3
0
 /** Test of join method, of class ArrayUtil. */
 @Test
 public void testJoin_doubleArr_doubleArr() {
   System.out.println("join");
   double[] array1 = null;
   double[] array2 = null;
   double[] expResult = null;
   double[] result = ArrayUtil.join(array1, array2);
   assertEquals(expResult, result);
   // TODO review the generated test code and remove the default call to fail.
   fail("The test case is a prototype.");
 }
Example #4
0
 /** Test of add method, of class ArrayUtil. */
 @Test
 public void testAdd_long_longArr() {
   System.out.println("add");
   long value = 0L;
   long[] array = null;
   long[] expResult = null;
   long[] result = ArrayUtil.add(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.");
 }
Example #5
0
 /** Test of remove method, of class ArrayUtil. */
 @Test
 public void testRemove_double_doubleArr() {
   System.out.println("remove");
   double value = 0.0;
   double[] array = null;
   double[] expResult = null;
   double[] result = ArrayUtil.remove(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.");
 }
Example #6
0
 /** 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));
 }
Example #7
0
 /** 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));
 }
Example #8
0
 /** 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));
 }