store method, not name, in message

changes the calling and thus too many test
This commit is contained in:
Torsten Ruger
2018-07-22 22:29:32 +03:00
parent b6c85cd4a4
commit d80ef4bf4e
41 changed files with 384 additions and 398 deletions

View File

@ -13,28 +13,28 @@ module Risc
#show_main_ticks # get output of what is
check_main_chain [LoadConstant, LoadConstant, SlotToReg, RegToSlot, RegToSlot,
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
RegToSlot, SlotToReg, RegToSlot, Branch, SlotToReg,
RegToSlot, LoadConstant, SlotToReg, RegToSlot, LoadConstant,
SlotToReg, SlotToReg, RegToSlot, LoadConstant, SlotToReg,
SlotToReg, RegToSlot, Branch, LoadConstant, SlotToReg,
RegToSlot, SlotToReg, FunctionCall, SlotToReg, SlotToReg,
SlotToReg, SlotToReg, SlotToReg, SlotToReg, SlotToReg,
RegToByte, SlotToReg, SlotToReg, RegToSlot, SlotToReg,
SlotToReg, Branch, RegToSlot, SlotToReg, SlotToReg,
SlotToReg, FunctionReturn, SlotToReg, SlotToReg, RegToSlot,
RegToSlot, RegToSlot, SlotToReg, Branch, RegToSlot,
LoadConstant, SlotToReg, RegToSlot, LoadConstant, SlotToReg,
SlotToReg, RegToSlot, LoadConstant, SlotToReg, SlotToReg,
RegToSlot, LoadConstant, Branch, SlotToReg, RegToSlot,
SlotToReg, FunctionCall, SlotToReg, SlotToReg, SlotToReg,
SlotToReg, SlotToReg, SlotToReg, SlotToReg, RegToByte,
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
Branch, RegToSlot, SlotToReg, SlotToReg, SlotToReg,
FunctionReturn, Transfer, SlotToReg, Branch, SlotToReg,
Syscall, NilClass]
FunctionReturn, SlotToReg, SlotToReg, RegToSlot, SlotToReg,
SlotToReg, RegToSlot, SlotToReg, SlotToReg, RegToSlot,
Branch, SlotToReg, SlotToReg, SlotToReg, FunctionReturn,
Transfer, SlotToReg, SlotToReg, Branch, Syscall,
NilClass]
assert_equal "K".ord , get_return
end
def test_reg_to_byte
done = main_ticks(41)
done = main_ticks(40)
assert_equal RegToByte , done.class
assert_equal "K".ord , @interpreter.get_register(done.register)
end
def test_exit
done = main_ticks(71)
done = main_ticks(70)
assert_equal Syscall , done.class
end