start to test if
truth check is only half done
This commit is contained in:
23
test/mom/test_if_no_else.rb
Normal file
23
test/mom/test_if_no_else.rb
Normal file
@ -0,0 +1,23 @@
|
||||
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
|
Reference in New Issue
Block a user