mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
test assert in functions that return values
This commit is contained in:
parent
751ba48bf5
commit
c019dd6f98
@ -133,3 +133,15 @@ fn test_anon_fn() {
|
|||||||
})
|
})
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn assert_in_bool_fn(v int) bool {
|
||||||
|
assert v < 3
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
fn test_assert_in_bool_fn() {
|
||||||
|
assert_in_bool_fn(2)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user