flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [10/19] git commit: [flex-falcon] - [FalconJX] resolved TODO
Date Fri, 19 Apr 2013 15:34:03 GMT
[FalconJX] resolved TODO

Fixed 'goog' test for multiple case statements; added 'type cast'.

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/ee46707f
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/ee46707f
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/ee46707f

Branch: refs/heads/develop
Commit: ee46707f24dca5d07fb5b63ecf6ff7e1c65a49fa
Parents: 9a6d011
Author: Erik de Bruin <erik@ixsoftware.nl>
Authored: Fri Apr 19 17:03:21 2013 +0200
Committer: Erik de Bruin <erik@ixsoftware.nl>
Committed: Fri Apr 19 17:03:21 2013 +0200

----------------------------------------------------------------------
 .../codegen/js/goog/TestGoogStatements.java        |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ee46707f/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogStatements.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogStatements.java
b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogStatements.java
index aca660f..4cf86e7 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogStatements.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogStatements.java
@@ -25,6 +25,7 @@ import org.apache.flex.compiler.internal.driver.js.goog.GoogBackend;
 import org.apache.flex.compiler.internal.tree.as.LabeledStatementNode;
 import org.apache.flex.compiler.tree.as.IFileNode;
 import org.apache.flex.compiler.tree.as.IForLoopNode;
+import org.apache.flex.compiler.tree.as.ISwitchNode;
 import org.apache.flex.compiler.tree.as.ITryNode;
 import org.apache.flex.compiler.tree.as.IVariableNode;
 import org.junit.Test;
@@ -238,6 +239,19 @@ public class TestGoogStatements extends TestStatements
     }
 
     //----------------------------------
+    // switch {}
+    //----------------------------------
+
+    @Test
+    public void testVisitSwitch_3()
+    {
+        ISwitchNode node = (ISwitchNode) getNode(
+                "switch(i){case 1: { var x:int = 42; break; }; case 2: { var y:int = 66;
break; }}", ISwitchNode.class);
+        asBlockWalker.visitSwitch(node);
+        assertOut("switch (i) {\n\tcase 1:\n\t\tvar /** @type {number} */ x = 42;\n\t\tbreak;\n\tcase
2:\n\t\tvar /** @type {number} */ y = 66;\n\t\tbreak;\n}");
+    }
+
+    //----------------------------------
     // label : for () {}
     //----------------------------------
 


Mime
View raw message