fix test ripples from changing return sequence

This commit is contained in:
Torsten Ruger 2018-03-23 20:04:29 +02:00
parent 0f183b3a74
commit 30d2cd3af7
3 changed files with 6 additions and 6 deletions

View File

@ -13,7 +13,7 @@ module Risc
RegToSlot, LoadConstant, SlotToReg, RegToSlot, SlotToReg, LoadConstant , RegToSlot, LoadConstant, SlotToReg, RegToSlot, SlotToReg, LoadConstant ,
FunctionCall, Label, SlotToReg, SlotToReg, RegToSlot, SlotToReg , FunctionCall, Label, SlotToReg, SlotToReg, RegToSlot, SlotToReg ,
SlotToReg, RegToSlot, SlotToReg, SlotToReg, RegToSlot, SlotToReg , SlotToReg, RegToSlot, SlotToReg, SlotToReg, RegToSlot, SlotToReg ,
Transfer, SlotToReg, FunctionReturn] SlotToReg, FunctionReturn]
end end
def test_return_instructions def test_return_instructions
@ -21,7 +21,7 @@ module Risc
end end
def test_function_return def test_function_return
produced = produce_body produced = produce_body
assert_equal FunctionReturn , produced.next(38).class assert_equal FunctionReturn , produced.next(37).class
end end
def test_load_5 def test_load_5
produced = produce_body produced = produce_body

View File

@ -19,7 +19,7 @@ module Risc
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg, SlotToReg , SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg, SlotToReg ,
RegToSlot, LoadConstant, SlotToReg, DynamicJump, SlotToReg, SlotToReg , RegToSlot, LoadConstant, SlotToReg, DynamicJump, SlotToReg, SlotToReg ,
RegToSlot, SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg , RegToSlot, SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg ,
RegToSlot, SlotToReg, Transfer, SlotToReg, FunctionReturn] RegToSlot, SlotToReg, SlotToReg, FunctionReturn]
end end
def test_return_instructions def test_return_instructions
@ -27,7 +27,7 @@ module Risc
end end
def test_function_return def test_function_return
produced = produce_body produced = produce_body
assert_equal FunctionReturn , produced.next(76).class assert_equal FunctionReturn , produced.next(75).class
end end
def test_cache_check def test_cache_check
produced = produce_body produced = produce_body

View File

@ -8,7 +8,7 @@ module Risc
super super
@input = "return 5" @input = "return 5"
@expect = [LoadConstant, RegToSlot, SlotToReg, SlotToReg, RegToSlot, SlotToReg , @expect = [LoadConstant, RegToSlot, SlotToReg, SlotToReg, RegToSlot, SlotToReg ,
Transfer, SlotToReg, FunctionReturn] SlotToReg, FunctionReturn]
end end
def test_return_instructions def test_return_instructions
@ -16,7 +16,7 @@ module Risc
end end
def test_function_return def test_function_return
produced = produce_body produced = produce_body
assert_equal FunctionReturn , produced.next(8).class assert_equal FunctionReturn , produced.next(7).class
end end
def test_load_5 def test_load_5
produced = produce_body produced = produce_body