PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/go/struct_initialization_runme.go

#
Go | 29 lines | 22 code | 7 blank | 0 comment | 12 complexity | 299811de1f818ab7e8284a78883bec3d MD5 | raw file
 1package main
 2
 3import . "./struct_initialization"
 4
 5func main() {
 6	if GetInstanceC1().GetX() != 10 {
 7		panic(0)
 8	}
 9
10	if GetInstanceD1().GetX() != 10 {
11		panic(0)
12	}
13
14	if GetInstanceD2().GetX() != 20 {
15		panic(0)
16	}
17
18	if GetInstanceD3().GetX() != 30 {
19		panic(0)
20	}
21
22	if GetInstanceE1().GetX() != 1 {
23		panic(0)
24	}
25
26	if GetInstanceF1().GetX() != 1 {
27		panic(0)
28	}
29}