780
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 module dstress.run.f.foreach_31_B;
|
|
6
|
|
7 int main(){
|
|
8 int[] index;
|
|
9 char[] value;
|
|
10
|
|
11 foreach(int i, char c; "_\U00012345-"d){
|
|
12 index ~= i;
|
|
13 value ~= c;
|
|
14 }
|
|
15
|
|
16 assert(value.length == 6);
|
|
17 assert(value[0] == '_');
|
|
18 assert(value[1] == 0xF0);
|
|
19 assert(value[2] == 0x92);
|
|
20 assert(value[3] == 0x8D);
|
|
21 assert(value[4] == 0x85);
|
|
22 assert(value[5] == '-');
|
|
23
|
|
24 assert(index.length == 6);
|
|
25 assert(index[0] == 0);
|
|
26 assert(index[1] == 1);
|
|
27 assert(index[2] == 1);
|
|
28 assert(index[3] == 1);
|
|
29 assert(index[4] == 1);
|
|
30 assert(index[5] == 2);
|
|
31
|
|
32 return 0;
|
|
33 }
|