- 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)')

git-svn-id: https://svn.apache.org/repos/asf/flex/whiteboard@1431325 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/mschmalle/falconjx/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestExpressions.java b/mschmalle/falconjx/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestExpressions.java
index 730c2bf..b7bace3 100644
--- a/mschmalle/falconjx/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestExpressions.java
+++ b/mschmalle/falconjx/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestExpressions.java
@@ -466,6 +466,37 @@
     // 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 @@
         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()
     {