diff --git a/test/parfait/helper.rb b/test/parfait/helper.rb index 4547138d..7979b7b0 100644 --- a/test/parfait/helper.rb +++ b/test/parfait/helper.rb @@ -33,7 +33,12 @@ HERE def check_return val check - assert_equal Parfait::Message , @interpreter.get_register(:r1).class - assert_equal val , @interpreter.get_register(:r1).return_value + assert_equal Parfait::Message , @interpreter.get_register(:r0).class + assert_equal val , @interpreter.get_register(:r0).return_value + end + + def check_return_class val + check + assert_equal val , @interpreter.get_register(:r0).return_value.class end end diff --git a/test/parfait/test_layout.rb b/test/parfait/test_layout.rb index 6b27bb53..285245ff 100644 --- a/test/parfait/test_layout.rb +++ b/test/parfait/test_layout.rb @@ -5,17 +5,18 @@ class TestLayoutRT < MiniTest::Test def test_main @string_input = "return 1" - check + check_return 1 end def test_get_layout @string_input = "return get_layout()" - check + check_return_class Parfait::Layout + end def test_get_class @string_input = "return get_class()" - check + check_return_class Parfait::Layout end