simple sends and all whiles working

This commit is contained in:
Torsten Ruger
2018-03-16 18:41:17 +05:30
parent 35a0952943
commit da0e1cdc5f
7 changed files with 40 additions and 40 deletions

View File

@ -5,31 +5,31 @@ module Vool
class TestSendSelfMom < MiniTest::Test
include MomCompile
include SimpleSendHarness
include Mom
def do_setup(str)
Risc.machine.boot
@stats = compile_first_method( str).first
@first = @stats.first
@ins = compile_first_method( str)
end
def setup
do_setup("self.get_internal_word(0)")
end
def test_receiver
assert_equal Mom::SlotDefinition, @stats[1].receiver.right.class
assert_equal SlotDefinition, @ins.next.right.class
end
def test_arg_one
assert_equal Mom::SlotLoad, @stats[1].arguments[0].class
assert_equal SlotLoad, @ins.next(2).arguments[0].class
end
def test_call_two
assert_equal Mom::SimpleCall, @stats[2].class
assert_equal SimpleCall, @ins.next(3).class
end
def test_call_has_method
assert_equal Parfait::TypedMethod, @stats[2].method.class
assert_equal Parfait::TypedMethod, @ins.next(3).method.class
end
def test_call_has_right_method
assert_equal :get_internal_word, @stats[2].method.name
assert_equal :get_internal_word, @ins.next(3).method.name
end
end
class TestSendSelfImplicitMom < TestSendSelfMom