2018-04-26 11:31:37 +02:00
|
|
|
require_relative "helper"
|
2015-10-27 17:08:40 +01:00
|
|
|
|
2017-04-14 10:13:47 +02:00
|
|
|
module Parfait
|
2018-04-26 11:31:37 +02:00
|
|
|
class TestMessage < ParfaitTest
|
2015-10-27 17:08:40 +01:00
|
|
|
|
2017-04-14 10:13:47 +02:00
|
|
|
def setup
|
2018-04-26 11:31:37 +02:00
|
|
|
super
|
2017-04-14 10:13:47 +02:00
|
|
|
@mess = @space.first_message
|
|
|
|
end
|
|
|
|
def test_length
|
|
|
|
assert_equal 9 , @mess.get_type.instance_length , @mess.get_type.inspect
|
|
|
|
end
|
|
|
|
def test_attribute_set
|
|
|
|
@mess.set_receiver( 55)
|
|
|
|
assert_equal 55 , @mess.receiver
|
|
|
|
end
|
|
|
|
def test_indexed
|
2018-05-14 10:55:01 +02:00
|
|
|
assert_equal 8 , @mess.get_type.variable_index(:arguments)
|
2017-04-14 10:13:47 +02:00
|
|
|
end
|
|
|
|
def test_next_message
|
|
|
|
assert_equal Message , @mess.next_message.class
|
|
|
|
end
|
|
|
|
def test_locals
|
2018-03-14 13:09:04 +01:00
|
|
|
assert_equal NamedList , @mess.frame.class
|
2017-04-14 10:13:47 +02:00
|
|
|
end
|
|
|
|
def test_arguments
|
|
|
|
assert_equal NamedList , @mess.arguments.class
|
|
|
|
end
|
|
|
|
def test_return_address
|
|
|
|
assert_nil @mess.return_address
|
|
|
|
end
|
|
|
|
def test_return_value
|
|
|
|
assert_nil @mess.return_value
|
|
|
|
end
|
|
|
|
def test_caller
|
|
|
|
assert_nil @mess.caller
|
|
|
|
end
|
|
|
|
def test_name
|
|
|
|
assert_nil @mess.name
|
|
|
|
end
|
2016-12-29 17:45:32 +01:00
|
|
|
end
|
2015-10-27 17:08:40 +01:00
|
|
|
end
|