summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2013-01-11 10:55:43 -0800
committer Ian Rogers <irogers@google.com> 2013-01-11 10:55:43 -0800
commita26babddfce488172648efcd18d8c9e672a71759 (patch)
treec2a2fd69d4d1d3a235113aa88ccae594faba1092
parentfef2a2947258a6e25b860061151932ff83fa81a2 (diff)
Move ExceptionTest to a run-test.
Change-Id: Ied054e1770ccc86c470dfc8d06cab39fc3e97216
-rw-r--r--build/Android.common.mk1
-rw-r--r--test/106-exceptions2/expected.txt4
-rw-r--r--test/106-exceptions2/info.txt1
-rw-r--r--test/106-exceptions2/src/Main.java (renamed from test/ExceptionTest/ExceptionTest.java)42
4 files changed, 26 insertions, 22 deletions
diff --git a/build/Android.common.mk b/build/Android.common.mk
index 6214adfd4d..9d41e01d99 100644
--- a/build/Android.common.mk
+++ b/build/Android.common.mk
@@ -428,7 +428,6 @@ TEST_OAT_DIRECTORIES := \
Main \
HelloWorld \
\
- ExceptionTest \
IntMath \
ParallelGC \
ReferenceMap \
diff --git a/test/106-exceptions2/expected.txt b/test/106-exceptions2/expected.txt
new file mode 100644
index 0000000000..50472f7ff8
--- /dev/null
+++ b/test/106-exceptions2/expected.txt
@@ -0,0 +1,4 @@
+nullCheckTestNoThrow PASSED
+nullCheckTestThrow PASSED
+checkAIOBE PASSED
+checkDivZero PASSED
diff --git a/test/106-exceptions2/info.txt b/test/106-exceptions2/info.txt
new file mode 100644
index 0000000000..88b603fc71
--- /dev/null
+++ b/test/106-exceptions2/info.txt
@@ -0,0 +1 @@
+Test runtime exceptions for potential regressions caused by the compiler.
diff --git a/test/ExceptionTest/ExceptionTest.java b/test/106-exceptions2/src/Main.java
index 3edae6d72c..7d5a64a99d 100644
--- a/test/ExceptionTest/ExceptionTest.java
+++ b/test/106-exceptions2/src/Main.java
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-class ExceptionTest {
+class Main {
public int ifoo;
/* Test requires visual inspection of object code to verify */
- int noThrow(ExceptionTest nonNullA,
- ExceptionTest nonNullB,
- ExceptionTest nonNullC) {
+ int noThrow(Main nonNullA,
+ Main nonNullB,
+ Main nonNullC) {
// "this" check should be eliminated on both IGET/IPUT
ifoo++;
@@ -53,12 +53,12 @@ class ExceptionTest {
}
/* Test to ensure we don't remove necessary null checks */
- int checkThrow(ExceptionTest nonNullA,
- ExceptionTest nonNullB,
- ExceptionTest nonNullC,
- ExceptionTest nullA,
- ExceptionTest nullB,
- ExceptionTest nullC) {
+ int checkThrow(Main nonNullA,
+ Main nonNullB,
+ Main nonNullC,
+ Main nullA,
+ Main nullB,
+ Main nullC) {
// "this" check should be eliminated on both IGET/IPUT
ifoo++;
@@ -131,22 +131,22 @@ class ExceptionTest {
static int nullCheckTestNoThrow(int x) {
- ExceptionTest base = new ExceptionTest();
- ExceptionTest a = new ExceptionTest();
- ExceptionTest b = new ExceptionTest();
- ExceptionTest c = new ExceptionTest();
+ Main base = new Main();
+ Main a = new Main();
+ Main b = new Main();
+ Main c = new Main();
base.ifoo = x;
return base.noThrow(a,b,c);
}
static int nullCheckTestThrow(int x) {
- ExceptionTest base = new ExceptionTest();
- ExceptionTest a = new ExceptionTest();
- ExceptionTest b = new ExceptionTest();
- ExceptionTest c = new ExceptionTest();
- ExceptionTest d = null;
- ExceptionTest e = null;
- ExceptionTest f = null;
+ Main base = new Main();
+ Main a = new Main();
+ Main b = new Main();
+ Main c = new Main();
+ Main d = null;
+ Main e = null;
+ Main f = null;
base.ifoo = x;
return base.checkThrow(a,b,c,d,e,f);
}