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