v2 / vlib / v / tests / c_structs / cstruct_nested_anon_test.c.v
23 lines · 20 sloc · 258 bytes · e861b73eaf7ddad36ec4633eda3a4c2cfe2efc15
Raw
1module main
2
3#insert "@VMODROOT/deep.h"
4
5struct C.DeepStruct {
6 A1 int
7 S1 struct {
8 A2 int
9 S2 struct {
10 A3 int
11 S3 struct {
12 A4 int
13 }
14 }
15 }
16}
17
18fn test_cstruct_nested_anon() {
19 x := C.DeepStruct{}
20 y := C.DeepStruct{}
21 dump(x)
22 assert x == y
23}
24