rubyx/test/slot_machine/instructions/test_label.rb
2020-03-22 14:31:43 +02:00

21 lines
451 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_label 1 , "target"
end
def test_2_slot
label = @instruction.risc_label( @compiler)
assert_label label , "target" , 1
end
end
end