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
#show_ticks # get output of what is
check_chain [Branch, Label, LoadConstant, SlotToReg, RegToSlot,
LoadConstant, RegToSlot, FunctionCall, Label, LoadConstant,
SlotToReg, SlotToReg, RegToSlot, LoadConstant, SlotToReg,
SlotToReg, SlotToReg, SlotToReg, RegToSlot, LoadConstant,
check_chain [Branch, Label, LoadConstant, SlotToReg, SlotToReg,
RegToSlot, LoadConstant, RegToSlot, FunctionCall, Label,
LoadConstant, SlotToReg, SlotToReg, RegToSlot, LoadConstant,
SlotToReg, SlotToReg, SlotToReg, SlotToReg, RegToSlot,
LoadConstant, SlotToReg, RegToSlot, LoadConstant, SlotToReg,
RegToSlot, SlotToReg, LoadConstant, FunctionCall, Label,
Label, NilClass]
LoadConstant, SlotToReg, SlotToReg, SlotToReg, SlotToReg,
RegToSlot, LoadConstant, SlotToReg, RegToSlot, LoadConstant,
SlotToReg, RegToSlot, SlotToReg, LoadConstant, FunctionCall,
Label, Label, NilClass]
end
def pest_get

View File

@ -16,7 +16,7 @@ module Risc
LoadConstant, RegToSlot, SlotToReg, SlotToReg, RegToSlot,
SlotToReg, SlotToReg, FunctionReturn, Transfer, Syscall,
NilClass]
assert_equal 5 , get_return.value
assert_equal 5 , get_return
end
def test_call_main
@ -27,7 +27,7 @@ module Risc
def test_load_5
load_ins = ticks 11
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
def test_transfer
transfer = ticks(19)