mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Count skip tests
This commit is contained in:
+4
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user