rubyx/test/parfait/test_message.rb

28 lines
518 B
Ruby
Raw Normal View History

2015-10-27 17:08:40 +01:00
require_relative "../helper"
class TestMessage < MiniTest::Test
def setup
Risc.machine.boot
@space = Parfait.object_space
@mess = @space.first_message
2015-10-27 17:08:40 +01:00
end
def test_length
assert_equal 9 , @mess.get_type.instance_length , @mess.get_type.inspect
2015-10-27 17:08:40 +01:00
end
def test_attribute_set
@mess.set_receiver( 55)
2015-10-27 17:08:40 +01:00
assert_equal 55 , @mess.receiver
end
def test_indexed
assert_equal 9 , @mess.get_type.variable_index(:arguments)
2015-10-27 17:08:40 +01:00
end
def test_next
assert @mess.next_message
end
2015-10-27 17:08:40 +01:00
end