diff options
author | Jeff Hao <jeffhao@google.com> | 2015-06-23 17:34:04 -0700 |
---|---|---|
committer | Jeff Hao <jeffhao@google.com> | 2015-06-23 17:34:04 -0700 |
commit | e7c7d8ed18a4e1d2291af78944ff913319ec1f23 (patch) | |
tree | a16f79bc17260b544bd7855706c55816321d8b81 /test | |
parent | 0cffac0c639d81e77d82c29ed423c91fb4da073b (diff) | |
download | art-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.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; } |