ruby-changes:48531
From: mame <ko1@a...>
Date: Sat, 4 Nov 2017 22:05:10 +0900 (JST)
Subject: [ruby-changes:48531] mame:r60646 (trunk): test/ruby/test_io.rb (test_write_no_garbage): Add detailed message
mame 2017-11-04 22:05:05 +0900 (Sat, 04 Nov 2017) New Revision: 60646 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60646 Log: 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. Modified files: trunk/test/ruby/test_io.rb Index: test/ruby/test_io.rb =================================================================== --- test/ruby/test_io.rb (revision 60645) +++ test/ruby/test_io.rb (revision 60646) @@ -3656,7 +3656,7 @@ __END__ https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L3656 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' -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/