2016-12-16 00:14:09 +01:00
|
|
|
require_relative "../helper"
|
|
|
|
|
2016-12-21 17:45:18 +01:00
|
|
|
class TestNamedLists < MiniTest::Test
|
2016-12-16 00:14:09 +01:00
|
|
|
|
|
|
|
def setup
|
2016-12-30 13:04:59 +01:00
|
|
|
Register.machine.boot
|
2016-12-30 13:10:49 +01:00
|
|
|
@space = Parfait.object_space
|
2016-12-30 13:04:59 +01:00
|
|
|
@named_list = @space.first_message.locals
|
2016-12-21 17:51:22 +01:00
|
|
|
@type = @named_list.get_type
|
2016-12-16 00:14:09 +01:00
|
|
|
end
|
|
|
|
|
2016-12-21 17:51:22 +01:00
|
|
|
def test_named_list_get_type
|
2016-12-16 00:14:09 +01:00
|
|
|
assert_equal Parfait::Type , @type.class
|
2016-12-29 17:45:32 +01:00
|
|
|
assert @type.names
|
2016-12-25 17:02:39 +01:00
|
|
|
assert @named_list.get_instance_variables
|
2016-12-16 00:14:09 +01:00
|
|
|
end
|
|
|
|
|
2016-12-25 17:02:39 +01:00
|
|
|
def test_new
|
|
|
|
list = Parfait::NamedList.new
|
|
|
|
assert list.get_type
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_var_names
|
|
|
|
list = Parfait::NamedList.new
|
|
|
|
assert list.get_instance_variables
|
|
|
|
end
|
2016-12-16 00:14:09 +01:00
|
|
|
end
|