diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-09 02:01:54 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-09 02:01:54 +0000 |
commit | b9d00698c8280fbb1f95dcbec63d12357a078248 (patch) | |
tree | e9bcdc820d90c2da044f43a28b85884185ea7e4f /test/objspace | |
parent | 9f81048b45a3c8cc984568ad8d2e94f9a209ebfc (diff) | |
download | ruby-b9d00698c8280fbb1f95dcbec63d12357a078248.tar.gz |
Revert "ext/objspace/objspace_dump.c: print addresses consistently"
This reverts commit r64970.
Visual C++ 12.0 doesn't have PRIxPTR.
Anyway we have our own vfprintf implementation BSD_vfprintf().
If you want to have portable vfprintf, replace it with BSD_vfprintf like
vsnprintf or just use BSD_vfprintf.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/objspace')
-rw-r--r-- | test/objspace/test_objspace.rb | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb index 947170203a..0e1ad327b9 100644 --- a/test/objspace/test_objspace.rb +++ b/test/objspace/test_objspace.rb @@ -318,62 +318,6 @@ class TestObjSpace < Test::Unit::TestCase end end - def test_dump_addresses_match_dump_all_addresses - assert_in_out_err(%w[-robjspace], "#{<<-"begin;"}\n#{<<-'end;'}") do |output, error| - begin; - def dump_my_heap_please - obj = Object.new - puts ObjectSpace.dump(obj) - ObjectSpace.dump_all(output: $stdout) - end - - dump_my_heap_please - end; - needle = JSON.parse(output.first) - addr = needle['address'] - found = output.drop(1).find { |l| JSON.parse(l)['address'] == addr } - assert found, "object #{addr} should be findable in full heap dump" - end - end - - def test_dump_class_addresses_match_dump_all_addresses - assert_in_out_err(%w[-robjspace], "#{<<-"begin;"}\n#{<<-'end;'}") do |output, error| - begin; - def dump_my_heap_please - obj = Object.new - puts ObjectSpace.dump(obj) - ObjectSpace.dump_all(output: $stdout) - end - - dump_my_heap_please - end; - needle = JSON.parse(output.first) - addr = needle['class'] - found = output.drop(1).find { |l| JSON.parse(l)['address'] == addr } - assert found, "object #{addr} should be findable in full heap dump" - end - end - - def test_dump_reference_addresses_match_dump_all_addresses - assert_in_out_err(%w[-robjspace], "#{<<-"begin;"}\n#{<<-'end;'}") do |output, error| - begin; - def dump_my_heap_please - obj = Object.new - obj2 = Object.new - obj2.instance_variable_set(:@ref, obj) - puts ObjectSpace.dump(obj) - ObjectSpace.dump_all(output: $stdout) - end - - dump_my_heap_please - end; - needle = JSON.parse(output.first) - addr = needle['address'] - found = output.drop(1).find { |l| (JSON.parse(l)['references'] || []).include? addr } - assert found, "object #{addr} should be findable in full heap dump" - end - end - def test_dump_all entry = /"bytesize":11, "value":"TEST STRING", "encoding":"UTF-8", "file":"-", "line":4, "method":"dump_my_heap_please", "generation":/ |