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

@ -20,13 +20,11 @@ HERE
end
def test_call_sm
run_space if_cond(8)
assert_equal Parfait::Integer , get_return.class
assert_equal 10 , get_return.value
assert_equal 10 , get_return
end
def test_call_lg
run_space if_cond(18)
assert_equal Parfait::Integer , get_return.class
assert_equal 20 , get_return.value
assert_equal 20 , get_return
end
end
end

View File

@ -18,8 +18,7 @@ module Methods
return down(8)
end
HERE
assert_equal Parfait::Integer , get_return.class
assert_equal 1 , get_return.value
assert_equal 1 , get_return
end
def est_fibo
@ -38,8 +37,7 @@ HERE
return fibo_r(8)
end
HERE
assert_equal Parfait::Integer , get_return.class
assert_equal 8 , get_return.value
assert_equal 8 , get_return
end
end
end

View File

@ -12,8 +12,7 @@ module Methods
return same(8)
end
HERE
assert_equal Parfait::Integer , get_return.class
assert_equal 8 , get_return.value
assert_equal 8 , get_return
end
def test_call_with_call
@ -26,8 +25,7 @@ HERE
return a
end
HERE
assert_equal Parfait::Integer , get_return.class
assert_equal 7 , get_return.value
assert_equal 7 , get_return
end
end
end