summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-27 19:02:24 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-27 19:02:24 +0000
commit492d120877e6687fa27d68c3bb17f776d14340fc (patch)
treef855117e27b1b8878bee6017068d64553b8c9efb /test/ruby
parent8f709e143a80d823e7acf3cdd761cc8dc0748689 (diff)
* gc.c (GC.stat): added. [ruby-dev:38607]
* test/ruby/test_gc.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_gc.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb
index 1bd3df4c1a..039240f1e0 100644
--- a/test/ruby/test_gc.rb
+++ b/test/ruby/test_gc.rb
@@ -51,4 +51,16 @@ class TestGc < Test::Unit::TestCase
GC.start
assert_operator(c, :<, GC.count)
end
+
+ def test_stat
+ res = GC.stat
+ assert_equal(false, res.empty?)
+ assert_kind_of(Integer, res[:count])
+
+ arg = Hash.new
+ res = GC.stat(arg)
+ assert_equal(arg, res)
+ assert_equal(false, res.empty?)
+ assert_kind_of(Integer, res[:count])
+ end
end