v2 / vlib / v / tests / options / option_array_submodule_test.v
19 lines · 15 sloc · 315 bytes · 6488041a749df9762348d019c4223908c476f2e2
Raw
1import another_module as amodule
2
3fn test_submodule_array_instance() {
4 x := ?[]amodule.SomeStruct{}
5 dump(x)
6 assert x == none
7
8 y := ?amodule.SomeStruct(none)
9 dump(y)
10 assert y == none
11
12 w := ?[]amodule.SomeStruct(none)
13 dump(w)
14 assert w == none
15
16 z := ?[2]amodule.SomeStruct(none)
17 dump(z)
18 assert z == none
19}
20