1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/v/tests/enum_array_field_test.v

21 lines
267 B
V

struct Abc {
mut:
flags []Flag
}
enum Flag {
flag_one
flag_two
}
fn test_enum_array_field() {
mut a := Abc{}
a.flags << .flag_one
assert true
a.flags << .flag_two
assert true
a.flags << .flag_one
println(a)
assert true
}