rubyx/test/parfait/test_named_list.rb
Torsten Ruger 1132309f6a unify space collection attribute naming
currently space is still acting as a sort of memory manager.
For proper linking, all objects must be reachable from space, hence the plural versions like messages and addresses (even they are instances, it is the list that is important)
To dish out instance to use, the head must be kept, ie next_XXX for intergers, return addresses and messages
2018-07-02 15:49:51 +03:00

32 lines
683 B
Ruby

require_relative "helper"
module Parfait
class TestNamedLists < ParfaitTest
def setup
super
@named_list = @space.next_message.frame
@type = @named_list.get_type
end
def test_named_list_get_type
assert_equal Type , @type.class
assert @type.names
assert @named_list.get_instance_variables
end
def test_new
list = NamedList.new
assert list.get_type
end
def test_var_names
list = NamedList.new
assert_equal List , list.get_instance_variables.class
end
def test_var_names_length
list = NamedList.new
assert_equal 1 , list.get_instance_variables.get_length
end
end
end