[llvm-commits] CVS: llvm-java/test/Programs/SingleSource/UnitTests/Lists3.java
Alkis Evlogimenos
alkis at cs.uiuc.edu
Mon Jan 17 18:30:59 PST 2005
Changes in directory llvm-java/test/Programs/SingleSource/UnitTests:
Lists3.java added (r1.1)
---
Log message:
New test
---
Diffs of the changes: (+24 -0)
Index: llvm-java/test/Programs/SingleSource/UnitTests/Lists3.java
diff -c /dev/null llvm-java/test/Programs/SingleSource/UnitTests/Lists3.java:1.1
*** /dev/null Mon Jan 17 20:30:59 2005
--- llvm-java/test/Programs/SingleSource/UnitTests/Lists3.java Mon Jan 17 20:30:49 2005
***************
*** 0 ****
--- 1,24 ----
+ import java.util.*;
+
+ public class Lists3
+ {
+ public static void main(String[] args) {
+ LinkedList llist = new LinkedList();
+ for (int i = 0; i < 10; ++i) {
+ llist.add(new Integer(i));
+ }
+
+ Test.println(llist.contains(new Integer(5)));
+ Test.println(llist.getFirst().equals(new Integer(0)));
+ Test.println(llist.getLast().equals(new Integer(9)));
+ Test.println(llist.indexOf(new Integer(3)));
+ Test.println(llist.remove(new Integer(3)));
+ Test.println(llist.indexOf(new Integer(3)));
+ Test.println(((Integer)llist.removeFirst()).intValue());
+ Test.println(((Integer)llist.removeLast()).intValue());
+ Test.println(llist.size());
+
+ for (Iterator i = llist.iterator(); i.hasNext(); )
+ Test.println(((Integer)i.next()).intValue());
+ }
+ }
More information about the llvm-commits
mailing list