From c019dd6f98104728340441b84e8937160693eee0 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sat, 7 Dec 2019 22:39:53 +0300 Subject: [PATCH] test assert in functions that return values --- vlib/compiler/tests/fn_test.v | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vlib/compiler/tests/fn_test.v b/vlib/compiler/tests/fn_test.v index a48da30ec9..bb730b88ca 100644 --- a/vlib/compiler/tests/fn_test.v +++ b/vlib/compiler/tests/fn_test.v @@ -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) +} + + +