• 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_exception;
18 
19 import dot.junit.DxTestCase;
20 import dot.junit.DxUtil;
21 import dot.junit.opcodes.move_exception.d.T_move_exception_1;
22 import dot.junit.opcodes.move_exception.d.T_move_exception_2;
23 
24 public class Test_move_exception extends DxTestCase {
25 
26     /**
27      * @title tests move-exception functionality
28      */
testN1()29     public void testN1() {
30         loadAndRun("dot.junit.opcodes.move_exception.d.T_move_exception_1",
31                    ArithmeticException.class);
32     }
33 
34     /**
35      * @title tests move-exception functionality
36      */
testN2()37     public void testN2() {
38         T_move_exception_2 t = new T_move_exception_2();
39         assertTrue(t.run());
40     }
41 
42     /**
43      * @constraint A23
44      * @title number of registers
45      */
testVFE1()46     public void testVFE1() {
47         load("dot.junit.opcodes.move_exception.d.T_move_exception_3", VerifyError.class);
48     }
49 
50     /**
51      * @constraint B21
52      * @title  move-exception is not first instruction in an exception handler
53      */
testVFE3()54     public void testVFE3() {
55         load("dot.junit.opcodes.move_exception.d.T_move_exception_5", VerifyError.class);
56     }
57 
58 }
59