summaryrefslogtreecommitdiff
path: root/test/objspace/test_objspace.rb
diff options
context:
space:
mode:
-rw-r--r--test/objspace/test_objspace.rb15
1 files changed, 13 insertions, 2 deletions
@@ -414,7 +414,7 @@ class TestObjSpace < Test::Unit::TestCase
@obj1 = Object.new
GC.start
@obj2 = Object.new
- ObjectSpace.dump_all(output: :stdout, since: gc_gen)
end
p dump_my_heap_please
@@ -422,7 +422,7 @@ class TestObjSpace < Test::Unit::TestCase
assert_equal 'nil', output.pop
since = output.shift.to_i
assert_operator output.size, :>, 0
- generations = output.map { |l| JSON.parse(l)["generation"] }.uniq.sort
assert_equal [since, since + 1], generations
end
end
@@ -479,6 +479,7 @@ class TestObjSpace < Test::Unit::TestCase
output.each { |l|
obj = JSON.parse(l)
next if obj["type"] == "ROOT"
assert_not_nil obj["slot_size"]
assert_equal 0, obj["slot_size"] % GC::INTERNAL_CONSTANTS[:RVALUE_SIZE]
@@ -794,6 +795,16 @@ class TestObjSpace < Test::Unit::TestCase
assert_equal name, JSON.parse(dump)["method"], dump
end
private
def utf8_❨╯°□°❩╯︵┻━┻