fix all tests accordingly to new return
This commit is contained in:
@ -11,7 +11,7 @@ module Risc
|
||||
|
||||
def test_if
|
||||
#show_main_ticks # get output of what is in main
|
||||
check_main_chain [LoadConstant, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
check_main_chain [LoadConstant, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
SlotToReg, RegToSlot, LoadConstant, LoadConstant, SlotToReg,
|
||||
RegToSlot, RegToSlot, SlotToReg, Branch, SlotToReg,
|
||||
RegToSlot, SlotToReg, SlotToReg, RegToSlot, RegToSlot,
|
||||
@ -48,13 +48,13 @@ module Risc
|
||||
SlotToReg, SlotToReg, SlotToReg, FunctionReturn, SlotToReg,
|
||||
SlotToReg, RegToSlot, SlotToReg, SlotToReg, Branch,
|
||||
LoadConstant, OperatorInstruction, IsZero, SlotToReg, SlotToReg,
|
||||
RegToSlot, SlotToReg, SlotToReg, RegToSlot, SlotToReg,
|
||||
SlotToReg, SlotToReg, FunctionReturn, Transfer, SlotToReg,
|
||||
SlotToReg, Branch, Syscall, NilClass]
|
||||
RegToSlot, 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(198)
|
||||
done = main_ticks(199)
|
||||
assert_equal Syscall , done.class
|
||||
end
|
||||
end
|
||||
|
@ -48,14 +48,14 @@ module Risc
|
||||
SlotToReg, RegToSlot, SlotToReg, SlotToReg, SlotToReg,
|
||||
FunctionReturn, SlotToReg, SlotToReg, RegToSlot, SlotToReg,
|
||||
SlotToReg, Branch, LoadConstant, OperatorInstruction, IsZero,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
RegToSlot, SlotToReg, SlotToReg, SlotToReg, FunctionReturn,
|
||||
Transfer, SlotToReg, SlotToReg, Branch, Syscall,
|
||||
NilClass]
|
||||
SlotToReg, SlotToReg, RegToSlot, Branch, SlotToReg,
|
||||
SlotToReg, RegToSlot, SlotToReg, SlotToReg, SlotToReg,
|
||||
FunctionReturn, Transfer, SlotToReg, SlotToReg, Branch,
|
||||
Syscall, NilClass]
|
||||
assert_equal 0 , get_return
|
||||
end
|
||||
def test_exit
|
||||
done = main_ticks(200)
|
||||
done = main_ticks(201)
|
||||
assert_equal Syscall , done.class
|
||||
end
|
||||
end
|
||||
|
@ -15,10 +15,10 @@ module Risc
|
||||
LoadConstant, OperatorInstruction, IsZero, LoadConstant, OperatorInstruction,
|
||||
IsZero, LoadConstant, SlotToReg, Branch, RegToSlot,
|
||||
Branch, SlotToReg, SlotToReg, LoadConstant, OperatorInstruction,
|
||||
IsZero, SlotToReg, SlotToReg, RegToSlot, SlotToReg,
|
||||
SlotToReg, RegToSlot, SlotToReg, SlotToReg, SlotToReg,
|
||||
FunctionReturn, Transfer, SlotToReg, SlotToReg, Branch,
|
||||
Syscall, NilClass]
|
||||
IsZero, SlotToReg, SlotToReg, RegToSlot, Branch,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
SlotToReg, FunctionReturn, Transfer, SlotToReg, SlotToReg,
|
||||
Branch, Syscall, NilClass]
|
||||
assert_kind_of Parfait::NilClass , get_return
|
||||
end
|
||||
def test_load_false_const
|
||||
@ -55,7 +55,7 @@ module Risc
|
||||
assert check.label.name.start_with?("merge_label") , check.label.name
|
||||
end
|
||||
def test_exit
|
||||
done = main_ticks(36)
|
||||
done = main_ticks(37)
|
||||
assert_equal Syscall , done.class
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user