diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2023-01-06 09:11:42 -0500 |
|---|---|---|
| committer | nagachika <nagachika@ruby-lang.org> | 2024-11-22 08:06:01 +0900 |
| commit | 605592b9becf55dab7fd00adfc9f10b9e4fa58b8 (patch) | |
| tree | 2b77e55316b91851ee77c03abf3f731d9d420d75 /test/ruby | |
| parent | ed41225edd5e5488db13785aac7180e613c07915 (diff) | |
Assert that resizing objects will re-embed them
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_gc_compact.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_gc_compact.rb b/test/ruby/test_gc_compact.rb index 8272a3fff3..0001a5193c 100644 --- a/test/ruby/test_gc_compact.rb +++ b/test/ruby/test_gc_compact.rb @@ -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 |
