1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Replace use of double_heap in tests with expand_heap

This commit is contained in:
Matt Valentine-House 2022-07-07 22:32:35 +01:00 committed by Peter Zhu
parent a6dd859aff
commit 6423d32e3b
Notes: git 2022-07-11 22:00:40 +09:00
2 changed files with 6 additions and 6 deletions

View file

@ -806,7 +806,7 @@ assert_equal "good", %q{
foo
begin
GC.verify_compaction_references(double_heap: true, toward: :empty)
GC.verify_compaction_references(expand_heap: true, toward: :empty)
rescue NotImplementedError
# in case compaction isn't supported
end

View file

@ -166,7 +166,7 @@ class TestGCCompact < Test::Unit::TestCase
hash = list_of_objects.hash
GC.verify_compaction_references(toward: :empty)
assert_equal hash, list_of_objects.hash
GC.verify_compaction_references(double_heap: false)
GC.verify_compaction_references(expand_heap: false)
assert_equal hash, list_of_objects.hash
end
@ -214,12 +214,12 @@ class TestGCCompact < Test::Unit::TestCase
begin;
STR_COUNT = 500
GC.verify_compaction_references(double_heap: true, toward: :empty)
GC.verify_compaction_references(expand_heap: true, toward: :empty)
str = "a" * GC::INTERNAL_CONSTANTS[:BASE_SLOT_SIZE]
ary = STR_COUNT.times.map { "" << str }
stats = GC.verify_compaction_references(double_heap: true, toward: :empty)
stats = GC.verify_compaction_references(expand_heap: true, toward: :empty)
assert_operator(stats[:moved_up][:T_STRING], :>=, STR_COUNT)
assert(ary) # warning: assigned but unused variable - ary
@ -231,11 +231,11 @@ class TestGCCompact < Test::Unit::TestCase
begin;
STR_COUNT = 500
GC.verify_compaction_references(double_heap: true, toward: :empty)
GC.verify_compaction_references(expand_heap: true, toward: :empty)
ary = STR_COUNT.times.map { ("a" * GC::INTERNAL_CONSTANTS[:BASE_SLOT_SIZE]).squeeze! }
stats = GC.verify_compaction_references(double_heap: true, toward: :empty)
stats = GC.verify_compaction_references(expand_heap: true, toward: :empty)
assert_operator(stats[:moved_down][:T_STRING], :>=, STR_COUNT)
assert(ary) # warning: assigned but unused variable - ary