rubyx/test/slot_machine/instructions/test_label.rb
Torsten a4c0b8e5f9 did return sequence
surprisingly easy. also some check polish
2020-03-22 14:31:43 +02:00

21 lines
461 B
Ruby

require_relative "helper"
module SlotMachine
class TestLabel < SlotMachineInstructionTest
def instruction
Label.new("ok" , "target")
end
def test_len
assert_equal 2 , all.length
assert_equal Risc::Label , all.first.class
end
def test_1_label
assert_equal Risc::Label , risc(1).class
end
def test_2_slot
label = @instruction.risc_label( @compiler)
assert_equal risc(1) , label
end
end
end