1.1 --- a/tests/FieldTest.java Sat Jan 22 23:35:05 2005 +0100
1.2 +++ b/tests/FieldTest.java Sat Jan 22 23:35:05 2005 +0100
1.3 @@ -7,6 +7,30 @@
1.4 public FieldTestClass f = new FieldTestClass(b + e.a);
1.5 public static FieldTestClass g;
1.6 public static FieldTestClass h = new FieldTestClass(789);
1.7 +
1.8 + public static void main(String[] args) {
1.9 + if (FieldTest.h != null && FieldTest.h.a == 789) {
1.10 + System.out.println("FieldTest.h.a correct: " + FieldTest.h.a);
1.11 + } else {
1.12 + System.out.println("FieldTest.h.a failed!");
1.13 + }
1.14 + FieldTest test = new FieldTest();
1.15 + if (test.h != null && test.h.a == 789) {
1.16 + System.out.println("test.h.a correct: " + test.h.a);
1.17 + } else {
1.18 + System.out.println("test.h.a failed!");
1.19 + }
1.20 + if (test.e != null && test.e.a == 456) {
1.21 + System.out.println("test.e.a correct: " + test.e.a);
1.22 + } else {
1.23 + System.out.println("test.e.a failed!");
1.24 + }
1.25 + if (test.f != null && test.f.a == 579) {
1.26 + System.out.println("test.f.a correct: " + test.f.a);
1.27 + } else {
1.28 + System.out.println("test.f.a failed!");
1.29 + }
1.30 + }
1.31 }
1.32
1.33 class FieldTestClass {
1.34 @@ -16,3 +40,5 @@
1.35 this.a = a;
1.36 }
1.37 }
1.38 +
1.39 +// vim: tabstop=4 expandtab shiftwidth=4