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_16; 18 19 import dot.junit.DxTestCase; 20 import dot.junit.DxUtil; 21 import dot.junit.opcodes.move_16.d.T_move_16_1; 22 import dot.junit.opcodes.move_16.d.T_move_16_2; 23 24 public class Test_move_16 extends DxTestCase { 25 /** 26 * @title v4001 -> v4000 27 */ testN1()28 public void testN1() { 29 assertTrue(T_move_16_1.run()); 30 } 31 32 /** 33 * @title v1 -> v4001 34 */ testN2()35 public void testN2() { 36 assertTrue(T_move_16_2.run()); 37 } 38 39 /** 40 * @constraint A23 41 * @title number of registers - src is not valid 42 */ testVFE1()43 public void testVFE1() { 44 load("dot.junit.opcodes.move_16.d.T_move_16_3", VerifyError.class); 45 } 46 47 /** 48 * @constraint A23 49 * @title number of registers - dst is not valid 50 */ testVFE2()51 public void testVFE2() { 52 load("dot.junit.opcodes.move_16.d.T_move_16_4", VerifyError.class); 53 } 54 55 /** 56 * @constraint B1 57 * @title src register contains reference 58 */ testVFE3()59 public void testVFE3() { 60 load("dot.junit.opcodes.move_16.d.T_move_16_5", VerifyError.class); 61 } 62 63 /** 64 * @constraint B1 65 * @title src register contains wide 66 */ testVFE4()67 public void testVFE4() { 68 load("dot.junit.opcodes.move_16.d.T_move_16_6", VerifyError.class); 69 } 70 71 /** 72 * @constraint B1 73 * @title src register is a part of reg pair 74 */ testVFE5()75 public void testVFE5() { 76 load("dot.junit.opcodes.move_16.d.T_move_16_7", VerifyError.class); 77 } 78 79 /** 80 * @constraint B18 81 * @title When writing to a register that is one half of a 82 * register pair, but not touching the other half, the old register pair gets broken 83 * up, and the other register involved in it becomes undefined. 84 */ testVFE6()85 public void testVFE6() { 86 load("dot.junit.opcodes.move_16.d.T_move_16_8", VerifyError.class); 87 } 88 } 89