aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/old/vlib/v/tests/enum_array_field_test.v
diff options
context:
space:
mode:
Diffstat (limited to 'v_windows/v/old/vlib/v/tests/enum_array_field_test.v')
-rw-r--r--v_windows/v/old/vlib/v/tests/enum_array_field_test.v20
1 files changed, 20 insertions, 0 deletions
diff --git a/v_windows/v/old/vlib/v/tests/enum_array_field_test.v b/v_windows/v/old/vlib/v/tests/enum_array_field_test.v
new file mode 100644
index 0000000..7eaf09f
--- /dev/null
+++ b/v_windows/v/old/vlib/v/tests/enum_array_field_test.v
@@ -0,0 +1,20 @@
+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
+}