annotate tests/mini/marray1.d @ 341:1bb99290e03a trunk

[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
author lindquist
date Sun, 13 Jul 2008 02:51:19 +0200
parents tangotests/marray1.d@a3b7c19c866c
children
rev   line source
lindquist@286 1 module tangotest.marray1;
lindquist@286 2
lindquist@286 3 void main()
lindquist@286 4 {
lindquist@286 5 int[][] arr;
lindquist@286 6 int[] a = [1,2];
lindquist@286 7 int[] b = [6,7,8,9];
lindquist@286 8 arr ~= a;
lindquist@286 9 arr ~= b;
lindquist@286 10 assert(a.length == 2);
lindquist@286 11 assert(b.length == 4);
lindquist@286 12 assert(arr.length == 2);
lindquist@286 13 assert(arr[0][0] == 1);
lindquist@286 14 assert(arr[0][1] == 2);
lindquist@286 15 assert(arr[1][0] == 6);
lindquist@286 16 assert(arr[1][1] == 7);
lindquist@286 17 assert(arr[1][2] == 8);
lindquist@286 18 assert(arr[1][3] == 9);
lindquist@286 19 }