1.1 --- a/tests/MultiArrayTest.java Sat Jan 22 23:35:05 2005 +0100
1.2 +++ b/tests/MultiArrayTest.java Sat Jan 22 23:35:05 2005 +0100
1.3 @@ -8,4 +8,32 @@
1.4 public int get(int index1, int index2) {
1.5 return multiArray[index1][index2];
1.6 }
1.7 +
1.8 + public static void main(String[] args) {
1.9 + int[] sizes = {4, 7};
1.10 + MultiArrayTest test = new MultiArrayTest(sizes);
1.11 + if (test.multiArray.length != 4) {
1.12 + System.err.println("test.multiArray.length failed!");
1.13 + } else {
1.14 + System.out.println("test.multiArray.length correct: " + test.multiArray.length);
1.15 + }
1.16 + if (test.multiArray[0].length != 7) {
1.17 + System.err.println("test.multiArray[0].length failed!");
1.18 + } else {
1.19 + System.out.println("test.multiArray[0].length correct: " + test.multiArray[0].length);
1.20 + }
1.21 + if (test.multiArray[3][6] != 0) {
1.22 + System.err.println("test.multiArray[3][6] failed!");
1.23 + } else {
1.24 + System.out.println("test.multiArray[3][6] correct: " + test.multiArray[3][6]);
1.25 + }
1.26 + test.multiArray[3][6] = 36;
1.27 + if (test.get(3, 6) != 36) {
1.28 + System.err.println("test.get(3, 6) failed!");
1.29 + } else {
1.30 + System.out.println("test.get(3, 6) correct: " + test.get(3, 6));
1.31 + }
1.32 + }
1.33 }
1.34 +
1.35 +// vim: tabstop=4 expandtab shiftwidth=4