• 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_result;
18 
19 import dot.junit.DxTestCase;
20 import dot.junit.DxUtil;
21 import dot.junit.opcodes.move_result.d.T_move_result_1;
22 
23 public class Test_move_result extends DxTestCase {
24     /**
25      * @title tests move-result functionality
26      */
testN1()27     public void testN1() {
28         assertTrue(T_move_result_1.run());
29     }
30 
31 
32     /**
33      * @constraint A23
34      * @title number of registers - dest is not valid
35      */
testVFE1()36     public void testVFE1() {
37         load("dot.junit.opcodes.move_result.d.T_move_result_2", VerifyError.class);
38     }
39 
40 
41     /**
42      * @constraint B1
43      * @title  reference
44      */
testVFE2()45     public void testVFE2() {
46         load("dot.junit.opcodes.move_result.d.T_move_result_3", VerifyError.class);
47     }
48 
49     /**
50      * @constraint B1
51      * @title wide
52      */
testVFE3()53     public void testVFE3() {
54         load("dot.junit.opcodes.move_result.d.T_move_result_4", VerifyError.class);
55     }
56 
57 
58     /**
59      * @constraint B18
60      * @title When writing to a register that is one half of a
61      * register pair, but not touching the other half, the old register pair gets broken
62      * up, and the other register involved in it becomes undefined.
63      */
testVFE4()64     public void testVFE4() {
65         load("dot.junit.opcodes.move_result.d.T_move_result_5", VerifyError.class);
66     }
67 
68     /**
69      * @constraint B19
70      * @title  move-result instruction must be immediately preceded
71      * (in the insns array) by an <invoke-kind> instruction
72      */
testVFE5()73     public void testVFE5() {
74         load("dot.junit.opcodes.move_result.d.T_move_result_6", VerifyError.class);
75     }
76 
77     /**
78      * @constraint B20
79      * @title move-result instruction must be immediately preceded
80      * (in actual control flow) by an <invoke-kind> instruction
81      */
testVFE6()82     public void testVFE6() {
83         load("dot.junit.opcodes.move_result.d.T_move_result_7", VerifyError.class);
84     }
85 
86     /**
87      * @constraint A23
88      * @title number of registers
89      */
testVFE7()90     public void testVFE7() {
91         load("dot.junit.opcodes.move_result.d.T_move_result_8", VerifyError.class);
92     }
93 }
94