diff options
author | jeffhao <jeffhao@google.com> | 2011-09-29 15:05:18 -0700 |
---|---|---|
committer | jeffhao <jeffhao@google.com> | 2011-09-29 15:05:18 -0700 |
commit | abcfde3b9661618a88e170fac6fdf092a59eb993 (patch) | |
tree | 81b14e7b70438c8b2490bf7ae26a1707db26afd2 /test/StaticsFromCode/StaticsFromCode.java | |
parent | 557e027f86d86f801e1b48055f8116f2d83d3d5c (diff) | |
download | android_art-abcfde3b9661618a88e170fac6fdf092a59eb993.tar.gz android_art-abcfde3b9661618a88e170fac6fdf092a59eb993.tar.bz2 android_art-abcfde3b9661618a88e170fac6fdf092a59eb993.zip |
Fixed test for static final fields that don't use <clinit>.
Static final fields that are initialized by a compile-time constant
expression are replaced by copies of the constant value. This is done by
the compiler, and the dex file format passes it on.
Change-Id: I19c9b63508a4632ac32b8b877f33d68bfb3b054b
Diffstat (limited to 'test/StaticsFromCode/StaticsFromCode.java')
-rw-r--r-- | test/StaticsFromCode/StaticsFromCode.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/StaticsFromCode/StaticsFromCode.java b/test/StaticsFromCode/StaticsFromCode.java new file mode 100644 index 0000000000..b62d99e737 --- /dev/null +++ b/test/StaticsFromCode/StaticsFromCode.java @@ -0,0 +1,9 @@ +// Copyright 2011 Google Inc. All Rights Reserved. + +class StaticsFromCode { + static final Object s0 = "android"; + + static Object getS0() { + return s0; + } +} |