diff options
Diffstat (limited to 'test/-ext-/tracepoint')
-rw-r--r-- | test/-ext-/tracepoint/test_tracepoint.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/-ext-/tracepoint/test_tracepoint.rb b/test/-ext-/tracepoint/test_tracepoint.rb index 058809471f..efbf40b460 100644 --- a/test/-ext-/tracepoint/test_tracepoint.rb +++ b/test/-ext-/tracepoint/test_tracepoint.rb @@ -17,7 +17,7 @@ class TestTracepointObj < Test::Unit::TestCase nil } - newobj_count, free_count, gc_start_count, *newobjs = *result + newobj_count, free_count, gc_start_count, gc_end_count, *newobjs = *result assert_equal 2, newobj_count assert_equal 2, newobjs.size assert_equal 'foobar', newobjs[0] @@ -31,10 +31,15 @@ class TestTracepointObj < Test::Unit::TestCase } GC.stat(stat2) - newobj_count, free_count, gc_start_count, *newobjs = *result + newobj_count, free_count, gc_start_count, gc_end_count, *newobjs = *result assert_operator stat2[:total_allocated_object] - stat1[:total_allocated_object], :>=, newobj_count + assert_operator 1_000_000, :<=, newobj_count + assert_operator stat2[:total_freed_object] - stat1[:total_freed_object], :>=, free_count assert_operator stat2[:count] - stat1[:count], :==, gc_start_count + + assert_operator gc_start_count, :>=, gc_end_count + assert_operator stat2[:count] - stat1[:count] - 1, :<=, gc_end_count end end |