1 package dot.junit.opcodes.if_gez;
2 
3 import dot.junit.DxTestCase;
4 import dot.junit.DxUtil;
5 import dot.junit.opcodes.if_gez.d.T_if_gez_1;
6 import dot.junit.opcodes.if_gez.d.T_if_gez_2;
7 
8 public class Test_if_gez extends DxTestCase {
9 
10     /**
11      * @title Argument = 5
12      */
testN1()13     public void testN1() {
14         T_if_gez_1 t = new T_if_gez_1();
15         assertEquals(1, t.run(5));
16     }
17 
18     /**
19      * @title Argument = -5
20      */
testN2()21     public void testN2() {
22         T_if_gez_1 t = new T_if_gez_1();
23         assertEquals(1234, t.run(-5));
24     }
25 
26     /**
27      * @title Arguments = Integer.MAX_VALUE
28      */
testB1()29     public void testB1() {
30         T_if_gez_1 t = new T_if_gez_1();
31         assertEquals(1, t.run(Integer.MAX_VALUE));
32     }
33 
34     /**
35      * @title Arguments = Integer.MIN_VALUE
36      */
testB2()37     public void testB2() {
38         T_if_gez_1 t = new T_if_gez_1();
39         assertEquals(1234, t.run(Integer.MIN_VALUE));
40     }
41 
42     /**
43      * @title Arguments = 0
44      */
testB3()45     public void testB3() {
46         T_if_gez_1 t = new T_if_gez_1();
47         assertEquals(1, t.run(0));
48     }
49 
50     /**
51      * @constraint A23
52      * @title  number of registers
53      */
testVFE1()54     public void testVFE1() {
55         load("dot.junit.opcodes.if_gez.d.T_if_gez_3", VerifyError.class);
56     }
57 
58 
59 
60     /**
61      * @constraint B1
62      * @title  types of arguments - double
63      */
testVFE2()64     public void testVFE2() {
65         load("dot.junit.opcodes.if_gez.d.T_if_gez_4", VerifyError.class);
66     }
67 
68     /**
69      * @constraint B1
70      * @title  types of arguments - long
71      */
testVFE3()72     public void testVFE3() {
73         load("dot.junit.opcodes.if_gez.d.T_if_gez_5", VerifyError.class);
74     }
75 
76     /**
77      * @constraint B1
78      * @title  types of arguments - reference
79      */
testVFE4()80     public void testVFE4() {
81         load("dot.junit.opcodes.if_gez.d.T_if_gez_6", VerifyError.class);
82     }
83 
84     /**
85      * @constraint A6
86      * @title branch target shall be inside the method
87      */
testVFE5()88     public void testVFE5() {
89         load("dot.junit.opcodes.if_gez.d.T_if_gez_8", VerifyError.class);
90     }
91 
92     /**
93      * @constraint A6
94      * @title  branch target shall not be "inside" instruction
95      */
testVFE6()96     public void testVFE6() {
97         load("dot.junit.opcodes.if_gez.d.T_if_gez_9", VerifyError.class);
98     }
99 
100     /**
101      * @constraint n/a
102      * @title  branch must not be 0
103      */
testVFE7()104     public void testVFE7() {
105         load("dot.junit.opcodes.if_gez.d.T_if_gez_10", VerifyError.class);
106     }
107 
108     /**
109      * @constraint B1
110      * @title Type of argument - float. The verifier checks that ints
111      * and floats are not used interchangeably.
112      */
testVFE8()113     public void testVFE8() {
114         load("dot.junit.opcodes.if_gez.d.T_if_gez_2", VerifyError.class);
115     }
116 
117 }
118