[llvm-commits] CVS: llvm-java/test/Programs/SingleSource/UnitTests/Test.java
Alkis Evlogimenos
alkis at cs.uiuc.edu
Thu Dec 16 14:46:08 PST 2004
Changes in directory llvm-java/test/Programs/SingleSource/UnitTests:
Test.java updated: 1.5 -> 1.6
---
Log message:
Use a getBytes(int, int, byte[], int) to print strings so that we
don't use an encoding manager to do so.
---
Diffs of the changes: (+6 -1)
Index: llvm-java/test/Programs/SingleSource/UnitTests/Test.java
diff -u llvm-java/test/Programs/SingleSource/UnitTests/Test.java:1.5 llvm-java/test/Programs/SingleSource/UnitTests/Test.java:1.6
--- llvm-java/test/Programs/SingleSource/UnitTests/Test.java:1.5 Sat Dec 11 21:30:57 2004
+++ llvm-java/test/Programs/SingleSource/UnitTests/Test.java Thu Dec 16 16:45:55 2004
@@ -9,7 +9,11 @@
public static native void println(long l);
public static native void println(float f);
public static native void println(double d);
-// public static void println(String s) { println(s.getBytes()); }
+ public static void println(String s) {
+ byte[] bytes = new byte[s.length()];
+ s.getBytes(0, s.length(), bytes, 0);
+ println(bytes);
+ }
private static native void println(byte[] a);
public static void main(String[] args) {
@@ -24,5 +28,6 @@
println(753.46);
println(-753.46);
println(new byte[] { 'H', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd' });
+ println("Hello world");
}
}
More information about the llvm-commits
mailing list