Mercurial > projects > dstress
comparison run/mini/marray2.d @ 1628:c6ef09dfba4d
add mini test set from ldc project
author | Moritz Warning <moritzwarning@web.de> |
---|---|
date | Mon, 10 Jan 2011 19:47:18 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1627:e1b954780837 | 1628:c6ef09dfba4d |
---|---|
1 module tangotests.marray2; | |
2 | |
3 void main() | |
4 { | |
5 int[][] ma = new int[][](2,4); | |
6 assert(ma.length == 2); | |
7 assert(ma[0].length == 4); | |
8 assert(ma[1].length == 4); | |
9 ma[0][3] = 32; | |
10 ma[1][2] = 123; | |
11 ma[0][0] = 55; | |
12 assert(ma[0][3] == 32); | |
13 assert(ma[1][2] == 123); | |
14 assert(ma[0][0] == 55); | |
15 } |