You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jo...@apache.org on 2016/04/06 01:56:42 UTC

[24/33] git commit: [flex-falcon] [refs/heads/develop] - TestExpressions: added tests for function calls

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 <jo...@apache.org>
Authored: Fri Apr 1 12:42:34 2016 -0700
Committer: Josh Tynjala <jo...@apache.org>
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)");
+    }
 }