summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-10 10:38:13 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-10 10:38:13 +0000
commit7f75a1a810fa031bb6ff31166d8ada09a27e9f35 (patch)
tree330f2f30fc34407dc8cb81b6c18121b79f633119 /test
parentdeab71578bb6f92a2e3cc24ef166fac2484d4f05 (diff)
* ext/objspace/objspace.c: add ObjectSpace.count_imemo_objects method
to count imemo objects for each type. * test/objspace/test_objspace.rb: add a test. * NEWS: describe about this addition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/objspace/test_objspace.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb
index 3870414..665fafe 100644
--- a/test/objspace/test_objspace.rb
+++ b/test/objspace/test_objspace.rb
@@ -79,6 +79,17 @@ class TestObjSpace < Test::Unit::TestCase
assert_not_empty(arg)
end
+ def test_count_imemo_objects
+ res = ObjectSpace.count_imemo_objects
+ puts
+ pp res
+ assert_not_empty(res)
+ assert_not_nil(res[:imemo_cref])
+ arg = {}
+ res = ObjectSpace.count_imemo_objects(arg)
+ assert_not_empty(res)
+ end
+
def test_reachable_objects_from
assert_separately %w[--disable-gem -robjspace], __FILE__, __LINE__, <<-'eom'
assert_equal(nil, ObjectSpace.reachable_objects_from(nil))