diff options
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 |
commit | a26babddfce488172648efcd18d8c9e672a71759 (patch) | |
tree | c2a2fd69d4d1d3a235113aa88ccae594faba1092 /test | |
parent | fef2a2947258a6e25b860061151932ff83fa81a2 (diff) | |
download | art-a26babddfce488172648efcd18d8c9e672a71759.zip art-a26babddfce488172648efcd18d8c9e672a71759.tar.gz art-a26babddfce488172648efcd18d8c9e672a71759.tar.bz2 |
Move ExceptionTest to a run-test.
Change-Id: Ied054e1770ccc86c470dfc8d06cab39fc3e97216
Diffstat (limited to 'test')
-rw-r--r-- | test/106-exceptions2/expected.txt | 4 | ||||
-rw-r--r-- | test/106-exceptions2/info.txt | 1 | ||||
-rw-r--r-- | test/106-exceptions2/src/Main.java (renamed from test/ExceptionTest/ExceptionTest.java) | 42 |
3 files changed, 26 insertions, 21 deletions
diff --git a/test/106-exceptions2/expected.txt b/test/106-exceptions2/expected.txt new file mode 100644 index 0000000..50472f7 --- /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 0000000..88b603f --- /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 3edae6d..7d5a64a 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); } |