add mrbtest verbose mode ('-v' option)

This commit is contained in:
Akira Yumiyama
2013-02-02 12:30:06 +09:00
parent d3c7755975
commit 7c67bfedfd
2 changed files with 8 additions and 1 deletions
+2
View File
@@ -23,6 +23,7 @@ end
# which will be tested by this
# assertion
def assert(str = 'Assertion failed', iso = '')
print(str, (iso != '' ? " [#{iso}]" : ''), ' : ') if $mrbtest_verbose
begin
if(!yield)
$asserts.push(assertion_string('Fail: ', str, iso))
@@ -37,6 +38,7 @@ def assert(str = 'Assertion failed', iso = '')
$kill_test += 1
print('X')
end
print("\n") if $mrbtest_verbose
end
##