diff options
author | Elliott Hughes <enh@google.com> | 2011-09-09 16:24:50 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2011-09-09 16:52:46 -0700 |
commit | 1240dade91d6c4bbf4e367ca608fcdc15348da45 (patch) | |
tree | d44767871d0febadc9773df9839c16977cde91be /test/SystemMethods | |
parent | 2d7404799fa4ca5d2dc925b3d411c642ff3cb4aa (diff) | |
download | art-1240dade91d6c4bbf4e367ca608fcdc15348da45.zip art-1240dade91d6c4bbf4e367ca608fcdc15348da45.tar.gz art-1240dade91d6c4bbf4e367ca608fcdc15348da45.tar.bz2 |
Test conversion of floats and doubles to strings.
There was some confusion about what Method::HasCode meant, and we weren't
quite ready to compile all methods _and_ be able to invoke them. We were
also missing a couple of native methods in Throwable that we need if we've
compiled all Throwable's code (because the next time we ask ClassLinker to
do anything, it'll try to throw NoClassDefFoundException from one of the
ClassLoaders, and that will try to run a Throwable constructor, which will
end up trying to call these native methods).
Change-Id: If4783f3c866aaa72413d7b7810ef2541d418ae33
Diffstat (limited to 'test/SystemMethods')
-rw-r--r-- | test/SystemMethods/SystemMethods.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SystemMethods/SystemMethods.java b/test/SystemMethods/SystemMethods.java index 3d76548..c968ae9 100644 --- a/test/SystemMethods/SystemMethods.java +++ b/test/SystemMethods/SystemMethods.java @@ -87,9 +87,22 @@ class SystemMethods { private static int i = 4; private static long j = 0x0123456789abcdefL; + private static float f = 3.14f; + private static double d = Math.PI; + public static int test4() { String s = "int=" + i + " long=" + j; System.logI(s); return 123; } + + public static int test5() { + System.logI("Float.toString"); + System.logI(Float.toString(f)); + System.logI("Double.toString"); + System.logI(Double.toString(d)); + String s = "int=" + i + " long=" + j + " float=" + f + " double=" + d; + System.logI(s); + return 123; + } } |