mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
14 lines
272 B
V
14 lines
272 B
V
fn test_if_expression_precedence_false_condition() {
|
|
b := 10
|
|
c := 20
|
|
res := 1 + if b > c { b } else { c } + 1
|
|
assert res == c + 2
|
|
}
|
|
|
|
fn test_if_expression_precedence_true_condition() {
|
|
b := 20
|
|
c := 10
|
|
res := 1 + if b > c { b } else { c } + 1
|
|
assert res == b + 2
|
|
}
|