From 6246753c2730015e6a4b9138bd6896d1724a80ed Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Tue, 6 Oct 2015 00:22:18 +0300 Subject: [PATCH] add another simple function test --- .../function_definition/function_foo2.tst | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/cases/function_definition/function_foo2.tst diff --git a/test/cases/function_definition/function_foo2.tst b/test/cases/function_definition/function_foo2.tst new file mode 100644 index 0000000..5f286f9 --- /dev/null +++ b/test/cases/function_definition/function_foo2.tst @@ -0,0 +1,22 @@ +int foo(int x) + int a = 5 + return a +end +3.foo( 4 ) +-- -- -- +s(:expressions, + s(:function, :int, + s(:name, :foo), + s(:parameters, + s(:parameter, :int, :x)), + s(:expressions, + s(:field_def, :int, :a, + s(:int, 5)), + s(:return, + s(:name, :a)))), + s(:call, + s(:name, :foo), + s(:arguments, + s(:int, 4)), + s(:receiver, + s(:int, 3))))