fix all tests accordingly to new return
This commit is contained in:
@ -12,8 +12,8 @@ module Risc
|
||||
def test_if
|
||||
#show_main_ticks # get output of what is in main
|
||||
check_main_chain [LoadConstant, LoadConstant, OperatorInstruction, IsZero, LoadConstant,
|
||||
OperatorInstruction, IsZero, LoadConstant, RegToSlot, SlotToReg,
|
||||
SlotToReg, RegToSlot, SlotToReg, Branch, SlotToReg,
|
||||
OperatorInstruction, IsZero, LoadConstant, RegToSlot, Branch,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
SlotToReg, FunctionReturn, Transfer, SlotToReg, SlotToReg,
|
||||
Branch, Syscall, NilClass]
|
||||
assert_equal 1 , get_return
|
||||
|
@ -22,7 +22,7 @@ module Risc
|
||||
RegToSlot, SlotToReg, SlotToReg, SlotToReg, FunctionReturn,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
LoadConstant, OperatorInstruction, IsZero, LoadConstant, RegToSlot,
|
||||
SlotToReg, SlotToReg, RegToSlot, Branch, SlotToReg,
|
||||
Branch, SlotToReg, SlotToReg, RegToSlot, SlotToReg,
|
||||
SlotToReg, SlotToReg, FunctionReturn, Transfer, SlotToReg,
|
||||
SlotToReg, Branch, Syscall, NilClass]
|
||||
assert_equal 2 , get_return
|
||||
|
@ -22,14 +22,14 @@ module Risc
|
||||
RegToSlot, SlotToReg, SlotToReg, SlotToReg, FunctionReturn,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
LoadConstant, OperatorInstruction, IsZero, LoadConstant, OperatorInstruction,
|
||||
IsZero, LoadConstant, RegToSlot, Branch, SlotToReg,
|
||||
SlotToReg, RegToSlot, SlotToReg, SlotToReg, SlotToReg,
|
||||
FunctionReturn, Transfer, SlotToReg, SlotToReg, Branch,
|
||||
Syscall, NilClass]
|
||||
IsZero, LoadConstant, RegToSlot, Branch, Branch,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
SlotToReg, FunctionReturn, Transfer, SlotToReg, SlotToReg,
|
||||
Branch, Syscall, NilClass]
|
||||
assert_equal 1 , get_return
|
||||
end
|
||||
def test_exit
|
||||
done = main_ticks(71)
|
||||
done = main_ticks(72)
|
||||
assert_equal Syscall , done.class
|
||||
end
|
||||
end
|
||||
|
@ -11,7 +11,7 @@ module Risc
|
||||
|
||||
def test_if
|
||||
#show_main_ticks # get output of what is in main
|
||||
check_main_chain [LoadConstant, LoadConstant, SlotToReg, RegToSlot, RegToSlot,
|
||||
check_main_chain [LoadConstant, LoadConstant, SlotToReg, RegToSlot, RegToSlot,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
RegToSlot, RegToSlot, SlotToReg, Branch, RegToSlot,
|
||||
LoadConstant, SlotToReg, RegToSlot, LoadConstant, SlotToReg,
|
||||
@ -22,7 +22,7 @@ module Risc
|
||||
RegToSlot, SlotToReg, SlotToReg, SlotToReg, FunctionReturn,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
LoadConstant, OperatorInstruction, IsZero, LoadConstant, RegToSlot,
|
||||
SlotToReg, SlotToReg, RegToSlot, Branch, SlotToReg,
|
||||
Branch, SlotToReg, SlotToReg, RegToSlot, SlotToReg,
|
||||
SlotToReg, SlotToReg, FunctionReturn, Transfer, SlotToReg,
|
||||
SlotToReg, Branch, Syscall, NilClass]
|
||||
assert_equal 2 , get_return
|
||||
|
@ -22,14 +22,14 @@ module Risc
|
||||
RegToSlot, SlotToReg, SlotToReg, SlotToReg, FunctionReturn,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
LoadConstant, OperatorInstruction, IsZero, LoadConstant, OperatorInstruction,
|
||||
IsZero, LoadConstant, RegToSlot, Branch, SlotToReg,
|
||||
SlotToReg, RegToSlot, SlotToReg, SlotToReg, SlotToReg,
|
||||
FunctionReturn, Transfer, SlotToReg, SlotToReg, Branch,
|
||||
Syscall, NilClass]
|
||||
IsZero, LoadConstant, RegToSlot, Branch, Branch,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
SlotToReg, FunctionReturn, Transfer, SlotToReg, SlotToReg,
|
||||
Branch, Syscall, NilClass]
|
||||
assert_equal 1 , get_return
|
||||
end
|
||||
def test_exit
|
||||
done = main_ticks(71)
|
||||
done = main_ticks(72)
|
||||
assert_equal Syscall , done.class
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user