v/compiler/tests/match_test.v

12 lines
154 B
Go
Raw Normal View History

2019-07-17 01:43:59 +02:00
fn test_switch() {
a := 3
mut b := 0
match a {
2 => println('two')
3 => println('three')
b = 3
4 => println('4')
}
assert b == 3
}