[llvm-commits] CVS: llvm-java/test/Programs/SingleSource/UnitTests/InnerClass.java Makefile
Alkis Evlogimenos
alkis at cs.uiuc.edu
Fri Dec 10 12:59:34 PST 2004
Changes in directory llvm-java/test/Programs/SingleSource/UnitTests:
InnerClass.java added (r1.1)
Makefile updated: 1.26 -> 1.27
---
Log message:
Add InnerClass test
---
Diffs of the changes: (+35 -0)
Index: llvm-java/test/Programs/SingleSource/UnitTests/InnerClass.java
diff -c /dev/null llvm-java/test/Programs/SingleSource/UnitTests/InnerClass.java:1.1
*** /dev/null Fri Dec 10 14:59:34 2004
--- llvm-java/test/Programs/SingleSource/UnitTests/InnerClass.java Fri Dec 10 14:59:24 2004
***************
*** 0 ****
--- 1,34 ----
+ public class InnerClass
+ {
+ private int i = 1024;
+ private boolean b = true;
+
+ public int i1() { return i; }
+ public boolean b1() { return b; }
+
+ InnerClassInner getInner() {
+ return new InnerClassInner();
+ }
+
+ public class InnerClassInner {
+ private int i = 512;
+ private boolean b = false;
+
+ public int ii1() { return i1(); }
+ public int ii2() { return i; }
+ public boolean bb1() { return b1(); }
+ public boolean bb2() { return b; }
+ }
+
+ public static void main(String[] args) {
+ InnerClass i = new InnerClass();
+ Test.print_int_ln(i.i1());
+ Test.print_boolean_ln(i.b1());
+
+ InnerClassInner ii = i.getInner();
+ Test.print_int_ln(ii.ii1());
+ Test.print_boolean_ln(ii.bb1());
+ Test.print_int_ln(ii.ii2());
+ Test.print_boolean_ln(ii.bb2());
+ }
+ }
Index: llvm-java/test/Programs/SingleSource/UnitTests/Makefile
diff -u llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.26 llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.27
--- llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.26 Fri Dec 10 14:09:53 2004
+++ llvm-java/test/Programs/SingleSource/UnitTests/Makefile Fri Dec 10 14:59:24 2004
@@ -17,6 +17,7 @@
FloatCompare \
ForLoop \
If \
+ InnerClass \
InstanceOf \
InterfaceCall \
Lists \
More information about the llvm-commits
mailing list