v2 / vlib / v / tests / concurrency / chan_push_enum_test.v
11 lines · 10 sloc · 124 bytes · 4a35ffd01bdc92b62b972f5ba0ebdef786f89d11
Raw
1enum FooBar {
2 foo
3 bar
4}
5
6fn test_chan_push_enum() {
7 ch := chan FooBar{cap: 10}
8 ch <- .foo
9 println(<-ch)
10 assert true
11}
12