rubyx/test/risc/methods/test_call_simple.rb
Torsten Ruger d84d208192 implement assignment normalisation
especially when the value is a send that needs normalising
fixes several broken tests
2018-04-27 21:56:41 +03:00

34 lines
619 B
Ruby

require_relative 'helper'
module Methods
class TestCallSimple < MethodsTest
def test_simple
run_space <<HERE
def same( n )
return n
end
def main(arg)
return same(8)
end
HERE
assert_equal Parfait::Integer , get_return.class
assert_equal 8 , get_return.value
end
def test_call_with_call
run_space <<HERE
def same( n )
return n
end
def main(arg)
a = same(8 - 1)
return a
end
HERE
assert_equal Parfait::Integer , get_return.class
assert_equal 7 , get_return.value
end
end
end