1.1 --- a/tests/ArrayTest.java Tue Jan 18 17:17:29 2005 +0100
1.2 +++ b/tests/ArrayTest.java Tue Jan 18 17:47:24 2005 +0100
1.3 @@ -8,4 +8,25 @@
1.4 public int get(int index) {
1.5 return array[index];
1.6 }
1.7 +
1.8 + public static void main(String[] args) {
1.9 + ArrayTest test = new ArrayTest(10);
1.10 + if (test.array.length != 10) {
1.11 + System.err.println("test.array.length failed!");
1.12 + } else {
1.13 + System.out.println("test.array.length correct: " + test.array.length);
1.14 + }
1.15 + for (int i = 0; i < test.array.length; i++) {
1.16 + test.array[i] = i + 10;
1.17 + }
1.18 + for (int j = 0; j < test.array.length; j++) {
1.19 + if (test.get(j) != j + 10) {
1.20 + System.err.println("test.get(" + j + ") failed!");
1.21 + } else {
1.22 + System.out.println("test.get(" + j + ") correct: " + test.get(j));
1.23 + }
1.24 + }
1.25 + }
1.26 }
1.27 +
1.28 +// vim: tabstop=4 expandtab shiftwidth=4