Mercurial > projects > dstress
annotate run/foreach_12.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$ | |
0 | 4 |
374 | 5 module dstress.run.foreach_12; |
0 | 6 |
7 int main(){ | |
8 char[] array="abc"; | |
9 int count=0; | |
10 assert(count==0); | |
11 foreach(char value; array){ | |
12 count++; | |
13 if(value=='b'){ | |
14 break; | |
15 } | |
16 } | |
17 assert(count==2); | |
18 return 0; | |
1 | 19 } |