[llvm-commits] CVS: llvm-java/test/Programs/SingleSource/UnitTests/ArrayCopy.java
Alkis Evlogimenos
alkis at cs.uiuc.edu
Tue Feb 1 23:12:18 PST 2005
Changes in directory llvm-java/test/Programs/SingleSource/UnitTests:
ArrayCopy.java added (r1.1)
---
Log message:
Add test
---
Diffs of the changes: (+17 -0)
ArrayCopy.java | 17 +++++++++++++++++
1 files changed, 17 insertions(+)
Index: llvm-java/test/Programs/SingleSource/UnitTests/ArrayCopy.java
diff -c /dev/null llvm-java/test/Programs/SingleSource/UnitTests/ArrayCopy.java:1.1
*** /dev/null Wed Feb 2 01:12:18 2005
--- llvm-java/test/Programs/SingleSource/UnitTests/ArrayCopy.java Wed Feb 2 01:12:08 2005
***************
*** 0 ****
--- 1,17 ----
+ import java.util.*;
+
+ public class ArrayCopy
+ {
+ public static void main(String[] args) {
+ int[] iarray1 = new int[10];
+ for (int i = 0; i < iarray1.length; ++i)
+ iarray1[i] = i;
+
+ 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));
+
+ for (int i = 0; i < iarray2.length; ++i)
+ Test.println(iarray2[i]);
+ }
+ }
More information about the llvm-commits
mailing list