javaclass

Change of tests/StaticTest.java

146:1dc70ce13680
tests/StaticTest.java
     1.1 --- a/tests/StaticTest.java	Sun Jan 23 01:01:34 2005 +0100
     1.2 +++ b/tests/StaticTest.java	Sun Jan 23 01:01:40 2005 +0100
     1.3 @@ -3,6 +3,24 @@
     1.4      public static StaticTestClass staticMember = StaticTestClass.newInstance();
     1.5      public static StaticTestClass staticMember2 = StaticTestClass.newInstance(123);
     1.6      public static int staticMember3 = StaticTestClass.getNumber();
     1.7 +
     1.8 +    public static void main(String[] args) {
     1.9 +        if (StaticTest.staticMember != null && StaticTest.staticMember.x == 321) {
    1.10 +            System.out.println("StaticTest.staticMember.x correct: " + StaticTest.staticMember.x);
    1.11 +        } else {
    1.12 +            System.out.println("StaticTest.staticMember.x failed!");
    1.13 +        }
    1.14 +        if (StaticTest.staticMember2 != null && StaticTest.staticMember2.x == 123) {
    1.15 +            System.out.println("StaticTest.staticMember2.x correct: " + StaticTest.staticMember2.x);
    1.16 +        } else {
    1.17 +            System.out.println("StaticTest.staticMember2.x failed!");
    1.18 +        }
    1.19 +        if (StaticTest.staticMember3 == 456) {
    1.20 +            System.out.println("StaticTest.staticMember3 correct: " + StaticTest.staticMember3);
    1.21 +        } else {
    1.22 +            System.out.println("StaticTest.staticMember3 failed!");
    1.23 +        }
    1.24 +    }
    1.25  }
    1.26  
    1.27  class StaticTestClass {
    1.28 @@ -28,3 +46,5 @@
    1.29          return 456;
    1.30      }
    1.31  }
    1.32 +
    1.33 +// vim: tabstop=4 expandtab shiftwidth=4