v2 / vlib / v / tests / fixed_array_init_with_init_test.v
20 lines · 17 sloc · 287 bytes · 2edfb583b40156bc9174dc90b658c5b3554ea220
Raw
1struct Structure1 {
2 world [2]Structure2
3}
4
5struct Structure2 {
6 liste []Structure3
7}
8
9struct Structure3 {
10 coo []int
11}
12
13fn test_main() {
14 app := Structure1{
15 world: [2]Structure2{init: Structure2{
16 liste: []Structure3{len: 1, init: Structure3{}}
17 }}
18 }
19 assert app.world.len == 2
20}
21