Last risc fixes that are not binary, move binary tests
move test that translate or create binary to own directory, for semantic distance (they are the only ones still failing)
This commit is contained in:
@ -11,10 +11,10 @@ module Risc
|
||||
|
||||
def test_if
|
||||
#show_main_ticks # get output of what is in main
|
||||
check_main_chain [LoadConstant, LoadConstant, OperatorInstruction, IsZero, LoadConstant, #5
|
||||
check_main_chain [LoadConstant, LoadConstant, OperatorInstruction, IsZero, LoadConstant, #5
|
||||
OperatorInstruction, IsZero, LoadConstant, RegToSlot, Branch, #10
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg, #15
|
||||
SlotToReg, FunctionReturn, Transfer, SlotToReg, SlotToReg, #20
|
||||
FunctionReturn, Transfer, SlotToReg, SlotToReg, Transfer, #20
|
||||
Syscall, NilClass,] #25
|
||||
assert_equal 1 , get_return
|
||||
end
|
||||
|
@ -15,10 +15,10 @@ module Risc
|
||||
IsZero, LoadConstant, OperatorInstruction, IsZero, LoadConstant, #10
|
||||
RegToSlot, Branch, SlotToReg, LoadConstant, OperatorInstruction, #15
|
||||
IsZero, SlotToReg, RegToSlot, Branch, SlotToReg, #20
|
||||
SlotToReg, RegToSlot, SlotToReg, SlotToReg, SlotToReg, #25
|
||||
FunctionReturn, Transfer, SlotToReg, SlotToReg, Syscall, #30
|
||||
SlotToReg, RegToSlot, SlotToReg, SlotToReg, FunctionReturn, #25
|
||||
Transfer, SlotToReg, SlotToReg, Transfer, Syscall, #30
|
||||
NilClass,] #35
|
||||
assert_kind_of Parfait::NilClass , get_return
|
||||
assert_kind_of NilClass , get_return
|
||||
end
|
||||
def test_load_false_const
|
||||
load = main_ticks(1)
|
||||
|
@ -75,7 +75,7 @@ module Risc
|
||||
end
|
||||
def test_tick_26_exit
|
||||
# 26.times { @interpreter.tick ;puts @interpreter.instruction.class}
|
||||
ticks(26)
|
||||
ticks(27)
|
||||
assert_equal Syscall , @interpreter.instruction.class
|
||||
assert_equal :exit , @interpreter.instruction.name
|
||||
end
|
||||
|
Reference in New Issue
Block a user