flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject svn commit: r1431325 - /flex/whiteboard/mschmalle/falconjx/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestExpressions.java
Date Thu, 10 Jan 2013 12:46:42 GMT
Author: erikdebruin
Date: Thu Jan 10 12:46:42 2013
New Revision: 1431325

URL: http://svn.apache.org/viewvc?rev=1431325&view=rev
Log:
- added tests for parentheses (right now ignored as the compiler removes all parentheses,
it seems) and the 'typeof a' operator (also ignored, the compiler only outputs 'typeof(a)')

Modified:
    flex/whiteboard/mschmalle/falconjx/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestExpressions.java

Modified: flex/whiteboard/mschmalle/falconjx/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestExpressions.java
URL: http://svn.apache.org/viewvc/flex/whiteboard/mschmalle/falconjx/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestExpressions.java?rev=1431325&r1=1431324&r2=1431325&view=diff
==============================================================================
--- flex/whiteboard/mschmalle/falconjx/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestExpressions.java
(original)
+++ flex/whiteboard/mschmalle/falconjx/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestExpressions.java
Thu Jan 10 12:46:42 2013
@@ -466,6 +466,37 @@ public class TestExpressions extends Tes
     // Other
     //----------------------------------
 
+    @Ignore
+    @Test
+    public void testParentheses_1()
+    {
+    	// TODO (erikdebruin/mschmalle) what happens to the parentheses?
+        IVariableNode node = (IVariableNode) getNode("var a = (a + b);",
+                IVariableNode.class);
+        visitor.visitVariable(node);
+        assertOutDebug("var a = (a + b)");
+    }
+
+    @Ignore
+    @Test
+    public void testParentheses_2()
+    {
+        IVariableNode node = (IVariableNode) getNode("var a = (a + b) - c;",
+                IVariableNode.class);
+        visitor.visitVariable(node);
+        assertOutDebug("var a = (a + b) - c");
+    }
+
+    @Ignore
+    @Test
+    public void testParentheses_3()
+    {
+        IVariableNode node = (IVariableNode) getNode("var a = ((a + b) - (c + d)) * e;",
+                IVariableNode.class);
+        visitor.visitVariable(node);
+        assertOutDebug("var a = ((a + b) - (c + d)) * e");
+    }
+
     @Test
     public void testAnonymousFunction()
     {
@@ -660,6 +691,16 @@ public class TestExpressions extends Tes
         assertOut("typeof(a)");
     }
 
+    @Ignore
+    @Test
+    public void testVisitUnaryOperatorNode_Typeof_NoParens()
+    {
+    	// TODO (erikdebruin/mschmalle) this notation is also valid in AS/JS
+        IUnaryOperatorNode node = getUnaryNode("typeof a");
+        visitor.visitUnaryOperator(node);
+        assertOut("typeof a");
+    }
+
     @Test
     public void testVisitUnaryOperatorNode_Void()
     {



Mime
View raw message