mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Pass when assert returns a false value
This commit is contained in:
+2
-1
@@ -44,7 +44,8 @@ def assert(str = 'Assertion failed', iso = '')
|
||||
begin
|
||||
$mrbtest_assert = []
|
||||
$mrbtest_assert_idx = 0
|
||||
if(!yield || $mrbtest_assert.size > 0)
|
||||
yield
|
||||
if($mrbtest_assert.size > 0)
|
||||
$asserts.push(assertion_string('Fail: ', str, iso, nil))
|
||||
$ko_test += 1
|
||||
t_print('F')
|
||||
|
||||
Reference in New Issue
Block a user