Пример #1
0
 public static void main(String[] args) throws Exception {
   try {
     Class.forName("dot.junit.opcodes.ushr_int_lit8.d.T_ushr_int_lit8_14");
     fail("expected a verification exception");
   } catch (Throwable t) {
     DxUtil.checkVerifyException(t);
   }
 }
Пример #2
0
 /**
  * @constraint B1
  * @title Types of arguments - int, float. The verifier checks that ints and floats are not used
  *     interchangeably.
  */
 public void testVFE5() {
   try {
     Class.forName("dot.junit.opcodes.add_int.d.T_add_int_5");
     fail("expected a verification exception");
   } catch (Throwable t) {
     DxUtil.checkVerifyException(t);
   }
 }
Пример #3
0
 public static void main(String[] args) throws Exception {
   try {
     Class.forName("dot.junit.opcodes.iput_byte.d.T_iput_byte_18");
     fail("expected a verification exception");
   } catch (Throwable t) {
     DxUtil.checkVerifyException(t);
   }
 }
Пример #4
0
 /**
  * @constraint A15
  * @title invoke-direct may not be used to invoke <clinit>
  */
 public void testVFE3() {
   try {
     Class.forName("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_4");
     fail("expected a verification exception");
   } catch (Throwable t) {
     DxUtil.checkVerifyException(t);
   }
 }
Пример #5
0
 public static void main(String[] args) throws Exception {
   try {
     Class.forName("dxc.junit.opcodes.array_length.jm.T_array_length_5");
     fail("expected a verification exception");
   } catch (Throwable t) {
     DxUtil.checkVerifyException(t);
   }
 }
 /**
  * @constraint A19
  * @title constant pool index
  */
 public void testVFE1() {
   try {
     Class.forName("dot.junit.opcodes.instance_of.d.T_instance_of_4");
     fail("expected a verification exception");
   } catch (Throwable t) {
     DxUtil.checkVerifyException(t);
   }
 }
Пример #7
0
 /**
  * @constraint B1
  * @title try to pass long instead of int
  */
 public void testVFE4() {
   try {
     Class.forName("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_6");
     fail("expected a verification exception");
   } catch (Throwable t) {
     DxUtil.checkVerifyException(t);
   }
 }
Пример #8
0
 /**
  * @constraint B1
  * @title types of arguments - double, float
  */
 public void testVFE1() {
   try {
     Class.forName("dot.junit.opcodes.cmpl_double.d.T_cmpl_double_2");
     fail("expected a verification exception");
   } catch (Throwable t) {
     DxUtil.checkVerifyException(t);
   }
 }
Пример #9
0
 /**
  * @constraint B1
  * @title types of arguments - array, int, long
  */
 public void testVFE2() {
   try {
     Class.forName("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_3");
     fail("expected a verification exception");
   } catch (Throwable t) {
     DxUtil.checkVerifyException(t);
   }
 }
Пример #10
0
 public static void main(String[] args) throws Exception {
   try {
     Class.forName("dot.junit.opcodes.mul_long_2addr.d.T_mul_long_2addr_5");
     fail("expected a verification exception");
   } catch (Throwable t) {
     DxUtil.checkVerifyException(t);
   }
 }
Пример #11
0
 /**
  * @constraint A14
  * @title attempt to invoke interface method
  */
 public void testVFE20() {
   // @uses dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_26
   try {
     new T_invoke_direct_range_26().run();
     fail("expected a verification exception");
   } catch (Throwable t) {
     DxUtil.checkVerifyException(t);
   }
 }
Пример #12
0
 public static void main(String[] args) throws Exception {
   // @uses dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_12
   // @uses dot.junit.opcodes.invoke_super_range.d.TSuper
   try {
     Class.forName("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_12");
     fail("expected a verification exception");
   } catch (Throwable t) {
     DxUtil.checkVerifyException(t);
   }
 }
Пример #13
0
 /**
  * @constraint n/a
  * @title Attempt to invoke abstract method
  */
 public void testVFE17() {
   // @uses dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_13
   // @uses dot.junit.opcodes.invoke_direct_range.TAbstract
   try {
     new T_invoke_direct_range_13().run();
     fail("expected NoSuchMethodError or verification exception");
   } catch (NoSuchMethodError t) {
   } catch (Throwable t) {
     DxUtil.checkVerifyException(t);
   }
 }
Пример #14
0
 /**
  * @constraint B10
  * @title assignment incompatible references when accessing protected method
  */
 public void testVFE10() {
   // @uses dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_25
   // @uses dot.junit.opcodes.invoke_direct_range.TPlain
   // @uses dot.junit.opcodes.invoke_direct_range.TSuper
   try {
     Class.forName("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_25");
     fail("expected a verification exception");
   } catch (Throwable t) {
     DxUtil.checkVerifyException(t);
   }
 }