remove the space instance from register machine

bad design, probably from the booting
This commit is contained in:
Torsten Ruger
2016-12-30 14:04:59 +02:00
parent ef872edd7a
commit a00f6be3ba
30 changed files with 121 additions and 94 deletions

View File

@ -3,7 +3,9 @@ require_relative "../helper"
class BasicType < MiniTest::Test
def setup
@mess = Register.machine.boot.space.first_message
Register.machine.boot
@space = Parfait::Space.object_space
@mess = @space.first_message
assert @mess
@type = @mess.get_type()
end
@ -36,7 +38,7 @@ class BasicType < MiniTest::Test
def test_type_length_index
type = @mess.get_type.get_type
assert_equal 5 , type.variable_index(:instance_methods)
assert_equal 5 , type.variable_index(:methods)
assert_equal type.object_class , type.get_internal_word(4)
end

View File

@ -3,7 +3,9 @@ require_relative "../helper"
class TypeHash < MiniTest::Test
def setup
@types = Register.machine.boot.space.types
Register.machine.boot
@space = Parfait::Space.object_space
@types = @space.types
@first = @types.values.first
end

View File

@ -3,7 +3,9 @@ require_relative "../helper"
class TypeMessages < MiniTest::Test
def setup
@mess = Register.machine.boot.space.first_message
Register.machine.boot
@space = Parfait::Space.object_space
@mess = @space.first_message
end
def test_message_type

View File

@ -3,7 +3,8 @@ require_relative "../helper"
class TestMethodApi < MiniTest::Test
def setup
@space = Register.machine.boot.space
Register.machine.boot
@space = Parfait::Space.object_space
@try_class = @space.create_class( :Try )
@try_type = @try_class.instance_type
end

View File

@ -3,7 +3,9 @@ require_relative "../helper"
class TypeApi < MiniTest::Test
def setup
tc = Register.machine.boot.space.get_class_by_name( :Type )
Register.machine.boot
@space = Parfait::Space.object_space
tc = @space.get_class_by_name( :Type )
@type = Parfait::Type.new tc
end
@ -12,7 +14,7 @@ class TypeApi < MiniTest::Test
end
def test_class_type
oc = Register.machine.boot.space.get_class_by_name( :Object )
oc = @space.get_class_by_name( :Object )
assert_equal Parfait::Class , oc.class
type = oc.instance_type
assert_equal Parfait::Type , type.class
@ -21,7 +23,7 @@ class TypeApi < MiniTest::Test
end
def test_class_space
space = Register.machine.space
space = Parfait::Space.object_space
assert_equal Parfait::Space , space.class
type = space.get_type
assert_equal Parfait::Type , type.class