Merge pull request #3740 from christopheraue/fix_test_output

fixed printing failed assertions
This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-07-12 08:24:02 +09:00
committed by GitHub
+2 -2
View File
@@ -23,8 +23,8 @@ def assertion_string(err, str, iso=nil, e=nil, bt=nil)
msg += " => #{e.message}" if e
msg += " (mrbgems: #{GEMNAME})" if Object.const_defined?(:GEMNAME)
if $mrbtest_assert && $mrbtest_assert.size > 0
$mrbtest_assert.each do |idx, msg, diff|
msg += "\n - Assertion[#{idx}] Failed: #{msg}\n#{diff}"
$mrbtest_assert.each do |idx, assert_msg, diff|
msg += "\n - Assertion[#{idx}] Failed: #{assert_msg}\n#{diff}"
end
end
msg += "\nbacktrace:\n\t#{bt.join("\n\t")}" if bt