• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2008 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package dot.junit.opcodes.move_wide_16;
18 
19 import dot.junit.DxTestCase;
20 import dot.junit.DxUtil;
21 import dot.junit.opcodes.move_wide_16.d.T_move_wide_16_1;
22 import dot.junit.opcodes.move_wide_16.d.T_move_wide_16_9;
23 
24 public class Test_move_wide_16 extends DxTestCase {
25     /**
26      * @title v4001 -> v4000
27      */
testN1()28     public void testN1() {
29         assertTrue(T_move_wide_16_1.run());
30     }
31 
32     /**
33      * @title v1 -> v4001
34      */
testN2()35     public void testN2() {
36         assertTrue(T_move_wide_16_1.run());
37     }
38 
39     /**
40      * @title v1 -> v2
41      */
testN3()42     public void testN3() {
43         assertEquals(T_move_wide_16_9.run(), 0);
44     }
45 
46     /**
47      * @constraint A24
48      * @title number of registers - src is not valid
49      */
testVFE1()50     public void testVFE1() {
51         load("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_3", VerifyError.class);
52     }
53 
54     /**
55      * @constraint A24
56      * @title number of registers - dst is not valid
57      */
testVFE2()58     public void testVFE2() {
59         load("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_4", VerifyError.class);
60     }
61 
62     /**
63      * @constraint B1
64      * @title src register contains reference
65      */
testVFE3()66     public void testVFE3() {
67         load("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_5", VerifyError.class);
68     }
69 
70     /**
71      * @constraint B1
72      * @title src register contains 32-bit value
73      */
testVFE4()74     public void testVFE4() {
75         load("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_6", VerifyError.class);
76     }
77 
78     /**
79      * @constraint B1
80      * @title src register is a part of reg pair
81      */
testVFE5()82     public void testVFE5() {
83         load("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_7", VerifyError.class);
84     }
85 
86     /**
87      * @constraint B18
88      * @title When writing to a register that is one half of a
89      * register pair, but not touching the other half, the old register pair gets broken
90      * up, and the other register involved in it becomes undefined.
91      */
testVFE6()92     public void testVFE6() {
93         load("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_8", VerifyError.class);
94     }
95 
96 }
97