rename object_type to instance_type

for better distinction that it is not every object
but only instances of the class
This commit is contained in:
Torsten Ruger
2016-02-25 12:16:13 -08:00
parent 278d71b56c
commit a8b815117f
11 changed files with 19 additions and 19 deletions

View File

@ -65,7 +65,7 @@ class TestType < MiniTest::Test
def test_class_type
oc = Register.machine.boot.space.get_class_by_name( :Object )
assert_equal Parfait::Class , oc.class
type = oc.object_type
type = oc.instance_type
assert_equal Parfait::Type , type.class
assert_equal 1 , type.instance_names.get_length
assert_equal type.first , :type
@ -119,7 +119,7 @@ class TestType < MiniTest::Test
assert_equal 55 , @mess.get_internal_word(message_ind)
end
def test_object_type
def test_instance_type
assert_equal 2 , @mess.get_type.variable_index(:next_message)
end

View File

@ -25,7 +25,7 @@ HERE
end
def test_field
Register.machine.space.get_class_by_name(:Object).object_type.add_instance_variable(:bro,:Object)
Register.machine.space.get_class_by_name(:Object).instance_type.add_instance_variable(:bro,:Object)
@root = :field_access
@string_input = <<HERE
self.bro

View File

@ -31,13 +31,13 @@ module Register
end
def test_field_int
Register.machine.space.get_class_by_name(:Object).object_type.add_instance_variable(:bro,:int)
Register.machine.space.get_class_by_name(:Object).instance_type.add_instance_variable(:bro,:int)
@string_input = "self.bro + 3"
check
end
def test_int_field
Register.machine.space.get_class_by_name(:Object).object_type.add_instance_variable(:bro,:int)
Register.machine.space.get_class_by_name(:Object).instance_type.add_instance_variable(:bro,:int)
@string_input = "3 + self.bro"
check
end