зеркало из https://github.com/github/ruby.git
GC.stat key name
* test/-ext-/tracepoint/test_tracepoint.rb: follow the change of key name of GC.stat. * test/ruby/test_hash.rb (TestHash#test_AREF_fstring_key): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
9b6bc26f87
Коммит
fa326bf312
|
@ -43,10 +43,10 @@ class TestTracepointObj < Test::Unit::TestCase
|
|||
|
||||
newobj_count, free_count, gc_start_count, gc_end_mark_count, gc_end_sweep_count, *newobjs = *result
|
||||
|
||||
assert_operator stat2[:total_allocated_object] - stat1[:total_allocated_object], :>=, newobj_count
|
||||
assert_operator stat2[:total_allocated_objects] - stat1[:total_allocated_objects], :>=, newobj_count
|
||||
assert_operator 1_000_000, :<=, newobj_count
|
||||
|
||||
assert_operator stat2[:total_freed_object] + stat2[:heap_final_slot] - stat1[:total_freed_object], :>=, free_count
|
||||
assert_operator stat2[:total_freed_objects] + stat2[:heap_final_slots] - stat1[:total_freed_objects], :>=, free_count
|
||||
assert_operator stat2[:count] - stat1[:count], :==, gc_start_count
|
||||
|
||||
assert_operator gc_start_count, :==, gc_end_mark_count
|
||||
|
|
|
@ -217,9 +217,9 @@ class TestHash < Test::Unit::TestCase
|
|||
|
||||
def test_AREF_fstring_key
|
||||
h = {"abc" => 1}
|
||||
before = GC.stat(:total_allocated_object)
|
||||
before = GC.stat(:total_allocated_objects)
|
||||
5.times{ h["abc"] }
|
||||
assert_equal before, GC.stat(:total_allocated_object)
|
||||
assert_equal before, GC.stat(:total_allocated_objects)
|
||||
end
|
||||
|
||||
def test_ASET_fstring_key
|
||||
|
|
Загрузка…
Ссылка в новой задаче