summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/Android.common.mk2
-rw-r--r--src/verifier/method_verifier_test.cc8
-rw-r--r--test/107-int-math2/expected.txt35
-rw-r--r--test/107-int-math2/info.txt2
-rw-r--r--test/107-int-math2/src/Main.java (renamed from test/IntMath/IntMath.java)22
5 files changed, 48 insertions, 21 deletions
diff --git a/build/Android.common.mk b/build/Android.common.mk
index 9d41e01..d7d8365 100644
--- a/build/Android.common.mk
+++ b/build/Android.common.mk
@@ -408,7 +408,6 @@ TEST_DEX_DIRECTORIES := \
AllFields \
CreateMethodSignature \
ExceptionHandle \
- IntMath \
Interfaces \
Main \
MyClass \
@@ -428,7 +427,6 @@ TEST_OAT_DIRECTORIES := \
Main \
HelloWorld \
\
- IntMath \
ParallelGC \
ReferenceMap \
StackWalk \
diff --git a/src/verifier/method_verifier_test.cc b/src/verifier/method_verifier_test.cc
index 9c9c745..8d4c513 100644
--- a/src/verifier/method_verifier_test.cc
+++ b/src/verifier/method_verifier_test.cc
@@ -55,13 +55,5 @@ TEST_F(MethodVerifierTest, LibCore) {
VerifyDexFile(java_lang_dex_file_);
}
-TEST_F(MethodVerifierTest, IntMath) {
- ScopedObjectAccess soa(Thread::Current());
- jobject class_loader = LoadDex("IntMath");
- Class* klass = class_linker_->FindClass("LIntMath;", soa.Decode<ClassLoader*>(class_loader));
- std::string error_msg;
- ASSERT_TRUE(MethodVerifier::VerifyClass(klass, error_msg) == MethodVerifier::kNoFailure) << error_msg;
-}
-
} // namespace verifier
} // namespace art
diff --git a/test/107-int-math2/expected.txt b/test/107-int-math2/expected.txt
new file mode 100644
index 0000000..b131cc2
--- /dev/null
+++ b/test/107-int-math2/expected.txt
@@ -0,0 +1,35 @@
+divideLongByBillion PASSED
+unopTest PASSED
+shiftTest1 PASSED
+shiftTest2 PASSED
+unsignedShiftTest PASSED
+convTest PASSED
+charSubTest PASSED
+intOperTest PASSED
+lit16Test PASSED
+lit8Test PASSED
+intShiftTest PASSED
+longOperTest PASSED
+longShiftTest PASSED
+switchTest PASSED
+testIntCompare PASSED
+testLongCompare PASSED
+testFloatCompare PASSED
+testDoubleCompare PASSED
+fibonacci PASSED
+throwAndCatch PASSED
+testClassCast PASSED
+testArrayStore PASSED
+testStackOverflow PASSED
+testArrayAllocation PASSED
+manyArgs PASSED
+virtualCall PASSED
+testGetPut PASSED
+staticFieldTest PASSED
+catchBlock(1000) PASSED
+catchBlock(7000) PASSED
+catchBlockNoThrow PASSED
+superTest PASSED
+constClassTest PASSED
+constStringTest PASSED
+instanceTest PASSED
diff --git a/test/107-int-math2/info.txt b/test/107-int-math2/info.txt
new file mode 100644
index 0000000..2b1c485
--- /dev/null
+++ b/test/107-int-math2/info.txt
@@ -0,0 +1,2 @@
+A forked and extended version of IntMath from 003-omnibus-opcodes.
+TODO: fold back into 003-omnibus-opcodes.
diff --git a/test/IntMath/IntMath.java b/test/107-int-math2/src/Main.java
index 65894a3..d737ff5 100644
--- a/test/IntMath/IntMath.java
+++ b/test/107-int-math2/src/Main.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-class IntMath extends IntMathBase {
+class Main extends IntMathBase {
public static boolean mBoolean1, mBoolean2;
public static byte mByte1, mByte2;
@@ -29,12 +29,12 @@ class IntMath extends IntMathBase {
private int foo_;
- public IntMath(int stuff) {
+ public Main(int stuff) {
super();
foo_ = stuff;
}
- public IntMath() {
+ public Main() {
super();
foo_ = 123;
}
@@ -66,7 +66,7 @@ class IntMath extends IntMathBase {
static int instanceTest(int x) {
IntMathBase a = new IntMathBase();
- IntMath b = new IntMath();
+ Main b = new Main();
if (!(null instanceof IntMathBase)) {
x = x + 42;
@@ -76,7 +76,7 @@ class IntMath extends IntMathBase {
x = x * 2;
}
- if (a instanceof IntMath) {
+ if (a instanceof Main) {
x = x + 13;
}
@@ -84,7 +84,7 @@ class IntMath extends IntMathBase {
x = x -1;
}
- if (b instanceof IntMath) {
+ if (b instanceof Main) {
x = x + 1333;
}
return x;
@@ -96,8 +96,8 @@ class IntMath extends IntMathBase {
}
static int superTest(int x) {
- IntMath instance = new IntMath();
- IntMath base = instance;
+ Main instance = new Main();
+ Main base = instance;
int val1 = instance.tryThing();
int val2 = base.tryThing();
return val1 + val2 + x;
@@ -770,14 +770,14 @@ class IntMath extends IntMathBase {
static int staticCall(int a)
{
- IntMath foo = new IntMath();
+ Main foo = new Main();
return foo.virtualCall(a);
}
static int testIGetPut(int a)
{
- IntMath foo = new IntMath(99);
- IntMath foo123 = new IntMath();
+ Main foo = new Main(99);
+ Main foo123 = new Main();
int z = foo.getFoo();
z += a;
z += foo123.getFoo();