Commit 147c5c54 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #3380 from syucream/fix-assert

Pass when assert returns a false value
parents 392d7fbe f085baae
...@@ -44,7 +44,8 @@ def assert(str = 'Assertion failed', iso = '') ...@@ -44,7 +44,8 @@ def assert(str = 'Assertion failed', iso = '')
begin begin
$mrbtest_assert = [] $mrbtest_assert = []
$mrbtest_assert_idx = 0 $mrbtest_assert_idx = 0
if(!yield || $mrbtest_assert.size > 0) yield
if($mrbtest_assert.size > 0)
$asserts.push(assertion_string('Fail: ', str, iso, nil)) $asserts.push(assertion_string('Fail: ', str, iso, nil))
$ko_test += 1 $ko_test += 1
t_print('F') t_print('F')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment