require_relative 'helper' module Virtual class TestMethods < MiniTest::Test include Fragments def test_simplest_function @string_input = < 5) return 10 else return 20 end end end HERE @expect = [[MethodEnter,Set,Set,Register::GetSlot,Register::GetSlot, Register::OperatorInstruction,Register::IsZeroBranch], [Set,Register::AlwaysBranch],[Set],[],[MethodReturn]] check end def test_function_return_while @string_input = < 5) n = n + 1 return n end end end HERE @expect = [[MethodEnter,Set], [Set,Register::GetSlot,Register::GetSlot,Register::OperatorInstruction, Register::IsZeroBranch,Set,Register::GetSlot,Register::GetSlot, Register::OperatorInstruction,Set,Register::AlwaysBranch] , [],[MethodReturn]] check end end end