mostly renames from the type change

also making setters as explicit set_xx methods
This commit is contained in:
Torsten Ruger
2016-12-29 18:45:32 +02:00
parent f4b3c645e5
commit b5f04ec718
11 changed files with 42 additions and 30 deletions

View File

@ -11,7 +11,7 @@ class TestMessage < MiniTest::Test
end
def test_attribute_set
@mess.receiver = 55
@mess.set_receiver( 55)
assert_equal 55 , @mess.receiver
end
@ -19,4 +19,7 @@ class TestMessage < MiniTest::Test
assert_equal 9 , @mess.get_type.variable_index(:arguments)
end
def test_next
assert @mess.next_message
end
end

View File

@ -9,7 +9,7 @@ class TestNamedLists < MiniTest::Test
def test_named_list_get_type
assert_equal Parfait::Type , @type.class
assert @type.instance_names
assert @type.names
assert @named_list.get_instance_variables
end

View File

@ -4,7 +4,7 @@ class TestMethod < MiniTest::Test
def setup
obj = Register.machine.space.get_class_by_name(:Object).instance_type
args = Parfait::Type.for_hash( obj , { bar: :Integer , foo: :Type})
args = Parfait::Type.for_hash( obj.object_class , { bar: :Integer , foo: :Type})
@method = ::Parfait::TypedMethod.new obj , :meth , args
@method.add_local :local_bar , :Integer
@method.add_local :local_foo , :Type
@ -20,7 +20,7 @@ class TestMethod < MiniTest::Test
def test_arg1
assert_equal 2 , @method.arguments_length , @method.arguments.inspect
assert_equal Symbol , @method.arguments.first.class
assert_equal Symbol , @method.arguments.names.first.class
assert_equal :bar , @method.argument_name(1)
end
@ -57,7 +57,7 @@ class TestMethod < MiniTest::Test
def test_local1
assert_equal 2 , @method.locals_length , @method.locals.inspect
assert_equal Symbol , @method.locals.first.class
assert_equal Symbol , @method.locals.names.first.class
assert_equal :local_bar , @method.locals_name(1)
end