fix return statement to actually return

fix a million tests
This commit is contained in:
Torsten Ruger
2015-10-27 21:04:46 +02:00
parent 79cf59c4e2
commit 142c36a374
16 changed files with 61 additions and 59 deletions

View File

@ -4,7 +4,7 @@ module Register
class TestIfStatement < MiniTest::Test
include Statements
def test_if_basic
def test_if_basicr
@string_input = <<HERE
class Object
int main()
@ -17,7 +17,7 @@ class Object
end
HERE
@expect = [Label, SaveReturn,LoadConstant,LoadConstant, OperatorInstruction,IsPlus ,
LoadConstant,Branch , Label , LoadConstant ,
LoadConstant,SetSlot,Branch , Label , LoadConstant ,SetSlot,
Label,Label,RegisterTransfer,GetSlot,FunctionReturn]
check
end
@ -34,7 +34,7 @@ class Object
end
HERE
@expect = [Label, SaveReturn,LoadConstant,LoadConstant, OperatorInstruction,IsMinus ,
Branch ,Label , LoadConstant ,
Branch ,Label , LoadConstant ,SetSlot,
Label,Label , RegisterTransfer,GetSlot,FunctionReturn]
check
end
@ -51,7 +51,7 @@ class Object
end
HERE
@expect = [Label, SaveReturn,LoadConstant,LoadConstant,OperatorInstruction,IsZero ,
Branch , Label , LoadConstant ,
Branch , Label , LoadConstant ,SetSlot,
Label,Label, RegisterTransfer,GetSlot,FunctionReturn]
check
end