diff --git a/test/typed/expressions/test_all.rb b/test/typed/expressions/test_all.rb index 6b2411ac..47e61631 100644 --- a/test/typed/expressions/test_all.rb +++ b/test/typed/expressions/test_all.rb @@ -1,4 +1,4 @@ require_relative "test_basic" require_relative "test_field_access" require_relative "test_ops" -#require_relative "test_call" +require_relative "test_call" diff --git a/test/typed/expressions/test_call.rb b/test/typed/expressions/test_call.rb index 45b908e7..8df72f0d 100644 --- a/test/typed/expressions/test_call.rb +++ b/test/typed/expressions/test_call.rb @@ -3,6 +3,7 @@ require_relative "helper" module Register class TestCall < MiniTest::Test include ExpressionHelper + include AST::Sexp def setup Register.machine.boot @@ -10,28 +11,28 @@ module Register end def test_call_main_plain - @input = 'main()' + @input = s(:call, s(:name, :main), s(:arguments)) check end def test_call_main_int - @input = 'main(1)' + @input = s(:call, s(:name, :main), s(:arguments , s(:int, 1))) check end def test_call_main_string - @input = 'main("1")' + @input = s(:call, s(:name, :main), s(:arguments , s(:string, "1") )) check end def test_call_main_op Register.machine.space.get_main.ensure_local(:bar , :Integer) - @input = 'main( bar )' + @input = s(:call, s(:name, :main), s(:arguments , s(:name, :bar) )) check end def test_call_string_put - @input = '"Hello Raisa, I am salama".putstring()' + @input = s(:call, s(:name, :putstring), s(:arguments), s(:receiver, s(:string, "Hello Raisa, I am salama"))) check end