v2 / vlib / v / tests / options / option_import_struct_test.v
17 lines · 13 sloc · 333 bytes · 6488041a749df9762348d019c4223908c476f2e2
Raw
1module main
2
3import another_module as aaa
4
5fn test_import_opt_struct_from_another_module() {
6 x := ?aaa.SomeStruct{}
7 assert dump(x == none) == true
8}
9
10fn test(a ?aaa.SomeStruct) ?aaa.SomeStruct {
11 return none
12}
13
14fn test_fn_decl_with_struct_from_another_module() {
15 x := test(?aaa.SomeStruct(none))
16 assert dump(x == none) == true
17}
18