summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJeff Hao <jeffhao@google.com>2015-06-23 17:34:04 -0700
committerJeff Hao <jeffhao@google.com>2015-06-23 17:34:04 -0700
commite7c7d8ed18a4e1d2291af78944ff913319ec1f23 (patch)
treea16f79bc17260b544bd7855706c55816321d8b81 /test
parent0cffac0c639d81e77d82c29ed423c91fb4da073b (diff)
downloadart-e7c7d8ed18a4e1d2291af78944ff913319ec1f23.zip
art-e7c7d8ed18a4e1d2291af78944ff913319ec1f23.tar.gz
art-e7c7d8ed18a4e1d2291af78944ff913319ec1f23.tar.bz2
Adding optimizing compiler test case for String.<init>.
Bug: 21991156 Change-Id: Ibd0bd7d3b20680ac06ac08cb857595288c4e9b69
Diffstat (limited to 'test')
-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 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;
}