diff options
author | Ian Rogers <irogers@google.com> | 2013-01-11 10:17:27 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-01-11 10:18:02 -0800 |
commit | 3a226e3b1980a9c0814c20be628bae91848fa408 (patch) | |
tree | c96b5ff7f1e3adc9a47156dae43bf4195e0f11ee /test | |
parent | e4dd006b59cce58aa8322bfefa298aec611cf03f (diff) | |
parent | 54a63fdbeccf8f976dfa8af741629d013c24476e (diff) | |
download | android_art-3a226e3b1980a9c0814c20be628bae91848fa408.tar.gz android_art-3a226e3b1980a9c0814c20be628bae91848fa408.tar.bz2 android_art-3a226e3b1980a9c0814c20be628bae91848fa408.zip |
Merge "Move MemUsage into run-test." into dalvik-dev
Diffstat (limited to 'test')
-rw-r--r-- | test/103-string-append/expected.txt | 1 | ||||
-rw-r--r-- | test/103-string-append/info.txt | 1 | ||||
-rw-r--r-- | test/103-string-append/src/Main.java | 31 | ||||
-rw-r--r-- | test/MemUsage/MemUsage.java | 15 |
4 files changed, 33 insertions, 15 deletions
diff --git a/test/103-string-append/expected.txt b/test/103-string-append/expected.txt new file mode 100644 index 0000000000..f75da10caf --- /dev/null +++ b/test/103-string-append/expected.txt @@ -0,0 +1 @@ +Test complete diff --git a/test/103-string-append/info.txt b/test/103-string-append/info.txt new file mode 100644 index 0000000000..f8be9b4a92 --- /dev/null +++ b/test/103-string-append/info.txt @@ -0,0 +1 @@ +Simple test that triggers GC by appending to a String. diff --git a/test/103-string-append/src/Main.java b/test/103-string-append/src/Main.java new file mode 100644 index 0000000000..12b1d8eac9 --- /dev/null +++ b/test/103-string-append/src/Main.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +public class Main { + public static final int ROUNDS = 16; + public static final int SIZE = 8 * 1024; + + public static void main(String [] args) { + String s; + for (int j = 0; j < ROUNDS; j++) { + s = ""; + for (int i = 0; i < SIZE; i++) { + s += "x"; + } + } + System.out.println("Test complete"); + } +} diff --git a/test/MemUsage/MemUsage.java b/test/MemUsage/MemUsage.java deleted file mode 100644 index 710031bb20..0000000000 --- a/test/MemUsage/MemUsage.java +++ /dev/null @@ -1,15 +0,0 @@ - -public class MemUsage { - public static final int ROUNDS = 8; - public static final int SIZE = 2000; - - public static void main(String [] args) { - String s; - for (int j = 0; j < ROUNDS; j++) { - s = ""; - for (int i = 0; i < SIZE; i++) { - s += "x"; - } - } - } -} |