rubyx/test/soml/parfait/test_layout.rb

38 lines
655 B
Ruby
Raw Normal View History

require_relative 'helper'
2015-11-07 18:38:52 +01:00
class TestLayoutRT < MiniTest::Test
include ParfaitTests
def test_main
@main = "return 1"
2015-11-07 21:26:06 +01:00
check_return 1
end
def check_return_class val
end
def test_get_layout
@main = "return get_layout()"
check
assert_equal Parfait::Layout , @interpreter.get_register(:r0).return_value.class
end
2015-11-07 18:38:52 +01:00
def test_get_class
@main = "return get_class()"
check
assert_equal Parfait::Layout , @interpreter.get_register(:r0).return_value.class
2015-11-07 18:38:52 +01:00
end
def test_puts_class
@main = <<HERE
Class c = get_class()
Word w = c.get_name()
w.putstring()
HERE
@stdout = "Space"
check
end
end