diff options
Diffstat (limited to 'test/ruby/test_gc.rb')
-rw-r--r-- | test/ruby/test_gc.rb | 12 |
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 |