Mercurial > projects > dstress
annotate run/foreach_04.d @ 1597:8b9d4d2f925a
Fix typos in complex tests. See D bug 614.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Tue, 09 Sep 2008 16:53:58 +0200 |
parents | f87ba6507260 |
children |
rev | line source |
---|---|
374 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 module dstress.run.foreach_04; | |
0 | 6 |
7 int main(){ | |
8 int array[3]; | |
9 array[0]=0; | |
10 array[1]=2; | |
11 array[2]=4; | |
12 int count=0; | |
13 assert(count==0); | |
14 foreach(int index, int value; array){ | |
15 assert(index*2==value); | |
16 count++; | |
17 } | |
18 assert(count==3); | |
19 return 0; | |
1 | 20 } |