am 7f738031: Merge "Fix opcode tests for iput_*" into froyo
* commit '7f738031e6dccc8c79a8ecc38432eec8eca243d6':
Fix opcode tests for iput_*
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput/Test_iput.java b/tools/vm-tests/src/dot/junit/opcodes/iput/Test_iput.java
index 7a83f26..f69b308 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/iput/Test_iput.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput/Test_iput.java
@@ -19,12 +19,18 @@
import dot.junit.DxTestCase;
import dot.junit.DxUtil;
import dot.junit.opcodes.iput.d.T_iput_1;
+import dot.junit.opcodes.iput.d.T_iput_10;
import dot.junit.opcodes.iput.d.T_iput_11;
import dot.junit.opcodes.iput.d.T_iput_12;
import dot.junit.opcodes.iput.d.T_iput_13;
import dot.junit.opcodes.iput.d.T_iput_14;
+import dot.junit.opcodes.iput.d.T_iput_15;
+import dot.junit.opcodes.iput.d.T_iput_17;
import dot.junit.opcodes.iput.d.T_iput_19;
import dot.junit.opcodes.iput.d.T_iput_5;
+import dot.junit.opcodes.iput.d.T_iput_7;
+import dot.junit.opcodes.iput.d.T_iput_8;
+import dot.junit.opcodes.iput.d.T_iput_9;
public class Test_iput extends DxTestCase {
@@ -48,7 +54,7 @@
assertEquals(3.14f, t.st_f1);
}
-
+
/**
* @title modification of final field
*/
@@ -72,8 +78,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_iput_5 t = new T_iput_5();
@@ -83,7 +89,7 @@
}
}
-
+
/**
* @title expected NullPointerException
*/
@@ -98,7 +104,7 @@
}
/**
- * @constraint A11
+ * @constraint A11
* @title constant pool index
*/
public void testVFE1() {
@@ -111,8 +117,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -126,24 +132,24 @@
/**
- *
- * @constraint B14
- * @title put integer into long field - only field with same name but
+ *
+ * @constraint B14
+ * @title put integer into long field - only field with same name but
* different type exists
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.iput.d.T_iput_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
+ new T_iput_17().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
DxUtil.checkVerifyException(t);
}
}
/**
- *
- * @constraint B14
- * @title type of field doesn't match opcode - attempt to modify double field
+ *
+ * @constraint B14
+ * @title type of field doesn't match opcode - attempt to modify double field
* with single-width register
*/
public void testVFE7() {
@@ -154,86 +160,77 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- * @constraint A11
- * @title Attempt to set static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @constraint A11
+ * @title Attempt to set static field.
*/
public void testVFE8() {
try {
- Class.forName("dot.junit.opcodes.iput.d.T_iput_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_7().run();
+ fail("expected IncompatibleClassChangeError");
+ } catch (IncompatibleClassChangeError t) {
}
}
-
+
/**
* @constraint B12
- * @title Attempt to modify inaccessible protected field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify inaccessible protected field.
*/
public void testVFE9() {
//@uses dot.junit.opcodes.iput.TestStubs
//@uses dot.junit.opcodes.iput.d.T_iput_8
try {
- Class.forName("dot.junit.opcodes.iput.d.T_iput_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput.d.T_iput_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput.d.T_iput_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput.d.T_iput_1
//@uses dot.junit.opcodes.iput.d.T_iput_15
try {
- Class.forName("dot.junit.opcodes.iput.d.T_iput_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
+ new T_iput_15().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
DxUtil.checkVerifyException(t);
}
}
-
-
+
+
/**
- * @constraint B1
+ * @constraint B1
* @title iput shall not work for wide numbers
*/
public void testVFE13() {
@@ -244,10 +241,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput shall not work for reference fields
*/
public void testVFE14() {
@@ -258,10 +255,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput shall not work for short fields
*/
public void testVFE15() {
@@ -272,10 +269,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput shall not work for boolean fields
*/
public void testVFE16() {
@@ -286,10 +283,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput shall not work for char fields
*/
public void testVFE17() {
@@ -300,10 +297,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput shall not work for byte fields
*/
public void testVFE18() {
@@ -314,11 +311,11 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- * @constraint B6
- * @title instance fields may only be accessed on already initialized instances.
+ * @constraint B6
+ * @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
try {
@@ -328,7 +325,7 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
* @constraint n/a
* @title Modification of final field in other class
@@ -337,10 +334,9 @@
//@uses dot.junit.opcodes.iput.TestStubs
//@uses dot.junit.opcodes.iput.d.T_iput_11
try {
- Class.forName("dot.junit.opcodes.iput.d.T_iput_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_11().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_10.java b/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_10.java
new file mode 100644
index 0000000..4f630e7
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_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.iput.d;
+
+public class T_iput_10 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_15.java b/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_15.java
new file mode 100644
index 0000000..f432d27
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_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.iput.d;
+
+public class T_iput_15 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_17.java b/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_17.java
new file mode 100644
index 0000000..0c1bb0c
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_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.iput.d;
+
+public class T_iput_17 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_7.java b/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_7.java
new file mode 100644
index 0000000..c7407e0
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_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.iput.d;
+
+public class T_iput_7 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_8.java b/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_8.java
new file mode 100644
index 0000000..264aef0
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_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.iput.d;
+
+public class T_iput_8 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_9.java b/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_9.java
new file mode 100644
index 0000000..a3c1695
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput/d/T_iput_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.iput.d;
+
+public class T_iput_9 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/Test_iput_boolean.java b/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/Test_iput_boolean.java
index cb51be8..6a2419b 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/Test_iput_boolean.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/Test_iput_boolean.java
@@ -19,16 +19,22 @@
import dot.junit.DxTestCase;
import dot.junit.DxUtil;
import dot.junit.opcodes.iput_boolean.d.T_iput_boolean_1;
+import dot.junit.opcodes.iput_boolean.d.T_iput_boolean_10;
import dot.junit.opcodes.iput_boolean.d.T_iput_boolean_11;
import dot.junit.opcodes.iput_boolean.d.T_iput_boolean_12;
import dot.junit.opcodes.iput_boolean.d.T_iput_boolean_13;
import dot.junit.opcodes.iput_boolean.d.T_iput_boolean_14;
+import dot.junit.opcodes.iput_boolean.d.T_iput_boolean_15;
+import dot.junit.opcodes.iput_boolean.d.T_iput_boolean_17;
+import dot.junit.opcodes.iput_boolean.d.T_iput_boolean_7;
+import dot.junit.opcodes.iput_boolean.d.T_iput_boolean_8;
+import dot.junit.opcodes.iput_boolean.d.T_iput_boolean_9;
public class Test_iput_boolean extends DxTestCase {
/**
- * @title put boolean into field
+ * @title put boolean into field
*/
public void testN1() {
T_iput_boolean_1 t = new T_iput_boolean_1();
@@ -37,7 +43,7 @@
assertEquals(true, t.st_i1);
}
-
+
/**
* @title modification of final field
*/
@@ -59,8 +65,8 @@
t.run();
assertEquals(true, t.getProtectedField());
}
-
-
+
+
/**
* @title expected NullPointerException
@@ -76,7 +82,7 @@
}
/**
- * @constraint A11
+ * @constraint A11
* @title constant pool index
*/
public void testVFE1() {
@@ -89,7 +95,7 @@
}
/**
- * @constraint A23
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -103,21 +109,20 @@
/**
- * @constraint B14
- * @title put boolean into long field - only field with same name but
+ * @constraint B14
+ * @title put boolean into long field - only field with same name but
* different type exists
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_boolean_17().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
- *
+ *
* @constraint B14
* @title put value '2' into boolean field
*/
@@ -131,9 +136,9 @@
}
/**
- *
+ *
* @constraint B14
- * @title type of field doesn't match opcode - attempt to modify double
+ * @title type of field doesn't match opcode - attempt to modify double
* field with single-width register
*/
public void testVFE7() {
@@ -144,87 +149,77 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint A11
- * @title Attempt to set static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ *
+ * @constraint A11
+ * @title Attempt to set static field.
*/
public void testVFE8() {
try {
- Class.forName("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_boolean_7().run();
+ fail("expected IncompatibleClassChangeError");
+ } catch (IncompatibleClassChangeError t) {
}
}
-
+
/**
* @constraint B12
- * @title Attempt to modify inaccessible protected field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify inaccessible protected field.
*/
public void testVFE9() {
//@uses dot.junit.opcodes.iput_boolean.TestStubs
//@uses dot.junit.opcodes.iput_boolean.d.T_iput_boolean_8
try {
- Class.forName("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput_boolean.d.T_iput_boolean_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput_boolean.d.T_iput_boolean_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput_boolean.d.T_iput_boolean_1
//@uses dot.junit.opcodes.iput_boolean.d.T_iput_boolean_15
try {
- Class.forName("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_boolean_15().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
-
-
+
+
/**
- * @constraint B1
+ * @constraint B1
* @title iput_boolean shall not work for wide numbers
*/
public void testVFE13() {
@@ -235,10 +230,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput_boolean shall not work for reference fields
*/
public void testVFE14() {
@@ -249,10 +244,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput_boolean shall not work for short fields
*/
public void testVFE15() {
@@ -263,10 +258,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput_boolean shall not work for int fields
*/
public void testVFE16() {
@@ -277,9 +272,9 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- * @constraint B1
+ * @constraint B1
* @title iput_boolean shall not work for char fields
*/
public void testVFE17() {
@@ -290,9 +285,9 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- * @constraint B1
+ * @constraint B1
* @title iput_boolean shall not work for byte fields
*/
public void testVFE18() {
@@ -305,8 +300,8 @@
}
/**
- * @constraint B6
- * @title instance fields may only be accessed on already initialized instances.
+ * @constraint B6
+ * @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
try {
@@ -316,7 +311,7 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
* @constraint n/a
* @title Modification of final field in other class
@@ -325,10 +320,9 @@
//@uses dot.junit.opcodes.iput_boolean.TestStubs
//@uses dot.junit.opcodes.iput_boolean.d.T_iput_boolean_11
try {
- Class.forName("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_boolean_11().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_10.java b/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_10.java
new file mode 100644
index 0000000..7279fe0
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_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.iput_boolean.d;
+
+public class T_iput_boolean_10 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_15.java b/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_15.java
new file mode 100644
index 0000000..893595b
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_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.iput_boolean.d;
+
+public class T_iput_boolean_15 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_17.java b/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_17.java
new file mode 100644
index 0000000..c7dbaeb
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_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.iput_boolean.d;
+
+public class T_iput_boolean_17 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_7.java b/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_7.java
new file mode 100644
index 0000000..c48328e
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_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.iput_boolean.d;
+
+public class T_iput_boolean_7 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_8.d b/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_8.d
index 8d69496..ce16612 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_8.d
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_8.d
@@ -27,8 +27,8 @@
.method public run()V
.limit regs 3
- new-instance v0, Ldot/junit/opcodes/iput/TestStubs;
- invoke-direct {v0}, dot/junit/opcodes/iput/TestStubs/<init>()V
+ new-instance v0, Ldot/junit/opcodes/iput_boolean/TestStubs;
+ invoke-direct {v0}, dot/junit/opcodes/iput_boolean/TestStubs/<init>()V
const v1, 0
iput-boolean v1, v0, dot.junit.opcodes.iput_boolean.TestStubs.TestStubField Z
return-void
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_8.java b/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_8.java
new file mode 100644
index 0000000..6706b11
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_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.iput_boolean.d;
+
+public class T_iput_boolean_8 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_9.java b/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_9.java
new file mode 100644
index 0000000..86c2fbf
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_boolean/d/T_iput_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.iput_boolean.d;
+
+public class T_iput_boolean_9 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_byte/Test_iput_byte.java b/tools/vm-tests/src/dot/junit/opcodes/iput_byte/Test_iput_byte.java
index 9fb87f5..f67e22b 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/iput_byte/Test_iput_byte.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_byte/Test_iput_byte.java
@@ -19,10 +19,16 @@
import dot.junit.DxTestCase;
import dot.junit.DxUtil;
import dot.junit.opcodes.iput_byte.d.T_iput_byte_1;
+import dot.junit.opcodes.iput_byte.d.T_iput_byte_10;
import dot.junit.opcodes.iput_byte.d.T_iput_byte_11;
import dot.junit.opcodes.iput_byte.d.T_iput_byte_12;
import dot.junit.opcodes.iput_byte.d.T_iput_byte_13;
import dot.junit.opcodes.iput_byte.d.T_iput_byte_14;
+import dot.junit.opcodes.iput_byte.d.T_iput_byte_15;
+import dot.junit.opcodes.iput_byte.d.T_iput_byte_17;
+import dot.junit.opcodes.iput_byte.d.T_iput_byte_7;
+import dot.junit.opcodes.iput_byte.d.T_iput_byte_8;
+import dot.junit.opcodes.iput_byte.d.T_iput_byte_9;
public class Test_iput_byte extends DxTestCase {
/**
@@ -35,7 +41,7 @@
assertEquals(77, t.st_i1);
}
-
+
/**
* @title modification of final field
*/
@@ -57,7 +63,7 @@
t.run();
assertEquals(77, t.getProtectedField());
}
-
+
/**
* @title expected NullPointerException
*/
@@ -72,7 +78,7 @@
}
/**
- * @constraint A11
+ * @constraint A11
* @title constant pool index
*/
public void testVFE1() {
@@ -85,8 +91,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -100,23 +106,22 @@
/**
- *
- * @constraint B14
- * @title put byte into long field - only field with same name but
+ *
+ * @constraint B14
+ * @title put byte into long field - only field with same name but
* different type exists
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.iput_byte.d.T_iput_byte_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_byte_17().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
- *
- * @constraint B14
+ *
+ * @constraint B14
* @title put value '256' into byte field
*/
public void testVFE6() {
@@ -129,9 +134,9 @@
}
/**
- *
- * @constraint B14
- * @title type of field doesn't match opcode - attempt to modify double
+ *
+ * @constraint B14
+ * @title type of field doesn't match opcode - attempt to modify double
* field with single-width register
*/
public void testVFE7() {
@@ -142,87 +147,77 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint A11
- * @title Attempt to set static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ *
+ * @constraint A11
+ * @title Attempt to set static field.
*/
public void testVFE8() {
try {
- Class.forName("dot.junit.opcodes.iput_byte.d.T_iput_byte_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_byte_7().run();
+ fail("expected IncompatibleClassChangeError");
+ } catch (IncompatibleClassChangeError t) {
}
}
-
+
/**
* @constraint B12
- * @title Attempt to modify inaccessible protected field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify inaccessible protected field.
*/
public void testVFE9() {
//@uses dot.junit.opcodes.iput_byte.TestStubs
//@uses dot.junit.opcodes.iput_byte.d.T_iput_byte_8
try {
- Class.forName("dot.junit.opcodes.iput_byte.d.T_iput_byte_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput_byte.d.T_iput_byte_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput_byte.d.T_iput_byte_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput_byte.d.T_iput_byte_1
//@uses dot.junit.opcodes.iput_byte.d.T_iput_byte_15
try {
- Class.forName("dot.junit.opcodes.iput_byte.d.T_iput_byte_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_byte_15().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
-
-
+
+
/**
- * @constraint B1
+ * @constraint B1
* @title iput-byte shall not work for wide numbers
*/
public void testVFE13() {
@@ -233,10 +228,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-byte shall not work for reference fields
*/
public void testVFE14() {
@@ -247,10 +242,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-byte shall not work for short fields
*/
public void testVFE15() {
@@ -261,10 +256,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-byte shall not work for int fields
*/
public void testVFE16() {
@@ -275,10 +270,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-byte shall not work for char fields
*/
public void testVFE17() {
@@ -289,10 +284,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-byte shall not work for boolean fields
*/
public void testVFE18() {
@@ -306,8 +301,8 @@
/**
- * @constraint B6
- * @title instance fields may only be accessed on already initialized instances.
+ * @constraint B6
+ * @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
try {
@@ -317,7 +312,7 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
* @constraint n/a
* @title Modification of final field in other class
@@ -326,10 +321,9 @@
//@uses dot.junit.opcodes.iput_byte.TestStubs
//@uses dot.junit.opcodes.iput_byte.d.T_iput_byte_11
try {
- Class.forName("dot.junit.opcodes.iput_byte.d.T_iput_byte_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_byte_11().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_byte_10.java b/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_byte_10.java
new file mode 100644
index 0000000..f7278f2
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_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.iput_byte.d;
+
+public class T_iput_byte_10 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_byte_15.java b/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_byte_15.java
new file mode 100644
index 0000000..249926f
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_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.iput_byte.d;
+
+public class T_iput_byte_15 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_byte_17.java b/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_byte_17.java
new file mode 100644
index 0000000..6eca2a9
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_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.iput_byte.d;
+
+public class T_iput_byte_17 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_byte_7.java b/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_byte_7.java
new file mode 100644
index 0000000..3ff9a3f
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_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.iput_byte.d;
+
+public class T_iput_byte_7 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_byte_8.java b/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_byte_8.java
new file mode 100644
index 0000000..8a29bb2
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_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.iput_byte.d;
+
+public class T_iput_byte_8 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_byte_9.java b/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_byte_9.java
new file mode 100644
index 0000000..37f7a6d
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_byte/d/T_iput_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.iput_byte.d;
+
+public class T_iput_byte_9 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_char/Test_iput_char.java b/tools/vm-tests/src/dot/junit/opcodes/iput_char/Test_iput_char.java
index 7674c21..f3a4f9e 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/iput_char/Test_iput_char.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_char/Test_iput_char.java
@@ -19,10 +19,16 @@
import dot.junit.DxTestCase;
import dot.junit.DxUtil;
import dot.junit.opcodes.iput_char.d.T_iput_char_1;
+import dot.junit.opcodes.iput_char.d.T_iput_char_10;
import dot.junit.opcodes.iput_char.d.T_iput_char_11;
import dot.junit.opcodes.iput_char.d.T_iput_char_12;
import dot.junit.opcodes.iput_char.d.T_iput_char_13;
import dot.junit.opcodes.iput_char.d.T_iput_char_14;
+import dot.junit.opcodes.iput_char.d.T_iput_char_15;
+import dot.junit.opcodes.iput_char.d.T_iput_char_17;
+import dot.junit.opcodes.iput_char.d.T_iput_char_7;
+import dot.junit.opcodes.iput_char.d.T_iput_char_8;
+import dot.junit.opcodes.iput_char.d.T_iput_char_9;
public class Test_iput_char extends DxTestCase {
/**
@@ -35,7 +41,7 @@
assertEquals(77, t.st_i1);
}
-
+
/**
* @title modification of final field
*/
@@ -57,7 +63,7 @@
t.run();
assertEquals(77, t.getProtectedField());
}
-
+
/**
* @title expected NullPointerException
*/
@@ -70,10 +76,10 @@
// expected
}
}
-
-
+
+
/**
- * @constraint A11
+ * @constraint A11
* @title constant pool index
*/
public void testVFE1() {
@@ -86,7 +92,7 @@
}
/**
- *
+ *
* @constraint A23
* @title number of registers
*/
@@ -101,23 +107,22 @@
/**
- *
- * @constraint B14
- * @title put char into long field - only field with same name but
+ *
+ * @constraint B14
+ * @title put char into long field - only field with same name but
* different type exists
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.iput_char.d.T_iput_char_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_char_17().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
- *
- * @constraint B14
+ *
+ * @constraint B14
* @title put value '66000' into byte field
*/
public void testVFE6() {
@@ -130,9 +135,9 @@
}
/**
- *
- * @constraint B14
- * @title type of field doesn't match opcode - attempt to modify double
+ *
+ * @constraint B14
+ * @title type of field doesn't match opcode - attempt to modify double
* field with single-width register
*/
public void testVFE7() {
@@ -143,88 +148,78 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint A11
- * @title Attempt to set static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ *
+ * @constraint A11
+ * @title Attempt to set static field.
*/
public void testVFE8() {
try {
- Class.forName("dot.junit.opcodes.iput_char.d.T_iput_char_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_char_7().run();
+ fail("expected IncompatibleClassChangeError");
+ } catch (IncompatibleClassChangeError t) {
}
}
-
+
/**
* @constraint B12
- * @title Attempt to modify inaccessible protected field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify inaccessible protected field.
*/
public void testVFE9() {
//@uses dot.junit.opcodes.iput_char.TestStubs
//@uses dot.junit.opcodes.iput_char.d.T_iput_char_8
try {
- Class.forName("dot.junit.opcodes.iput_char.d.T_iput_char_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput_char.d.T_iput_char_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput_char.d.T_iput_char_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput_char.d.T_iput_char_1
//@uses dot.junit.opcodes.iput_char.d.T_iput_char_15
try {
- Class.forName("dot.junit.opcodes.iput_char.d.T_iput_char_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_char_15().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
-
-
+
+
/**
- * @constraint B1
+ * @constraint B1
* @title iput-char shall not work for wide numbers
*/
public void testVFE13() {
@@ -235,10 +230,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-char shall not work for reference fields
*/
public void testVFE14() {
@@ -249,10 +244,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-char shall not work for short fields
*/
public void testVFE15() {
@@ -263,10 +258,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-char shall not work for int fields
*/
public void testVFE16() {
@@ -277,10 +272,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-char shall not work for byte fields
*/
public void testVFE17() {
@@ -291,10 +286,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-char shall not work for boolean fields
*/
public void testVFE18() {
@@ -308,8 +303,8 @@
/**
- * @constraint B6
- * @title instance fields may only be accessed on already initialized instances.
+ * @constraint B6
+ * @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
try {
@@ -319,7 +314,7 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
* @constraint n/a
* @title Modification of final field in other class
@@ -328,10 +323,9 @@
//@uses dot.junit.opcodes.iput_char.TestStubs
//@uses dot.junit.opcodes.iput_char.d.T_iput_char_11
try {
- Class.forName("dot.junit.opcodes.iput_char.d.T_iput_char_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_char_11().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_char_10.java b/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_char_10.java
new file mode 100644
index 0000000..2e2c554
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_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.iput_char.d;
+
+public class T_iput_char_10 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_char_15.java b/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_char_15.java
new file mode 100644
index 0000000..9419df4
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_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.iput_char.d;
+
+public class T_iput_char_15 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_char_17.java b/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_char_17.java
new file mode 100644
index 0000000..41d3dfb
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_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.iput_char.d;
+
+public class T_iput_char_17 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_char_7.java b/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_char_7.java
new file mode 100644
index 0000000..4e148d7
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_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.iput_char.d;
+
+public class T_iput_char_7 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_char_8.java b/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_char_8.java
new file mode 100644
index 0000000..186ce0b
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_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.iput_char.d;
+
+public class T_iput_char_8 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_char_9.java b/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_char_9.java
new file mode 100644
index 0000000..3cb3667
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_char/d/T_iput_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.iput_char.d;
+
+public class T_iput_char_9 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_object/Test_iput_object.java b/tools/vm-tests/src/dot/junit/opcodes/iput_object/Test_iput_object.java
index d0dd8ad..e2f8fa4 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/iput_object/Test_iput_object.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_object/Test_iput_object.java
@@ -19,10 +19,16 @@
import dot.junit.DxTestCase;
import dot.junit.DxUtil;
import dot.junit.opcodes.iput_object.d.T_iput_object_1;
+import dot.junit.opcodes.iput_object.d.T_iput_object_10;
import dot.junit.opcodes.iput_object.d.T_iput_object_11;
import dot.junit.opcodes.iput_object.d.T_iput_object_12;
import dot.junit.opcodes.iput_object.d.T_iput_object_13;
import dot.junit.opcodes.iput_object.d.T_iput_object_14;
+import dot.junit.opcodes.iput_object.d.T_iput_object_15;
+import dot.junit.opcodes.iput_object.d.T_iput_object_17;
+import dot.junit.opcodes.iput_object.d.T_iput_object_7;
+import dot.junit.opcodes.iput_object.d.T_iput_object_8;
+import dot.junit.opcodes.iput_object.d.T_iput_object_9;
public class Test_iput_object extends DxTestCase {
/**
@@ -35,7 +41,7 @@
assertEquals(t, t.st_i1);
}
-
+
/**
* @title modification of final field
*/
@@ -57,7 +63,7 @@
t.run();
assertEquals(t, t.getProtectedField());
}
-
+
/**
* @title expected NullPointerException
*/
@@ -70,10 +76,10 @@
// expected
}
}
-
-
+
+
/**
- * @constraint A11
+ * @constraint A11
* @title constant pool index
*/
public void testVFE1() {
@@ -86,8 +92,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -101,25 +107,24 @@
/**
- *
- * @constraint B14
- * @title put object into long field - only field with same name but
+ *
+ * @constraint B14
+ * @title put object into long field - only field with same name but
* different type exists
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.iput_object.d.T_iput_object_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_object_17().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
- *
+ *
* @constraint B14
- * @title type of field doesn't match opcode - attempt to modify double
+ * @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 A11
- * @title Attempt to set non-static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ *
+ * @constraint A11
+ * @title Attempt to set non-static field.
*/
public void testVFE8() {
try {
- Class.forName("dot.junit.opcodes.iput_object.d.T_iput_object_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_object_7().run();
+ fail("expected IncompatibleClassChangeError");
+ } catch (IncompatibleClassChangeError t) {
}
}
-
+
/**
* @constraint B12
- * @title Attempt to modify inaccessible protected field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify inaccessible protected field.
*/
public void testVFE9() {
//@uses dot.junit.opcodes.iput_object.TestStubs
//@uses dot.junit.opcodes.iput_object.d.T_iput_object_8
try {
- Class.forName("dot.junit.opcodes.iput_object.d.T_iput_object_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput_object.d.T_iput_object_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput_object.d.T_iput_object_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput_object.d.T_iput_object_1
//@uses dot.junit.opcodes.iput_object.d.T_iput_object_15
try {
- Class.forName("dot.junit.opcodes.iput_object.d.T_iput_object_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_object_15().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
-
-
+
+
/**
- * @constraint B1
+ * @constraint B1
* @title iput-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 iput-object shall not work for char fields
*/
public void testVFE15() {
@@ -249,10 +244,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-object shall not work for int fields
*/
public void testVFE16() {
@@ -263,10 +258,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-object shall not work for byte fields
*/
public void testVFE17() {
@@ -277,10 +272,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-object shall not work for boolean fields
*/
public void testVFE18() {
@@ -293,8 +288,8 @@
}
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-object shall not work for short fields
*/
public void testVFE6() {
@@ -306,11 +301,11 @@
}
}
-
+
/**
- * @constraint B6
- * @title instance fields may only be accessed on already initialized instances.
+ * @constraint B6
+ * @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
try {
@@ -320,7 +315,7 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
* @constraint n/a
* @title Modification of final field in other class
@@ -329,10 +324,9 @@
//@uses dot.junit.opcodes.iput_object.TestStubs
//@uses dot.junit.opcodes.iput_object.d.T_iput_object_11
try {
- Class.forName("dot.junit.opcodes.iput_object.d.T_iput_object_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_object_11().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_object_10.java b/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_object_10.java
new file mode 100644
index 0000000..01e9cb6
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_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.iput_object.d;
+
+public class T_iput_object_10 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_object_15.java b/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_object_15.java
new file mode 100644
index 0000000..84667f8
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_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.iput_object.d;
+
+public class T_iput_object_15 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_object_17.java b/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_object_17.java
new file mode 100644
index 0000000..6db4b58
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_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.iput_object.d;
+
+public class T_iput_object_17 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_object_7.java b/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_object_7.java
new file mode 100644
index 0000000..60bba2f
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_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.iput_object.d;
+
+public class T_iput_object_7 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_object_8.java b/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_object_8.java
new file mode 100644
index 0000000..f104e78
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_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.iput_object.d;
+
+public class T_iput_object_8 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_object_9.java b/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_object_9.java
new file mode 100644
index 0000000..7b53911
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_object/d/T_iput_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.iput_object.d;
+
+public class T_iput_object_9 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_short/Test_iput_short.java b/tools/vm-tests/src/dot/junit/opcodes/iput_short/Test_iput_short.java
index d3c44b9..0ea32e5 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/iput_short/Test_iput_short.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_short/Test_iput_short.java
@@ -19,10 +19,16 @@
import dot.junit.DxTestCase;
import dot.junit.DxUtil;
import dot.junit.opcodes.iput_short.d.T_iput_short_1;
+import dot.junit.opcodes.iput_short.d.T_iput_short_10;
import dot.junit.opcodes.iput_short.d.T_iput_short_11;
import dot.junit.opcodes.iput_short.d.T_iput_short_12;
import dot.junit.opcodes.iput_short.d.T_iput_short_13;
import dot.junit.opcodes.iput_short.d.T_iput_short_14;
+import dot.junit.opcodes.iput_short.d.T_iput_short_15;
+import dot.junit.opcodes.iput_short.d.T_iput_short_17;
+import dot.junit.opcodes.iput_short.d.T_iput_short_7;
+import dot.junit.opcodes.iput_short.d.T_iput_short_8;
+import dot.junit.opcodes.iput_short.d.T_iput_short_9;
public class Test_iput_short extends DxTestCase {
/**
@@ -35,7 +41,7 @@
assertEquals(77, t.st_i1);
}
-
+
/**
* @title modification of final field
*/
@@ -57,7 +63,7 @@
t.run();
assertEquals(77, t.getProtectedField());
}
-
+
/**
* @title expected NullPointerException
*/
@@ -70,11 +76,11 @@
// expected
}
}
-
-
+
+
/**
- * @constraint A11
+ * @constraint A11
* @title constant pool index
*/
public void testVFE1() {
@@ -87,8 +93,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -102,23 +108,22 @@
/**
- *
- * @constraint B14
- * @title put short into long field - only field with same name but
+ *
+ * @constraint B14
+ * @title put short into long field - only field with same name but
* different type exists
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.iput_short.d.T_iput_short_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_short_17().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
+
/**
- *
- * @constraint B14
+ *
+ * @constraint B14
* @title put value '66000' into byte field
*/
public void testVFE6() {
@@ -131,9 +136,9 @@
}
/**
- *
+ *
* @constraint B14
- * @title type of field doesn't match opcode - attempt to modify double
+ * @title type of field doesn't match opcode - attempt to modify double
* field with single-width register
*/
public void testVFE7() {
@@ -144,87 +149,77 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint A11
- * @title Attempt to set static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ *
+ * @constraint A11
+ * @title Attempt to set static field.
*/
public void testVFE8() {
try {
- Class.forName("dot.junit.opcodes.iput_short.d.T_iput_short_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_short_7().run();
+ fail("expected IncompatibleClassChangeError");
+ } catch (IncompatibleClassChangeError t) {
}
}
-
+
/**
* @constraint B12
- * @title Attempt to modify inaccessible protected field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify inaccessible protected field.
*/
public void testVFE9() {
//@uses dot.junit.opcodes.iput_short.TestStubs
//@uses dot.junit.opcodes.iput_short.d.T_iput_short_8
try {
- Class.forName("dot.junit.opcodes.iput_short.d.T_iput_short_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput_short.d.T_iput_short_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput_short.d.T_iput_short_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.iput_short.d.T_iput_short_1
//@uses dot.junit.opcodes.iput_short.d.T_iput_short_15
try {
- Class.forName("dot.junit.opcodes.iput_short.d.T_iput_short_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_short_15().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
-
-
+
+
/**
- * @constraint B1
+ * @constraint B1
* @title iput-short shall not work for wide numbers
*/
public void testVFE13() {
@@ -235,10 +230,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-short shall not work for reference fields
*/
public void testVFE14() {
@@ -249,10 +244,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-short shall not work for char fields
*/
public void testVFE15() {
@@ -263,10 +258,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-short shall not work for int fields
*/
public void testVFE16() {
@@ -277,10 +272,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-short shall not work for byte fields
*/
public void testVFE17() {
@@ -291,10 +286,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-short shall not work for boolean fields
*/
public void testVFE18() {
@@ -308,8 +303,8 @@
/**
- * @constraint B6
- * @title instance fields may only be accessed on already initialized instances.
+ * @constraint B6
+ * @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
try {
@@ -319,7 +314,7 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
* @constraint n/a
* @title Modification of final field in other class
@@ -328,10 +323,9 @@
//@uses dot.junit.opcodes.iput_short.TestStubs
//@uses dot.junit.opcodes.iput_short.d.T_iput_short_11
try {
- Class.forName("dot.junit.opcodes.iput_short.d.T_iput_short_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_short_11().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_short_10.java b/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_short_10.java
new file mode 100644
index 0000000..eb01ab1
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_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.iput_short.d;
+
+public class T_iput_short_10 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_short_15.java b/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_short_15.java
new file mode 100644
index 0000000..17398b7
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_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.iput_short.d;
+
+public class T_iput_short_15 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_short_17.java b/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_short_17.java
new file mode 100644
index 0000000..b89d34b
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_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.iput_short.d;
+
+public class T_iput_short_17 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_short_7.java b/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_short_7.java
new file mode 100644
index 0000000..6969f12
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_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.iput_short.d;
+
+public class T_iput_short_7 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_short_8.d b/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_short_8.d
index 0fc4550..05b5100 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_short_8.d
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_short_8.d
@@ -27,8 +27,8 @@
.method public run()V
.limit regs 3
- new-instance v0, Ldot/junit/opcodes/iput/TestStubs;
- invoke-direct {v0}, dot/junit/opcodes/iput/TestStubs/<init>()V
+ new-instance v0, Ldot/junit/opcodes/iput_short/TestStubs;
+ invoke-direct {v0}, dot/junit/opcodes/iput_short/TestStubs/<init>()V
const v1, 0
iput-short v1, v0, dot.junit.opcodes.iput_short.TestStubs.TestStubField S
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_short_8.java b/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_short_8.java
new file mode 100644
index 0000000..689c54b
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_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.iput_short.d;
+
+public class T_iput_short_8 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_short_9.java b/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_short_9.java
new file mode 100644
index 0000000..7f81b96
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_short/d/T_iput_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.iput_short.d;
+
+public class T_iput_short_9 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_wide/Test_iput_wide.java b/tools/vm-tests/src/dot/junit/opcodes/iput_wide/Test_iput_wide.java
index a0cac2d..a61bb70 100644
--- a/tools/vm-tests/src/dot/junit/opcodes/iput_wide/Test_iput_wide.java
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_wide/Test_iput_wide.java
@@ -18,16 +18,22 @@
import dot.junit.DxTestCase;
import dot.junit.DxUtil;
-import dot.junit.opcodes.iput_wide.d.T_iput_wide_13;
import dot.junit.opcodes.iput_wide.d.T_iput_wide_1;
+import dot.junit.opcodes.iput_wide.d.T_iput_wide_10;
import dot.junit.opcodes.iput_wide.d.T_iput_wide_11;
import dot.junit.opcodes.iput_wide.d.T_iput_wide_12;
+import dot.junit.opcodes.iput_wide.d.T_iput_wide_13;
import dot.junit.opcodes.iput_wide.d.T_iput_wide_14;
+import dot.junit.opcodes.iput_wide.d.T_iput_wide_15;
+import dot.junit.opcodes.iput_wide.d.T_iput_wide_17;
import dot.junit.opcodes.iput_wide.d.T_iput_wide_5;
+import dot.junit.opcodes.iput_wide.d.T_iput_wide_7;
+import dot.junit.opcodes.iput_wide.d.T_iput_wide_8;
+import dot.junit.opcodes.iput_wide.d.T_iput_wide_9;
public class Test_iput_wide extends DxTestCase {
/**
- * @title put long into field
+ * @title put long into field
*/
public void testN1() {
T_iput_wide_1 t = new T_iput_wide_1();
@@ -35,7 +41,7 @@
t.run();
assertEquals(778899112233l, t.st_i1);
}
-
+
/**
* @title put double into field
*/
@@ -46,7 +52,7 @@
assertEquals(0.5d, t.st_i1);
}
-
+
/**
* @title modification of final field
*/
@@ -68,7 +74,7 @@
t.run();
assertEquals(77, t.getProtectedField());
}
-
+
/**
* @title expected NullPointerException
*/
@@ -81,11 +87,11 @@
// expected
}
}
-
-
+
+
/**
- * @constraint A11
+ * @constraint A11
* @title constant pool index
*/
public void testVFE1() {
@@ -98,8 +104,8 @@
}
/**
- *
- * @constraint A23
+ *
+ * @constraint A23
* @title number of registers
*/
public void testVFE2() {
@@ -113,26 +119,25 @@
/**
- *
- * @constraint B14
- * @title put int into long field - only field with same name but
+ *
+ * @constraint B14
+ * @title put int into long field - only field with same name but
* different type exists
*/
public void testVFE5() {
try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_wide_17().run();
+ fail("expected NoSuchFieldError");
+ } catch (NoSuchFieldError t) {
}
}
-
-
+
+
/**
- *
+ *
* @constraint B14
- * @title type of field doesn't match opcode - attempt to modify float
+ * @title type of field doesn't match opcode - attempt to modify float
* field with double-width register
*/
public void testVFE7() {
@@ -143,88 +148,78 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint A11
- * @title Attempt to set non-static field. Java throws IncompatibleClassChangeError
- * on first access but Dalvik throws VerifyError on class loading.
+ *
+ * @constraint A11
+ * @title Attempt to set non-static field.
*/
public void testVFE8() {
try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_wide_7().run();
+ fail("expected IncompatibleClassChangeError");
+ } catch (IncompatibleClassChangeError t) {
}
}
-
+
/**
* @constraint B12
- * @title Attempt to modify inaccessible protected field. Java throws IllegalAccessError
- * on first access but Dalvik throws VerifyError on class loading.
+ * @title Attempt to modify inaccessible protected field.
*/
public void testVFE9() {
//@uses dot.junit.opcodes.iput_wide.TestStubs
//@uses dot.junit.opcodes.iput_wide.d.T_iput_wide_8
try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.
*/
public void testVFE10() {
try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.
*/
public void testVFE11() {
try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_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.
*/
public void testVFE12() {
//@uses dot.junit.opcodes.iput_wide.d.T_iput_wide_1
//@uses dot.junit.opcodes.iput_wide.d.T_iput_wide_15
try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ new T_iput_wide_15().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
-
-
+
+
/**
- * @constraint B1
+ * @constraint B1
* @title iput-wide shall not work for single-width numbers
*/
public void testVFE13() {
@@ -235,10 +230,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-wide shall not work for reference fields
*/
public void testVFE14() {
@@ -249,10 +244,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-wide shall not work for char fields
*/
public void testVFE15() {
@@ -263,10 +258,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-wide shall not work for int fields
*/
public void testVFE16() {
@@ -277,10 +272,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-wide shall not work for byte fields
*/
public void testVFE17() {
@@ -291,10 +286,10 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-wide shall not work for boolean fields
*/
public void testVFE18() {
@@ -307,8 +302,8 @@
}
/**
- *
- * @constraint B1
+ *
+ * @constraint B1
* @title iput-wide shall not work for short fields
*/
public void testVFE6() {
@@ -319,12 +314,12 @@
DxUtil.checkVerifyException(t);
}
}
-
-
+
+
/**
- * @constraint B6
- * @title instance fields may only be accessed on already initialized instances.
+ * @constraint B6
+ * @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
try {
@@ -334,7 +329,7 @@
DxUtil.checkVerifyException(t);
}
}
-
+
/**
* @constraint n/a
* @title Modification of final field in other class
@@ -342,11 +337,10 @@
public void testE5() {
//@uses dot.junit.opcodes.iput_wide.TestStubs
//@uses dot.junit.opcodes.iput_wide.d.T_iput_wide_11
- try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
+ try {
+ new T_iput_wide_11().run();
+ fail("expected IllegalAccessError");
+ } catch (IllegalAccessError t) {
}
}
}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_wide_10.java b/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_wide_10.java
new file mode 100644
index 0000000..9653b55
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_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.iput_wide.d;
+
+public class T_iput_wide_10 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_wide_15.java b/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_wide_15.java
new file mode 100644
index 0000000..9818c22
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_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.iput_wide.d;
+
+public class T_iput_wide_15 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_wide_17.java b/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_wide_17.java
new file mode 100644
index 0000000..60c005e
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_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.iput_wide.d;
+
+public class T_iput_wide_17 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_wide_7.java b/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_wide_7.java
new file mode 100644
index 0000000..e476c01
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_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.iput_wide.d;
+
+public class T_iput_wide_7 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_wide_8.java b/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_wide_8.java
new file mode 100644
index 0000000..dc2e2bf
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_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.iput_wide.d;
+
+public class T_iput_wide_8 {
+ public void run() {
+ }
+}
diff --git a/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_wide_9.java b/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_wide_9.java
new file mode 100644
index 0000000..c9d1da2
--- /dev/null
+++ b/tools/vm-tests/src/dot/junit/opcodes/iput_wide/d/T_iput_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.iput_wide.d;
+
+public class T_iput_wide_9 {
+ public void run() {
+ }
+}