rubyx/test/soml/expressions/test_call.rb
Torsten Ruger 18f9ea019e move parfait tests to some
after renaming compiler to soml
it’s where they wanna be
also will allow for unifying test helpers and testing fragments
remotely too
2015-11-18 12:14:31 +02:00

46 lines
848 B
Ruby

require_relative "helper"
module Register
class TestCall < MiniTest::Test
include ExpressionHelper
def setup
Register.machine.boot
@root = :call_site
@output = Register::RegisterValue
end
def test_call_main_plain
@string_input = 'main()'
check
end
def test_call_main_int
@string_input = 'main(1)'
check
end
def test_call_self_main
@string_input = 'self.main()'
check
end
def test_call_main_string
@string_input = 'main("1")'
check
end
def test_call_main_op
Register.machine.space.get_main.ensure_local(:bar , :Integer)
@string_input = 'main( bar )'
check
end
def test_call_string_put
@string_input = '"Hello Raisa, I am salama".putstring()'
check
end
end
end