v2 / vlib / v / tests / structs / struct_field_fixed_array_init_test.v
10 lines · 9 sloc · 140 bytes · 6488041a749df9762348d019c4223908c476f2e2
Raw
1struct Foo {
2mut:
3 bar [2]string
4}
5
6fn test_struct_field_fixed_array_init() {
7 foo := Foo{}
8 println(foo.bar[0])
9 assert foo.bar[0] == ''
10}
11