rubyx/test/sol/send/test_send_args_send.rb
Torsten Rüger d1f8733623 Rename Vool to Sol
Simple is really the descriptive name for the layer
Sure, it is "virtual" but that is not as important as the fact that it is simple (or simplified)
Also objct (based really) is better, since orientated implies it is a little like that, but only orientated, not really it. Sol only has objects, nothing else
Just cause i was renaming anyway
2019-10-04 00:38:47 +03:00

28 lines
791 B
Ruby

require_relative "helper"
module Sol
class TestSendArgsSendSlotMachine < MiniTest::Test
include SolCompile
def setup
@compiler = compile_main( "a = main(4.div4);return a" , "Integer.div4")
@ins = @compiler.slot_instructions.next
end
def test_array
check_array [MessageSetup, ArgumentTransfer, SimpleCall, SlotLoad, MessageSetup ,
ArgumentTransfer, SimpleCall, SlotLoad ,SlotLoad, ReturnJump,
Label, ReturnSequence , Label] , @ins
end
def test_one_call
assert_equal SimpleCall, @ins.next(2).class
assert_equal :div4 , @ins.next(2).method.name
end
def test_two_call
assert_equal SimpleCall, @ins.next(6).class
assert_equal :main, @ins.next(6).method.name
end
end
end