307
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Andrew Fedoniouk <news@terrainformatica.com>
|
|
6 // @date@ 2005-03-10
|
|
7 // @uri@ news:d0otkq$1fsg$1@digitaldaemon.com
|
|
8 // @url@ nntp://news.digitalmars.com/digitalmars.D.bugs/3137
|
|
9
|
|
10 module dstress.run.struct_initialization_06;
|
|
11
|
|
12 struct A {
|
|
13 int one;
|
|
14 int two[4];
|
|
15 }
|
|
16
|
|
17 A a = { one:1, two:2 };
|
|
18
|
|
19 int main(){
|
1086
|
20 if(a.one != 1){
|
|
21 assert(0);
|
|
22 }
|
|
23 if(a.two[0] != 2){
|
|
24 assert(0);
|
|
25 }
|
|
26 if(a.two[1] != 2){
|
|
27 assert(0);
|
|
28 }
|
|
29 if(a.two[2] != 2){
|
|
30 assert(0);
|
|
31 }
|
|
32 if(a.two[3] != 2){
|
|
33 assert(0);
|
|
34 }
|
307
|
35 return 0;
|
|
36 }
|