javaclass

Change of tests/SwitchTest.java

146:1dc70ce13680
tests/SwitchTest.java
     1.1 --- a/tests/SwitchTest.java	Sun Jan 23 01:01:34 2005 +0100
     1.2 +++ b/tests/SwitchTest.java	Sun Jan 23 01:01:40 2005 +0100
     1.3 @@ -18,4 +18,30 @@
     1.4  
     1.5          return x;
     1.6      }
     1.7 +
     1.8 +    public static void main(String[] args) {
     1.9 +        SwitchTest test = new SwitchTest();
    1.10 +        if (test.test(0) == 10) {
    1.11 +            System.out.println("test.test(0) correct: " + test.test(0));
    1.12 +        } else {
    1.13 +            System.err.println("test.test(0) failed!");
    1.14 +        }
    1.15 +        if (test.test(1) == 11) {
    1.16 +            System.out.println("test.test(1) correct: " + test.test(1));
    1.17 +        } else {
    1.18 +            System.err.println("test.test(1) failed!");
    1.19 +        }
    1.20 +        if (test.test(2) == 22) {
    1.21 +            System.out.println("test.test(2) correct: " + test.test(2));
    1.22 +        } else {
    1.23 +            System.err.println("test.test(2) failed!");
    1.24 +        }
    1.25 +        if (test.test(3) == 3) {
    1.26 +            System.out.println("test.test(3) correct: " + test.test(3));
    1.27 +        } else {
    1.28 +            System.err.println("test.test(3) failed!");
    1.29 +        }
    1.30 +    }
    1.31  }
    1.32 +
    1.33 +// vim: tabstop=4 expandtab shiftwidth=4