pass return integer back out through exit

for testing of binaries later (and off course general correctness)
Some tests were using the fact that the interpreter was used, changed those to return ints rather than strings
This commit is contained in:
Torsten Ruger
2018-06-19 18:55:47 +03:00
parent db459fcd3d
commit 5f7683efcf
33 changed files with 174 additions and 152 deletions

View File

@ -39,9 +39,10 @@ module Risc
FunctionReturn, SlotToReg, SlotToReg, RegToSlot, SlotToReg,
SlotToReg, RegToSlot, SlotToReg, SlotToReg, RegToSlot,
SlotToReg, SlotToReg, SlotToReg, Branch, FunctionReturn,
Transfer, Syscall, NilClass]
assert_equal Parfait::Integer , get_return.class
assert_equal 1 , get_return.value
SlotToReg, SlotToReg, Branch, Transfer, Syscall,
NilClass]
assert_equal Fixnum , get_return.class
assert_equal 1 , get_return
end
def test_call_main
@ -66,7 +67,7 @@ module Risc
assert_equal Fixnum , link.class
end
def test_sys
sys = main_ticks(142)
sys = main_ticks(145)
assert_equal Syscall , sys.class
end
end