rubyx/test/mom/instruction/test_slot_load.rb
Torsten Ruger 3343017dba move type resolution to compiler
from risc_value.
also unite mock compilers
2018-07-16 11:46:18 +03:00

22 lines
627 B
Ruby

require_relative "helper"
module Mom
class TestSlotLoadBasics < MiniTest::Test
def test_ins_ok
assert SlotLoad.new( [:message, :caller] , [:receiver,:type] )
end
def test_ins_fail1
assert_raises {SlotLoad.new( [:message, :caller] , nil )}
end
def test_fail_on_right
@load = SlotLoad.new( [:message, :caller] , [:receiver,:type] )
assert_raises {@load.to_risc(Risc::FakeCompiler.new)}
end
def test_fail_on_left_long
@load = SlotLoad.new( [:message, :caller , :type] , [:receiver,:type] )
assert_raises {@load.to_risc(Risc::FakeCompiler.new)}
end
end
end