flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [11/19] git commit: [flex-falcon] - [FalconJX] fixed 'INamespaceAccessExpressionNode' interface and tests
Date Fri, 19 Apr 2013 15:34:04 GMT
[FalconJX] fixed 'INamespaceAccessExpressionNode' interface and tests

Signed-off-by: Erik de Bruin <erik@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/c8357e61
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/c8357e61
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/c8357e61

Branch: refs/heads/develop
Commit: c8357e61a77f73b53b3cfcac46f6ed60639e2456
Parents: ee46707
Author: Erik de Bruin <erik@ixsoftware.nl>
Authored: Fri Apr 19 17:04:40 2013 +0200
Committer: Erik de Bruin <erik@ixsoftware.nl>
Committed: Fri Apr 19 17:04:40 2013 +0200

----------------------------------------------------------------------
 .../internal/codegen/as/TestExpressions.java       |    6 ++----
 .../codegen/js/goog/TestGoogExpressions.java       |    8 +++-----
 .../flex/compiler/internal/test/ASTestBase.java    |    8 ++++++++
 .../tree/as/NamespaceAccessExpressionNode.java     |    4 ++--
 4 files changed, 15 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c8357e61/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 12a39b8..16ec842 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
@@ -612,8 +612,7 @@ public class TestExpressions extends ASTestBase
     @Test
     public void testVisitBinaryOperator_NamespaceAccess_1()
     {
-        INamespaceAccessExpressionNode node = (INamespaceAccessExpressionNode) getExpressionNode(
-                "a::b", INamespaceAccessExpressionNode.class);
+        INamespaceAccessExpressionNode node = (INamespaceAccessExpressionNode) getNamespaceAccessExpressionNode("a::b");
         asBlockWalker.visitNamespaceAccessExpression(node);
         assertOut("a::b");
     }
@@ -621,8 +620,7 @@ public class TestExpressions extends ASTestBase
     @Test
     public void testVisitBinaryOperator_NamespaceAccess_2()
     {
-        INamespaceAccessExpressionNode node = (INamespaceAccessExpressionNode) getExpressionNode(
-                "a::b::c", INamespaceAccessExpressionNode.class);
+        INamespaceAccessExpressionNode node = (INamespaceAccessExpressionNode) getNamespaceAccessExpressionNode("a::b::c");
         asBlockWalker.visitNamespaceAccessExpression(node);
         assertOut("a::b::c");
     }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c8357e61/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 997b46a..d984058 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
@@ -23,8 +23,8 @@ import org.apache.flex.compiler.driver.IBackend;
 import org.apache.flex.compiler.internal.codegen.as.TestExpressions;
 import org.apache.flex.compiler.internal.driver.js.goog.GoogBackend;
 import org.apache.flex.compiler.tree.as.IBinaryOperatorNode;
+import org.apache.flex.compiler.tree.as.IFunctionCallNode;
 import org.apache.flex.compiler.tree.as.IFunctionNode;
-import org.apache.flex.compiler.tree.as.IIfNode;
 import org.apache.flex.compiler.tree.as.INamespaceAccessExpressionNode;
 import org.apache.flex.compiler.tree.as.IVariableNode;
 import org.junit.Test;
@@ -173,8 +173,7 @@ public class TestGoogExpressions extends TestExpressions
     @Test
     public void testVisitBinaryOperator_NamespaceAccess_1()
     {
-        INamespaceAccessExpressionNode node = (INamespaceAccessExpressionNode) getExpressionNode(
-                "a::b", INamespaceAccessExpressionNode.class);
+        INamespaceAccessExpressionNode node = (INamespaceAccessExpressionNode) getNamespaceAccessExpressionNode("a::b");
         asBlockWalker.visitNamespaceAccessExpression(node);
         assertOut("a.b");
     }
@@ -183,8 +182,7 @@ public class TestGoogExpressions extends TestExpressions
     @Test
     public void testVisitBinaryOperator_NamespaceAccess_2()
     {
-        INamespaceAccessExpressionNode node = (INamespaceAccessExpressionNode) getExpressionNode(
-                "a::b::c", INamespaceAccessExpressionNode.class);
+        INamespaceAccessExpressionNode node = (INamespaceAccessExpressionNode) getNamespaceAccessExpressionNode("a::b::c");
         asBlockWalker.visitNamespaceAccessExpression(node);
         assertOut("a.b.c");
     }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c8357e61/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/ASTestBase.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/ASTestBase.java
b/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/ASTestBase.java
index f8fb1c9..f471fcc 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/ASTestBase.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/ASTestBase.java
@@ -13,6 +13,7 @@ import org.apache.flex.compiler.tree.as.IExpressionNode;
 import org.apache.flex.compiler.tree.as.IFileNode;
 import org.apache.flex.compiler.tree.as.IFunctionNode;
 import org.apache.flex.compiler.tree.as.IInterfaceNode;
+import org.apache.flex.compiler.tree.as.INamespaceAccessExpressionNode;
 import org.apache.flex.compiler.tree.as.IUnaryOperatorNode;
 import org.apache.flex.compiler.tree.as.IVariableNode;
 import org.apache.flex.utils.FilenameNormalization;
@@ -131,6 +132,13 @@ public class ASTestBase extends TestBase
         return (IBinaryOperatorNode) getNode(code, IBinaryOperatorNode.class);
     }
 
+    protected INamespaceAccessExpressionNode getNamespaceAccessExpressionNode(
+            String code)
+    {
+        return (INamespaceAccessExpressionNode) getNode(code,
+                INamespaceAccessExpressionNode.class);
+    }
+
     protected IDynamicAccessNode getDynamicAccessNode(String code)
     {
         return (IDynamicAccessNode) getNode(code, IDynamicAccessNode.class);

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c8357e61/compiler/src/org/apache/flex/compiler/internal/tree/as/NamespaceAccessExpressionNode.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/tree/as/NamespaceAccessExpressionNode.java
b/compiler/src/org/apache/flex/compiler/internal/tree/as/NamespaceAccessExpressionNode.java
index c968216..5fc8230 100644
--- a/compiler/src/org/apache/flex/compiler/internal/tree/as/NamespaceAccessExpressionNode.java
+++ b/compiler/src/org/apache/flex/compiler/internal/tree/as/NamespaceAccessExpressionNode.java
@@ -25,9 +25,9 @@ import org.apache.flex.compiler.definitions.references.INamespaceReference;
 import org.apache.flex.compiler.parsing.IASToken;
 import org.apache.flex.compiler.projects.ICompilerProject;
 import org.apache.flex.compiler.tree.ASTNodeID;
+import org.apache.flex.compiler.tree.as.INamespaceAccessExpressionNode;
 
-// TODO Add interface for this class
-public class NamespaceAccessExpressionNode extends BinaryOperatorNodeBase
+public class NamespaceAccessExpressionNode extends BinaryOperatorNodeBase implements INamespaceAccessExpressionNode
 {
     /**
      * Constructor.


Mime
View raw message