rubyx/test/mom/test_simple_call_statement.rb

24 lines
534 B
Ruby
Raw Normal View History

2018-03-12 13:46:23 +01:00
require_relative "helper"
module Mom
class TestSimpleCall < MiniTest::Test
include MomCompile
def setup
Risc.machine.boot
@stats = compile_first_method_flat( "5.mod4")
@first = @stats.next
end
def test_if_compiles
assert_equal @stats.last.class , SimpleCall , @stats
end
2018-03-13 08:00:51 +01:00
def test_method_name
assert_equal @stats.last.method.name , :mod4 , @stats.last.to_rxf
2018-03-12 13:46:23 +01:00
end
def test_array
check_array [MessageSetup,ArgumentTransfer,SimpleCall] , @stats
end
end
end