diff options
Diffstat (limited to 'test/ruby/test_gc.rb')
-rw-r--r-- | test/ruby/test_gc.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index dfe5e31cfb..4218dab888 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -166,6 +166,16 @@ class TestGc < Test::Unit::TestCase eom end + def test_profiler_total_time + GC::Profiler.enable + GC::Profiler.clear + + GC.start + assert_operator(GC::Profiler.total_time, :>, 0) + ensure + GC::Profiler.disable + end + def test_finalizing_main_thread assert_in_out_err(%w[--disable-gems], <<-EOS, ["\"finalize\""], [], "[ruby-dev:46647]") ObjectSpace.define_finalizer(Thread.main) { p 'finalize' } |