[llvm-commits] CVS: llvm-java/test/Programs/SingleSource/UnitTests/ArrayCopy.java
Alkis Evlogimenos
alkis at cs.uiuc.edu
Wed Feb 2 07:54:28 PST 2005
Changes in directory llvm-java/test/Programs/SingleSource/UnitTests:
ArrayCopy.java updated: 1.1 -> 1.2
---
Log message:
java.lang.Math uses JNI calls that are not implemented yet.
---
Diffs of the changes: (+5 -1)
ArrayCopy.java | 6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-)
Index: llvm-java/test/Programs/SingleSource/UnitTests/ArrayCopy.java
diff -u llvm-java/test/Programs/SingleSource/UnitTests/ArrayCopy.java:1.1 llvm-java/test/Programs/SingleSource/UnitTests/ArrayCopy.java:1.2
--- llvm-java/test/Programs/SingleSource/UnitTests/ArrayCopy.java:1.1 Wed Feb 2 01:12:08 2005
+++ llvm-java/test/Programs/SingleSource/UnitTests/ArrayCopy.java Wed Feb 2 09:54:17 2005
@@ -2,6 +2,10 @@
public class ArrayCopy
{
+ public static int min(int a, int b) {
+ return a < b ? a : b;
+ }
+
public static void main(String[] args) {
int[] iarray1 = new int[10];
for (int i = 0; i < iarray1.length; ++i)
@@ -9,7 +13,7 @@
int[] iarray2 = new int[123];
for (int i = 0; i < iarray2.length; i += iarray1.length)
- System.arraycopy(iarray1, 0, iarray2, i, Math.min(iarray2.length - i, iarray1.length));
+ System.arraycopy(iarray1, 0, iarray2, i, min(iarray2.length - i, iarray1.length));
for (int i = 0; i < iarray2.length; ++i)
Test.println(iarray2[i]);
More information about the llvm-commits
mailing list