diff options
-rw-r--r-- | test/ruby/test_gc.rb | 10 | ||||
-rw-r--r-- | test/ruby/test_gc_compact.rb | 14 | ||||
-rw-r--r-- | test/ruby/test_string.rb | 4 |
3 files changed, 14 insertions, 14 deletions
@@ -226,7 +226,7 @@ class TestGc < Test::Unit::TestCase GC.stat_heap(0, stat_heap) GC.stat(stat) - GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT].times do |i| EnvUtil.without_gc do GC.stat_heap(i, stat_heap) GC.stat(stat) @@ -248,7 +248,7 @@ class TestGc < Test::Unit::TestCase assert_equal stat_heap[:slot_size], GC.stat_heap(0)[:slot_size] assert_raise(ArgumentError) { GC.stat_heap(-1) } - assert_raise(ArgumentError) { GC.stat_heap(GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT]) } end def test_stat_heap_all @@ -259,7 +259,7 @@ class TestGc < Test::Unit::TestCase GC.stat_heap(0, stat_heap) GC.stat_heap(nil, stat_heap_all) - GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT].times do |i| GC.stat_heap(nil, stat_heap_all) GC.stat_heap(i, stat_heap) @@ -538,7 +538,7 @@ class TestGc < Test::Unit::TestCase gc_count = GC.stat(:count) # Fill up all of the size pools to the init slots - GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT].times do |i| capa = (GC.stat_heap(i, :slot_size) - GC::INTERNAL_CONSTANTS[:RVALUE_OVERHEAD] - (2 * RbConfig::SIZEOF["void*"])) / RbConfig::SIZEOF["void*"] while GC.stat_heap(i, :heap_eden_slots) < GC_HEAP_INIT_SLOTS Array.new(capa) @@ -558,7 +558,7 @@ class TestGc < Test::Unit::TestCase gc_count = GC.stat(:count) # Fill up all of the size pools to the init slots - GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT].times do |i| capa = (GC.stat_heap(i, :slot_size) - GC::INTERNAL_CONSTANTS[:RVALUE_OVERHEAD] - (2 * RbConfig::SIZEOF["void*"])) / RbConfig::SIZEOF["void*"] while GC.stat_heap(i, :heap_eden_slots) < SIZES[i] Array.new(capa) @@ -283,7 +283,7 @@ class TestGCCompact < Test::Unit::TestCase end; end - def test_moving_arrays_down_size_pools omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1 assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10) @@ -305,7 +305,7 @@ class TestGCCompact < Test::Unit::TestCase end; end - def test_moving_arrays_up_size_pools omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1 assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10) @@ -329,7 +329,7 @@ class TestGCCompact < Test::Unit::TestCase end; end - def test_moving_objects_between_size_pools omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1 assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 60) @@ -361,7 +361,7 @@ class TestGCCompact < Test::Unit::TestCase end; end - def test_moving_strings_up_size_pools omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1 assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 30) @@ -382,7 +382,7 @@ class TestGCCompact < Test::Unit::TestCase end; end - def test_moving_strings_down_size_pools omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1 assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 30) @@ -402,7 +402,7 @@ class TestGCCompact < Test::Unit::TestCase end; end - def test_moving_hashes_down_size_pools omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1 # AR and ST hashes are in the same size pool on 32 bit omit unless RbConfig::SIZEOF["uint64_t"] <= RbConfig::SIZEOF["void*"] @@ -425,7 +425,7 @@ class TestGCCompact < Test::Unit::TestCase end; end - def test_moving_objects_between_size_pools_keeps_shape_frozen_status # [Bug #19536] assert_separately([], "#{<<~"begin;"}\n#{<<~"end;"}") begin; @@ -662,8 +662,8 @@ CODE assert_equal(Encoding::UTF_8, "#{s}x".encoding) end - def test_string_interpolations_across_size_pools_get_embedded - omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1 require 'objspace' base_slot_size = GC::INTERNAL_CONSTANTS[:BASE_SLOT_SIZE] |