diff options
Diffstat (limited to 'test/ruby/test_gc.rb')
-rw-r--r-- | test/ruby/test_gc.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 72c38e4b27..42b249d0dc 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -32,4 +32,23 @@ class TestGc < Test::Unit::TestCase GC.stress = prev_stress end + + def test_enable_disable + GC.enable + assert_equal(false, GC.enable) + assert_equal(false, GC.disable) + assert_equal(true, GC.disable) + assert_equal(true, GC.disable) + assert_nil(GC.start) + assert_equal(true, GC.enable) + assert_equal(false, GC.enable) + ensure + GC.enable + end + + def test_count + c = GC.count + GC.start + assert_operator(c, :<, GC.count) + end end |