Count skip tests

This commit is contained in:
KOBAYASHI Shuji
2019-03-05 19:53:25 +09:00
parent 06dae1a9b6
commit 650ca7da17
+4 -1
View File
@@ -1,6 +1,7 @@
$ok_test = 0
$ko_test = 0
$kill_test = 0
$skip_test = 0
$asserts = []
$test_start = Time.now if Object.const_defined?(:Time)
@@ -57,6 +58,7 @@ def assert(str = 'Assertion failed', iso = '')
end
rescue MRubyTestSkip => e
$asserts.push(assertion_string('Skip: ', str, iso, e))
$skip_test += 1
t_print('?')
rescue Exception => e
bt = e.backtrace if $mrbtest_verbose
@@ -220,12 +222,13 @@ def report()
t_print("#{msg}\n")
end
$total_test = $ok_test+$ko_test+$kill_test
$total_test = $ok_test + $ko_test + $kill_test + $skip_test
t_print("Total: #{$total_test}\n")
t_print(" OK: #{$ok_test}\n")
t_print(" KO: #{$ko_test}\n")
t_print("Crash: #{$kill_test}\n")
t_print(" Skip: #{$skip_test}\n")
if Object.const_defined?(:Time)
t_time = Time.now - $test_start