add debug print for the failure

http://ci.rvm.jp/results/trunk-gc-asserts@ruby-sp2-docker/4364584

```
  1) Failure:
TestObjSpace#test_dump_all [/tmp/ruby/src/trunk-gc-asserts/test/objspace/test_objspace.rb:599]:
number of strings.
<2> expected but was
<3>.
```
This commit is contained in:
Koichi Sasada 2022-12-28 15:46:16 +09:00
parent c6c7f5900f
commit 3931921607

View File

@ -580,7 +580,14 @@ class TestObjSpace < Test::Unit::TestCase
# This test makes assertions on the assignment to `str`, so we look for
# the second appearance of /TEST STRING/ in the output
test_string_in_dump_all = output.grep(/TEST2/)
assert_equal(2, test_string_in_dump_all.size, "number of strings")
begin
assert_equal(2, test_string_in_dump_all.size, "number of strings")
rescue Exception => e
STDERR.puts e.inspect
STDERR.puts test_string_in_dump_all
raise
end
entry_hash = JSON.parse(test_string_in_dump_all[1])