summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_gc_compact.rb13
-rw-r--r--test/ruby/test_shapes.rb19
2 files changed, 16 insertions, 16 deletions
diff --git a/test/ruby/test_gc_compact.rb b/test/ruby/test_gc_compact.rb
index 92a2be1174..bae29a3162 100644
--- a/test/ruby/test_gc_compact.rb
+++ b/test/ruby/test_gc_compact.rb
@@ -210,7 +210,7 @@ class TestGCCompact < Test::Unit::TestCase
end
def test_moving_arrays_down_size_pools
- omit if !GC.using_rvargc?
+ omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1
assert_separately([], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10, signal: :SEGV)
begin;
ARY_COUNT = 500
@@ -229,7 +229,8 @@ class TestGCCompact < Test::Unit::TestCase
end
def test_moving_arrays_up_size_pools
- omit if !GC.using_rvargc?
+ omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1
+
assert_separately([], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10, signal: :SEGV)
begin;
ARY_COUNT = 500
@@ -250,6 +251,8 @@ class TestGCCompact < Test::Unit::TestCase
end
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)
begin;
class Foo
@@ -274,7 +277,8 @@ class TestGCCompact < Test::Unit::TestCase
end
def test_moving_strings_up_size_pools
- omit if !GC.using_rvargc?
+ omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1
+
assert_separately([], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10, signal: :SEGV)
begin;
STR_COUNT = 500
@@ -292,7 +296,8 @@ class TestGCCompact < Test::Unit::TestCase
end
def test_moving_strings_down_size_pools
- omit if !GC.using_rvargc?
+ omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1
+
assert_separately([], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10, signal: :SEGV)
begin;
STR_COUNT = 500
diff --git a/test/ruby/test_shapes.rb b/test/ruby/test_shapes.rb
index 23696acc70..326ff3a453 100644
--- a/test/ruby/test_shapes.rb
+++ b/test/ruby/test_shapes.rb
@@ -86,15 +86,10 @@ class TestShapes < Test::Unit::TestCase
assert_equal(2, bar_shape.next_iv_index)
end
- def test_new_obj_has_root_shape
- assert_shape_equal(RubyVM::Shape.root_shape, RubyVM::Shape.of(Object.new))
- end
+ class TestObject; end
- def test_frozen_new_obj_has_frozen_root_shape
- assert_shape_equal(
- RubyVM::Shape.frozen_root_shape,
- RubyVM::Shape.of(Object.new.freeze)
- )
+ def test_new_obj_has_root_shape
+ assert_shape_equal(RubyVM::Shape.root_shape, RubyVM::Shape.of(TestObject.new))
end
def test_str_has_root_shape
@@ -109,12 +104,12 @@ class TestShapes < Test::Unit::TestCase
assert_shape_equal(RubyVM::Shape.root_shape, RubyVM::Shape.of({}))
end
- def test_true_has_frozen_root_shape
- assert_shape_equal(RubyVM::Shape.frozen_root_shape, RubyVM::Shape.of(true))
+ def test_true_has_special_const_shape_id
+ assert_equal(RubyVM::Shape::SPECIAL_CONST_SHAPE_ID, RubyVM::Shape.of(true).id)
end
- def test_nil_has_frozen_root_shape
- assert_shape_equal(RubyVM::Shape.frozen_root_shape, RubyVM::Shape.of(nil))
+ def test_nil_has_special_const_shape_id
+ assert_equal(RubyVM::Shape::SPECIAL_CONST_SHAPE_ID, RubyVM::Shape.of(nil).id)
end
def test_basic_shape_transition