Merge "Fix opcode tests for new_array and new_instance" 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/const_class/TestStubs.java b/tools/vm-tests/src/dot/junit/opcodes/const_class/TestStubs.java
index 2a096b7..3897d2f 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/const_class/TestStubs.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/const_class/TestStubs.java
@@ -16,9 +16,6 @@
package dot.junit.opcodes.const_class;
-public class TestStubs {
- @SuppressWarnings("unused")
- private class TestStub {
- // used by testE2
- }
+//used by testE2
+class TestStubs {
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/const_class/Test_const_class.java b/tools/vm-tests/src/dot/junit/opcodes/const_class/Test_const_class.java
index e481ec6..93f5ee4 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/const_class/Test_const_class.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/const_class/Test_const_class.java
@@ -61,16 +61,14 @@
* @title Class is not accessible
*/
public void testE2() {
- //@uses dot.junit.opcodes.const_class.TestStubs$TestStub
+ //@uses dot.junit.opcodes.const_class.TestStubs
//@uses dot.junit.opcodes.const_class.d.T_const_class_7
try {
T_const_class_7 t = new T_const_class_7();
t.run();
- fail("expected a verification exception");
+ fail("expected an IllegalAccessError exception");
} catch (IllegalAccessError e) {
// expected
- } catch(VerifyError e) {
- // expected
}
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/const_class/d/T_const_class_7.d b/tools/vm-tests/src/dot/junit/opcodes/const_class/d/T_const_class_7.d
index fc04390..20d9749 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/const_class/d/T_const_class_7.d
+++ b/tools/vm-tests/src/dot/junit/opcodes/const_class/d/T_const_class_7.d
@@ -27,7 +27,7 @@
.method public run()Ljava/lang/Class;
.limit regs 255
- const-class v254, dot/junit/opcodes/const_class/TestStubs$TestStub
+ const-class v254, dot/junit/opcodes/const_class/TestStubs
return-object v254
.end method
diff --git a/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/TestStubs.java b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/TestStubs.java
index 8a513a7..344f5c2 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/TestStubs.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/TestStubs.java
@@ -16,9 +16,6 @@
package dot.junit.opcodes.filled_new_array;
-public class TestStubs {
- @SuppressWarnings("unused")
- private class TestStub{
- // used by T_filled_new_array_11
- }
+// used by T_filled_new_array_11
+class TestStubs {
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/Test_filled_new_array.java b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/Test_filled_new_array.java
index 4022d68..b17c29b 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/Test_filled_new_array.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/Test_filled_new_array.java
@@ -19,8 +19,9 @@
import dot.junit.DxTestCase;
import dot.junit.DxUtil;
import dot.junit.opcodes.filled_new_array.d.T_filled_new_array_1;
+import dot.junit.opcodes.filled_new_array.d.T_filled_new_array_10;
+import dot.junit.opcodes.filled_new_array.d.T_filled_new_array_11;
import dot.junit.opcodes.filled_new_array.d.T_filled_new_array_2;
-import dot.junit.opcodes.filled_new_array.d.T_filled_new_array_9;
public class Test_filled_new_array extends DxTestCase {
/**
@@ -145,11 +146,13 @@
* @title attempt to instantiate array of non-existent class
*/
public void testVFE8() {
+ //@uses dot.junit.opcodes.filled_new_array.d.T_filled_new_array_10
try {
- Class.forName("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_10");
- fail("expected a verification exception");
- } catch(Throwable t) {
- DxUtil.checkVerifyException(t);
+ T_filled_new_array_10 T = new T_filled_new_array_10();
+ T.run();
+ fail("expected a NoClassDefFoundError exception");
+ } catch(NoClassDefFoundError t) {
+ // expected
}
}
@@ -161,10 +164,11 @@
//@uses dot.junit.opcodes.filled_new_array.d.T_filled_new_array_11
//@uses dot.junit.opcodes.filled_new_array.TestStubs
try {
- Class.forName("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_11");
- fail("expected a verification exception");
- } catch(Throwable t) {
- DxUtil.checkVerifyException(t);
+ T_filled_new_array_11 T = new T_filled_new_array_11();
+ T.run();
+ fail("expected a IllegalAccessError exception");
+ } catch(IllegalAccessError t) {
+ // expected
}
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/d/T_filled_new_array_10.java b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/d/T_filled_new_array_10.java
new file mode 100644
index 0000000..4caf263
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/d/T_filled_new_array_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.d;
+
+public class T_filled_new_array_10 {
+ public Object[] run() {
+ return null;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/d/T_filled_new_array_11.d b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/d/T_filled_new_array_11.d
index e9c0775..dca1ca3 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/d/T_filled_new_array_11.d
+++ b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/d/T_filled_new_array_11.d
@@ -27,7 +27,7 @@
.method public run()[Ljava/lang/Object;
.limit regs 10
const v9, 0
- filled-new-array {v9}, [Ldot/junit/opcodes/filled_new_array/TestStubs$TestStub;
+ filled-new-array {v9}, [Ldot/junit/opcodes/filled_new_array/TestStubs;
move-result-object v0
return-object v0
.end method
diff --git a/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/d/T_filled_new_array_11.java b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/d/T_filled_new_array_11.java
new file mode 100644
index 0000000..f25d58f
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/filled_new_array/d/T_filled_new_array_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.d;
+
+public class T_filled_new_array_11 {
+ public Object[] run() {
+ return null;
+ }
+}
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/dot/junit/opcodes/sget/Test_sget.java b/tools/vm-tests/src/dot/junit/opcodes/sget/Test_sget.java
index de7e2dd..981b19a 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/sget/Test_sget.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget/Test_sget.java
@@ -20,12 +20,17 @@
import dot.junit.DxUtil;
import dot.junit.opcodes.sget.d.T_sget_1;
import dot.junit.opcodes.sget.d.T_sget_11;
+import dot.junit.opcodes.sget.d.T_sget_12;
+import dot.junit.opcodes.sget.d.T_sget_13;
import dot.junit.opcodes.sget.d.T_sget_2;
import dot.junit.opcodes.sget.d.T_sget_5;
+import dot.junit.opcodes.sget.d.T_sget_6;
+import dot.junit.opcodes.sget.d.T_sget_7;
+import dot.junit.opcodes.sget.d.T_sget_8;
import dot.junit.opcodes.sget.d.T_sget_9;
public class Test_sget extends DxTestCase {
-
+
/**
* @title type - int
*/
@@ -65,7 +70,7 @@
// expected
}
}
-
+
/**
* @title initialization of referenced class throws exception
*/
@@ -80,7 +85,7 @@
}
/**
- * @constraint A12
+ * @constraint A12
* @title constant pool index
*/
public void testVFE1() {
@@ -93,8 +98,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -105,84 +110,75 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B13
- * @title read integer from long field - only field with same name but
+ *
+ * @constraint B13
+ * @title read integer from long field - only field with same name but
* different type exists
*/
public void testVFE3() {
try {
- Class.forName("dot.junit.opcodes.sget.d.T_sget_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_13().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
* @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.sget.d.T_sget_6
//@uses dot.junit.opcodes.sget.TestStubs
try {
- Class.forName("dot.junit.opcodes.sget.d.T_sget_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_6().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
/**
* @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.sget.d.T_sget_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_7().run();
+ fail("expected NoClassDefFoundError");
+ } catch (NoClassDefFoundError t) {
}
}
/**
* @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.sget.d.T_sget_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_8().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
* @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.sget.d.T_sget_12
//@uses dot.junit.opcodes.sget.d.T_sget_1
try {
- Class.forName("dot.junit.opcodes.sget.d.T_sget_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_12().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
-
+
/**
- * @constraint B1
+ * @constraint B1
* @title sget shall not work for reference fields
*/
public void testVFE8() {
@@ -193,10 +189,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget shall not work for short fields
*/
public void testVFE9() {
@@ -207,10 +203,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget shall not work for boolean fields
*/
public void testVFE10() {
@@ -221,10 +217,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget shall not work for char fields
*/
public void testVFE11() {
@@ -235,10 +231,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget shall not work for byte fields
*/
public void testVFE12() {
@@ -248,11 +244,11 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
-
+ }
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget shall not work for double fields
*/
public void testVFE13() {
@@ -262,11 +258,11 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
-
+ }
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget shall not work for long fields
*/
public void testVFE14() {
@@ -276,5 +272,5 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
+ }
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget/d/T_sget_12.java b/tools/vm-tests/src/dot/junit/opcodes/sget/d/T_sget_12.java
new file mode 100644
index 0000000..f4232d3
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget/d/T_sget_12.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.sget.d;
+
+public class T_sget_12 {
+ public int run(){
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget/d/T_sget_13.java b/tools/vm-tests/src/dot/junit/opcodes/sget/d/T_sget_13.java
new file mode 100644
index 0000000..a1d862f
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget/d/T_sget_13.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sget.d;
+
+public class T_sget_13 {
+ public void run(){
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget/d/T_sget_6.java b/tools/vm-tests/src/dot/junit/opcodes/sget/d/T_sget_6.java
new file mode 100644
index 0000000..8f81780
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget/d/T_sget_6.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.sget.d;
+
+public class T_sget_6 {
+ public int run(){
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget/d/T_sget_7.java b/tools/vm-tests/src/dot/junit/opcodes/sget/d/T_sget_7.java
new file mode 100644
index 0000000..8960240
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget/d/T_sget_7.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.sget.d;
+
+public class T_sget_7 {
+ public int run(){
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget/d/T_sget_8.java b/tools/vm-tests/src/dot/junit/opcodes/sget/d/T_sget_8.java
new file mode 100644
index 0000000..17e16f0
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget/d/T_sget_8.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.sget.d;
+
+public class T_sget_8 {
+ public int run(){
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/Test_sget_boolean.java b/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/Test_sget_boolean.java
index 85ef065..ccbeb09 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/Test_sget_boolean.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/Test_sget_boolean.java
@@ -20,11 +20,16 @@
import dot.junit.DxUtil;
import dot.junit.opcodes.sget_boolean.d.T_sget_boolean_1;
import dot.junit.opcodes.sget_boolean.d.T_sget_boolean_11;
+import dot.junit.opcodes.sget_boolean.d.T_sget_boolean_12;
+import dot.junit.opcodes.sget_boolean.d.T_sget_boolean_13;
import dot.junit.opcodes.sget_boolean.d.T_sget_boolean_5;
+import dot.junit.opcodes.sget_boolean.d.T_sget_boolean_6;
+import dot.junit.opcodes.sget_boolean.d.T_sget_boolean_7;
+import dot.junit.opcodes.sget_boolean.d.T_sget_boolean_8;
import dot.junit.opcodes.sget_boolean.d.T_sget_boolean_9;
public class Test_sget_boolean extends DxTestCase {
-
+
/**
* @title get boolean from static field
*/
@@ -49,7 +54,7 @@
* @title attempt to access non-static field
*/
public void testE1() {
-
+
T_sget_boolean_5 t = new T_sget_boolean_5();
try {
t.run();
@@ -58,7 +63,7 @@
// expected
}
}
-
+
/**
* @title initialization of referenced class throws exception
*/
@@ -72,10 +77,10 @@
}
}
-
+
/**
- * @constraint A12
+ * @constraint A12
* @title constant pool index
*/
public void testVFE1() {
@@ -88,8 +93,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -100,84 +105,74 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B13
- * @title read boolean from long field - only field with same name but
+ *
+ * @constraint B13
+ * @title read boolean from long field - only field with same name but
* different type exists
*/
public void testVFE3() {
try {
- Class.forName("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_boolean_13().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
* @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.sget_boolean.d.T_sget_boolean_6
//@uses dot.junit.opcodes.sget_boolean.TestStubs
try {
- Class.forName("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_boolean_6().run();
+ } catch (IllegalAccessError t) {
}
}
/**
* @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.sget_boolean.d.T_sget_boolean_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_boolean_7().run();
+ fail("expected NoClassDefFoundError");
+ } catch (NoClassDefFoundError t) {
}
}
/**
* @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.sget_boolean.d.T_sget_boolean_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_boolean_8().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
* @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.sget_boolean.d.T_sget_boolean_12
//@uses dot.junit.opcodes.sget_boolean.d.T_sget_boolean_1
try {
- Class.forName("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_boolean_12().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
-
+
/**
- * @constraint B1
+ * @constraint B1
* @title sget_boolean shall not work for reference fields
*/
public void testVFE8() {
@@ -188,10 +183,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_boolean shall not work for short fields
*/
public void testVFE9() {
@@ -202,10 +197,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_boolean shall not work for int fields
*/
public void testVFE10() {
@@ -216,10 +211,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_boolean shall not work for char fields
*/
public void testVFE11() {
@@ -230,10 +225,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_boolean shall not work for byte fields
*/
public void testVFE12() {
@@ -243,11 +238,11 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
-
+ }
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_boolean shall not work for double fields
*/
public void testVFE13() {
@@ -257,11 +252,11 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
-
+ }
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_boolean shall not work for long fields
*/
public void testVFE14() {
@@ -271,5 +266,5 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
+ }
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/d/T_sget_boolean_12.java b/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/d/T_sget_boolean_12.java
new file mode 100644
index 0000000..74566c4
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/d/T_sget_boolean_12.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.sget_boolean.d;
+
+public class T_sget_boolean_12 {
+ public boolean run(){
+ return true;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/d/T_sget_boolean_13.java b/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/d/T_sget_boolean_13.java
new file mode 100644
index 0000000..f69d590
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/d/T_sget_boolean_13.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sget_boolean.d;
+
+public class T_sget_boolean_13 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/d/T_sget_boolean_6.java b/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/d/T_sget_boolean_6.java
new file mode 100644
index 0000000..ecf8943
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/d/T_sget_boolean_6.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.sget_boolean.d;
+
+public class T_sget_boolean_6 {
+ public boolean run(){
+ return true;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/d/T_sget_boolean_7.java b/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/d/T_sget_boolean_7.java
new file mode 100644
index 0000000..4db0e16
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/d/T_sget_boolean_7.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.sget_boolean.d;
+
+public class T_sget_boolean_7 {
+ public boolean run(){
+ return true;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/d/T_sget_boolean_8.java b/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/d/T_sget_boolean_8.java
new file mode 100644
index 0000000..42cf804
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_boolean/d/T_sget_boolean_8.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.sget_boolean.d;
+
+public class T_sget_boolean_8 {
+ public boolean run(){
+ return true;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_byte/Test_sget_byte.java b/tools/vm-tests/src/dot/junit/opcodes/sget_byte/Test_sget_byte.java
index 87781ac..9a19f98 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/sget_byte/Test_sget_byte.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_byte/Test_sget_byte.java
@@ -20,11 +20,16 @@
import dot.junit.DxUtil;
import dot.junit.opcodes.sget_byte.d.T_sget_byte_1;
import dot.junit.opcodes.sget_byte.d.T_sget_byte_11;
+import dot.junit.opcodes.sget_byte.d.T_sget_byte_12;
+import dot.junit.opcodes.sget_byte.d.T_sget_byte_13;
import dot.junit.opcodes.sget_byte.d.T_sget_byte_5;
+import dot.junit.opcodes.sget_byte.d.T_sget_byte_6;
+import dot.junit.opcodes.sget_byte.d.T_sget_byte_7;
+import dot.junit.opcodes.sget_byte.d.T_sget_byte_8;
import dot.junit.opcodes.sget_byte.d.T_sget_byte_9;
public class Test_sget_byte extends DxTestCase {
-
+
/**
* @title get byte from static field
*/
@@ -49,7 +54,7 @@
* @title attempt to access non-static field
*/
public void testE1() {
-
+
T_sget_byte_5 t = new T_sget_byte_5();
try {
t.run();
@@ -58,7 +63,7 @@
// expected
}
}
-
+
/**
* @title initialization of referenced class throws exception
*/
@@ -72,10 +77,10 @@
}
}
-
+
/**
- * @constraint A12
+ * @constraint A12
* @title constant pool index
*/
public void testVFE1() {
@@ -88,8 +93,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -100,84 +105,75 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B13
- * @title read byte from long field - only field with same name but
+ *
+ * @constraint B13
+ * @title read byte from long field - only field with same name but
* different type exists
*/
public void testVFE3() {
try {
- Class.forName("dot.junit.opcodes.sget_byte.d.T_sget_byte_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_byte_13().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
* @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.sget_byte.d.T_sget_byte_6
//@uses dot.junit.opcodes.sget_byte.TestStubs
try {
- Class.forName("dot.junit.opcodes.sget_byte.d.T_sget_byte_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_byte_6().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
/**
* @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.sget_byte.d.T_sget_byte_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_byte_7().run();
+ fail("expected NoClassDefFoundError");
+ } catch (NoClassDefFoundError t) {
}
}
/**
* @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.sget_byte.d.T_sget_byte_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_byte_8().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
* @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.sget_byte.d.T_sget_byte_12
//@uses dot.junit.opcodes.sget_byte.d.T_sget_byte_1
try {
- Class.forName("dot.junit.opcodes.sget_byte.d.T_sget_byte_12");
+ new T_sget_byte_12().run();
fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ } catch (IllegalAccessError t) {
}
}
-
+
/**
- * @constraint B1
+ * @constraint B1
* @title sget_byte shall not work for reference fields
*/
public void testVFE8() {
@@ -188,10 +184,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_byte shall not work for short fields
*/
public void testVFE9() {
@@ -202,10 +198,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_byte shall not work for int fields
*/
public void testVFE10() {
@@ -216,10 +212,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_byte shall not work for char fields
*/
public void testVFE11() {
@@ -230,10 +226,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_byte shall not work for boolean fields
*/
public void testVFE12() {
@@ -243,11 +239,11 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
-
+ }
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_byte shall not work for double fields
*/
public void testVFE13() {
@@ -257,11 +253,11 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
-
+ }
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_byte shall not work for long fields
*/
public void testVFE14() {
@@ -271,5 +267,5 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
+ }
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_byte/d/T_sget_byte_12.java b/tools/vm-tests/src/dot/junit/opcodes/sget_byte/d/T_sget_byte_12.java
new file mode 100644
index 0000000..cbfb2c0
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_byte/d/T_sget_byte_12.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.sget_byte.d;
+
+public class T_sget_byte_12 {
+ public byte run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_byte/d/T_sget_byte_13.java b/tools/vm-tests/src/dot/junit/opcodes/sget_byte/d/T_sget_byte_13.java
new file mode 100644
index 0000000..b2723ae
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_byte/d/T_sget_byte_13.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sget_byte.d;
+
+public class T_sget_byte_13 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_byte/d/T_sget_byte_6.java b/tools/vm-tests/src/dot/junit/opcodes/sget_byte/d/T_sget_byte_6.java
new file mode 100644
index 0000000..df4e3f9
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_byte/d/T_sget_byte_6.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.sget_byte.d;
+
+public class T_sget_byte_6 {
+ public byte run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_byte/d/T_sget_byte_7.java b/tools/vm-tests/src/dot/junit/opcodes/sget_byte/d/T_sget_byte_7.java
new file mode 100644
index 0000000..b865dde
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_byte/d/T_sget_byte_7.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.sget_byte.d;
+
+public class T_sget_byte_7 {
+ public byte run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_byte/d/T_sget_byte_8.java b/tools/vm-tests/src/dot/junit/opcodes/sget_byte/d/T_sget_byte_8.java
new file mode 100644
index 0000000..605616f
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_byte/d/T_sget_byte_8.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.sget_byte.d;
+
+public class T_sget_byte_8 {
+ public byte run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_char/Test_sget_char.java b/tools/vm-tests/src/dot/junit/opcodes/sget_char/Test_sget_char.java
index 1cf81b7..10324a5 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/sget_char/Test_sget_char.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_char/Test_sget_char.java
@@ -20,11 +20,16 @@
import dot.junit.DxUtil;
import dot.junit.opcodes.sget_char.d.T_sget_char_1;
import dot.junit.opcodes.sget_char.d.T_sget_char_11;
+import dot.junit.opcodes.sget_char.d.T_sget_char_12;
+import dot.junit.opcodes.sget_char.d.T_sget_char_13;
import dot.junit.opcodes.sget_char.d.T_sget_char_5;
+import dot.junit.opcodes.sget_char.d.T_sget_char_6;
+import dot.junit.opcodes.sget_char.d.T_sget_char_7;
+import dot.junit.opcodes.sget_char.d.T_sget_char_8;
import dot.junit.opcodes.sget_char.d.T_sget_char_9;
public class Test_sget_char extends DxTestCase {
-
+
/**
* @title get char from static field
*/
@@ -49,7 +54,7 @@
* @title attempt to access non-static field
*/
public void testE1() {
-
+
T_sget_char_5 t = new T_sget_char_5();
try {
t.run();
@@ -58,7 +63,7 @@
// expected
}
}
-
+
/**
* @title initialization of referenced class throws exception
*/
@@ -72,10 +77,10 @@
}
}
-
+
/**
- * @constraint A12
+ * @constraint A12
* @title constant pool index
*/
public void testVFE1() {
@@ -88,8 +93,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -100,84 +105,75 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B13
- * @title read char from long field - only field with same name but
+ *
+ * @constraint B13
+ * @title read char from long field - only field with same name but
* different type exists
*/
public void testVFE3() {
try {
- Class.forName("dot.junit.opcodes.sget_char.d.T_sget_char_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_char_13().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
* @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.sget_char.d.T_sget_char_6
//@uses dot.junit.opcodes.sget_char.TestStubs
try {
- Class.forName("dot.junit.opcodes.sget_char.d.T_sget_char_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_char_6().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
/**
* @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.sget_char.d.T_sget_char_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_char_7().run();
+ fail("expected NoClassDefFoundError");
+ } catch (NoClassDefFoundError t) {
}
}
/**
* @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.sget_char.d.T_sget_char_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_char_8().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
* @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.sget_char.d.T_sget_char_12
//@uses dot.junit.opcodes.sget_char.d.T_sget_char_1
try {
- Class.forName("dot.junit.opcodes.sget_char.d.T_sget_char_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_char_12().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
-
+
/**
- * @constraint B1
+ * @constraint B1
* @title sget_char shall not work for reference fields
*/
public void testVFE8() {
@@ -188,10 +184,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_char shall not work for short fields
*/
public void testVFE9() {
@@ -202,10 +198,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_char shall not work for int fields
*/
public void testVFE10() {
@@ -216,10 +212,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_char shall not work for byte fields
*/
public void testVFE11() {
@@ -230,10 +226,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_char shall not work for boolean fields
*/
public void testVFE12() {
@@ -243,11 +239,11 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
-
+ }
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_char shall not work for double fields
*/
public void testVFE13() {
@@ -257,11 +253,11 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
-
+ }
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_char shall not work for long fields
*/
public void testVFE14() {
@@ -271,5 +267,5 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
+ }
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_char/d/T_sget_char_12.java b/tools/vm-tests/src/dot/junit/opcodes/sget_char/d/T_sget_char_12.java
new file mode 100644
index 0000000..f7affdf
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_char/d/T_sget_char_12.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.sget_char.d;
+
+public class T_sget_char_12 {
+ public char run() {
+ return ' ';
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_char/d/T_sget_char_13.java b/tools/vm-tests/src/dot/junit/opcodes/sget_char/d/T_sget_char_13.java
new file mode 100644
index 0000000..b347b53
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_char/d/T_sget_char_13.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sget_char.d;
+
+public class T_sget_char_13 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_char/d/T_sget_char_6.java b/tools/vm-tests/src/dot/junit/opcodes/sget_char/d/T_sget_char_6.java
new file mode 100644
index 0000000..7fc0f38
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_char/d/T_sget_char_6.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.sget_char.d;
+
+public class T_sget_char_6 {
+ public char run() {
+ return ' ';
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_char/d/T_sget_char_7.java b/tools/vm-tests/src/dot/junit/opcodes/sget_char/d/T_sget_char_7.java
new file mode 100644
index 0000000..616d9f1
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_char/d/T_sget_char_7.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.sget_char.d;
+
+public class T_sget_char_7 {
+ public char run() {
+ return ' ';
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_char/d/T_sget_char_8.java b/tools/vm-tests/src/dot/junit/opcodes/sget_char/d/T_sget_char_8.java
new file mode 100644
index 0000000..78e63e9
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_char/d/T_sget_char_8.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.sget_char.d;
+
+public class T_sget_char_8 {
+ public char run() {
+ return ' ';
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_object/Test_sget_object.java b/tools/vm-tests/src/dot/junit/opcodes/sget_object/Test_sget_object.java
index 51d6c91..88aa4cb 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/sget_object/Test_sget_object.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_object/Test_sget_object.java
@@ -20,11 +20,17 @@
import dot.junit.DxUtil;
import dot.junit.opcodes.sget_object.d.T_sget_object_1;
import dot.junit.opcodes.sget_object.d.T_sget_object_11;
+import dot.junit.opcodes.sget_object.d.T_sget_object_12;
+import dot.junit.opcodes.sget_object.d.T_sget_object_13;
+import dot.junit.opcodes.sget_object.d.T_sget_object_21;
import dot.junit.opcodes.sget_object.d.T_sget_object_5;
+import dot.junit.opcodes.sget_object.d.T_sget_object_6;
+import dot.junit.opcodes.sget_object.d.T_sget_object_7;
+import dot.junit.opcodes.sget_object.d.T_sget_object_8;
import dot.junit.opcodes.sget_object.d.T_sget_object_9;
public class Test_sget_object extends DxTestCase {
-
+
/**
* @title get object from static field
*/
@@ -49,7 +55,7 @@
* @title attempt to access non-static field
*/
public void testE1() {
-
+
T_sget_object_5 t = new T_sget_object_5();
try {
t.run();
@@ -58,7 +64,7 @@
// expected
}
}
-
+
/**
* @title initialization of referenced class throws exception
*/
@@ -72,10 +78,10 @@
}
}
-
+
/**
- * @constraint A12
+ * @constraint A12
* @title constant pool index
*/
public void testVFE1() {
@@ -88,8 +94,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -100,84 +106,75 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B13
- * @title read object from long field - only field with same name but
+ *
+ * @constraint B13
+ * @title read object from long field - only field with same name but
* different type exists
*/
public void testVFE3() {
try {
- Class.forName("dot.junit.opcodes.sget_object.d.T_sget_object_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_object_13().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
* @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.sget_object.d.T_sget_object_6
//@uses dot.junit.opcodes.sget_object.TestStubs
try {
- Class.forName("dot.junit.opcodes.sget_object.d.T_sget_object_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_object_6().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
/**
* @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.sget_object.d.T_sget_object_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_object_7().run();
+ fail("expected NoClassDefFoundError");
+ } catch (NoClassDefFoundError t) {
}
}
/**
* @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.sget_object.d.T_sget_object_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_object_8().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
* @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.sget_object.d.T_sget_object_12
//@uses dot.junit.opcodes.sget_object.d.T_sget_object_1
try {
- Class.forName("dot.junit.opcodes.sget_object.d.T_sget_object_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_object_12().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
-
+
/**
- * @constraint B1
+ * @constraint B1
* @title sget_object shall not work for short fields
*/
public void testVFE8() {
@@ -188,10 +185,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_object shall not work for char fields
*/
public void testVFE9() {
@@ -202,10 +199,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_object shall not work for int fields
*/
public void testVFE10() {
@@ -216,10 +213,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_object shall not work for byte fields
*/
public void testVFE11() {
@@ -230,10 +227,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_object shall not work for boolean fields
*/
public void testVFE12() {
@@ -243,11 +240,11 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
-
+ }
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_object shall not work for double fields
*/
public void testVFE13() {
@@ -257,11 +254,11 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
-
+ }
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_object shall not work for long fields
*/
public void testVFE14() {
@@ -271,19 +268,18 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
-
+ }
+
/**
- *
- * @constraint B13
+ *
+ * @constraint B13
* @title only field of different type exists)
*/
public void testVFE15() {
try {
- Class.forName("dot.junit.opcodes.sget_object.d.T_sget_object_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_object_21().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_12.java b/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_12.java
new file mode 100644
index 0000000..0978a26
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_12.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.sget_object.d;
+
+public class T_sget_object_12 {
+ public Object run() {
+ return null;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_13.java b/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_13.java
new file mode 100644
index 0000000..7fe275e
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_13.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sget_object.d;
+
+public class T_sget_object_13 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_21.java b/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_21.java
new file mode 100644
index 0000000..0343390
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_21.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.sget_object.d;
+
+public class T_sget_object_21 {
+ public String run() {
+ return null;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_6.java b/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_6.java
new file mode 100644
index 0000000..84714b2
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_6.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.sget_object.d;
+
+public class T_sget_object_6 {
+ public Object run() {
+ return null;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_7.java b/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_7.java
new file mode 100644
index 0000000..56fbd35
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_7.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.sget_object.d;
+
+public class T_sget_object_7 {
+ public Object run() {
+ return null;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_8.java b/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_8.java
new file mode 100644
index 0000000..87afe69
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_object/d/T_sget_object_8.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.sget_object.d;
+
+public class T_sget_object_8 {
+ public Object run() {
+ return null;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_short/Test_sget_short.java b/tools/vm-tests/src/dot/junit/opcodes/sget_short/Test_sget_short.java
index 33a3c06..b38ef29 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/sget_short/Test_sget_short.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_short/Test_sget_short.java
@@ -20,11 +20,16 @@
import dot.junit.DxUtil;
import dot.junit.opcodes.sget_short.d.T_sget_short_1;
import dot.junit.opcodes.sget_short.d.T_sget_short_11;
+import dot.junit.opcodes.sget_short.d.T_sget_short_12;
+import dot.junit.opcodes.sget_short.d.T_sget_short_13;
import dot.junit.opcodes.sget_short.d.T_sget_short_5;
+import dot.junit.opcodes.sget_short.d.T_sget_short_6;
+import dot.junit.opcodes.sget_short.d.T_sget_short_7;
+import dot.junit.opcodes.sget_short.d.T_sget_short_8;
import dot.junit.opcodes.sget_short.d.T_sget_short_9;
public class Test_sget_short extends DxTestCase {
-
+
/**
* @title get short from static field
*/
@@ -49,7 +54,7 @@
* @title attempt to access non-static field
*/
public void testE1() {
-
+
T_sget_short_5 t = new T_sget_short_5();
try {
t.run();
@@ -58,7 +63,7 @@
// expected
}
}
-
+
/**
* @title initialization of referenced class throws exception
*/
@@ -72,10 +77,10 @@
}
}
-
+
/**
- * @constraint A12
+ * @constraint A12
* @title constant pool index
*/
public void testVFE1() {
@@ -88,8 +93,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -100,84 +105,75 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B13
- * @title read short from long field - only field with same name but
+ *
+ * @constraint B13
+ * @title read short from long field - only field with same name but
* different type exists
*/
public void testVFE3() {
try {
- Class.forName("dot.junit.opcodes.sget_short.d.T_sget_short_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_short_13().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
* @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.sget_short.d.T_sget_short_6
//@uses dot.junit.opcodes.sget_short.TestStubs
try {
- Class.forName("dot.junit.opcodes.sget_short.d.T_sget_short_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_short_6().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
/**
* @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.sget_short.d.T_sget_short_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_short_7().run();
+ fail("expected NoClassDefFoundError");
+ } catch (NoClassDefFoundError t) {
}
}
/**
* @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.sget_short.d.T_sget_short_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_short_8().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
* @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.sget_short.d.T_sget_short_12
//@uses dot.junit.opcodes.sget_short.d.T_sget_short_1
try {
- Class.forName("dot.junit.opcodes.sget_short.d.T_sget_short_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_short_12().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
-
+
/**
- * @constraint B1
+ * @constraint B1
* @title sget_short shall not work for reference fields
*/
public void testVFE8() {
@@ -188,10 +184,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_short shall not work for char fields
*/
public void testVFE9() {
@@ -202,10 +198,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_short shall not work for int fields
*/
public void testVFE10() {
@@ -216,10 +212,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_short shall not work for byte fields
*/
public void testVFE11() {
@@ -230,10 +226,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_short shall not work for boolean fields
*/
public void testVFE12() {
@@ -243,11 +239,11 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
-
+ }
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_short shall not work for double fields
*/
public void testVFE13() {
@@ -257,11 +253,11 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
-
+ }
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget_short shall not work for long fields
*/
public void testVFE14() {
@@ -271,5 +267,5 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
+ }
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_short/d/T_sget_short_12.java b/tools/vm-tests/src/dot/junit/opcodes/sget_short/d/T_sget_short_12.java
new file mode 100644
index 0000000..ea41518
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_short/d/T_sget_short_12.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.sget_short.d;
+
+public class T_sget_short_12 {
+ public short run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_short/d/T_sget_short_13.java b/tools/vm-tests/src/dot/junit/opcodes/sget_short/d/T_sget_short_13.java
new file mode 100644
index 0000000..4bc3105
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_short/d/T_sget_short_13.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sget_short.d;
+
+public class T_sget_short_13 {
+ public void run(){
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_short/d/T_sget_short_6.java b/tools/vm-tests/src/dot/junit/opcodes/sget_short/d/T_sget_short_6.java
new file mode 100644
index 0000000..1499a3c
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_short/d/T_sget_short_6.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.sget_short.d;
+
+public class T_sget_short_6 {
+ public short run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_short/d/T_sget_short_7.java b/tools/vm-tests/src/dot/junit/opcodes/sget_short/d/T_sget_short_7.java
new file mode 100644
index 0000000..823e90d
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_short/d/T_sget_short_7.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.sget_short.d;
+
+public class T_sget_short_7 {
+ public short run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_short/d/T_sget_short_8.java b/tools/vm-tests/src/dot/junit/opcodes/sget_short/d/T_sget_short_8.java
new file mode 100644
index 0000000..2c3ec32
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_short/d/T_sget_short_8.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.sget_short.d;
+
+public class T_sget_short_8 {
+ public short run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_wide/Test_sget_wide.java b/tools/vm-tests/src/dot/junit/opcodes/sget_wide/Test_sget_wide.java
index b107ea8..8ecbeb7 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/sget_wide/Test_sget_wide.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_wide/Test_sget_wide.java
@@ -20,12 +20,17 @@
import dot.junit.DxUtil;
import dot.junit.opcodes.sget_wide.d.T_sget_wide_1;
import dot.junit.opcodes.sget_wide.d.T_sget_wide_11;
+import dot.junit.opcodes.sget_wide.d.T_sget_wide_12;
+import dot.junit.opcodes.sget_wide.d.T_sget_wide_13;
import dot.junit.opcodes.sget_wide.d.T_sget_wide_2;
import dot.junit.opcodes.sget_wide.d.T_sget_wide_5;
+import dot.junit.opcodes.sget_wide.d.T_sget_wide_6;
+import dot.junit.opcodes.sget_wide.d.T_sget_wide_7;
+import dot.junit.opcodes.sget_wide.d.T_sget_wide_8;
import dot.junit.opcodes.sget_wide.d.T_sget_wide_9;
public class Test_sget_wide extends DxTestCase {
-
+
/**
* @title type - long
*/
@@ -57,7 +62,7 @@
* @title attempt to access non-static field
*/
public void testE1() {
-
+
T_sget_wide_5 t = new T_sget_wide_5();
try {
t.run();
@@ -66,12 +71,12 @@
// expected
}
}
-
+
/**
* @title initialization of referenced class throws exception
*/
public void testE6() {
-
+
T_sget_wide_9 t = new T_sget_wide_9();
try {
t.run();
@@ -81,10 +86,10 @@
}
}
-
+
/**
- * @constraint A12
+ * @constraint A12
* @title constant pool index
*/
public void testVFE1() {
@@ -97,8 +102,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -109,84 +114,75 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B13
- * @title read long from integer field - only field with same name but
+ *
+ * @constraint B13
+ * @title read long from integer field - only field with same name but
* different type exists
*/
public void testVFE3() {
try {
- Class.forName("dot.junit.opcodes.sget_wide.d.T_sget_wide_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_wide_13().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
* @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.sget_wide.d.T_sget_wide_6
//@uses dot.junit.opcodes.sget_wide.TestStubs
try {
- Class.forName("dot.junit.opcodes.sget_wide.d.T_sget_wide_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_wide_6().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
/**
* @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.sget_wide.d.T_sget_wide_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_wide_7().run();
+ fail("expected NoClassDefFoundError");
+ } catch (NoClassDefFoundError t) {
}
}
/**
* @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.sget_wide.d.T_sget_wide_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_wide_8().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
* @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.sget_wide.d.T_sget_wide_12
//@uses dot.junit.opcodes.sget_wide.d.T_sget_wide_1
try {
- Class.forName("dot.junit.opcodes.sget_wide.d.T_sget_wide_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sget_wide_12().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
-
+
/**
- * @constraint B1
+ * @constraint B1
* @title sget-wide shall not work for reference fields
*/
public void testVFE8() {
@@ -197,10 +193,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget-wide shall not work for short fields
*/
public void testVFE9() {
@@ -211,10 +207,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget-wide shall not work for boolean fields
*/
public void testVFE10() {
@@ -225,10 +221,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget-wide shall not work for char fields
*/
public void testVFE11() {
@@ -239,10 +235,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget-wide shall not work for byte fields
*/
public void testVFE12() {
@@ -252,11 +248,11 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
-
+ }
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget-wide shall not work for float fields
*/
public void testVFE13() {
@@ -266,11 +262,11 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
-
+ }
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sget-wide shall not work for int fields
*/
public void testVFE14() {
@@ -280,5 +276,5 @@
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
- }
+ }
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_wide/d/T_sget_wide_12.java b/tools/vm-tests/src/dot/junit/opcodes/sget_wide/d/T_sget_wide_12.java
new file mode 100644
index 0000000..9dc55c6
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_wide/d/T_sget_wide_12.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.sget_wide.d;
+
+public class T_sget_wide_12 {
+ public long run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_wide/d/T_sget_wide_13.java b/tools/vm-tests/src/dot/junit/opcodes/sget_wide/d/T_sget_wide_13.java
new file mode 100644
index 0000000..21fc969
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_wide/d/T_sget_wide_13.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sget_wide.d;
+
+public class T_sget_wide_13 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_wide/d/T_sget_wide_6.java b/tools/vm-tests/src/dot/junit/opcodes/sget_wide/d/T_sget_wide_6.java
new file mode 100644
index 0000000..f2744cf
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_wide/d/T_sget_wide_6.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.sget_wide.d;
+
+public class T_sget_wide_6 {
+ public long run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_wide/d/T_sget_wide_7.java b/tools/vm-tests/src/dot/junit/opcodes/sget_wide/d/T_sget_wide_7.java
new file mode 100644
index 0000000..e97e416
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_wide/d/T_sget_wide_7.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.sget_wide.d;
+
+public class T_sget_wide_7 {
+ public long run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sget_wide/d/T_sget_wide_8.java b/tools/vm-tests/src/dot/junit/opcodes/sget_wide/d/T_sget_wide_8.java
new file mode 100644
index 0000000..95b2dbb
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sget_wide/d/T_sget_wide_8.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.sget_wide.d;
+
+public class T_sget_wide_8 {
+ public long run() {
+ return 0;
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput/Test_sput.java b/tools/vm-tests/src/dot/junit/opcodes/sput/Test_sput.java
index 7733001..8b73bb5 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/sput/Test_sput.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput/Test_sput.java
@@ -19,12 +19,18 @@
import dot.junit.DxTestCase;
import dot.junit.DxUtil;
import dot.junit.opcodes.sput.d.T_sput_1;
+import dot.junit.opcodes.sput.d.T_sput_10;
import dot.junit.opcodes.sput.d.T_sput_11;
import dot.junit.opcodes.sput.d.T_sput_12;
import dot.junit.opcodes.sput.d.T_sput_13;
import dot.junit.opcodes.sput.d.T_sput_14;
+import dot.junit.opcodes.sput.d.T_sput_15;
+import dot.junit.opcodes.sput.d.T_sput_17;
import dot.junit.opcodes.sput.d.T_sput_19;
import dot.junit.opcodes.sput.d.T_sput_5;
+import dot.junit.opcodes.sput.d.T_sput_7;
+import dot.junit.opcodes.sput.d.T_sput_8;
+import dot.junit.opcodes.sput.d.T_sput_9;
public class Test_sput extends DxTestCase {
@@ -49,7 +55,7 @@
assertEquals(3.14f, T_sput_19.st_f1);
}
-
+
/**
* @title modification of final field
*/
@@ -73,8 +79,8 @@
}
/**
- * @title Trying to put float into integer field. Dalvik doens't distinguish 32-bits types
- * internally, so this operation makes no sense but shall not crash the VM.
+ * @title Trying to put float into integer field. Dalvik doens't distinguish 32-bits types
+ * internally, so this operation makes no sense but shall not crash the VM.
*/
public void testN6() {
T_sput_5 t = new T_sput_5();
@@ -84,7 +90,7 @@
}
}
-
+
/**
* @title initialization of referenced class throws exception
@@ -100,7 +106,7 @@
}
/**
- * @constraint A12
+ * @constraint A12
* @title constant pool index
*/
public void testVFE1() {
@@ -113,8 +119,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -128,24 +134,23 @@
/**
- *
- * @constraint B13
- * @title put integer into long field - only field with same name but
+ *
+ * @constraint B13
+ * @title put integer into long field - only field with same name but
* different type exists
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.sput.d.T_sput_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_17().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
/**
- *
- * @constraint B13
- * @title type of field doesn't match opcode - attempt to modify double field
+ *
+ * @constraint B13
+ * @title type of field doesn't match opcode - attempt to modify double field
* with single-width register
*/
public void testVFE7() {
@@ -156,87 +161,77 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint A12
- * @title Attempt to set non-static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ *
+ * @constraint A12
+ * @title Attempt to set non-static field.
*/
public void testVFE8() {
try {
- Class.forName("dot.junit.opcodes.sput.d.T_sput_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_7().run();
+ fail("expected IncompatibleClassChangeError");
+ } catch (IncompatibleClassChangeError t) {
}
}
-
+
/**
* @constraint n/a
- * @title Attempt to modify inaccessible field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify inaccessible field.
*/
public void testVFE9() {
//@uses dot.junit.opcodes.sput.TestStubs
//@uses dot.junit.opcodes.sput.d.T_sput_8
try {
- Class.forName("dot.junit.opcodes.sput.d.T_sput_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_8().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
/**
* @constraint n/a
- * @title Attempt to modify field of undefined class. Java throws NoClassDefFoundError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
try {
- Class.forName("dot.junit.opcodes.sput.d.T_sput_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_9().run();
+ fail("expected NoClassDefFoundError");
+ } catch (NoClassDefFoundError t) {
}
}
/**
* @constraint n/a
- * @title Attempt to modify undefined field. Java throws NoSuchFieldError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify undefined field.
*/
public void testVFE11() {
try {
- Class.forName("dot.junit.opcodes.sput.d.T_sput_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_10().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
-
-
+
+
+
/**
* @constraint n/a
- * @title Attempt to modify superclass' private field from subclass. Java
- * throws IllegalAccessError on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify superclass' private field from subclass.
*/
public void testVFE12() {
//@uses dot.junit.opcodes.sput.d.T_sput_1
//@uses dot.junit.opcodes.sput.d.T_sput_15
try {
- Class.forName("dot.junit.opcodes.sput.d.T_sput_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_15().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
-
-
+
+
/**
- * @constraint B1
+ * @constraint B1
* @title sput shall not work for wide numbers
*/
public void testVFE13() {
@@ -247,10 +242,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput shall not work for reference fields
*/
public void testVFE14() {
@@ -261,10 +256,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput shall not work for short fields
*/
public void testVFE15() {
@@ -275,10 +270,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput shall not work for boolean fields
*/
public void testVFE16() {
@@ -289,10 +284,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput shall not work for char fields
*/
public void testVFE17() {
@@ -303,10 +298,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput shall not work for byte fields
*/
public void testVFE18() {
@@ -317,7 +312,7 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
* @constraint n/a
* @title Modification of final field in other class
@@ -326,11 +321,10 @@
//@uses dot.junit.opcodes.sput.TestStubs
//@uses dot.junit.opcodes.sput.d.T_sput_11
try {
- Class.forName("dot.junit.opcodes.sput.d.T_sput_11");
+ new T_sput_11().run();
fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ } catch (IllegalAccessError t) {
}
}
-
+
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_10.java b/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_10.java
new file mode 100644
index 0000000..01a9d6b
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_10.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput.d;
+
+public class T_sput_10 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_15.java b/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_15.java
new file mode 100644
index 0000000..25944f3
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_15.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput.d;
+
+public class T_sput_15 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_17.java b/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_17.java
new file mode 100644
index 0000000..c96b5eb
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_17.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput.d;
+
+public class T_sput_17 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_7.java b/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_7.java
new file mode 100644
index 0000000..8b22c00
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_7.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput.d;
+
+public class T_sput_7 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_8.java b/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_8.java
new file mode 100644
index 0000000..5ccae38
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_8.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput.d;
+
+public class T_sput_8 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_9.java b/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_9.java
new file mode 100644
index 0000000..b8f71e7
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput/d/T_sput_9.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput.d;
+
+public class T_sput_9 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/Test_sput_boolean.java b/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/Test_sput_boolean.java
index 61a3e54..f503ec6 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/Test_sput_boolean.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/Test_sput_boolean.java
@@ -19,10 +19,16 @@
import dot.junit.DxTestCase;
import dot.junit.DxUtil;
import dot.junit.opcodes.sput_boolean.d.T_sput_boolean_1;
+import dot.junit.opcodes.sput_boolean.d.T_sput_boolean_10;
import dot.junit.opcodes.sput_boolean.d.T_sput_boolean_11;
import dot.junit.opcodes.sput_boolean.d.T_sput_boolean_12;
import dot.junit.opcodes.sput_boolean.d.T_sput_boolean_13;
import dot.junit.opcodes.sput_boolean.d.T_sput_boolean_14;
+import dot.junit.opcodes.sput_boolean.d.T_sput_boolean_15;
+import dot.junit.opcodes.sput_boolean.d.T_sput_boolean_17;
+import dot.junit.opcodes.sput_boolean.d.T_sput_boolean_7;
+import dot.junit.opcodes.sput_boolean.d.T_sput_boolean_8;
+import dot.junit.opcodes.sput_boolean.d.T_sput_boolean_9;
public class Test_sput_boolean extends DxTestCase {
@@ -37,7 +43,7 @@
assertEquals(true, T_sput_boolean_1.st_i1);
}
-
+
/**
* @title modification of final field
*/
@@ -59,7 +65,7 @@
t.run();
assertEquals(true, T_sput_boolean_14.getProtectedField());
}
-
+
/**
* @title initialization of referenced class throws exception
@@ -75,7 +81,7 @@
}
/**
- * @constraint A12
+ * @constraint A12
* @title constant pool index
*/
public void testVFE1() {
@@ -88,8 +94,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -103,23 +109,22 @@
/**
- *
- * @constraint B13
- * @title put boolean into long field - only field with same name but
+ *
+ * @constraint B13
+ * @title put boolean into long field - only field with same name but
* different type exists
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_boolean_17().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
- *
- * @constraint B13
+ *
+ * @constraint B13
* @title put value '2' into boolean field
*/
public void testVFE6() {
@@ -132,9 +137,9 @@
}
/**
- *
- * @constraint B13
- * @title type of field doesn't match opcode - attempt to modify double
+ *
+ * @constraint B13
+ * @title type of field doesn't match opcode - attempt to modify double
* field with single-width register
*/
public void testVFE7() {
@@ -145,87 +150,77 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint A12
- * @title Attempt to set non-static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ *
+ * @constraint A12
+ * @title Attempt to set non-static field.
*/
public void testVFE8() {
try {
- Class.forName("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_boolean_7().run();
+ fail("expected IncompatibleClassChangeError");
+ } catch (IncompatibleClassChangeError t) {
}
}
-
+
/**
* @constraint n/a
- * @title Attempt to modify inaccessible field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify inaccessible field.
*/
public void testVFE9() {
//@uses dot.junit.opcodes.sput_boolean.TestStubs
//@uses dot.junit.opcodes.sput_boolean.d.T_sput_boolean_8
try {
- Class.forName("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_boolean_8().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
/**
* @constraint n/a
- * @title Attempt to modify field of undefined class. Java throws NoClassDefFoundError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
try {
- Class.forName("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_boolean_9().run();
+ fail("expected NoClassDefFoundError");
+ } catch (NoClassDefFoundError t) {
}
}
/**
* @constraint n/a
- * @title Attempt to modify undefined field. Java throws NoSuchFieldError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify undefined field.
*/
public void testVFE11() {
try {
- Class.forName("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_boolean_10().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
-
-
+
+
+
/**
* @constraint n/a
- * @title Attempt to modify superclass' private field from subclass. Java
- * throws IllegalAccessError on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify superclass' private field from subclass.
*/
public void testVFE12() {
//@uses dot.junit.opcodes.sput_boolean.d.T_sput_boolean_1
//@uses dot.junit.opcodes.sput_boolean.d.T_sput_boolean_15
try {
- Class.forName("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_15");
+ new T_sput_boolean_15().run();
fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ } catch (IllegalAccessError t) {
}
}
-
-
+
+
/**
- * @constraint B1
+ * @constraint B1
* @title sput_boolean shall not work for wide numbers
*/
public void testVFE13() {
@@ -236,10 +231,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput_boolean shall not work for reference fields
*/
public void testVFE14() {
@@ -250,10 +245,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput_boolean shall not work for short fields
*/
public void testVFE15() {
@@ -264,10 +259,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput_boolean shall not work for int fields
*/
public void testVFE16() {
@@ -278,10 +273,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput_boolean shall not work for char fields
*/
public void testVFE17() {
@@ -292,10 +287,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput_boolean shall not work for byte fields
*/
public void testVFE18() {
@@ -306,19 +301,19 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- * @constraint B1
+ * @constraint B1
* @title Modification of final field in other class.
*/
public void testVFE19() {
//@uses dot.junit.opcodes.sput_boolean.TestStubs
//@uses dot.junit.opcodes.sput_boolean.d.T_sput_boolean_11
-
+
try {
- Class.forName("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_11");
- }catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_boolean_11().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_10.java b/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_10.java
new file mode 100644
index 0000000..1bb1f7a
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_10.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_boolean.d;
+
+public class T_sput_boolean_10 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_15.java b/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_15.java
new file mode 100644
index 0000000..467fc55
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_15.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_boolean.d;
+
+public class T_sput_boolean_15 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_17.java b/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_17.java
new file mode 100644
index 0000000..5e126b5
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_17.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_boolean.d;
+
+public class T_sput_boolean_17 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_7.java b/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_7.java
new file mode 100644
index 0000000..7a97328
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_7.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_boolean.d;
+
+public class T_sput_boolean_7 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_8.java b/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_8.java
new file mode 100644
index 0000000..8d738ae
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_8.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_boolean.d;
+
+public class T_sput_boolean_8 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_9.java b/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_9.java
new file mode 100644
index 0000000..6028d28
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_boolean/d/T_sput_boolean_9.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_boolean.d;
+
+public class T_sput_boolean_9 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_byte/Test_sput_byte.java b/tools/vm-tests/src/dot/junit/opcodes/sput_byte/Test_sput_byte.java
index 4cb751b..c64f876 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/sput_byte/Test_sput_byte.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_byte/Test_sput_byte.java
@@ -19,10 +19,16 @@
import dot.junit.DxTestCase;
import dot.junit.DxUtil;
import dot.junit.opcodes.sput_byte.d.T_sput_byte_1;
+import dot.junit.opcodes.sput_byte.d.T_sput_byte_10;
import dot.junit.opcodes.sput_byte.d.T_sput_byte_11;
import dot.junit.opcodes.sput_byte.d.T_sput_byte_12;
import dot.junit.opcodes.sput_byte.d.T_sput_byte_13;
import dot.junit.opcodes.sput_byte.d.T_sput_byte_14;
+import dot.junit.opcodes.sput_byte.d.T_sput_byte_15;
+import dot.junit.opcodes.sput_byte.d.T_sput_byte_17;
+import dot.junit.opcodes.sput_byte.d.T_sput_byte_7;
+import dot.junit.opcodes.sput_byte.d.T_sput_byte_8;
+import dot.junit.opcodes.sput_byte.d.T_sput_byte_9;
public class Test_sput_byte extends DxTestCase {
/**
@@ -35,7 +41,7 @@
assertEquals(77, T_sput_byte_1.st_i1);
}
-
+
/**
* @title modification of final field
*/
@@ -57,7 +63,7 @@
t.run();
assertEquals(77, T_sput_byte_14.getProtectedField());
}
-
+
/**
* @title initialization of referenced class throws exception
@@ -73,7 +79,7 @@
}
/**
- * @constraint A12
+ * @constraint A12
* @title constant pool index
*/
public void testVFE1() {
@@ -86,8 +92,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -101,22 +107,21 @@
/**
- *
- * @constraint B13
- * @title put byte into long field - only field with same name but
+ *
+ * @constraint B13
+ * @title put byte into long field - only field with same name but
* different type exists
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.sput_byte.d.T_sput_byte_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_byte_17().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
- *
+ *
* @constraint B13
* @title put value '256' into byte field
*/
@@ -130,9 +135,9 @@
}
/**
- *
- * @constraint B13
- * @title type of field doesn't match opcode - attempt to modify double
+ *
+ * @constraint B13
+ * @title type of field doesn't match opcode - attempt to modify double
* field with single-width register
*/
public void testVFE7() {
@@ -143,87 +148,77 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint A12
- * @title Attempt to set non-static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ *
+ * @constraint A12
+ * @title Attempt to set non-static field.
*/
public void testVFE8() {
try {
- Class.forName("dot.junit.opcodes.sput_byte.d.T_sput_byte_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_byte_7().run();
+ fail("expected IncompatibleClassChangeError");
+ } catch (IncompatibleClassChangeError t) {
}
}
-
+
/**
* @constraint n/a
- * @title Attempt to modify inaccessible field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify inaccessible field.
*/
public void testVFE9() {
//@uses dot.junit.opcodes.sput_byte.TestStubs
//@uses dot.junit.opcodes.sput_byte.d.T_sput_byte_8
try {
- Class.forName("dot.junit.opcodes.sput_byte.d.T_sput_byte_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_byte_8().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
/**
* @constraint n/a
- * @title Attempt to modify field of undefined class. Java throws NoClassDefFoundError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
try {
- Class.forName("dot.junit.opcodes.sput_byte.d.T_sput_byte_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_byte_9().run();
+ fail("expected NoClassDefFoundError");
+ } catch (NoClassDefFoundError t) {
}
}
/**
* @constraint n/a
- * @title Attempt to modify undefined field. Java throws NoSuchFieldError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify undefined field.
*/
public void testVFE11() {
try {
- Class.forName("dot.junit.opcodes.sput_byte.d.T_sput_byte_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_byte_10().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
-
-
+
+
+
/**
* @constraint n/a
- * @title Attempt to modify superclass' private field from subclass. Java
- * throws IllegalAccessError on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify superclass' private field from subclass.
*/
public void testVFE12() {
//@uses dot.junit.opcodes.sput_byte.d.T_sput_byte_1
//@uses dot.junit.opcodes.sput_byte.d.T_sput_byte_15
try {
- Class.forName("dot.junit.opcodes.sput_byte.d.T_sput_byte_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_byte_15().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
-
-
+
+
/**
- * @constraint B1
+ * @constraint B1
* @title sput-byte shall not work for wide numbers
*/
public void testVFE13() {
@@ -234,10 +229,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-byte shall not work for reference fields
*/
public void testVFE14() {
@@ -248,10 +243,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-byte shall not work for short fields
*/
public void testVFE15() {
@@ -262,10 +257,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-byte shall not work for int fields
*/
public void testVFE16() {
@@ -276,10 +271,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-byte shall not work for char fields
*/
public void testVFE17() {
@@ -290,9 +285,9 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- * @constraint B1
+ * @constraint B1
* @title sput-byte shall not work for boolean fields
*/
public void testVFE18() {
@@ -303,7 +298,7 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
* @constraint n/a
* @title Modification of final field in other class
@@ -312,10 +307,9 @@
//@uses dot.junit.opcodes.sput_byte.TestStubs
//@uses dot.junit.opcodes.sput_byte.d.T_sput_byte_11
try {
- Class.forName("dot.junit.opcodes.sput_byte.d.T_sput_byte_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_byte_11().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_10.java b/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_10.java
new file mode 100644
index 0000000..0b49e2e
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_10.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_byte.d;
+
+public class T_sput_byte_10 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_15.java b/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_15.java
new file mode 100644
index 0000000..c797268
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_15.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_byte.d;
+
+public class T_sput_byte_15 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_17.java b/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_17.java
new file mode 100644
index 0000000..4ee32fc
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_17.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_byte.d;
+
+public class T_sput_byte_17 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_7.java b/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_7.java
new file mode 100644
index 0000000..8871136
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_7.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_byte.d;
+
+public class T_sput_byte_7 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_8.java b/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_8.java
new file mode 100644
index 0000000..0e1605f
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_8.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_byte.d;
+
+public class T_sput_byte_8 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_9.java b/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_9.java
new file mode 100644
index 0000000..0262d88
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_byte/d/T_sput_byte_9.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_byte.d;
+
+public class T_sput_byte_9 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_char/Test_sput_char.java b/tools/vm-tests/src/dot/junit/opcodes/sput_char/Test_sput_char.java
index 92ec064..120b45a 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/sput_char/Test_sput_char.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_char/Test_sput_char.java
@@ -19,10 +19,16 @@
import dot.junit.DxTestCase;
import dot.junit.DxUtil;
import dot.junit.opcodes.sput_char.d.T_sput_char_1;
+import dot.junit.opcodes.sput_char.d.T_sput_char_10;
import dot.junit.opcodes.sput_char.d.T_sput_char_11;
import dot.junit.opcodes.sput_char.d.T_sput_char_12;
import dot.junit.opcodes.sput_char.d.T_sput_char_13;
import dot.junit.opcodes.sput_char.d.T_sput_char_14;
+import dot.junit.opcodes.sput_char.d.T_sput_char_15;
+import dot.junit.opcodes.sput_char.d.T_sput_char_17;
+import dot.junit.opcodes.sput_char.d.T_sput_char_7;
+import dot.junit.opcodes.sput_char.d.T_sput_char_8;
+import dot.junit.opcodes.sput_char.d.T_sput_char_9;
public class Test_sput_char extends DxTestCase {
/**
@@ -35,7 +41,7 @@
assertEquals(77, T_sput_char_1.st_i1);
}
-
+
/**
* @title modification of final field
*/
@@ -57,7 +63,7 @@
t.run();
assertEquals(77, T_sput_char_14.getProtectedField());
}
-
+
/**
* @title initialization of referenced class throws exception
@@ -73,7 +79,7 @@
}
/**
- * @constraint A12
+ * @constraint A12
* @title constant pool index
*/
public void testVFE1() {
@@ -86,8 +92,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -101,23 +107,22 @@
/**
- *
- * @constraint B13
- * @title put char into long field - only field with same name but
+ *
+ * @constraint B13
+ * @title put char into long field - only field with same name but
* different type exists
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.sput_char.d.T_sput_char_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_char_17().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
- *
- * @constraint B13
+ *
+ * @constraint B13
* @title put value '66000' into byte field
*/
public void testVFE6() {
@@ -130,9 +135,9 @@
}
/**
- *
- * @constraint B13
- * @title type of field doesn't match opcode - attempt to modify double
+ *
+ * @constraint B13
+ * @title type of field doesn't match opcode - attempt to modify double
* field with single-width register
*/
public void testVFE7() {
@@ -143,87 +148,77 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint A12
- * @title Attempt to set non-static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ *
+ * @constraint A12
+ * @title Attempt to set non-static field.
*/
public void testVFE8() {
try {
- Class.forName("dot.junit.opcodes.sput_char.d.T_sput_char_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_char_7().run();
+ fail("expected IncompatibleClassChangeError");
+ } catch (IncompatibleClassChangeError t) {
}
}
-
+
/**
* @constraint n/a
- * @title Attempt to modify inaccessible field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify inaccessible field.
*/
public void testVFE9() {
//@uses dot.junit.opcodes.sput_char.TestStubs
//@uses dot.junit.opcodes.sput_char.d.T_sput_char_8
try {
- Class.forName("dot.junit.opcodes.sput_char.d.T_sput_char_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_char_8().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
/**
* @constraint n/a
- * @title Attempt to modify field of undefined class. Java throws NoClassDefFoundError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
try {
- Class.forName("dot.junit.opcodes.sput_char.d.T_sput_char_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_char_9().run();
+ fail("expected NoClassDefFoundError");
+ } catch (NoClassDefFoundError t) {
}
}
/**
* @constraint n/a
- * @title Attempt to modify undefined field. Java throws NoSuchFieldError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify undefined field.
*/
public void testVFE11() {
try {
- Class.forName("dot.junit.opcodes.sput_char.d.T_sput_char_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_char_10().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
-
-
+
+
+
/**
* @constraint n/a
- * @title Attempt to modify superclass' private field from subclass. Java
- * throws IllegalAccessError on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify superclass' private field from subclass.
*/
public void testVFE12() {
//@uses dot.junit.opcodes.sput_char.d.T_sput_char_1
//@uses dot.junit.opcodes.sput_char.d.T_sput_char_15
try {
- Class.forName("dot.junit.opcodes.sput_char.d.T_sput_char_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_char_15().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
-
-
+
+
/**
- * @constraint B1
+ * @constraint B1
* @title sput-char shall not work for wide numbers
*/
public void testVFE13() {
@@ -234,10 +229,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-char shall not work for reference fields
*/
public void testVFE14() {
@@ -248,10 +243,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-char shall not work for short fields
*/
public void testVFE15() {
@@ -262,10 +257,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-char shall not work for int fields
*/
public void testVFE16() {
@@ -276,10 +271,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-char shall not work for byte fields
*/
public void testVFE17() {
@@ -290,10 +285,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-char shall not work for boolean fields
*/
public void testVFE18() {
@@ -313,10 +308,9 @@
//@uses dot.junit.opcodes.sput_char.TestStubs
//@uses dot.junit.opcodes.sput_char.d.T_sput_char_11
try {
- Class.forName("dot.junit.opcodes.sput_char.d.T_sput_char_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_char_11().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_10.java b/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_10.java
new file mode 100644
index 0000000..10f88f3
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_10.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_char.d;
+
+public class T_sput_char_10 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_15.java b/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_15.java
new file mode 100644
index 0000000..2b4d7d2
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_15.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_char.d;
+
+public class T_sput_char_15 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_17.java b/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_17.java
new file mode 100644
index 0000000..349eaa2
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_17.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_char.d;
+
+public class T_sput_char_17 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_7.java b/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_7.java
new file mode 100644
index 0000000..7a496f2
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_7.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_char.d;
+
+public class T_sput_char_7 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_8.java b/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_8.java
new file mode 100644
index 0000000..c4a3e38
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_8.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_char.d;
+
+public class T_sput_char_8 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_9.java b/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_9.java
new file mode 100644
index 0000000..c38e18c
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_char/d/T_sput_char_9.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_char.d;
+
+public class T_sput_char_9 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_object/Test_sput_object.java b/tools/vm-tests/src/dot/junit/opcodes/sput_object/Test_sput_object.java
index 0607225..cd070a7 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/sput_object/Test_sput_object.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_object/Test_sput_object.java
@@ -19,10 +19,16 @@
import dot.junit.DxTestCase;
import dot.junit.DxUtil;
import dot.junit.opcodes.sput_object.d.T_sput_object_1;
+import dot.junit.opcodes.sput_object.d.T_sput_object_10;
import dot.junit.opcodes.sput_object.d.T_sput_object_11;
import dot.junit.opcodes.sput_object.d.T_sput_object_12;
import dot.junit.opcodes.sput_object.d.T_sput_object_13;
import dot.junit.opcodes.sput_object.d.T_sput_object_14;
+import dot.junit.opcodes.sput_object.d.T_sput_object_15;
+import dot.junit.opcodes.sput_object.d.T_sput_object_17;
+import dot.junit.opcodes.sput_object.d.T_sput_object_7;
+import dot.junit.opcodes.sput_object.d.T_sput_object_8;
+import dot.junit.opcodes.sput_object.d.T_sput_object_9;
public class Test_sput_object extends DxTestCase {
/**
@@ -35,7 +41,7 @@
assertEquals(t, T_sput_object_1.st_i1);
}
-
+
/**
* @title modification of final field
*/
@@ -57,7 +63,7 @@
t.run();
assertEquals(t, T_sput_object_14.getProtectedField());
}
-
+
/**
* @title initialization of referenced class throws exception
@@ -86,8 +92,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -101,25 +107,24 @@
/**
- *
- * @constraint B13
- * @title put object into long field - only field with same name but
+ *
+ * @constraint B13
+ * @title put object into long field - only field with same name but
* different type exists
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.sput_object.d.T_sput_object_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_object_17().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
- *
- * @constraint B13
- * @title type of field doesn't match opcode - attempt to modify double
+ *
+ * @constraint B13
+ * @title type of field doesn't match opcode - attempt to modify double
* field with single-width register
*/
public void testVFE7() {
@@ -130,87 +135,77 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint A12
- * @title Attempt to set non-static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ *
+ * @constraint A12
+ * @title Attempt to set non-static field.
*/
public void testVFE8() {
try {
- Class.forName("dot.junit.opcodes.sput_object.d.T_sput_object_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_object_7().run();
+ fail("expected IncompatibleClassChangeError");
+ } catch (IncompatibleClassChangeError t) {
}
}
-
+
/**
* @constraint n/a
- * @title Attempt to modify inaccessible field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify inaccessible field.
*/
public void testVFE9() {
//@uses dot.junit.opcodes.sput_object.TestStubs
//@uses dot.junit.opcodes.sput_object.d.T_sput_object_8
try {
- Class.forName("dot.junit.opcodes.sput_object.d.T_sput_object_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_object_8().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
/**
* @constraint n/a
- * @title Attempt to modify field of undefined class. Java throws NoClassDefFoundError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
try {
- Class.forName("dot.junit.opcodes.sput_object.d.T_sput_object_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_object_9().run();
+ fail("expected NoClassDefFoundError");
+ } catch (NoClassDefFoundError t) {
}
}
/**
* @constraint n/a
- * @title Attempt to modify undefined field. Java throws NoSuchFieldError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify undefined field.
*/
public void testVFE11() {
try {
- Class.forName("dot.junit.opcodes.sput_object.d.T_sput_object_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_object_10().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
-
-
+
+
+
/**
* @constraint n/a
- * @title Attempt to modify superclass' private field from subclass. Java
- * throws IllegalAccessError on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify superclass' private field from subclass.
*/
public void testVFE12() {
//@uses dot.junit.opcodes.sput_object.d.T_sput_object_1
//@uses dot.junit.opcodes.sput_object.d.T_sput_object_15
try {
- Class.forName("dot.junit.opcodes.sput_object.d.T_sput_object_15");
+ new T_sput_object_15().run();
fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ } catch (IllegalAccessError t) {
}
}
-
-
+
+
/**
- * @constraint B1
+ * @constraint B1
* @title sput-object shall not work for wide numbers
*/
public void testVFE13() {
@@ -221,10 +216,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B13
+ *
+ * @constraint B13
* @title assignment incompatible references
*/
public void testVFE14() {
@@ -235,10 +230,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-object shall not work for char fields
*/
public void testVFE15() {
@@ -249,10 +244,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-object shall not work for int fields
*/
public void testVFE16() {
@@ -263,10 +258,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-object shall not work for byte fields
*/
public void testVFE17() {
@@ -277,10 +272,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-object shall not work for boolean fields
*/
public void testVFE18() {
@@ -293,8 +288,8 @@
}
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-object shall not work for short fields
*/
public void testVFE6() {
@@ -308,17 +303,16 @@
/**
- * @constraint B1
+ * @constraint B1
* @title Modification of final field in other class
*/
public void testVFE19() {
//@uses dot.junit.opcodes.sput_object.TestStubs
//@uses dot.junit.opcodes.sput_object.d.T_sput_object_11
try {
- Class.forName("dot.junit.opcodes.sput_object.d.T_sput_object_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_object_11().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_10.java b/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_10.java
new file mode 100644
index 0000000..bbc15c5
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_10.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_object.d;
+
+public class T_sput_object_10 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_15.java b/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_15.java
new file mode 100644
index 0000000..676e4c3
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_15.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_object.d;
+
+public class T_sput_object_15 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_17.java b/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_17.java
new file mode 100644
index 0000000..6f7ad7c
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_17.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_object.d;
+
+public class T_sput_object_17 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_7.java b/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_7.java
new file mode 100644
index 0000000..0e5f873
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_7.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_object.d;
+
+public class T_sput_object_7 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_8.java b/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_8.java
new file mode 100644
index 0000000..d3d7408
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_8.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_object.d;
+
+public class T_sput_object_8 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_9.java b/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_9.java
new file mode 100644
index 0000000..bef9d16
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_object/d/T_sput_object_9.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_object.d;
+
+public class T_sput_object_9 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_short/Test_sput_short.java b/tools/vm-tests/src/dot/junit/opcodes/sput_short/Test_sput_short.java
index c566401..f14c4a7 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/sput_short/Test_sput_short.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_short/Test_sput_short.java
@@ -19,10 +19,16 @@
import dot.junit.DxTestCase;
import dot.junit.DxUtil;
import dot.junit.opcodes.sput_short.d.T_sput_short_1;
+import dot.junit.opcodes.sput_short.d.T_sput_short_10;
import dot.junit.opcodes.sput_short.d.T_sput_short_11;
import dot.junit.opcodes.sput_short.d.T_sput_short_12;
import dot.junit.opcodes.sput_short.d.T_sput_short_13;
import dot.junit.opcodes.sput_short.d.T_sput_short_14;
+import dot.junit.opcodes.sput_short.d.T_sput_short_15;
+import dot.junit.opcodes.sput_short.d.T_sput_short_17;
+import dot.junit.opcodes.sput_short.d.T_sput_short_7;
+import dot.junit.opcodes.sput_short.d.T_sput_short_8;
+import dot.junit.opcodes.sput_short.d.T_sput_short_9;
public class Test_sput_short extends DxTestCase {
/**
@@ -35,7 +41,7 @@
assertEquals(77, T_sput_short_1.st_i1);
}
-
+
/**
* @title modification of final field
*/
@@ -73,7 +79,7 @@
}
/**
- * @constraint A12
+ * @constraint A12
* @title constant pool index
*/
public void testVFE1() {
@@ -86,8 +92,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -101,23 +107,22 @@
/**
- *
- * @constraint B13
- * @title put short into long field - only field with same name but
+ *
+ * @constraint B13
+ * @title put short into long field - only field with same name but
* different type exists
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.sput_short.d.T_sput_short_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_short_17().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
- *
- * @constraint B13
+ *
+ * @constraint B13
* @title put value '66000' into byte field
*/
public void testVFE6() {
@@ -130,9 +135,9 @@
}
/**
- *
- * @constraint B13
- * @title type of field doesn't match opcode - attempt to modify double
+ *
+ * @constraint B13
+ * @title type of field doesn't match opcode - attempt to modify double
* field with single-width register
*/
public void testVFE7() {
@@ -143,87 +148,77 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint A12
- * @title Attempt to set non-static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ *
+ * @constraint A12
+ * @title Attempt to set non-static field.
*/
public void testVFE8() {
try {
- Class.forName("dot.junit.opcodes.sput_short.d.T_sput_short_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_short_7().run();
+ fail("expected IncompatibleClassChangeError");
+ } catch (IncompatibleClassChangeError t) {
}
}
-
+
/**
* @constraint n/a
- * @title Attempt to modify inaccessible field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify inaccessible field.
*/
public void testVFE9() {
//@uses dot.junit.opcodes.sput_short.TestStubs
//@uses dot.junit.opcodes.sput_short.d.T_sput_short_8
try {
- Class.forName("dot.junit.opcodes.sput_short.d.T_sput_short_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_short_8().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
/**
* @constraint n/a
- * @title Attempt to modify field of undefined class. Java throws NoClassDefFoundError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
try {
- Class.forName("dot.junit.opcodes.sput_short.d.T_sput_short_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_short_9().run();
+ fail("expected NoClassDefFoundError");
+ } catch (NoClassDefFoundError t) {
}
}
/**
* @constraint n/a
- * @title Attempt to modify undefined field. Java throws NoSuchFieldError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify undefined field.
*/
public void testVFE11() {
try {
- Class.forName("dot.junit.opcodes.sput_short.d.T_sput_short_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_short_10().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
-
-
+
+
+
/**
* @constraint n/a
- * @title Attempt to modify superclass' private field from subclass. Java
- * throws IllegalAccessError on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify superclass' private field from subclass.
*/
public void testVFE12() {
//@uses dot.junit.opcodes.sput_short.d.T_sput_short_1
//@uses dot.junit.opcodes.sput_short.d.T_sput_short_15
try {
- Class.forName("dot.junit.opcodes.sput_short.d.T_sput_short_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_short_15().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
-
-
+
+
/**
- * @constraint B1
+ * @constraint B1
* @title sput-short shall not work for wide numbers
*/
public void testVFE13() {
@@ -234,10 +229,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-short shall not work for reference fields
*/
public void testVFE14() {
@@ -248,10 +243,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-short shall not work for char fields
*/
public void testVFE15() {
@@ -262,10 +257,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-short shall not work for int fields
*/
public void testVFE16() {
@@ -276,10 +271,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-short shall not work for byte fields
*/
public void testVFE17() {
@@ -290,10 +285,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-short shall not work for boolean fields
*/
public void testVFE18() {
@@ -313,10 +308,9 @@
//@uses dot.junit.opcodes.sput_short.TestStubs
//@uses dot.junit.opcodes.sput_short.d.T_sput_short_11
try {
- Class.forName("dot.junit.opcodes.sput_short.d.T_sput_short_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_short_11().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_10.java b/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_10.java
new file mode 100644
index 0000000..3af3f04
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_10.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_short.d;
+
+public class T_sput_short_10 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_15.java b/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_15.java
new file mode 100644
index 0000000..04f6a7c
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_15.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_short.d;
+
+public class T_sput_short_15 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_17.java b/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_17.java
new file mode 100644
index 0000000..fa56416
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_17.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_short.d;
+
+public class T_sput_short_17 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_7.java b/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_7.java
new file mode 100644
index 0000000..cbecc44
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_7.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_short.d;
+
+public class T_sput_short_7 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_8.java b/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_8.java
new file mode 100644
index 0000000..852263e
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_8.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_short.d;
+
+public class T_sput_short_8 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_9.java b/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_9.java
new file mode 100644
index 0000000..e950c1d
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_short/d/T_sput_short_9.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_short.d;
+
+public class T_sput_short_9 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_wide/Test_sput_wide.java b/tools/vm-tests/src/dot/junit/opcodes/sput_wide/Test_sput_wide.java
index edca9d9..29ff21b 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/sput_wide/Test_sput_wide.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_wide/Test_sput_wide.java
@@ -19,11 +19,17 @@
import dot.junit.DxTestCase;
import dot.junit.DxUtil;
import dot.junit.opcodes.sput_wide.d.T_sput_wide_1;
+import dot.junit.opcodes.sput_wide.d.T_sput_wide_10;
import dot.junit.opcodes.sput_wide.d.T_sput_wide_11;
import dot.junit.opcodes.sput_wide.d.T_sput_wide_12;
import dot.junit.opcodes.sput_wide.d.T_sput_wide_13;
import dot.junit.opcodes.sput_wide.d.T_sput_wide_14;
+import dot.junit.opcodes.sput_wide.d.T_sput_wide_15;
+import dot.junit.opcodes.sput_wide.d.T_sput_wide_17;
import dot.junit.opcodes.sput_wide.d.T_sput_wide_5;
+import dot.junit.opcodes.sput_wide.d.T_sput_wide_7;
+import dot.junit.opcodes.sput_wide.d.T_sput_wide_8;
+import dot.junit.opcodes.sput_wide.d.T_sput_wide_9;
public class Test_sput_wide extends DxTestCase {
/**
@@ -35,7 +41,7 @@
t.run();
assertEquals(778899112233l, T_sput_wide_1.st_i1);
}
-
+
/**
* @title put double into static field
*/
@@ -46,7 +52,7 @@
assertEquals(0.5d, T_sput_wide_5.st_i1);
}
-
+
/**
* @title modification of final field
*/
@@ -68,7 +74,7 @@
t.run();
assertEquals(77, T_sput_wide_14.getProtectedField());
}
-
+
/**
* @title initialization of referenced class throws exception
*/
@@ -83,7 +89,7 @@
}
/**
- * @constraint A12
+ * @constraint A12
* @title constant pool index
*/
public void testVFE1() {
@@ -96,8 +102,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -111,26 +117,25 @@
/**
- *
- * @constraint B13
- * @title put int into long field - only field with same name but
+ *
+ * @constraint B13
+ * @title put int into long field - only field with same name but
* different type exists
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.sput_wide.d.T_sput_wide_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_wide_17().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
-
+
+
/**
- *
- * @constraint B13
- * @title type of field doesn't match opcode - attempt to modify float
+ *
+ * @constraint B13
+ * @title type of field doesn't match opcode - attempt to modify float
* field with double-width register
*/
public void testVFE7() {
@@ -141,87 +146,85 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint A12
- * @title Attempt to set non-static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ *
+ * @constraint A12
+ * @title Attempt to set non-static field.Dalvik throws IncompatibleClassChangeError when
+ * executing the code.
*/
public void testVFE8() {
try {
- Class.forName("dot.junit.opcodes.sput_wide.d.T_sput_wide_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_wide_7().run();
+ fail("expected IncompatibleClassChangeError");
+ } catch (IncompatibleClassChangeError t) {
}
}
-
+
/**
* @constraint n/a
- * @title Attempt to modify inaccessible field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify inaccessible field. Dalvik throws IllegalAccessError when executing
+ * the code.
*/
public void testVFE9() {
//@uses dot.junit.opcodes.sput_wide.TestStubs
//@uses dot.junit.opcodes.sput_wide.d.T_sput_wide_8
try {
- Class.forName("dot.junit.opcodes.sput_wide.d.T_sput_wide_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_wide_8().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
/**
* @constraint n/a
- * @title Attempt to modify field of undefined class. Java throws NoClassDefFoundError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify field of undefined class. Dalvik throws NoClassDefFoundError when
+ * executing the code.
*/
public void testVFE10() {
+ //@uses dot.junit.opcodes.sput_wide.d.T_sput_wide_9
try {
- Class.forName("dot.junit.opcodes.sput_wide.d.T_sput_wide_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_wide_9().run();
+ fail("expected NoClassDefFoundError");
+ } catch (NoClassDefFoundError t) {
}
}
/**
* @constraint n/a
- * @title Attempt to modify undefined field. Java throws NoSuchFieldError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify undefined field. Dalvik throws NoSuchFieldError when executing the
+ * code.
*/
public void testVFE11() {
+ //@uses dot.junit.opcodes.sput_wide.d.T_sput_wide_10
try {
- Class.forName("dot.junit.opcodes.sput_wide.d.T_sput_wide_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_wide_10().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
-
-
+
+
+
/**
* @constraint n/a
- * @title Attempt to modify superclass' private field from subclass. Java
- * throws IllegalAccessError on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify superclass' private field from subclass. Dalvik throws
+ * IllegalAccessError when executing the code.
*/
public void testVFE12() {
//@uses dot.junit.opcodes.sput_wide.d.T_sput_wide_1
//@uses dot.junit.opcodes.sput_wide.d.T_sput_wide_15
try {
- Class.forName("dot.junit.opcodes.sput_wide.d.T_sput_wide_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
+ new T_sput_wide_15().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
DxUtil.checkVerifyException(t);
}
}
-
-
+
+
/**
- * @constraint B1
+ * @constraint B1
* @title sput-wide shall not work for single-width numbers
*/
public void testVFE13() {
@@ -232,10 +235,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-wide shall not work for reference fields
*/
public void testVFE14() {
@@ -246,10 +249,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-wide shall not work for char fields
*/
public void testVFE15() {
@@ -260,10 +263,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-wide shall not work for int fields
*/
public void testVFE16() {
@@ -274,10 +277,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-wide shall not work for byte fields
*/
public void testVFE17() {
@@ -288,10 +291,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-wide shall not work for boolean fields
*/
public void testVFE18() {
@@ -304,8 +307,8 @@
}
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title sput-wide shall not work for short fields
*/
public void testVFE6() {
@@ -316,7 +319,7 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
* @constraint n/a
* @title Modification of final field in other class
@@ -325,12 +328,11 @@
//@uses dot.junit.opcodes.sput_wide.TestStubs
//@uses dot.junit.opcodes.sput_wide.d.T_sput_wide_11
try {
- Class.forName("dot.junit.opcodes.sput_wide.d.T_sput_wide_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_sput_wide_11().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
-
+
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_10.java b/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_10.java
new file mode 100644
index 0000000..b275744
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_10.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_wide.d;
+
+public class T_sput_wide_10 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_15.java b/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_15.java
new file mode 100644
index 0000000..376cdd8
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_15.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_wide.d;
+
+public class T_sput_wide_15 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_17.java b/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_17.java
new file mode 100644
index 0000000..244fa5e
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_17.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_wide.d;
+
+public class T_sput_wide_17 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_7.java b/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_7.java
new file mode 100644
index 0000000..4608227
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_7.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_wide.d;
+
+public class T_sput_wide_7 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_8.java b/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_8.java
new file mode 100644
index 0000000..17cf144
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_8.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_wide.d;
+
+public class T_sput_wide_8 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_9.java b/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_9.java
new file mode 100644
index 0000000..00355dd
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_9.java
@@ -0,0 +1,22 @@
+/*
+ * 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.sput_wide.d;
+
+public class T_sput_wide_9 {
+ public void run() {
+ }
+}
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(