test/ruby/test_io.rb (test_write_no_garbage): Add detailed message

I saw this test failed once.  There is no problem if `before > after`
but we cannot check it.  To allow diagnosis in future, the detailed
message is added.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2017-11-04 13:05:05 +00:00
parent e92ca247d2
commit 0ec91a46ac

View File

@ -3656,7 +3656,7 @@ __END__
s = w.syswrite(buf)
after = ObjectSpace.count_objects(res)[:T_STRING]
assert_equal before, after,
'no strings left over after write [ruby-core:78898] [Bug #13085]'
"no strings left over after write [ruby-core:78898] [Bug #13085]: #{ before } strings before write -> #{ after } strings after write"
assert_not_predicate buf, :frozen?, 'no inadvertent freeze'
assert_equal buf.bytesize, n, 'IO#write wrote expected size'
assert_equal s, n, 'IO#syswrite wrote expected size'