示例#1
0
 /** @title expected NullPointerException */
 public void testE2() {
   T_aput_boolean_1 t = new T_aput_boolean_1();
   try {
     t.run(null, 2, true);
     fail("expected NullPointerException");
   } catch (NullPointerException aie) {
     // expected
   }
 }
示例#2
0
 /** @title expected ArrayIndexOutOfBoundsException (negative index) */
 public void testE3() {
   T_aput_boolean_1 t = new T_aput_boolean_1();
   boolean[] arr = new boolean[2];
   try {
     t.run(arr, -1, true);
     fail("expected ArrayIndexOutOfBoundsException");
   } catch (ArrayIndexOutOfBoundsException aie) {
     // expected
   }
 }
示例#3
0
 /** @title put boolean into array */
 public void testN2() {
   T_aput_boolean_1 t = new T_aput_boolean_1();
   boolean[] arr = new boolean[2];
   t.run(arr, 0, true);
   assertEquals(true, arr[0]);
 }