1
0
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:
Alexander Medvednikov 2019-12-07 22:39:53 +03:00
parent 751ba48bf5
commit c019dd6f98

View File

@ -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)
}