let spce keep the messages in a factory #14

Like Integers and addresses before, messages are now in a factory
Factories keep allocated (uninitialised) objects, had to make init public to call it
This commit is contained in:
Torsten Ruger
2018-09-01 11:24:16 +03:00
parent 0a390cc5a9
commit d964e9ea9d
10 changed files with 39 additions and 35 deletions

View File

@ -5,7 +5,7 @@ module Parfait
def setup
super
@mess = @space.next_message
@mess = @space.get_next_for(:Message)
assert @mess
@type = @mess.get_type()
end

View File

@ -5,7 +5,7 @@ module Parfait
def setup
super
@mess = @space.next_message
@mess = @space.get_next_for(:Message)
end
def test_message_type

View File

@ -27,7 +27,7 @@ module Parfait
assert_equal Parfait::Space , space.class
type = space.get_type
assert_equal Parfait::Type , type.class
assert_equal 9 , type.names.get_length
assert_equal 7 , type.names.get_length
assert_equal type.object_class.class , Parfait::Class
assert_equal type.object_class.name , :Space
end