You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2013/04/19 17:34:02 UTC

[09/19] git commit: [flex-falcon] - [FalconJX] resolved TODO

[FalconJX] resolved TODO

Use IFunctionCallNode instead of IIfNode.

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/9a6d0112
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/9a6d0112
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/9a6d0112

Branch: refs/heads/develop
Commit: 9a6d01124e80a02feef13147b7bfe34dca169d2a
Parents: 452e4ab
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Apr 19 17:02:14 2013 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Apr 19 17:02:14 2013 +0200

----------------------------------------------------------------------
 .../codegen/js/goog/TestGoogExpressions.java       |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9a6d0112/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogExpressions.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogExpressions.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogExpressions.java
index 8938da9..997b46a 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogExpressions.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogExpressions.java
@@ -135,12 +135,11 @@ public class TestGoogExpressions extends TestExpressions
     @Test
     public void testAnonymousFunctionAsArgument()
     {
-        // TODO (mschmalle) using IIfNode in expressions test, any other way to do this without statement?
-        IIfNode node = (IIfNode) getNode(
-                "if (a) {addListener('foo', function(event:Object):void{doit();});}",
-                IIfNode.class);
-        asBlockWalker.visitIf(node);
-        assertOut("if (a) {\n\taddListener('foo', function(event) {\n\t\tdoit();\n\t});\n}");
+        IFunctionCallNode node = (IFunctionCallNode) getNode(
+                "addListener('foo', function(event:Object):void{doit();})",
+                IFunctionCallNode.class);
+        asBlockWalker.visitFunctionCall(node);
+        assertOut("addListener('foo', function(event) {\n\tdoit();\n})");
     }
 
     @Override