v2 / vlib / v / tests / options / option_alias_eq_test.v
18 lines · 15 sloc · 217 bytes · 6488041a749df9762348d019c4223908c476f2e2
Raw
1struct MyStruct {
2 field int
3}
4
5pub type MyOpt = ?MyStruct
6
7fn empty() map[string]MyOpt {
8 return {}
9}
10
11fn test_empty() {
12 expected := {
13 'key': ?MyOpt(none)
14 }
15 assert dump(expected) == {
16 'key': ?MyOpt(none)
17 }
18}
19