v2 / vlib / v / tests / conditions / matches / match_aliases_test.v
10 lines · 9 sloc · 149 bytes · 8e35f4d9848f7ad35d857a187dddbfd2eca5e19d
Raw
1fn test_match_aliases() {
2 a := u8(97)
3 ret := match a {
4 `0`...`9`, `a`...`f` { 'OK' }
5 else { 'NOT OK' }
6 }
7
8 println(ret)
9 assert ret == 'OK'
10}
11