Mercurial > projects > dstress
annotate run/foreach_16.d @ 390:0b6abb63f92d
fixed wchar->dchar
Walter <walter@digitalmars.com>
2005-04-06
mail:001701c53ace$7e91de50$0200a8c0@colossus
author | thomask |
---|---|
date | Wed, 06 Apr 2005 18:25:21 +0000 |
parents | f87ba6507260 |
children | 36bedfa079e6 |
rev | line source |
---|---|
374 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
70
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
4
diff
changeset
|
5 module dstress.run.foreach_16; |
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
4
diff
changeset
|
6 |
4 | 7 int main(){ |
70
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
4
diff
changeset
|
8 char[] string = x"F0 9D 83 93"; // utf-8 for U+1D0D3 |
4 | 9 |
10 int count=0; | |
390 | 11 dchar tmp; |
12 foreach(dchar value ; string){ | |
4 | 13 tmp=value; |
14 count++; | |
15 } | |
16 assert(count==1); | |
17 assert(tmp==0x01D0D3); | |
18 | |
19 return 0; | |
20 } |