diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2023-01-06 09:11:42 -0500 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2023-01-09 08:49:29 -0500 |
| commit | 682b45d489b29b297e8b3b2c1ba8f549ed50b77a (patch) | |
| tree | 3954295e1e9d95f3416f5b8094c3b2deff6fa9f0 /test/ruby | |
| parent | 3be2acfafd3b3c6168e2266c7c6561d143d7ae5c (diff) | |
Assert that resizing objects will re-embed them
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7071
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 0c49b36513..e11b34707f 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 |
