mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #3876 from bamchoh/patch-2
Use same format between Fail and Skip
This commit is contained in:
+3
-2
@@ -20,7 +20,8 @@ end
|
||||
def assertion_string(err, str, iso=nil, e=nil, bt=nil)
|
||||
msg = "#{err}#{str}"
|
||||
msg += " [#{iso}]" if iso && iso != ''
|
||||
msg += " => #{e.message}" if e
|
||||
msg += " => #{e.cause}" if e && e.respond_to?(:cause)
|
||||
msg += " => #{e.message}" if e && !e.respond_to?(:cause)
|
||||
msg += " (mrbgems: #{GEMNAME})" if Object.const_defined?(:GEMNAME)
|
||||
if $mrbtest_assert && $mrbtest_assert.size > 0
|
||||
$mrbtest_assert.each do |idx, assert_msg, diff|
|
||||
@@ -56,7 +57,7 @@ def assert(str = 'Assertion failed', iso = '')
|
||||
rescue Exception => e
|
||||
bt = e.backtrace if $mrbtest_verbose
|
||||
if e.class.to_s == 'MRubyTestSkip'
|
||||
$asserts.push "Skip: #{str} #{iso} #{e.cause}"
|
||||
$asserts.push(assertion_string('Skip: ', str, iso, e, nil))
|
||||
t_print('?')
|
||||
else
|
||||
$asserts.push(assertion_string("#{e.class}: ", str, iso, e, bt))
|
||||
|
||||
Reference in New Issue
Block a user