rubyx/test/slot_machine/instructions/test_slot_load.rb
Torsten db5a59f735 Unify instruction namings also dirs
Was getting confused myself, where it was instruction or instructions, when if the base class was inside or out of dir.
Now dirs are plural, and base class is inside.
2020-03-22 14:31:43 +02:00

25 lines
725 B
Ruby

require_relative "helper"
module SlotMachine
class TestSlotLoadBasics < MiniTest::Test
def setup
Parfait.boot!({})
end
def test_ins_ok
assert SlotLoad.new("test", [:message, :caller] , [:message , :receiver,:type] )
end
def test_ins_fail1
assert_raises {SlotLoad.new( "test",[:message, :caller] , nil )}
end
def pest_fail_on_right
load = SlotLoad.new( "test",[:message, :caller] , [:message ,:receiver,:type] )
assert_raises {load.to_risc(Risc.test_compiler)}
end
def pest_fail_on_left_long
load = SlotLoad.new("test", [:message, :caller , :type , :type] , [:message,:type] )
assert_raises {load.to_risc(Risc.test_compiler)}
end
end
end