diff options
author | 2017-11-09 15:58:36 +0000 | |
---|---|---|
committer | 2017-11-09 16:02:58 +0000 | |
commit | 0e9e85316e41860dff3ff8d54b42801c51b69b78 (patch) | |
tree | 3bdba5a8edd61cca1309643f67c6c22d58be0532 | |
parent | 972e654c147b64737bdd242bd18a74429af82bc6 (diff) |
Clean up 669-moveable-string-class-equals.
This is a follow-up addressing late comments on
https://android-review.googlesource.com/531015 .
The --no-dex2oat in unnecessary since
https://android-review.googlesource.com/531270 .
Test: 669-moveable-string-class-equals (--jit)
Bug: 68181300
Change-Id: Ia978a1cacec7a3aec78e4c132d78c0031f3f5cd9
-rwxr-xr-x | test/669-moveable-string-class-equals/run | 2 | ||||
-rw-r--r-- | test/669-moveable-string-class-equals/src/Main.java | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/test/669-moveable-string-class-equals/run b/test/669-moveable-string-class-equals/run index d0ab6f8d55..7c74d8ca0e 100755 --- a/test/669-moveable-string-class-equals/run +++ b/test/669-moveable-string-class-equals/run @@ -16,4 +16,4 @@ # Run without image, so that String.class is moveable. # Reduce heap size to force more frequent GCs. -${RUN} --no-image --no-dex2oat --runtime-option -Xmx16m "$@" +${RUN} --no-image --runtime-option -Xmx16m "$@" diff --git a/test/669-moveable-string-class-equals/src/Main.java b/test/669-moveable-string-class-equals/src/Main.java index 4badadeae4..d182d51a25 100644 --- a/test/669-moveable-string-class-equals/src/Main.java +++ b/test/669-moveable-string-class-equals/src/Main.java @@ -43,6 +43,10 @@ public class Main { array[i] = "V" + i; } + // Continually check string equality between a newly allocated String and an + // already allocated String with the same contents while allocating over 128MiB + // memory (with heap size limited to 16MiB), ensuring we run GC and stress the + // instanceof check in the String.equals() implementation. for (int count = 0; count != 128 * 1024; ++count) { for (int i = 0; i != length; ++i) { allocateAtLeast1KiB(); |