summaryrefslogtreecommitdiff
path: root/test/ruby/test_shapes.rb
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_shapes.rb186
1 files changed, 186 insertions, 0 deletions
@@ -37,6 +37,35 @@ class TestShapes < Test::Unit::TestCase
end
end
# RubyVM::Shape.of returns new instances of shape objects for
# each call. This helper method allows us to define equality for
# shapes
@@ -51,6 +80,156 @@ class TestShapes < Test::Unit::TestCase
refute_equal(shape1.id, shape2.id)
end
def test_shape_order
bar = ShapeOrder.new # 0 => 1
bar.set_c # 1 => 2
@@ -218,4 +397,11 @@ class TestShapes < Test::Unit::TestCase
RubyVM::Shape.find_by_id(-1)
end
end
end if defined?(RubyVM::Shape)