summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jeff Hao <jeffhao@google.com> 2015-06-23 17:34:04 -0700
committer Jeff Hao <jeffhao@google.com> 2015-06-24 10:34:41 -0700
commit7d925a9dc0884097743fe122bf6d9c6c08259580 (patch)
treec5554ec0d2343b31ab64c7168ee404cb5d3857e4
parentf46e9d76c1fb99f0bb3a9a68f5b421d29ab25f7a (diff)
Adding optimizing compiler test case for String.<init>.
Bug: 21991156 (cherry-picked from commit e7c7d8ed18a4e1d2291af78944ff913319ec1f23) Change-Id: I282edaaa422f393629a09cb807da889422e33fb2
-rw-r--r--test/401-optimizing-compiler/src/Main.java9
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 7c3fd25ea7..a1e62b3b39 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;
}