TestExpressions: added tests for function calls
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/4f9787cc Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/4f9787cc Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/4f9787cc Branch: refs/heads/develop Commit: 4f9787cc1b70a04a983b3ef57bc576f6c5714c08 Parents: e1d5ab1 Author: Josh Tynjala <[email protected]> Authored: Fri Apr 1 12:42:34 2016 -0700 Committer: Josh Tynjala <[email protected]> Committed: Fri Apr 1 12:42:34 2016 -0700 ---------------------------------------------------------------------- .../internal/codegen/as/TestExpressions.java | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/4f9787cc/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestExpressions.java ---------------------------------------------------------------------- diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestExpressions.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestExpressions.java index 85fc8f5..ab7d66f 100644 --- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestExpressions.java +++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestExpressions.java @@ -737,4 +737,28 @@ public class TestExpressions extends ASTestBase asBlockWalker.visitReturn(node); assertOut("return"); } + + @Test + public void testVisitFunctionCall_1() + { + IFunctionCallNode node = (IFunctionCallNode) getNode("a()", IFunctionCallNode.class); + asBlockWalker.visitFunctionCall(node); + assertOut("a()"); + } + + @Test + public void testVisitFunctionCall_2() + { + IFunctionCallNode node = (IFunctionCallNode) getNode("a(b)", IFunctionCallNode.class); + asBlockWalker.visitFunctionCall(node); + assertOut("a(b)"); + } + + @Test + public void testVisitFunctionCall_3() + { + IFunctionCallNode node = (IFunctionCallNode) getNode("a(b, c)", IFunctionCallNode.class); + asBlockWalker.visitFunctionCall(node); + assertOut("a(b, c)"); + } }
