rubyx/test/slot_machine/instructions/test_label.rb

21 lines
451 B
Ruby
Raw Normal View History

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
2020-03-08 16:31:16 +01:00
assert_label 1 , "target"
end
def test_2_slot
label = @instruction.risc_label( @compiler)
2020-03-08 16:31:16 +01:00
assert_label label , "target" , 1
end
end
end