зеркало из https://github.com/github/ruby.git
Assert that resizing objects will re-embed them
This commit is contained in:
Родитель
3be2acfafd
Коммит
682b45d489
|
@ -353,7 +353,7 @@ class TestGCCompact < Test::Unit::TestCase
|
|||
def test_moving_objects_between_size_pools
|
||||
omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1
|
||||
|
||||
assert_separately([], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10, signal: :SEGV)
|
||||
assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10, signal: :SEGV)
|
||||
begin;
|
||||
class Foo
|
||||
def add_ivars
|
||||
|
@ -376,6 +376,7 @@ class TestGCCompact < Test::Unit::TestCase
|
|||
stats = GC.verify_compaction_references(expand_heap: true, toward: :empty)
|
||||
|
||||
assert_operator(stats.dig(:moved_up, :T_OBJECT) || 0, :>=, OBJ_COUNT)
|
||||
assert_include(ObjectSpace.dump(ary[0]), '"embedded":true')
|
||||
end;
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче