rubyx/test/mom/test_if_no_else.rb
Torsten Ruger c8980595a3 start to test if
truth check is only half done
2018-03-19 21:20:11 +05:30

24 lines
509 B
Ruby

require_relative "helper"
module Risc
class TestIfNoElse < MiniTest::Test
include Statements
def setup
super
@input = "if(@a) ; arg = 5 ; end"
@expect = [SlotToReg, SlotToReg, LoadConstant, IsSame, Label, LoadConstant ,
SlotToReg, RegToSlot, Label]
end
def test_if_instructions
assert_nil msg = check_nil , msg
end
def ttest_if_instructions
produced = produce_body
assert_equal 5 , produced.class , produced
end
end
end