Various fixes to vm tests for new verifier.
Change-Id: I8f3232ae6dd3c62bbdb53ece8706a9ea281bf846
This changes the expected results of various tests cases to match the
new verifier:
- invalid version number test bumped up to never be valid
- add-long/2addr, add-double/2addr tests for mixing long/double changed
from using const to define type which can be ambiguous
- if-eqz can't take float values for arguments, and a test for this
failure already exists, so the extra tests were removed
- invoke-super/invoke-virtual superclass ToInt method should use
float-to-int, not int-to-float
diff --git a/tools/vm-tests-tf/src/dot/junit/format/f1/d/T_f1_3.dfh b/tools/vm-tests-tf/src/dot/junit/format/f1/d/T_f1_3.dfh
index cdfa4a8..0b32ce7 100644
--- a/tools/vm-tests-tf/src/dot/junit/format/f1/d/T_f1_3.dfh
+++ b/tools/vm-tests-tf/src/dot/junit/format/f1/d/T_f1_3.dfh
@@ -1,10 +1,10 @@
// Processing 'out/classes_dasm/dot/junit/format/f1/d/T_f1_3.dex'...
-// Opened 'out/classes_dasm/dot/junit/format/f1/d/T_f1_3.dex', DEX version '035'
+// Opened 'out/classes_dasm/dot/junit/format/f1/d/T_f1_3.dex', DEX version '999'
// DEX file header:
// parsed: offset 0, len 8: magic : 'dex
-// 035'
-//@mod 64 65 78 0A 30 33 35 00
- 64 65 78 0A 30 33 36 00
+// 999'
+//@mod 64 65 78 0A 39 39 39 00
+ 64 65 78 0A 39 39 39 00
// parsed: offset 8, len 4: checksum : df0f35a3
A3 35 0F DF
// parsed: offset 12, len 20: signature : b564...1b93
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_double/d/T_add_double_3.d b/tools/vm-tests-tf/src/dot/junit/opcodes/add_double/d/T_add_double_3.d
index ebdc492..548c00f 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_double/d/T_add_double_3.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_double/d/T_add_double_3.d
@@ -23,12 +23,10 @@
return-void
.end method
-.method public run()D
+.method public run(JD)D
.limit regs 7
- const-wide v2, 31415
- const-wide v4, 3.1415
- add-double v0, v2, v4
+ add-double v0, v3, v5
return-wide v0
.end method
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_double/d/T_add_double_3.java b/tools/vm-tests-tf/src/dot/junit/opcodes/add_double/d/T_add_double_3.java
index fadc09e..0f392ce 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_double/d/T_add_double_3.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_double/d/T_add_double_3.java
@@ -18,7 +18,7 @@
public class T_add_double_3 {
- public double run() {
+ public double run(long a, double b) {
return 1;
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_double_2addr/d/T_add_double_2addr_3.d b/tools/vm-tests-tf/src/dot/junit/opcodes/add_double_2addr/d/T_add_double_2addr_3.d
index 62f4198..dd559d34 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_double_2addr/d/T_add_double_2addr_3.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_double_2addr/d/T_add_double_2addr_3.d
@@ -23,13 +23,12 @@
return-void
.end method
-.method public run()D
+.method public run(J)D
.limit regs 7
- const-wide v2, 31415
- const-wide v4, 3.1415
- add-double/2addr v4, v2
- return-wide v4
+ const-wide v2, 3.1415
+ add-double/2addr v2, v5
+ return-wide v2
.end method
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_double_2addr/d/T_add_double_2addr_3.java b/tools/vm-tests-tf/src/dot/junit/opcodes/add_double_2addr/d/T_add_double_2addr_3.java
index 860bfc9..607347c 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_double_2addr/d/T_add_double_2addr_3.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_double_2addr/d/T_add_double_2addr_3.java
@@ -18,7 +18,7 @@
public class T_add_double_2addr_3 {
- public double run() {
+ public double run(long a) {
return 0;
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_long/d/T_add_long_6.d b/tools/vm-tests-tf/src/dot/junit/opcodes/add_long/d/T_add_long_6.d
index 435256f..03e77ee 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_long/d/T_add_long_6.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_long/d/T_add_long_6.d
@@ -23,12 +23,10 @@
return-void
.end method
-.method public run()J
+.method public run(JD)J
.limit regs 7
- const-wide v2, 31415
- const-wide v4, 3.1415
- add-long v0, v2, v4
+ add-long v0, v3, v5
return-wide v0
.end method
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_long/d/T_add_long_6.java b/tools/vm-tests-tf/src/dot/junit/opcodes/add_long/d/T_add_long_6.java
index 4cdc6c5..f52fb4d 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_long/d/T_add_long_6.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_long/d/T_add_long_6.java
@@ -18,7 +18,7 @@
public class T_add_long_6 {
- public long run() {
+ public long run(long a, double b) {
return 0;
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_long_2addr/d/T_add_long_2addr_6.d b/tools/vm-tests-tf/src/dot/junit/opcodes/add_long_2addr/d/T_add_long_2addr_6.d
index 7c842cc..906eabc 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_long_2addr/d/T_add_long_2addr_6.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_long_2addr/d/T_add_long_2addr_6.d
@@ -23,12 +23,11 @@
return-void
.end method
-.method public run()J
+.method public run(D)J
.limit regs 7
const-wide v2, 31415
- const-wide v4, 3.1415
- add-long/2addr v2, v4
+ add-long/2addr v2, v5
return-wide v2
.end method
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_long_2addr/d/T_add_long_2addr_6.java b/tools/vm-tests-tf/src/dot/junit/opcodes/add_long_2addr/d/T_add_long_2addr_6.java
index 8badad9..bcc8a54 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_long_2addr/d/T_add_long_2addr_6.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_long_2addr/d/T_add_long_2addr_6.java
@@ -18,7 +18,7 @@
public class T_add_long_2addr_6 {
- public long run() {
+ public long run(double a) {
return 0;
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/double_to_long/d/T_double_to_long_3.d b/tools/vm-tests-tf/src/dot/junit/opcodes/double_to_long/d/T_double_to_long_3.d
index 1f2293d..556aa4e 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/double_to_long/d/T_double_to_long_3.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/double_to_long/d/T_double_to_long_3.d
@@ -27,7 +27,6 @@
.method public run(J)J
.limit regs 8
- const-wide v6, 32380293
double-to-long v0, v6
const-wide v2, 123
return-wide v2
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/if_eqz/Test_if_eqz.java b/tools/vm-tests-tf/src/dot/junit/opcodes/if_eqz/Test_if_eqz.java
index f03ffd6..ebedd7f 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/if_eqz/Test_if_eqz.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/if_eqz/Test_if_eqz.java
@@ -46,23 +46,7 @@
T_if_eqz_1 t = new T_if_eqz_1();
assertEquals(1234, t.run(Integer.MIN_VALUE));
}
-
- /**
- * @title Arguments = Float.MAX_VALUE
- */
- public void testB3() {
- T_if_eqz_3 t = new T_if_eqz_3();
- assertEquals(1234, t.run(Float.MAX_VALUE));
- }
-
- /**
- * @title Arguments = Float.MIN_VALUE
- */
- public void testB4() {
- T_if_eqz_3 t = new T_if_eqz_3();
- assertEquals(1234, t.run(Float.MIN_VALUE));
- }
-
+
/**
* @title Arguments = 0
*/
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super/d/TSuper.d b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super/d/TSuper.d
index c7993b7..2e4f13f 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super/d/TSuper.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super/d/TSuper.d
@@ -31,7 +31,7 @@
.method public toInt(F)I
.limit regs 3
- int-to-float v0, v2
+ float-to-int v0, v2
return v0
.end method
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super_range/d/TSuper.d b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super_range/d/TSuper.d
index e9d0ff1..88def8a 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super_range/d/TSuper.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super_range/d/TSuper.d
@@ -31,7 +31,7 @@
.method public toInt(F)I
.limit regs 3
- int-to-float v0, v2
+ float-to-int v0, v2
return v0
.end method
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_virtual/d/TSuper.d b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_virtual/d/TSuper.d
index 3b7a591..1df3ae2 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_virtual/d/TSuper.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_virtual/d/TSuper.d
@@ -33,7 +33,7 @@
.method public toInt(F)I
.limit regs 3
- int-to-float v0, v2
+ float-to-int v0, v2
return v0
.end method
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_virtual_range/d/TSuper.d b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_virtual_range/d/TSuper.d
index 7b4d7b6..b375fc5 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_virtual_range/d/TSuper.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_virtual_range/d/TSuper.d
@@ -33,7 +33,7 @@
.method public toInt(F)I
.limit regs 3
- int-to-float v0, v2
+ float-to-int v0, v2
return v0
.end method