rubyx/test/parfait/test_message.rb
Torsten Ruger aa79e41d1c rename register to risc
seems to fit the layer much better as we really have a very reduced
instruction set
2017-01-19 09:02:29 +02:00

28 lines
518 B
Ruby

require_relative "../helper"
class TestMessage < MiniTest::Test
def setup
Risc.machine.boot
@space = Parfait.object_space
@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
assert_equal 9 , @mess.get_type.variable_index(:arguments)
end
def test_next
assert @mess.next_message
end
end