fix tests from interpreter load change

loading values, not Constants
This commit is contained in:
Torsten Ruger 2018-03-24 12:24:53 +02:00
parent 2c137e8c97
commit 65d3d5f1c9
2 changed files with 9 additions and 9 deletions

View File

@ -11,14 +11,14 @@ module Risc
def test_chain def test_chain
#show_ticks # get output of what is #show_ticks # get output of what is
check_chain [Branch, Label, LoadConstant, SlotToReg, RegToSlot, check_chain [Branch, Label, LoadConstant, SlotToReg, SlotToReg,
LoadConstant, RegToSlot, FunctionCall, Label, LoadConstant, RegToSlot, LoadConstant, RegToSlot, FunctionCall, Label,
SlotToReg, SlotToReg, RegToSlot, LoadConstant, SlotToReg, LoadConstant, SlotToReg, SlotToReg, RegToSlot, LoadConstant,
SlotToReg, SlotToReg, SlotToReg, RegToSlot, LoadConstant,
SlotToReg, SlotToReg, SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg, SlotToReg, SlotToReg, RegToSlot,
LoadConstant, SlotToReg, RegToSlot, LoadConstant, SlotToReg, LoadConstant, SlotToReg, SlotToReg, SlotToReg, SlotToReg,
RegToSlot, SlotToReg, LoadConstant, FunctionCall, Label, RegToSlot, LoadConstant, SlotToReg, RegToSlot, LoadConstant,
Label, NilClass] SlotToReg, RegToSlot, SlotToReg, LoadConstant, FunctionCall,
Label, Label, NilClass]
end end
def pest_get def pest_get

View File

@ -16,7 +16,7 @@ module Risc
LoadConstant, RegToSlot, SlotToReg, SlotToReg, RegToSlot, LoadConstant, RegToSlot, SlotToReg, SlotToReg, RegToSlot,
SlotToReg, SlotToReg, FunctionReturn, Transfer, Syscall, SlotToReg, SlotToReg, FunctionReturn, Transfer, Syscall,
NilClass] NilClass]
assert_equal 5 , get_return.value assert_equal 5 , get_return
end end
def test_call_main def test_call_main
@ -27,7 +27,7 @@ module Risc
def test_load_5 def test_load_5
load_ins = ticks 11 load_ins = ticks 11
assert_equal LoadConstant , load_ins.class assert_equal LoadConstant , load_ins.class
assert_equal 5 , @interpreter.get_register(load_ins.register).value assert_equal 5 , @interpreter.get_register(load_ins.register)
end end
def test_transfer def test_transfer
transfer = ticks(19) transfer = ticks(19)