annotate run/foreach_16.d @ 1560:36bedfa079e6

D1 -> D2 : 2/N
author thomask
date Sun, 19 Aug 2007 19:15:01 +0000
parents 0b6abb63f92d
children
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(){
1560
36bedfa079e6 D1 -> D2 : 2/N
thomask
parents: 390
diff changeset
8 string x = 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;
1560
36bedfa079e6 D1 -> D2 : 2/N
thomask
parents: 390
diff changeset
12 foreach(dchar value ; x){
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 }