test/-ext-: suppress warnings

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-10-14 19:14:27 +00:00
parent 5f7f1e5162
commit 2e3d072d9d
5 changed files with 24 additions and 20 deletions

View file

@ -12,7 +12,7 @@ class TestTracepointObj < Test::Unit::TestCase
result = Bug.tracepoint_track_objspace_events{
99
'abc'
v="foobar"
_="foobar"
Object.new
nil
}
@ -22,6 +22,8 @@ class TestTracepointObj < Test::Unit::TestCase
assert_equal 2, newobjs.size
assert_equal 'foobar', newobjs[0]
assert_equal Object, newobjs[1].class
assert_operator free_count, :>=, 0
assert_operator gc_start_count, :>=, gc_end_count
end
def test_tracks_objspace_count
@ -37,7 +39,7 @@ class TestTracepointObj < Test::Unit::TestCase
GC.stat(stat2)
GC.enable
newobj_count, free_count, gc_start_count, gc_end_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