Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
conditions
/
matches
/
match_in_if_expression_test.v
13
lines
·
13
sloc
·
178 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
fn
test_match_in_if_expression() {
2
num := 3
3
str :=
'a'
4
res :=
if
num
in
[1, 3] {
5
match
str {
6
'a'
{
'A'
}
7
else
{
'ODD'
}
8
}
9
}
else
{
10
'NONE'
11
}
12
assert res ==
'A'
13
}
14