Merge "Fix opcode tests for const-class and filled-new-array" into froyo
diff --git a/tools/vm-tests/src/dot/junit/opcodes/check_cast/TestStubs.java b/tools/vm-tests/src/dot/junit/opcodes/check_cast/TestStubs.java
index 53af56d..67f8f04 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/check_cast/TestStubs.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/check_cast/TestStubs.java
@@ -16,12 +16,5 @@
package dot.junit.opcodes.check_cast;
-public class TestStubs {
- @SuppressWarnings("unused")
- private class TestStub {
- // used by testVFE5
- public void foo() {
-
- }
- }
+class TestStubs {
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/check_cast/Test_check_cast.java b/tools/vm-tests/src/dot/junit/opcodes/check_cast/Test_check_cast.java
index ea9e38c..78a0479 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/check_cast/Test_check_cast.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/check_cast/Test_check_cast.java
@@ -20,6 +20,8 @@
import dot.junit.DxUtil;
import dot.junit.opcodes.check_cast.d.T_check_cast_1;
import dot.junit.opcodes.check_cast.d.T_check_cast_2;
+import dot.junit.opcodes.check_cast.d.T_check_cast_3;
+import dot.junit.opcodes.check_cast.d.T_check_cast_7;
public class Test_check_cast extends DxTestCase {
@@ -118,34 +120,34 @@
}
}
-
/**
* @constraint n/a
- * @title Attempt to access inaccessible class. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
- */
+ * @title Attempt to access inaccessible class, expect throws IllegalAccessError
+ */
public void testVFE5() {
//@uses dot.junit.opcodes.check_cast.TestStubs
//@uses dot.junit.opcodes.check_cast.d.T_check_cast_3
+ T_check_cast_3 t = new T_check_cast_3();
try {
- Class.forName("dot.junit.opcodes.check_cast.d.T_check_cast_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ t.run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError iae) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to access undefined class. Java throws NoClassDefFoundError on
- * first access but Dalvik throws VerifyError on class loading.
- */
+ * @title Attempt to access undefined class, expect throws NoClassDefFoundError on
+ * first access
+ */
public void testVFE6() {
+ T_check_cast_7 t = new T_check_cast_7();
try {
- Class.forName("dot.junit.opcodes.check_cast.d.T_check_cast_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ t.run();
+ fail("expected NoClassDefFoundError");
+ } catch (NoClassDefFoundError iae) {
+ // expected
}
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/check_cast/d/T_check_cast_3.d b/tools/vm-tests/src/dot/junit/opcodes/check_cast/d/T_check_cast_3.d
index 5b5dea0..d269a31 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/check_cast/d/T_check_cast_3.d
+++ b/tools/vm-tests/src/dot/junit/opcodes/check_cast/d/T_check_cast_3.d
@@ -26,7 +26,7 @@
.method public run()V
.limit regs 6
- check-cast v5, dot/junit/opcodes/check_cast/Test_check_cast$TestStub
+ check-cast v5, dot/junit/opcodes/check_cast/TestStubs
return-void
.end method
diff --git a/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/TestStubs.java b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/TestStubs.java
index d38808e..47b87e4 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/TestStubs.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/TestStubs.java
@@ -16,9 +16,6 @@
package dot.junit.opcodes.filled_new_array_range;
-public class TestStubs {
- @SuppressWarnings("unused")
- private class TestStub{
- // used by T_filled_new_array_range_11
- }
+// used by T_filled_new_array_range_11
+class TestStubs {
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/Test_filled_new_array_range.java b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/Test_filled_new_array_range.java
index b69d5b4..84b1379 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/Test_filled_new_array_range.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/Test_filled_new_array_range.java
@@ -19,8 +19,9 @@
import dot.junit.DxTestCase;
import dot.junit.DxUtil;
import dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_1;
+import dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_10;
+import dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_11;
import dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_2;
-import dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_9;
public class Test_filled_new_array_range extends DxTestCase {
/**
@@ -140,31 +141,32 @@
}
/**
- * @constraint n/a
+ * @constraint n/a
* @title attempt to instantiate array of non-existent class
*/
public void testVFE8() {
+ T_filled_new_array_range_10 t = new T_filled_new_array_range_10();
try {
- Class.forName("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_10");
- fail("expected a verification exception");
- } catch(Throwable t) {
- DxUtil.checkVerifyException(t);
+ t.run();
+ fail("expected NoClassDefFoundError exception");
+ } catch (NoClassDefFoundError e) {
+ // expected
}
}
-
+
/**
- * @constraint n/a
+ * @constraint n/a
* @title attempt to instantiate array of inaccessible class
*/
public void testVFE9() {
- //@uses dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_11
+ //@uses dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_11
//@uses dot.junit.opcodes.filled_new_array_range.TestStubs
+ T_filled_new_array_range_11 t = new T_filled_new_array_range_11();
try {
- Class.forName("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_11");
- fail("expected a verification exception");
- } catch(Throwable t) {
- DxUtil.checkVerifyException(t);
+ t.run();
+ fail("expected IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
-
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/d/T_filled_new_array_range_10.java b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/d/T_filled_new_array_range_10.java
new file mode 100644
index 0000000..57075bd
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/d/T_filled_new_array_range_10.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.filled_new_array_range.d;
+
+public class T_filled_new_array_range_10 {
+ public Object[] run() {
+ return null;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/d/T_filled_new_array_range_11.d b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/d/T_filled_new_array_range_11.d
index a628f07..e3a21e9 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/d/T_filled_new_array_range_11.d
+++ b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/d/T_filled_new_array_range_11.d
@@ -27,7 +27,7 @@
.method public run()[Ljava/lang/Object;
.limit regs 10
const v9, 0
- filled-new-array/range {v9}, [Ldot/junit/opcodes/filled_new_array_range/TestStubs$TestStub;
+ filled-new-array/range {v9}, [Ldot/junit/opcodes/filled_new_array_range/TestStubs;
move-result-object v0
return-object v0
.end method
diff --git a/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/d/T_filled_new_array_range_11.java b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/d/T_filled_new_array_range_11.java
new file mode 100644
index 0000000..f4ca611
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array_range/d/T_filled_new_array_range_11.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.filled_new_array_range.d;
+
+public class T_filled_new_array_range_11 {
+ public Object[] run() {
+ return null;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget/Test_iget.java b/tools/vm-tests/src/dot/junit/opcodes/iget/Test_iget.java
index b5fcb67..50658ce 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/iget/Test_iget.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget/Test_iget.java
@@ -20,7 +20,14 @@
import dot.junit.DxUtil;
import dot.junit.opcodes.iget.d.T_iget_1;
import dot.junit.opcodes.iget.d.T_iget_11;
+import dot.junit.opcodes.iget.d.T_iget_12;
+import dot.junit.opcodes.iget.d.T_iget_13;
import dot.junit.opcodes.iget.d.T_iget_2;
+import dot.junit.opcodes.iget.d.T_iget_21;
+import dot.junit.opcodes.iget.d.T_iget_5;
+import dot.junit.opcodes.iget.d.T_iget_6;
+import dot.junit.opcodes.iget.d.T_iget_7;
+import dot.junit.opcodes.iget.d.T_iget_8;
import dot.junit.opcodes.iget.d.T_iget_9;
public class Test_iget extends DxTestCase {
@@ -98,70 +105,66 @@
*/
public void testVFE3() {
try {
- Class.forName("dot.junit.opcodes.iget.d.T_iget_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_13().run();
+ fail("expected a NoSuchFieldError exception");
+ } catch (NoSuchFieldError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read inaccessible private field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read inaccessible private field.
*/
public void testVFE4() {
//@uses dot.junit.opcodes.iget.d.T_iget_6
//@uses dot.junit.opcodes.iget.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget.d.T_iget_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_6().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read field of undefined class. Java throws NoClassDefFoundError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read field of undefined class.
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.iget.d.T_iget_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_7().run();
+ fail("expected a NoClassDefFoundError exception");
+ } catch (NoClassDefFoundError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read undefined field. Java throws NoSuchFieldError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read undefined field.
*/
public void testVFE6() {
try {
- Class.forName("dot.junit.opcodes.iget.d.T_iget_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_8().run();
+ fail("expected a NoSuchFieldError exception");
+ } catch (NoSuchFieldError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read superclass' private field from subclass. Java
- * throws IllegalAccessError on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
//@uses dot.junit.opcodes.iget.d.T_iget_12
//@uses dot.junit.opcodes.iget.d.T_iget_1
try {
- Class.forName("dot.junit.opcodes.iget.d.T_iget_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_12().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
@@ -264,37 +267,33 @@
/**
* @constraint B12
- * @title Attempt to read protected field of unrelated class. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read protected field of unrelated class.
*/
public void testVFE15() {
//@uses dot.junit.opcodes.iget.d.T_iget_21
//@uses dot.junit.opcodes.iget.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget.d.T_iget_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_21().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
-
/**
* @constraint A11
- * @title Attempt to read static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read static field.
*/
public void testVFE16() {
//@uses dot.junit.opcodes.iget.d.T_iget_5
- //@uses dot.junit.opcodes.iget.TestStubs
+ //@uses dot.junit.opcodes.iget.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget.d.T_iget_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_5().run();
+ fail("expected an IncompatibleClassChangeError exception");
+ } catch (IncompatibleClassChangeError e) {
+ // expected
}
}
-
/**
* @constraint B6
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_12.java b/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_12.java
new file mode 100644
index 0000000..b9f40ae
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_12.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget.d;
+
+public class T_iget_12 extends T_iget_1 {
+
+ @Override
+ public int run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_13.java b/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_13.java
new file mode 100644
index 0000000..1038f56
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_13.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget.d;
+
+public class T_iget_13 {
+
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_21.java b/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_21.java
new file mode 100644
index 0000000..31db5f1
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_21.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget.d;
+
+public class T_iget_21 {
+
+ public int run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_5.java b/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_5.java
new file mode 100644
index 0000000..053f013
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_5.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget.d;
+
+public class T_iget_5 {
+
+ public int run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_6.java b/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_6.java
new file mode 100644
index 0000000..efb61d2
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_6.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget.d;
+
+public class T_iget_6 {
+
+ public int run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_7.java b/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_7.java
new file mode 100644
index 0000000..54b848f
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_7.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget.d;
+
+public class T_iget_7 {
+
+ public int run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_8.java b/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_8.java
new file mode 100644
index 0000000..249b4d0
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget/d/T_iget_8.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget.d;
+
+public class T_iget_8 {
+
+ public int run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/Test_iget_boolean.java b/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/Test_iget_boolean.java
index 2b24d6d..b23f330 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/Test_iget_boolean.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/Test_iget_boolean.java
@@ -20,6 +20,13 @@
import dot.junit.DxUtil;
import dot.junit.opcodes.iget_boolean.d.T_iget_boolean_1;
import dot.junit.opcodes.iget_boolean.d.T_iget_boolean_11;
+import dot.junit.opcodes.iget_boolean.d.T_iget_boolean_12;
+import dot.junit.opcodes.iget_boolean.d.T_iget_boolean_13;
+import dot.junit.opcodes.iget_boolean.d.T_iget_boolean_21;
+import dot.junit.opcodes.iget_boolean.d.T_iget_boolean_5;
+import dot.junit.opcodes.iget_boolean.d.T_iget_boolean_6;
+import dot.junit.opcodes.iget_boolean.d.T_iget_boolean_7;
+import dot.junit.opcodes.iget_boolean.d.T_iget_boolean_8;
import dot.junit.opcodes.iget_boolean.d.T_iget_boolean_9;
public class Test_iget_boolean extends DxTestCase {
@@ -91,70 +98,66 @@
*/
public void testVFE3() {
try {
- Class.forName("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_boolean_13().run();
+ fail("expected a NoSuchFieldError exception");
+ } catch (NoSuchFieldError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read inaccessible field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read inaccessible field
*/
public void testVFE4() {
//@uses dot.junit.opcodes.iget_boolean.d.T_iget_boolean_6
//@uses dot.junit.opcodes.iget_boolean.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_boolean_6().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read field of undefined class. Java throws NoClassDefFoundError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read field of undefined class.
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_boolean_7().run();
+ fail("expected a NoClassDefFoundError exception");
+ } catch (NoClassDefFoundError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read undefined field. Java throws NoSuchFieldError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read undefined field.
*/
public void testVFE6() {
try {
- Class.forName("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_boolean_8().run();
+ fail("expected a NoSuchFieldError exception");
+ } catch (NoSuchFieldError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read superclass' private field from subclass. Java
- * throws IllegalAccessError on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
//@uses dot.junit.opcodes.iget_boolean.d.T_iget_boolean_12
//@uses dot.junit.opcodes.iget_boolean.d.T_iget_boolean_1
try {
- Class.forName("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_boolean_12().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
@@ -252,35 +255,32 @@
/**
* @constraint B12
- * @title Attempt to read inaccessible protected field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read inaccessible protected field.
*/
public void testVFE15() {
//@uses dot.junit.opcodes.iget_boolean.d.T_iget_boolean_21
//@uses dot.junit.opcodes.iget_boolean.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_boolean_21().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
/**
* @constraint A11
- * @title Attempt to read static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read static field.
*/
public void testVFE16() {
//@uses dot.junit.opcodes.iget_boolean.d.T_iget_boolean_5
//@uses dot.junit.opcodes.iget_boolean.TestStubs
-
try {
- Class.forName("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_boolean_5().run();
+ fail("expected an IncompatibleClassChangeError exception");
+ } catch (IncompatibleClassChangeError e) {
+ // expected
}
}
@@ -297,4 +297,3 @@
}
}
}
-
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_12.java b/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_12.java
new file mode 100644
index 0000000..5af996f
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_12.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_boolean.d;
+
+public class T_iget_boolean_12 extends T_iget_boolean_1 {
+
+ @Override
+ public boolean run(){
+ return false;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_13.java b/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_13.java
new file mode 100644
index 0000000..b652090
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_13.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_boolean.d;
+
+public class T_iget_boolean_13 {
+
+ public void run(){
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_21.java b/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_21.java
new file mode 100644
index 0000000..74e2da1
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_21.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_boolean.d;
+
+public class T_iget_boolean_21 {
+
+ public boolean run(){
+ return false;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_5.java b/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_5.java
new file mode 100644
index 0000000..5b275aa
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_5.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_boolean.d;
+
+public class T_iget_boolean_5 {
+
+ public boolean run(){
+ return false;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_6.java b/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_6.java
new file mode 100644
index 0000000..0d91cab
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_6.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_boolean.d;
+
+public class T_iget_boolean_6 {
+
+ public boolean run(){
+ return false;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_7.java b/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_7.java
new file mode 100644
index 0000000..3ec333b
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_7.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_boolean.d;
+
+public class T_iget_boolean_7 {
+
+ public boolean run(){
+ return false;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_8.java b/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_8.java
new file mode 100644
index 0000000..b87cf8d
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_8.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_boolean.d;
+
+public class T_iget_boolean_8 {
+
+ public boolean run(){
+ return false;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_byte/Test_iget_byte.java b/tools/vm-tests/src/dot/junit/opcodes/iget_byte/Test_iget_byte.java
index 5d8630b..de48192 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/iget_byte/Test_iget_byte.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_byte/Test_iget_byte.java
@@ -20,6 +20,13 @@
import dot.junit.DxUtil;
import dot.junit.opcodes.iget_byte.d.T_iget_byte_1;
import dot.junit.opcodes.iget_byte.d.T_iget_byte_11;
+import dot.junit.opcodes.iget_byte.d.T_iget_byte_12;
+import dot.junit.opcodes.iget_byte.d.T_iget_byte_13;
+import dot.junit.opcodes.iget_byte.d.T_iget_byte_21;
+import dot.junit.opcodes.iget_byte.d.T_iget_byte_5;
+import dot.junit.opcodes.iget_byte.d.T_iget_byte_6;
+import dot.junit.opcodes.iget_byte.d.T_iget_byte_7;
+import dot.junit.opcodes.iget_byte.d.T_iget_byte_8;
import dot.junit.opcodes.iget_byte.d.T_iget_byte_9;
public class Test_iget_byte extends DxTestCase {
@@ -89,70 +96,66 @@
*/
public void testVFE3() {
try {
- Class.forName("dot.junit.opcodes.iget_byte.d.T_iget_byte_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_byte_13().run();
+ fail("expected a NoSuchFieldError exception");
+ } catch (NoSuchFieldError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read inaccessible field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read inaccessible field.
*/
public void testVFE4() {
//@uses dot.junit.opcodes.iget_byte.d.T_iget_byte_6
//@uses dot.junit.opcodes.iget_byte.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget_byte.d.T_iget_byte_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_byte_6().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read field of undefined class. Java throws NoClassDefFoundError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read field of undefined class.
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.iget_byte.d.T_iget_byte_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_byte_7().run();
+ fail("expected a NoClassDefFoundError exception");
+ } catch (NoClassDefFoundError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read undefined field. Java throws NoSuchFieldError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read undefined field.
*/
public void testVFE6() {
try {
- Class.forName("dot.junit.opcodes.iget_byte.d.T_iget_byte_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_byte_8().run();
+ fail("expected a NoSuchFieldError exception");
+ } catch (NoSuchFieldError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read superclass' private field from subclass. Java
- * throws IllegalAccessError on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
//@uses dot.junit.opcodes.iget_byte.d.T_iget_byte_12
//@uses dot.junit.opcodes.iget_byte.d.T_iget_byte_1
try {
- Class.forName("dot.junit.opcodes.iget_byte.d.T_iget_byte_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_byte_12().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
@@ -249,34 +252,32 @@
/**
* @constraint B12
- * @title Attempt to read inaccessible protected field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read inaccessible protected field.
*/
public void testVFE15() {
//@uses dot.junit.opcodes.iget_byte.d.T_iget_byte_21
//@uses dot.junit.opcodes.iget_byte.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget_byte.d.T_iget_byte_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_byte_21().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
/**
* @constraint A11
- * @title Attempt to read static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read static field.
*/
public void testVFE16() {
//@uses dot.junit.opcodes.iget_byte.d.T_iget_byte_5
//@uses dot.junit.opcodes.iget_byte.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget_byte.d.T_iget_byte_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_byte_5().run();
+ fail("expected an IncompatibleClassChangeError exception");
+ } catch (IncompatibleClassChangeError e) {
+ // expected
}
}
@@ -293,4 +294,3 @@
}
}
}
-
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_12.java b/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_12.java
new file mode 100644
index 0000000..3927a5b
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_12.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_byte.d;
+
+public class T_iget_byte_12 extends T_iget_byte_1 {
+
+ @Override
+ public byte run() {
+ return p1;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_13.java b/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_13.java
new file mode 100644
index 0000000..755b896
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_13.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_byte.d;
+
+public class T_iget_byte_13 {
+
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_21.java b/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_21.java
new file mode 100644
index 0000000..10deb39
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_21.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_byte.d;
+
+public class T_iget_byte_21 {
+
+ public byte run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_5.java b/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_5.java
new file mode 100644
index 0000000..75f7a5c
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_5.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_byte.d;
+
+public class T_iget_byte_5 {
+
+ public byte run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_6.java b/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_6.java
new file mode 100644
index 0000000..20af80f
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_6.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_byte.d;
+
+public class T_iget_byte_6 {
+
+ public byte run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_7.java b/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_7.java
new file mode 100644
index 0000000..f13071d
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_7.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_byte.d;
+
+public class T_iget_byte_7 {
+
+ public byte run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_8.java b/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_8.java
new file mode 100644
index 0000000..6f89bf3
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_8.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_byte.d;
+
+public class T_iget_byte_8 {
+
+ public byte run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_char/Test_iget_char.java b/tools/vm-tests/src/dot/junit/opcodes/iget_char/Test_iget_char.java
index 1805534..c7516e8 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/iget_char/Test_iget_char.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_char/Test_iget_char.java
@@ -20,6 +20,13 @@
import dot.junit.DxUtil;
import dot.junit.opcodes.iget_char.d.T_iget_char_1;
import dot.junit.opcodes.iget_char.d.T_iget_char_11;
+import dot.junit.opcodes.iget_char.d.T_iget_char_12;
+import dot.junit.opcodes.iget_char.d.T_iget_char_13;
+import dot.junit.opcodes.iget_char.d.T_iget_char_21;
+import dot.junit.opcodes.iget_char.d.T_iget_char_5;
+import dot.junit.opcodes.iget_char.d.T_iget_char_6;
+import dot.junit.opcodes.iget_char.d.T_iget_char_7;
+import dot.junit.opcodes.iget_char.d.T_iget_char_8;
import dot.junit.opcodes.iget_char.d.T_iget_char_9;
public class Test_iget_char extends DxTestCase {
@@ -92,70 +99,66 @@
*/
public void testVFE3() {
try {
- Class.forName("dot.junit.opcodes.iget_char.d.T_iget_char_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_char_13().run();
+ fail("expected a NoSuchFieldError exception");
+ } catch (NoSuchFieldError t) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read inaccessible field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read inaccessible field.
*/
public void testVFE4() {
//@uses dot.junit.opcodes.iget_char.d.T_iget_char_6
//@uses dot.junit.opcodes.iget_char.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget_char.d.T_iget_char_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_char_6().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError t) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read field of undefined class. Java throws NoClassDefFoundError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read field of undefined class.
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.iget_char.d.T_iget_char_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_char_7().run();
+ fail("expected a NoClassDefFoundError exception");
+ } catch (NoClassDefFoundError t) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read undefined field. Java throws NoSuchFieldError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read undefined field.
*/
public void testVFE6() {
try {
- Class.forName("dot.junit.opcodes.iget_char.d.T_iget_char_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_char_8().run();
+ fail("expected a NoSuchFieldError exception");
+ } catch (NoSuchFieldError t) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read superclass' private field from subclass. Java
- * throws IllegalAccessError on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
//@uses dot.junit.opcodes.iget_char.d.T_iget_char_12
//@uses dot.junit.opcodes.iget_char.d.T_iget_char_1
try {
- Class.forName("dot.junit.opcodes.iget_char.d.T_iget_char_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_char_12().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError t) {
+ // expected
}
}
@@ -256,34 +259,32 @@
/**
* @constraint B12
- * @title Attempt to read inaccessible protected field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read inaccessible protected field.
*/
public void testVFE15() {
//@uses dot.junit.opcodes.iget_char.d.T_iget_char_21
//@uses dot.junit.opcodes.iget_char.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget_char.d.T_iget_char_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_char_21().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError t) {
+ // expected
}
}
/**
* @constraint A11
- * @title Attempt to read static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read static field.
*/
public void testVFE16() {
//@uses dot.junit.opcodes.iget_char.d.T_iget_char_5
//@uses dot.junit.opcodes.iget_char.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget_char.d.T_iget_char_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_char_5().run();
+ fail("expected an IncompatibleClassChangeError exception");
+ } catch (IncompatibleClassChangeError t) {
+ // expected
}
}
@@ -301,4 +302,3 @@
}
}
}
-
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_12.java b/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_12.java
new file mode 100644
index 0000000..611b24b
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_12.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_char.d;
+
+public class T_iget_char_12 extends T_iget_char_1 {
+
+ @Override
+ public char run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_13.java b/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_13.java
new file mode 100644
index 0000000..33cae33
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_13.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_char.d;
+
+public class T_iget_char_13 {
+
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_21.java b/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_21.java
new file mode 100644
index 0000000..6517824
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_21.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_char.d;
+
+public class T_iget_char_21 {
+
+ public char run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_5.java b/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_5.java
new file mode 100644
index 0000000..4975e76
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_5.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_char.d;
+
+public class T_iget_char_5 {
+
+ public char run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_6.java b/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_6.java
new file mode 100644
index 0000000..8be8c2b
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_6.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_char.d;
+
+public class T_iget_char_6 {
+
+ public char run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_7.java b/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_7.java
new file mode 100644
index 0000000..4ca80d7
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_7.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_char.d;
+
+public class T_iget_char_7 {
+
+ public char run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_8.java b/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_8.java
new file mode 100644
index 0000000..49d35c6
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_char/d/T_iget_char_8.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_char.d;
+
+public class T_iget_char_8 {
+
+ public char run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_object/Test_iget_object.java b/tools/vm-tests/src/dot/junit/opcodes/iget_object/Test_iget_object.java
index 7c6e03c..3a735b6 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/iget_object/Test_iget_object.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_object/Test_iget_object.java
@@ -20,6 +20,14 @@
import dot.junit.DxUtil;
import dot.junit.opcodes.iget_object.d.T_iget_object_1;
import dot.junit.opcodes.iget_object.d.T_iget_object_11;
+import dot.junit.opcodes.iget_object.d.T_iget_object_12;
+import dot.junit.opcodes.iget_object.d.T_iget_object_13;
+import dot.junit.opcodes.iget_object.d.T_iget_object_21;
+import dot.junit.opcodes.iget_object.d.T_iget_object_22;
+import dot.junit.opcodes.iget_object.d.T_iget_object_5;
+import dot.junit.opcodes.iget_object.d.T_iget_object_6;
+import dot.junit.opcodes.iget_object.d.T_iget_object_7;
+import dot.junit.opcodes.iget_object.d.T_iget_object_8;
import dot.junit.opcodes.iget_object.d.T_iget_object_9;
public class Test_iget_object extends DxTestCase {
@@ -91,70 +99,66 @@
*/
public void testVFE3() {
try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_object_13().run();
+ fail("expected a NoSuchFieldError exception");
+ } catch (NoSuchFieldError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read inaccessible field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read inaccessible field.
*/
public void testVFE4() {
//@uses dot.junit.opcodes.iget_object.d.T_iget_object_6
//@uses dot.junit.opcodes.iget_object.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_object_6().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read field of undefined class. Java throws NoClassDefFoundError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read field of undefined class.
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_object_7().run();
+ fail("expected a NoClassDefFoundError exception");
+ } catch (NoClassDefFoundError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read undefined field. Java throws NoSuchFieldError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read undefined field.
*/
public void testVFE6() {
try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_object_8().run();
+ fail("expected a NoSuchFieldError exception");
+ } catch (NoSuchFieldError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read superclass' private field from subclass. Java
- * throws IllegalAccessError on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
//@uses dot.junit.opcodes.iget_object.d.T_iget_object_12
//@uses dot.junit.opcodes.iget_object.d.T_iget_object_1
try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_object_12().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
@@ -262,43 +266,40 @@
*/
public void testVFE15() {
try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_object_21().run();
+ fail("expected a NoSuchFieldError exception");
+ } catch (NoSuchFieldError e) {
+ // expected
}
}
/**
* @constraint B12
- * @title Attempt to read inaccessible protected field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read inaccessible protected field.
*/
public void testVFE16() {
//@uses dot.junit.opcodes.iget_object.d.T_iget_object_22
//@uses dot.junit.opcodes.iget_object.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_object_22().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
-
/**
* @constraint A11
- * @title Attempt to read static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read static field.
*/
public void testVFE17() {
//@uses dot.junit.opcodes.iget_object.d.T_iget_object_5
- //@uses dot.junit.opcodes.iget_object.TestStubs
+ //@uses dot.junit.opcodes.iget_object.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_object_5().run();
+ fail("expected an IncompatibleClassChangeError exception");
+ } catch (IncompatibleClassChangeError e) {
+ // expected
}
}
@@ -315,4 +316,3 @@
}
}
}
-
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_12.java b/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_12.java
new file mode 100644
index 0000000..f98c36a
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_12.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_object.d;
+
+public class T_iget_object_12 extends T_iget_object_1 {
+
+ public Object run() {
+ return null;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_13.java b/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_13.java
new file mode 100644
index 0000000..85a8761
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_13.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_object.d;
+
+public class T_iget_object_13 {
+
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_21.java b/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_21.java
new file mode 100644
index 0000000..e301893
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_21.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_object.d;
+
+public class T_iget_object_21 {
+
+ public String run() {
+ return null;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_22.java b/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_22.java
new file mode 100644
index 0000000..d9ad933
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_22.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_object.d;
+
+public class T_iget_object_22 {
+
+ public Object run() {
+ return null;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_5.java b/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_5.java
new file mode 100644
index 0000000..3626499
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_5.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_object.d;
+
+public class T_iget_object_5 {
+
+ public Object run() {
+ return null;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_6.java b/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_6.java
new file mode 100644
index 0000000..a4ba515
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_6.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_object.d;
+
+public class T_iget_object_6 {
+
+ public Object run() {
+ return null;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_7.java b/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_7.java
new file mode 100644
index 0000000..2940ca4
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_7.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_object.d;
+
+public class T_iget_object_7 {
+
+ public Object run() {
+ return null;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_8.java b/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_8.java
new file mode 100644
index 0000000..3b5c4d7
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_object/d/T_iget_object_8.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_object.d;
+
+public class T_iget_object_8 {
+
+ public Object run() {
+ return null;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_short/Test_iget_short.java b/tools/vm-tests/src/dot/junit/opcodes/iget_short/Test_iget_short.java
index aaa8270..a7d3658 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/iget_short/Test_iget_short.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_short/Test_iget_short.java
@@ -20,6 +20,13 @@
import dot.junit.DxUtil;
import dot.junit.opcodes.iget_short.d.T_iget_short_1;
import dot.junit.opcodes.iget_short.d.T_iget_short_11;
+import dot.junit.opcodes.iget_short.d.T_iget_short_12;
+import dot.junit.opcodes.iget_short.d.T_iget_short_13;
+import dot.junit.opcodes.iget_short.d.T_iget_short_21;
+import dot.junit.opcodes.iget_short.d.T_iget_short_5;
+import dot.junit.opcodes.iget_short.d.T_iget_short_6;
+import dot.junit.opcodes.iget_short.d.T_iget_short_7;
+import dot.junit.opcodes.iget_short.d.T_iget_short_8;
import dot.junit.opcodes.iget_short.d.T_iget_short_9;
public class Test_iget_short extends DxTestCase {
@@ -93,70 +100,66 @@
*/
public void testVFE3() {
try {
- Class.forName("dot.junit.opcodes.iget_short.d.T_iget_short_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_short_13().run();
+ fail("expected a NoSuchFieldError exception");
+ } catch (NoSuchFieldError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read inaccessible field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read inaccessible field.
*/
public void testVFE4() {
//@uses dot.junit.opcodes.iget_short.d.T_iget_short_6
//@uses dot.junit.opcodes.iget_short.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget_short.d.T_iget_short_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_short_6().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read field of undefined class. Java throws NoClassDefFoundError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read field of undefined class.
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.iget_short.d.T_iget_short_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_short_7().run();
+ fail("expected a NoClassDefFoundError exception");
+ } catch (NoClassDefFoundError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read undefined field. Java throws NoSuchFieldError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read undefined field.
*/
public void testVFE6() {
try {
- Class.forName("dot.junit.opcodes.iget_short.d.T_iget_short_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_short_8().run();
+ fail("expected a NoSuchFieldError exception");
+ } catch (NoSuchFieldError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read superclass' private field from subclass. Java
- * throws IllegalAccessError on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
//@uses dot.junit.opcodes.iget_short.d.T_iget_short_12
//@uses dot.junit.opcodes.iget_short.d.T_iget_short_1
try {
- Class.forName("dot.junit.opcodes.iget_short.d.T_iget_short_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_short_12().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
@@ -259,34 +262,32 @@
/**
* @constraint B12
- * @title Attempt to read inaccessible protected field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read inaccessible protected field.
*/
public void testVFE15() {
//@uses dot.junit.opcodes.iget_short.d.T_iget_short_21
//@uses dot.junit.opcodes.iget_short.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget_short.d.T_iget_short_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_short_21().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
/**
* @constraint A11
- * @title Attempt to read static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read static field.
*/
public void testVFE16() {
//@uses dot.junit.opcodes.iget_short.d.T_iget_short_5
- //@uses dot.junit.opcodes.iget_short.TestStubs
+ //@uses dot.junit.opcodes.iget_short.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget_short.d.T_iget_short_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_short_5().run();
+ fail("expected an IncompatibleClassChangeError exception");
+ } catch (IncompatibleClassChangeError e) {
+ // expected
}
}
@@ -303,4 +304,3 @@
}
}
}
-
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_12.java b/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_12.java
new file mode 100644
index 0000000..be322f3
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_12.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_short.d;
+
+public class T_iget_short_12 extends T_iget_short_1 {
+
+ @Override
+ public short run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_13.java b/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_13.java
new file mode 100644
index 0000000..3b27d6c
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_13.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_short.d;
+
+public class T_iget_short_13 {
+
+ public void run(){
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_21.java b/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_21.java
index 2c7fd32..5bb7f6e 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_21.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_21.java
@@ -18,4 +18,6 @@
public class T_iget_short_21 {
+ public void run() {
+ }
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_5.java b/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_5.java
new file mode 100644
index 0000000..37c4351
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_5.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_short.d;
+
+public class T_iget_short_5 {
+
+ public short run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_6.java b/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_6.java
new file mode 100644
index 0000000..5ac127b
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_6.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_short.d;
+
+public class T_iget_short_6 {
+
+ public short run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_7.java b/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_7.java
new file mode 100644
index 0000000..7c81be5
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_7.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_short.d;
+
+public class T_iget_short_7 {
+
+ public short run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_8.java b/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_8.java
new file mode 100644
index 0000000..f22a81e
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_short/d/T_iget_short_8.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_short.d;
+
+public class T_iget_short_8 {
+
+ public short run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_wide/Test_iget_wide.java b/tools/vm-tests/src/dot/junit/opcodes/iget_wide/Test_iget_wide.java
index 2260220..7e42d32 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/iget_wide/Test_iget_wide.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_wide/Test_iget_wide.java
@@ -20,7 +20,14 @@
import dot.junit.DxUtil;
import dot.junit.opcodes.iget_wide.d.T_iget_wide_1;
import dot.junit.opcodes.iget_wide.d.T_iget_wide_11;
+import dot.junit.opcodes.iget_wide.d.T_iget_wide_12;
+import dot.junit.opcodes.iget_wide.d.T_iget_wide_13;
import dot.junit.opcodes.iget_wide.d.T_iget_wide_2;
+import dot.junit.opcodes.iget_wide.d.T_iget_wide_21;
+import dot.junit.opcodes.iget_wide.d.T_iget_wide_5;
+import dot.junit.opcodes.iget_wide.d.T_iget_wide_6;
+import dot.junit.opcodes.iget_wide.d.T_iget_wide_7;
+import dot.junit.opcodes.iget_wide.d.T_iget_wide_8;
import dot.junit.opcodes.iget_wide.d.T_iget_wide_9;
public class Test_iget_wide extends DxTestCase {
@@ -99,70 +106,66 @@
*/
public void testVFE3() {
try {
- Class.forName("dot.junit.opcodes.iget_wide.d.T_iget_wide_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_wide_13().run();
+ fail("expected a NoSuchFieldError exception");
+ } catch (NoSuchFieldError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read inaccessible field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read inaccessible field.
*/
public void testVFE4() {
//@uses dot.junit.opcodes.iget_wide.d.T_iget_wide_6
//@uses dot.junit.opcodes.iget_wide.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget_wide.d.T_iget_wide_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_wide_6().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read field of undefined class. Java throws NoClassDefFoundError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read field of undefined class.
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.iget_wide.d.T_iget_wide_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_wide_7().run();
+ fail("expected a NoClassDefFoundError exception");
+ } catch (NoClassDefFoundError e) {
+ // expected
}
}
/**
* @constraint n/a
- * @title Attempt to read undefined field. Java throws NoSuchFieldError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read undefined field.
*/
public void testVFE6() {
try {
- Class.forName("dot.junit.opcodes.iget_wide.d.T_iget_wide_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_wide_8().run();
+ fail("expected a NoSuchFieldError exception");
+ } catch (NoSuchFieldError e) {
+ // expected
}
}
-
+
/**
* @constraint n/a
- * @title Attempt to read superclass' private field from subclass. Java
- * throws IllegalAccessError on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
//@uses dot.junit.opcodes.iget_wide.d.T_iget_wide_12
//@uses dot.junit.opcodes.iget_wide.d.T_iget_wide_1
try {
- Class.forName("dot.junit.opcodes.iget_wide.d.T_iget_wide_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_wide_12().run();
+ fail("expected a IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
@@ -265,34 +268,31 @@
/**
* @constraint B12
- * @title Attempt to read inaccessible protected field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read inaccessible protected field.
*/
public void testVFE15() {
//@uses dot.junit.opcodes.iget_wide.d.T_iget_wide_21
- //@uses dot.junit.opcodes.iget.TestStubs
+ //@uses dot.junit.opcodes.iget_wide.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget_wide.d.T_iget_wide_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_wide_21().run();
+ fail("expected an IllegalAccessError exception");
+ } catch (IllegalAccessError e) {
+ // expected
}
}
-
/**
* @constraint A11
- * @title Attempt to read static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to read static field.
*/
public void testVFE16() {
//@uses dot.junit.opcodes.iget_wide.d.T_iget_wide_5
- //@uses dot.junit.opcodes.iget_wide.TestStubs
+ //@uses dot.junit.opcodes.iget_wide.TestStubs
try {
- Class.forName("dot.junit.opcodes.iget_wide.d.T_iget_wide_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iget_wide_5().run();
+ fail("expected a IncompatibleClassChangeError exception");
+ } catch (IncompatibleClassChangeError e) {
+ // expected
}
}
@@ -309,4 +309,3 @@
}
}
}
-
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_12.java b/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_12.java
new file mode 100644
index 0000000..af3cbda
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_12.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_wide.d;
+
+public class T_iget_wide_12 extends T_iget_wide_1 {
+
+ @Override
+ public long run() {
+ return -99;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_13.java b/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_13.java
new file mode 100644
index 0000000..98086a6
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_13.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_wide.d;
+
+public class T_iget_wide_13 {
+
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_21.java b/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_21.java
new file mode 100644
index 0000000..affeadf
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_21.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_wide.d;
+
+public class T_iget_wide_21 {
+
+ public long run() {
+ return -99;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_5.java b/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_5.java
new file mode 100644
index 0000000..c4c130e
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_5.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_wide.d;
+
+public class T_iget_wide_5 {
+
+ public long run() {
+ return -99;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_6.java b/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_6.java
new file mode 100644
index 0000000..649795f
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_6.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_wide.d;
+
+public class T_iget_wide_6 {
+
+ public long run() {
+ return -99;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_7.java b/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_7.java
new file mode 100644
index 0000000..0866645
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_7.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_wide.d;
+
+public class T_iget_wide_7 {
+
+ public long run() {
+ return -99;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_8.java b/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_8.java
new file mode 100644
index 0000000..570764d
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_8.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dot.junit.opcodes.iget_wide.d;
+
+public class T_iget_wide_8 {
+
+ public long run() {
+ return -99;
+ }
+}
diff --git a/tools/vm-tests/src/util/build/BuildDalvikSuite.java b/tools/vm-tests/src/util/build/BuildDalvikSuite.java
index af130b6..ff89022 100644
--- a/tools/vm-tests/src/util/build/BuildDalvikSuite.java
+++ b/tools/vm-tests/src/util/build/BuildDalvikSuite.java
@@ -532,7 +532,7 @@
File sourceFolder = new File(JAVASRC_FOLDER);
String fileName = dependentTestClassName.replace('.', '/').trim();
-
+
if (new File(sourceFolder, fileName + ".dfh").exists()) {
BuildStep.BuildFile inputFile = new BuildStep.BuildFile(