diff options
author | Jeff Hao <jeffhao@google.com> | 2015-06-24 17:05:42 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-24 17:05:43 +0000 |
commit | 466efcc89c7e55bf90d2af0aa92cc5e8fc2bd4f2 (patch) | |
tree | f24c1262cbe2d5ff719f83d485a8d29650a565cf /test | |
parent | 286763464072ffb599846f76720c7ec54392ae6e (diff) | |
parent | e7c7d8ed18a4e1d2291af78944ff913319ec1f23 (diff) | |
download | art-466efcc89c7e55bf90d2af0aa92cc5e8fc2bd4f2.zip art-466efcc89c7e55bf90d2af0aa92cc5e8fc2bd4f2.tar.gz art-466efcc89c7e55bf90d2af0aa92cc5e8fc2bd4f2.tar.bz2 |
Merge "Adding optimizing compiler test case for String.<init>." into mnc-dev
Diffstat (limited to 'test')
-rw-r--r-- | test/401-optimizing-compiler/src/Main.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/401-optimizing-compiler/src/Main.java b/test/401-optimizing-compiler/src/Main.java index 7c3fd25..a1e62b3 100644 --- a/test/401-optimizing-compiler/src/Main.java +++ b/test/401-optimizing-compiler/src/Main.java @@ -110,6 +110,11 @@ public class Main { if (result != 42) { throw new Error("Unexpected result: " + result); } + + String s = $opt$StringInit(); + if (!s.equals("hello world")) { + throw new Error("Unexpected string: " + s); + } } public static void invokePrivate() { @@ -230,5 +235,9 @@ public class Main { return array.length; } + public static String $opt$StringInit() { + return new String("hello world"); + } + Object o; } |