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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
374
f87ba6507260 added missing meta-data
thomask
parents: 70
diff changeset
1 // $HeadURL$
f87ba6507260 added missing meta-data
thomask
parents: 70
diff changeset
2 // $Date$
f87ba6507260 added missing meta-data
thomask
parents: 70
diff changeset
3 // $Author$
f87ba6507260 added missing meta-data
thomask
parents: 70
diff changeset
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
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
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
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
9
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
10 int count=0;
390
0b6abb63f92d fixed wchar->dchar
thomask
parents: 374
diff changeset
11 dchar tmp;
0b6abb63f92d fixed wchar->dchar
thomask
parents: 374
diff changeset
12 foreach(dchar value ; string){
4
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
13 tmp=value;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
14 count++;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
15 }
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
16 assert(count==1);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
17 assert(tmp==0x01D0D3);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
18
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
19 return 0;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
20 }