flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mschma...@apache.org
Subject svn commit: r1452955 [1/9] - in /flex/falcon/trunk: compiler.jx.tests/src/org/apache/flex/compiler/internal/as/ compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/ compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/ compile...
Date Tue, 05 Mar 2013 19:22:09 GMT
Author: mschmalle
Date: Tue Mar  5 19:22:05 2013
New Revision: 1452955

URL: http://svn.apache.org/r1452955
Log:
Flex:FalconJx:
- Moved packages to final resting places, driver, codegen etc.

Added:
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestAccessorMembers.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestClass.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestComments.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestExpressions.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestFieldMembers.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalClasses.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalConstants.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalFunctions.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestInterface.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestMethodMembers.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestPackage.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestStatements.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/amd/
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/amd/TestAMDClassA.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/amd/TestAMDClassB.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/amd/TestAMDEmiter.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/amd/TestAMDInterfaceI.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/amd/TestAMDInterfaceIOther.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/amd/TestAMDInterfaceISub.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/amd/TestAMDPackage.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogAccessorMembers.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogClass.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogEmiter.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogExpressions.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogFieldMembers.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogFile.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogGlobalClasses.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogGlobalConstants.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogGlobalFunctions.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogInterface.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogMethodMembers.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogPackage.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/goog/TestGoogStatements.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/TestMXMLApplication.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/TestMXMLAttributes.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/TestMXMLNodes.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/TestMXMLScript.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/IASGlobalFunctionConstants.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/IDocEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/IEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/IEmitterTokens.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/as/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/as/IASEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/as/IASWriter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/js/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/js/IJSDocEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/js/IJSEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/js/IJSPublisher.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/js/IJSWriter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/js/amd/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/js/amd/IJSAMDDocEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/js/amd/IJSAMDEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/js/goog/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/js/goog/IJSGoogDocEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/js/goog/IJSGoogEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/mxml/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/mxml/IMXMLEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/mxml/flexjs/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/codegen/mxml/flexjs/IMXMLFlexJSEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/driver/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/driver/IApplication.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/driver/IBackend.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/driver/js/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/driver/js/IJSApplication.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/Emitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASAfterNodeStrategy.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASBeforeNodeStrategy.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASBlockWalker.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASEmitterTokens.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASFilterWriter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASWriter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSDocEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSDocEmitterTokens.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSEmitterTokens.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSFilterWriter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSPublisher.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSSharedData.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSWriter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/amd/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/amd/ExportWriter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/amd/JSAMDDocEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/amd/JSAMDEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/amd/JSAMDEmitterTokens.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/amd/TempTools.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogDocEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogDocEmitterTokens.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogEmitterTokens.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/MXMLBlockWalker.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/MXMLEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/MXMLEmitterTokens.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSBlockWalker.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/as/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/as/ASBackend.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/JSApplication.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/JSBackend.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/JSCompilationUnit.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/JSSourceFileHandler.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/amd/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/amd/AMDBackend.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/goog/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/goog/GoogBackend.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/goog/JSGoogConfiguration.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/mxml/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/mxml/MXMLBackend.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/mxml/MXMLSourceFileHandler.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/mxml/flexjs/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/driver/mxml/flexjs/MXMLFlexJSBackend.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/visitor/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/visitor/as/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/visitor/as/ASNodeHandler.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/visitor/as/ASNodeSwitch.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/visitor/as/BeforeAfterStrategy.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/visitor/js/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/visitor/mxml/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/visitor/mxml/MXMLNodeSwitch.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/utils/ASNodeUtils.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/visitor/as/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/visitor/as/IASBlockVisitor.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/visitor/as/IASBlockWalker.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/visitor/js/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/visitor/mxml/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/visitor/mxml/IMXMLBlockVisitor.java   (with props)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/visitor/mxml/IMXMLBlockWalker.java   (with props)
Removed:
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/as/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/common/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/constants/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/as/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/common/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/js/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/mxml/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/js/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/mxml/
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/visitor/IASBlockVisitor.java
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/visitor/IASBlockWalker.java
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/visitor/IMXMLBlockVisitor.java
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/visitor/IMXMLBlockWalker.java
Modified:
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/AMDTestBase.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/ASTestBase.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/FlexJSTestBase.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/ITestBase.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/MXMLTestBase.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/TestBase.java
    flex/falcon/trunk/compiler.jx/bin/   (props changed)
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/clients/MXMLJSC.java
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/targets/JSTarget.java
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/targets/IJSTarget.java
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/utils/JSClosureCompilerUtil.java
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/utils/NativeUtils.java
    flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/visitor/IASNodeStrategy.java

Added: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestAccessorMembers.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestAccessorMembers.java?rev=1452955&view=auto
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestAccessorMembers.java (added)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestAccessorMembers.java Tue Mar  5 19:22:05 2013
@@ -0,0 +1,101 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.codegen.as;
+
+import org.apache.flex.compiler.internal.test.ASTestBase;
+import org.apache.flex.compiler.tree.as.IAccessorNode;
+import org.junit.Test;
+
+/**
+ * This class tests the production of valid ActionScript3 code for Class
+ * Accessor members.
+ * 
+ * @author Michael Schmalle
+ */
+public class TestAccessorMembers extends ASTestBase
+{
+    //--------------------------------------------------------------------------
+    // Accessor
+    //--------------------------------------------------------------------------
+
+    @Test
+    public void testGetAccessor()
+    {
+        IAccessorNode node = getAccessor("function get foo():int{return -1;}");
+        asBlockWalker.visitFunction(node);
+        assertOut("function get foo():int {\n\treturn -1;\n}");
+    }
+
+    @Test
+    public void testGetAccessor_withNamespace()
+    {
+        IAccessorNode node = getAccessor("public function get foo():int{return -1;}");
+        asBlockWalker.visitFunction(node);
+        assertOut("public function get foo():int {\n\treturn -1;\n}");
+    }
+
+    @Test
+    public void testGetAccessor_withNamespaceOverride()
+    {
+        IAccessorNode node = getAccessor("public override function get foo():int{return -1;}");
+        asBlockWalker.visitFunction(node);
+        assertOut("public override function get foo():int {\n\treturn -1;\n}");
+    }
+
+    @Test
+    public void testGetAccessor_withStatic()
+    {
+        IAccessorNode node = getAccessor("public static function get foo():int{return -1;}");
+        asBlockWalker.visitFunction(node);
+        assertOut("public static function get foo():int {\n\treturn -1;\n}");
+    }
+
+    @Test
+    public void testSetAccessor()
+    {
+        IAccessorNode node = getAccessor("function set foo(value:int):void{}");
+        asBlockWalker.visitFunction(node);
+        assertOut("function set foo(value:int):void {\n}");
+    }
+
+    @Test
+    public void testSetAccessor_withNamespace()
+    {
+        IAccessorNode node = getAccessor("public function set foo(value:int):void{}");
+        asBlockWalker.visitFunction(node);
+        assertOut("public function set foo(value:int):void {\n}");
+    }
+
+    @Test
+    public void testSetAccessor_withNamespaceOverride()
+    {
+        IAccessorNode node = getAccessor("public override function set foo(value:int):void{}");
+        asBlockWalker.visitFunction(node);
+        assertOut("public override function set foo(value:int):void {\n}");
+    }
+
+    @Test
+    public void testSetAccessor_withStatic()
+    {
+        IAccessorNode node = getAccessor("public static function set foo(value:int):void{}");
+        asBlockWalker.visitFunction(node);
+        assertOut("public static function set foo(value:int):void {\n}");
+    }
+}

Propchange: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestAccessorMembers.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestClass.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestClass.java?rev=1452955&view=auto
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestClass.java (added)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestClass.java Tue Mar  5 19:22:05 2013
@@ -0,0 +1,234 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.codegen.as;
+
+import org.apache.flex.compiler.internal.test.ASTestBase;
+import org.apache.flex.compiler.tree.as.IClassNode;
+import org.apache.flex.compiler.tree.as.IFileNode;
+import org.junit.Test;
+
+/**
+ * This class tests the production of valid ActionScript3 code for Class
+ * production.
+ * 
+ * @author Michael Schmalle
+ */
+public class TestClass extends ASTestBase
+{
+    //--------------------------------------------------------------------------
+    // Class
+    //--------------------------------------------------------------------------
+
+    @Test
+    public void testSimple()
+    {
+        IClassNode node = getClassNode("public class A{}");
+        asBlockWalker.visitClass(node);
+        assertOut("public class A {\n}");
+    }
+
+    @Test
+    public void testSimpleInternal()
+    {
+        IClassNode node = getClassNode("internal class A{}");
+        asBlockWalker.visitClass(node);
+        assertOut("internal class A {\n}");
+    }
+
+    @Test
+    public void testSimpleFinal()
+    {
+        IClassNode node = getClassNode("public final class A{}");
+        asBlockWalker.visitClass(node);
+        assertOut("public final class A {\n}");
+    }
+
+    @Test
+    public void testSimpleDynamic()
+    {
+        IClassNode node = getClassNode("public dynamic class A{}");
+        asBlockWalker.visitClass(node);
+        assertOut("public dynamic class A {\n}");
+    }
+
+    @Test
+    public void testSimpleExtends()
+    {
+        IClassNode node = getClassNode("public class A extends B {}");
+        asBlockWalker.visitClass(node);
+        assertOut("public class A extends B {\n}");
+    }
+
+    @Test
+    public void testSimpleImplements()
+    {
+        IClassNode node = getClassNode("public class A implements IA {}");
+        asBlockWalker.visitClass(node);
+        assertOut("public class A implements IA {\n}");
+    }
+
+    @Test
+    public void testSimpleImplementsMultiple()
+    {
+        IClassNode node = getClassNode("public class A implements IA, IB, IC {}");
+        asBlockWalker.visitClass(node);
+        assertOut("public class A implements IA, IB, IC {\n}");
+    }
+
+    @Test
+    public void testSimpleExtendsImplements()
+    {
+        IClassNode node = getClassNode("public class A extends B implements IA {}");
+        asBlockWalker.visitClass(node);
+        assertOut("public class A extends B implements IA {\n}");
+    }
+
+    @Test
+    public void testSimpleExtendsImplementsMultiple()
+    {
+        IClassNode node = getClassNode("public class A extends B implements IA, IB, IC {}");
+        asBlockWalker.visitClass(node);
+        assertOut("public class A extends B implements IA, IB, IC {\n}");
+    }
+
+    @Test
+    public void testSimpleFinalExtendsImplementsMultiple()
+    {
+        IClassNode node = getClassNode("public final class A extends B implements IA, IB, IC {}");
+        asBlockWalker.visitClass(node);
+        assertOut("public final class A extends B implements IA, IB, IC {\n}");
+    }
+
+    @Test
+    public void testQualifiedExtendsImplementsMultiple()
+    {
+        IClassNode node = getClassNode("public class A extends goo.B implements foo.bar.IA, goo.foo.IB, baz.boo.IC {}");
+        asBlockWalker.visitClass(node);
+        assertOut("public class A extends goo.B implements foo.bar.IA, goo.foo.IB, baz.boo.IC {\n}");
+    }
+
+    @Test
+    public void testConstructor()
+    {
+        IClassNode node = getClassNode("public class A {public function A(){super('foo', 42);}}");
+        asBlockWalker.visitClass(node);
+        assertOut("public class A {\n\tpublic function A() {\n\t\tsuper('foo', 42);\n\t}\n}");
+    }
+
+    @Test
+    public void testConstructor_withArguments()
+    {
+        IClassNode node = getClassNode("public class A {public function A(arg1:String, arg2:int) {}}");
+        asBlockWalker.visitClass(node);
+        assertOut("public class A {\n\tpublic function A(arg1:String, arg2:int) {\n\t}\n}");
+    }
+
+    @Test
+    public void testExtendsConstructor_withArguments()
+    {
+        IClassNode node = getClassNode("public class A extends B {public function A(arg1:String, arg2:int) {}}");
+        asBlockWalker.visitClass(node);
+        assertOut("public class A extends B {\n\tpublic function A(arg1:String, arg2:int) {\n\t}\n}");
+    }
+
+    @Test
+    public void testFields()
+    {
+        IClassNode node = getClassNode("public class A {public var a:Object;protected var b:String; "
+                + "private var c:int; internal var d:uint; var e:Number}");
+        asBlockWalker.visitClass(node);
+        assertOut("public class A {\n\tpublic var a:Object;\n\tprotected var b:String;"
+                + "\n\tprivate var c:int;\n\tvar d:uint;\n\tvar e:Number;\n}");
+    }
+
+    @Test
+    public void testConstants()
+    {
+        IClassNode node = getClassNode("public class A {"
+                + "public static const A:int = 42;"
+                + "protected static const B:Number = 42;"
+                + "private static const C:Number = 42;"
+                + "foo_bar static const C:String = 'me' + 'you';");
+        asBlockWalker.visitClass(node);
+        assertOut("public class A {\n\tpublic static const A:int = 42;\n\t"
+                + "protected static const B:Number = 42;\n\tprivate static const "
+                + "C:Number = 42;\n\tfoo_bar static const C:String = 'me' + 'you';\n}");
+    }
+
+    @Test
+    public void testAccessors()
+    {
+        IClassNode node = getClassNode("public class A {"
+                + "public function get foo1():Object{return null;}"
+                + "public function set foo1(value:Object):void{}"
+                + "protected function get foo2():Object{return null;}"
+                + "protected function set foo2(value:Object):void{}"
+                + "private function get foo3():Object{return null;}"
+                + "private function set foo3(value:Object):void{}"
+                + "internal function get foo5():Object{return null;}"
+                + "internal function set foo5(value:Object):void{}"
+                + "foo_bar function get foo6():Object{return null;}"
+                + "foo_bar function set foo6(value:Object):void{}" + "}");
+        asBlockWalker.visitClass(node);
+        assertOut("public class A {\n\tpublic function get foo1():Object {"
+                + "\n\t\treturn null;\n\t}\n\tpublic function set foo1(value:Object)"
+                + ":void {\n\t}\n\tprotected function get foo2():Object {\n\t\treturn "
+                + "null;\n\t}\n\tprotected function set foo2(value:Object):void "
+                + "{\n\t}\n\tprivate function get foo3():Object {\n\t\treturn null;"
+                + "\n\t}\n\tprivate function set foo3(value:Object):void {\n\t}\n\t"
+                + "function get foo5():Object {\n\t\treturn null;\n\t}\n\tfunction set "
+                + "foo5(value:Object):void {\n\t}\n\tfoo_bar function get foo6():Object "
+                + "{\n\t\treturn null;\n\t}\n\tfoo_bar function set "
+                + "foo6(value:Object):void {\n\t}\n}");
+    }
+
+    @Test
+    public void testMethods()
+    {
+        IClassNode node = getClassNode("public class A {"
+                + "public function foo1():Object{return null;}"
+                + "public final function foo1a():Object{return null;}"
+                + "override public function foo1b():Object{return super.foo1b();}"
+                + "protected function foo2(value:Object):void{}"
+                + "private function foo3(value:Object):void{}"
+                + "internal function foo5(value:Object):void{}"
+                + "foo_bar function foo6(value:Object):void{}"
+                + "public static function foo7(value:Object):void{}"
+                + "foo_bar static function foo7(value:Object):void{}" + "}");
+        asBlockWalker.visitClass(node);
+        assertOut("public class A {\n\tpublic function foo1():Object {\n\t\treturn "
+                + "null;\n\t}\n\tpublic final function foo1a():Object {\n\t\treturn "
+                + "null;\n\t}\n\tpublic override function foo1b():Object {\n\t\treturn "
+                + "super.foo1b();\n\t}\n\tprotected function foo2(value:Object):void "
+                + "{\n\t}\n\tprivate function foo3(value:Object):void {\n\t}\n\tfunction "
+                + "foo5(value:Object):void {\n\t}\n\tfoo_bar function foo6(value:Object"
+                + "):void {\n\t}\n\tpublic static function foo7(value:Object):void {\n\t}"
+                + "\n\tfoo_bar static function foo7(value:Object):void {\n\t}\n}");
+    }
+
+    protected IClassNode getClassNode(String code)
+    {
+        String source = "package {" + code + "}";
+        IFileNode node = compileAS(source);
+        IClassNode child = (IClassNode) findFirstDescendantOfType(node,
+                IClassNode.class);
+        return child;
+    }
+}

Propchange: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestClass.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestComments.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestComments.java?rev=1452955&view=auto
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestComments.java (added)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestComments.java Tue Mar  5 19:22:05 2013
@@ -0,0 +1,72 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.codegen.as;
+
+import org.apache.flex.compiler.internal.test.ASTestBase;
+
+/**
+ * @author Erik de Bruin
+ */
+public class TestComments extends ASTestBase
+{
+    // (mschmalle) comments aren't preserved, no need for them in release 
+    //             output...
+
+    //	  @Test
+    //    public void testComment_SingleLine()
+    //    {
+    //    	IFunctionNode node = getMethod("function a():void {// single line comment};");
+    //        visitor.visitFunction(node);
+    //        assertOut("function a():void {\n\t// single line comment\n}");
+    //    }
+    //
+    //    @Test
+    //    public void testComment_SingleLine_After()
+    //    {
+    //    	IFunctionNode node = getMethod("function a():void {var a:String = ''; // single line comment};");
+    //        visitor.visitFunction(node);
+    //        assertOut("function a():void {\n\tvar a:String = ''; // single line comment\n}");
+    //    }
+    //
+    //    @Test
+    //    public void testComment_MultiLine()
+    //    {
+    //    	IFunctionNode node = getMethod("function a():void {/*first line comment\nsecond line comment*/};");
+    //        visitor.visitFunction(node);
+    //        assertOut("function a():void {\n\t/*first line comment\n\tsecond line comment*/\n}");
+    //    }
+    //
+    //    @Test
+    //    public void testComment_InLine()
+    //    {
+    //    	IFunctionNode node = getMethod("function a():void {var a:String /* inline comment */ = 'Hello world';};");
+    //        visitor.visitFunction(node);
+    //        assertOut("function a():void {\n\tvar a:String /* inline comment */ = 'Hello world';\n}");
+    //    }
+    //
+    //    @Test
+    //    public void testComment_ASDoc()
+    //    {
+    //    	IFunctionNode node = getMethod("function a():void {/**\n * line comment\n */};");
+    //        visitor.visitFunction(node);
+    //        assertOut("function a():void {\n\t/**\n\t * line comment\n\t */};");
+    //    }
+
+}

Propchange: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestComments.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestExpressions.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestExpressions.java?rev=1452955&view=auto
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestExpressions.java (added)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestExpressions.java Tue Mar  5 19:22:05 2013
@@ -0,0 +1,756 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.codegen.as;
+
+import org.apache.flex.compiler.internal.test.ASTestBase;
+import org.apache.flex.compiler.internal.tree.as.ArrayLiteralNode;
+import org.apache.flex.compiler.internal.tree.as.NamespaceAccessExpressionNode;
+import org.apache.flex.compiler.internal.tree.as.ObjectLiteralNode;
+import org.apache.flex.compiler.tree.as.IBinaryOperatorNode;
+import org.apache.flex.compiler.tree.as.IDynamicAccessNode;
+import org.apache.flex.compiler.tree.as.IFunctionCallNode;
+import org.apache.flex.compiler.tree.as.IIfNode;
+import org.apache.flex.compiler.tree.as.IIterationFlowNode;
+import org.apache.flex.compiler.tree.as.IMemberAccessExpressionNode;
+import org.apache.flex.compiler.tree.as.IReturnNode;
+import org.apache.flex.compiler.tree.as.ITernaryOperatorNode;
+import org.apache.flex.compiler.tree.as.IUnaryOperatorNode;
+import org.apache.flex.compiler.tree.as.IVariableNode;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * @author Michael Schmalle
+ */
+public class TestExpressions extends ASTestBase
+{
+
+    // ILanguageIdentifierNode -> IIdentifierNode
+
+    @Test
+    public void testVisitLanguageIdentifierNode_This()
+    {
+        IMemberAccessExpressionNode node = (IMemberAccessExpressionNode) getNode(
+                "if (a) this.a;", IMemberAccessExpressionNode.class);
+        asBlockWalker.visitMemberAccessExpression(node);
+        assertOut("this.a");
+    }
+
+    @Test
+    public void testVisitLanguageIdentifierNode_SuperMember()
+    {
+        IMemberAccessExpressionNode node = (IMemberAccessExpressionNode) getNode(
+                "if (a) super.foo;", IMemberAccessExpressionNode.class);
+        asBlockWalker.visitMemberAccessExpression(node);
+        assertOut("super.foo");
+    }
+
+    @Test
+    public void testVisitLanguageIdentifierNode_SuperMethod_1()
+    {
+        // NOTE: This is here as an example that a method call to super
+        // is always held within a IFunctionCallNode, here it's a plain member access
+        IMemberAccessExpressionNode node = (IMemberAccessExpressionNode) getNode(
+                "if (a) super.foo();", IMemberAccessExpressionNode.class);
+        asBlockWalker.visitMemberAccessExpression(node);
+        assertOut("super.foo");
+    }
+
+    @Test
+    public void testVisitLanguageIdentifierNode_SuperMethod_2()
+    {
+        IFunctionCallNode node = (IFunctionCallNode) getNode(
+                "if (a) super.foo(a, b, c);", IFunctionCallNode.class);
+        asBlockWalker.visitFunctionCall(node);
+        assertOut("super.foo(a, b, c)");
+    }
+
+    @Test
+    public void testVisitLanguageIdentifierNode_This1()
+    {
+        IMemberAccessExpressionNode node = (IMemberAccessExpressionNode) getNode(
+                "if (a) this.a;", IMemberAccessExpressionNode.class);
+
+        asBlockWalker.visitMemberAccessExpression(node);
+        assertOut("this.a");
+    }
+
+    @Test
+    public void testVisitLanguageIdentifierNode_This2()
+    {
+        IMemberAccessExpressionNode node = (IMemberAccessExpressionNode) getNode(
+                "if (a) this.a;", IMemberAccessExpressionNode.class);
+
+        asBlockWalker.visitMemberAccessExpression(node);
+        assertOut("this.a");
+    }
+
+    //----------------------------------
+    // Primary expression keywords
+    //----------------------------------
+
+    //----------------------------------
+    // Arithmetic
+    //----------------------------------
+
+    @Test
+    public void testVisitBinaryOperatorNode_Plus()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a + b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a + b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_Minus()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a - b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a - b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_Divide()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a / b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a / b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_Modulo()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a % b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a % b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_Multiply()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a * b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a * b");
+    }
+
+    @Test
+    public void testVisitUnaryOperatorNode_PostIncrement()
+    {
+        IUnaryOperatorNode node = getUnaryNode("a++");
+        asBlockWalker.visitUnaryOperator(node);
+        assertOut("a++");
+    }
+
+    @Test
+    public void testVisitUnaryOperatorNode_PreIncrement()
+    {
+        IUnaryOperatorNode node = getUnaryNode("++a");
+        asBlockWalker.visitUnaryOperator(node);
+        assertOut("++a");
+    }
+
+    @Test
+    public void testVisitUnaryOperatorNode_PostDecrement()
+    {
+        IUnaryOperatorNode node = getUnaryNode("a--");
+        asBlockWalker.visitUnaryOperator(node);
+        assertOut("a--");
+    }
+
+    @Test
+    public void testVisitUnaryOperatorNode_PreDecrement()
+    {
+        IUnaryOperatorNode node = getUnaryNode("--a");
+        asBlockWalker.visitUnaryOperator(node);
+        assertOut("--a");
+    }
+
+    //----------------------------------
+    // Arithmetic compound assignment
+    //----------------------------------
+
+    @Test
+    public void testVisitBinaryOperatorNode_PlusAssignment()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a += b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a += b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_MinusAssignment()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a -= b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a -= b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_DivideAssignment()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a /= b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a /= b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_ModuloAssignment()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a %= b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a %= b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_MultiplyAssignment()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a *= b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a *= b");
+    }
+
+    //----------------------------------
+    // Assignment
+    //----------------------------------
+
+    @Test
+    public void testVisitBinaryOperatorNode_Assignment()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a = b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a = b");
+    }
+
+    //----------------------------------
+    // Bitwise
+    //----------------------------------
+
+    @Test
+    public void testVisitBinaryOperatorNode_BitwiseAnd()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a & b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a & b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_BitwiseLeftShift()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a << b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a << b");
+    }
+
+    @Test
+    public void testVisitUnaryOperatorNode_BitwiseNot()
+    {
+        IUnaryOperatorNode node = getUnaryNode("~a");
+        asBlockWalker.visitUnaryOperator(node);
+        assertOut("~a");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_BitwiseOr()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a | b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a | b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_BitwiseRightShift()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a >> b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a >> b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_BitwiseUnsignedRightShift()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a >>> b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a >>> b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_BitwiseXOR()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a ^ b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a ^ b");
+    }
+
+    //----------------------------------
+    // Bitwise compound assignment
+    //----------------------------------
+
+    @Test
+    public void testVisitBinaryOperatorNode_BitwiseAndAssignment()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a &= b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a &= b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_BitwiseLeftShiftAssignment()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a <<= b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a <<= b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_BitwiseOrAssignment()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a |= b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a |= b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_BitwiseRightShiftAssignment()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a >>= b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a >>= b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_BitwiseUnsignedRightShiftAssignment()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a >>>= b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a >>>= b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_BitwiseXORAssignment()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a ^= b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a ^= b");
+    }
+
+    //----------------------------------
+    // Comparison
+    //----------------------------------
+
+    @Test
+    public void testVisitBinaryOperatorNode_Equal()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a == b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a == b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_GreaterThan()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a > b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a > b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_GreaterThanEqual()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a >= b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a >= b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_NotEqual()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a != b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a != b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_LessThan()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a < b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a < b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_LessThanEqual()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a <= b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a <= b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_StrictEqual()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a === b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a === b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_StrictNotEqual()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a !== b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a !== b");
+    }
+
+    //----------------------------------
+    // Logical
+    //----------------------------------
+
+    @Test
+    public void testVisitBinaryOperatorNode_LogicalAnd()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a && b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a && b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_LogicalAndAssignment()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a &&= b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a &&= b");
+    }
+
+    @Test
+    public void testVisitUnaryOperatorNode_LogicalNot()
+    {
+        IUnaryOperatorNode node = getUnaryNode("!a");
+        asBlockWalker.visitUnaryOperator(node);
+        assertOut("!a");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_LogicalOr()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a || b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a || b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_LogicalOrAssignment()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a ||= b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a ||= b");
+    }
+
+    //----------------------------------
+    // Other
+    //----------------------------------
+
+    @Ignore
+    @Test
+    public void testParentheses_1()
+    {
+        // TODO (mschmalle) why aren't parentheses preserved, various math 
+        //                  will come out wrong if they aren't?
+        IVariableNode node = (IVariableNode) getNode("var a = (a + b);",
+                IVariableNode.class);
+        asBlockWalker.visitVariable(node);
+        assertOut("var a = (a + b)");
+    }
+
+    @Ignore
+    @Test
+    public void testParentheses_2()
+    {
+        IVariableNode node = (IVariableNode) getNode("var a = (a + b) - c;",
+                IVariableNode.class);
+        asBlockWalker.visitVariable(node);
+        assertOut("var a = (a + b) - c");
+    }
+
+    @Ignore
+    @Test
+    public void testParentheses_3()
+    {
+        IVariableNode node = (IVariableNode) getNode(
+                "var a = ((a + b) - (c + d)) * e;", IVariableNode.class);
+        asBlockWalker.visitVariable(node);
+        assertOut("var a = ((a + b) - (c + d)) * e");
+    }
+
+    @Test
+    public void testAnonymousFunction()
+    {
+        IVariableNode node = (IVariableNode) getNode("var a = function(){};",
+                IVariableNode.class);
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:* = function() {\n}");
+    }
+
+    @Test
+    public void testAnonymousFunctionWithParamsReturn()
+    {
+        IVariableNode node = (IVariableNode) getNode(
+                "var a:Object = function(foo:int, bar:String = 'goo'):int{return -1;};",
+                IVariableNode.class);
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Object = function(foo:int, bar:String = 'goo'):int {\n\treturn -1;\n}");
+    }
+
+    @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:Object):void {\n\t\tdoit();\n\t});\n}");
+    }
+
+    @Test
+    public void testVisitDynamicAccessNode_1()
+    {
+        IDynamicAccessNode node = getDynamicAccessNode("a[b]");
+        asBlockWalker.visitDynamicAccess(node);
+        assertOut("a[b]");
+    }
+
+    @Test
+    public void testVisitDynamicAccessNode_2()
+    {
+        IDynamicAccessNode node = getDynamicAccessNode("a[b[c][d]]");
+        asBlockWalker.visitDynamicAccess(node);
+        assertOut("a[b[c][d]]");
+    }
+
+    @Test
+    public void testVisitAs()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a as b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a as b");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_Comma()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a, b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a, b");
+    }
+
+    @Test
+    public void testVisitTernaryOperatorNode()
+    {
+        ITernaryOperatorNode node = (ITernaryOperatorNode) getExpressionNode(
+                "a ? b : c", ITernaryOperatorNode.class);
+        asBlockWalker.visitTernaryOperator(node);
+        assertOut("a ? b : c");
+    }
+
+    @Test
+    public void testVisitUnaryOperator_Delete()
+    {
+        IUnaryOperatorNode node = getUnaryNode("delete a");
+        asBlockWalker.visitUnaryOperator(node);
+        assertOut("delete a");
+    }
+
+    @Test
+    public void testVisitMemberAccess_1()
+    {
+        IMemberAccessExpressionNode node = (IMemberAccessExpressionNode) getExpressionNode(
+                "a.b", IMemberAccessExpressionNode.class);
+        asBlockWalker.visitMemberAccessExpression(node);
+        assertOut("a.b");
+    }
+
+    @Test
+    public void testVisitMemberAccess_2()
+    {
+        IMemberAccessExpressionNode node = (IMemberAccessExpressionNode) getExpressionNode(
+                "a.b.c.d", IMemberAccessExpressionNode.class);
+        asBlockWalker.visitMemberAccessExpression(node);
+        assertOut("a.b.c.d");
+    }
+
+    @Test
+    public void testVisitBinaryOperator_In()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a in b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a in b");
+    }
+
+    @Test
+    public void testVisitBinaryOperator_Instancof()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a instanceof b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a instanceof b");
+    }
+
+    @Test
+    public void testVisitBinaryOperator_Is()
+    {
+        IBinaryOperatorNode node = getBinaryNode("a is b");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a is b");
+    }
+
+    @Test
+    public void testVisitBinaryOperator_NamespaceAccess_1()
+    {
+        // TODO this needs INamespaceAccessExpressionNode interface
+        NamespaceAccessExpressionNode node = (NamespaceAccessExpressionNode) getExpressionNode(
+                "a::b", NamespaceAccessExpressionNode.class);
+        asBlockWalker.visitNamespaceAccessExpression(node);
+        assertOut("a::b");
+    }
+
+    @Test
+    public void testVisitBinaryOperator_NamespaceAccess_2()
+    {
+        // TODO this needs INamespaceAccessExpressionNode interface
+        NamespaceAccessExpressionNode node = (NamespaceAccessExpressionNode) getExpressionNode(
+                "a::b::c", NamespaceAccessExpressionNode.class);
+        asBlockWalker.visitNamespaceAccessExpression(node);
+        assertOut("a::b::c");
+    }
+
+    @Test
+    public void testVisitBinaryOperator_New()
+    {
+        IFunctionCallNode node = (IFunctionCallNode) getExpressionNode(
+                "new Object()", IFunctionCallNode.class);
+        asBlockWalker.visitFunctionCall(node);
+        assertOut("new Object()");
+    }
+
+    @Test
+    public void testVisitObjectLiteral_1()
+    {
+        ObjectLiteralNode node = (ObjectLiteralNode) getExpressionNode(
+                "a = {a:1}", ObjectLiteralNode.class);
+        asBlockWalker.visitLiteral(node);
+        assertOut("{a:1}");
+    }
+
+    @Test
+    public void testVisitObjectLiteral_2()
+    {
+        ObjectLiteralNode node = (ObjectLiteralNode) getExpressionNode(
+                "a = {a:1,b:{c:2,d:{e:4}}}", ObjectLiteralNode.class);
+        asBlockWalker.visitLiteral(node);
+        assertOut("{a:1, b:{c:2, d:{e:4}}}");
+    }
+
+    @Test
+    public void testVisitArrayLiteral_1()
+    {
+        ArrayLiteralNode node = (ArrayLiteralNode) getExpressionNode(
+                "a = [0,1,2]", ArrayLiteralNode.class);
+        asBlockWalker.visitLiteral(node);
+        assertOut("[0, 1, 2]");
+    }
+
+    @Test
+    public void testVisitArrayLiteral_2()
+    {
+        ArrayLiteralNode node = (ArrayLiteralNode) getExpressionNode(
+                "a = [0,[0,1,[0,1]],2,[1,2]]", ArrayLiteralNode.class);
+        asBlockWalker.visitLiteral(node);
+        assertOut("[0, [0, 1, [0, 1]], 2, [1, 2]]");
+    }
+
+    @Test
+    public void testVisitUnaryOperatorNode_Typeof()
+    {
+        IUnaryOperatorNode node = getUnaryNode("typeof(a)");
+        asBlockWalker.visitUnaryOperator(node);
+        assertOut("typeof(a)");
+    }
+
+    @Ignore
+    @Test
+    public void testVisitUnaryOperatorNode_Typeof_NoParens()
+    {
+        // TODO (mschmalle) the notation without parenthesis is also valid in AS/JS
+        IUnaryOperatorNode node = getUnaryNode("typeof a");
+        asBlockWalker.visitUnaryOperator(node);
+        assertOut("typeof a");
+    }
+
+    @Test
+    public void testVisitUnaryOperatorNode_Void()
+    {
+        IUnaryOperatorNode node = getUnaryNode("void a");
+        asBlockWalker.visitUnaryOperator(node);
+        assertOut("void a");
+    }
+
+    @Test
+    public void testVisitUnaryOperatorNode_Concate_1()
+    {
+        IBinaryOperatorNode node = getBinaryNode("\"a\" + \"b\"");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("\"a\" + \"b\"");
+    }
+
+    @Ignore
+    @Test
+    public void testVisitUnaryOperatorNode_Concate_2()
+    {
+        // TODO (mschmalle) what's up with the escaping of backslashes?
+        IBinaryOperatorNode node = getBinaryNode("\"a\\\"\" + \"\\\"b\"");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("\"a\\\"\" + \"\\\"b\"");
+    }
+
+    @Test
+    public void testVisitIterationFlowNode_Break()
+    {
+        IIterationFlowNode node = (IIterationFlowNode) getNode("break",
+                IIterationFlowNode.class);
+        asBlockWalker.visitIterationFlow(node);
+        assertOut("break");
+    }
+
+    @Test
+    public void testVisitIterationFlowNode_Continue()
+    {
+        IIterationFlowNode node = (IIterationFlowNode) getNode("continue",
+                IIterationFlowNode.class);
+        asBlockWalker.visitIterationFlow(node);
+        assertOut("continue");
+    }
+
+    @Test
+    public void testVisitReturn()
+    {
+        IReturnNode node = (IReturnNode) getNode("return", IReturnNode.class);
+        asBlockWalker.visitReturn(node);
+        assertOut("return");
+    }
+}

Propchange: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestExpressions.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestFieldMembers.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestFieldMembers.java?rev=1452955&view=auto
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestFieldMembers.java (added)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestFieldMembers.java Tue Mar  5 19:22:05 2013
@@ -0,0 +1,205 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.codegen.as;
+
+import org.apache.flex.compiler.internal.test.ASTestBase;
+import org.apache.flex.compiler.tree.as.IFileNode;
+import org.apache.flex.compiler.tree.as.INamespaceNode;
+import org.apache.flex.compiler.tree.as.IVariableNode;
+import org.junit.Test;
+
+/**
+ * This class tests the production of valid ActionScript3 code for Class Field
+ * members.
+ * 
+ * @author Michael Schmalle
+ */
+public class TestFieldMembers extends ASTestBase
+{
+    /*
+     * Field, Constant, [Namespace]
+     * 
+     * var foo;
+     * var foo:int;
+     * var foo:int = 42;
+     * private var foo:int;
+     * private var foo:int = 42;
+     * protected var foo:int;
+     * public var foo:int;
+     */
+
+    //--------------------------------------------------------------------------
+    // Field
+    //--------------------------------------------------------------------------
+
+    @Test
+    public void testField()
+    {
+        IVariableNode node = getField("var foo;");
+        asBlockWalker.visitVariable(node);
+        assertOut("var foo:*");
+    }
+
+    @Test
+    public void testField_withType()
+    {
+        IVariableNode node = getField("var foo:int;");
+        asBlockWalker.visitVariable(node);
+        assertOut("var foo:int");
+    }
+
+    @Test
+    public void testField_withTypeValue()
+    {
+        IVariableNode node = getField("var foo:int = 420;");
+        asBlockWalker.visitVariable(node);
+        assertOut("var foo:int = 420");
+    }
+
+    @Test
+    public void testField_withNamespaceTypeValue()
+    {
+        IVariableNode node = getField("private var foo:int = 420;");
+        asBlockWalker.visitVariable(node);
+        assertOut("private var foo:int = 420");
+    }
+
+    @Test
+    public void testField_withCustomNamespaceTypeValue()
+    {
+        IVariableNode node = getField("mx_internal var foo:int = 420;");
+        asBlockWalker.visitVariable(node);
+        assertOut("mx_internal var foo:int = 420");
+    }
+
+    @Test
+    public void testField_withNamespaceTypeCollection()
+    {
+        IVariableNode node = getField("protected var foo:Vector.<Foo>;");
+        asBlockWalker.visitVariable(node);
+        assertOut("protected var foo:Vector.<Foo>");
+    }
+
+    @Test
+    public void testField_withNamespaceTypeCollectionComplex()
+    {
+        IVariableNode node = getField("protected var foo:Vector.<Vector.<Vector.<Foo>>>;");
+        asBlockWalker.visitVariable(node);
+        assertOut("protected var foo:Vector.<Vector.<Vector.<Foo>>>");
+    }
+
+    @Test
+    public void testField_withNamespaceTypeValueComplex()
+    {
+        IVariableNode node = getField("protected var foo:Foo = new Foo('bar', 42);");
+        asBlockWalker.visitVariable(node);
+        assertOut("protected var foo:Foo = new Foo('bar', 42)");
+    }
+
+    @Test
+    public void testField_withList()
+    {
+        IVariableNode node = getField("protected var a:int = 4, b:int = 11, c:int = 42;");
+        asBlockWalker.visitVariable(node);
+        assertOut("protected var a:int = 4, b:int = 11, c:int = 42");
+    }
+
+    //--------------------------------------------------------------------------
+    // Constant
+    //--------------------------------------------------------------------------
+
+    @Test
+    public void testConstant()
+    {
+        IVariableNode node = getField("static const foo;");
+        asBlockWalker.visitVariable(node);
+        // TODO (mschmalle) is * type even possible for a constant?
+        assertOut("static const foo:*");
+    }
+
+    @Test
+    public void testConstant_withType()
+    {
+        IVariableNode node = getField("static const foo:int;");
+        asBlockWalker.visitVariable(node);
+        assertOut("static const foo:int");
+    }
+
+    @Test
+    public void testConstant_withTypeValue()
+    {
+        IVariableNode node = getField("static const foo:int = 420;");
+        asBlockWalker.visitVariable(node);
+        assertOut("static const foo:int = 420");
+    }
+
+    @Test
+    public void testConstant_withNamespaceTypeValue()
+    {
+        IVariableNode node = getField("private static const foo:int = 420;");
+        asBlockWalker.visitVariable(node);
+        assertOut("private static const foo:int = 420");
+    }
+
+    @Test
+    public void testConstant_withCustomNamespaceTypeValue()
+    {
+        IVariableNode node = getField("mx_internal static const foo:int = 420;");
+        asBlockWalker.visitVariable(node);
+        assertOut("mx_internal static const foo:int = 420");
+    }
+
+    //--------------------------------------------------------------------------
+    // Namespace
+    //--------------------------------------------------------------------------
+
+    @Test
+    public void testNamespace()
+    {
+        INamespaceNode node = getNamespace("namespace ns = \"http://whatever\";");
+        asBlockWalker.visitNamespace(node);
+        assertOut("namespace ns = \"http://whatever\"");
+    }
+
+    @Test
+    public void testNamespace_public()
+    {
+        INamespaceNode node = getNamespace("public namespace ns = \"http://whatever\";");
+        asBlockWalker.visitNamespace(node);
+        assertOut("public namespace ns = \"http://whatever\"");
+    }
+
+    @Test
+    public void testNamespace_protected()
+    {
+        INamespaceNode node = getNamespace("protected namespace ns = \"http://whatever\";");
+        asBlockWalker.visitNamespace(node);
+        assertOut("protected namespace ns = \"http://whatever\"");
+    }
+
+    protected INamespaceNode getNamespace(String code)
+    {
+        String source = "package {public class A {" + code + "}}";
+        IFileNode node = compileAS(source);
+        INamespaceNode child = (INamespaceNode) findFirstDescendantOfType(node,
+                INamespaceNode.class);
+        return child;
+    }
+}

Propchange: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestFieldMembers.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalClasses.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalClasses.java?rev=1452955&view=auto
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalClasses.java (added)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalClasses.java Tue Mar  5 19:22:05 2013
@@ -0,0 +1,282 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.codegen.as;
+
+import org.apache.flex.compiler.internal.test.ASTestBase;
+import org.apache.flex.compiler.tree.as.IFunctionNode;
+import org.apache.flex.compiler.tree.as.IVariableNode;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * @author Erik de Bruin
+ */
+public class TestGlobalClasses extends ASTestBase
+{
+    @Test
+    public void testArgumentError()
+    {
+        IVariableNode node = getVariable("var a:ArgumentError = new ArgumentError();");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:ArgumentError = new ArgumentError()");
+    }
+
+    @Test
+    public void testArguments()
+    {
+        IFunctionNode node = getMethod("function a():void {\ttrace(arguments);}");
+        asBlockWalker.visitFunction(node);
+        assertOut("function a():void {\n\ttrace(arguments);\n}");
+    }
+
+    @Test
+    public void testArray()
+    {
+        IVariableNode node = getVariable("var a:Array = new Array(1);");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Array = new Array(1)");
+    }
+
+    @Test
+    public void testBoolean()
+    {
+        IVariableNode node = getVariable("var a:Boolean = new Boolean(1);");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Boolean = new Boolean(1)");
+    }
+
+    @Test
+    public void testClass()
+    {
+        IVariableNode node = getVariable("var a:Class = Class(FooBar)");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Class = Class(FooBar)");
+    }
+
+    @Test
+    public void testDate()
+    {
+        IVariableNode node = getVariable("var a:Date = new Date();");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Date = new Date()");
+    }
+
+    @Test
+    public void testDefinitionError()
+    {
+        IVariableNode node = getVariable("var a:DefinitionError = new DefinitionError();");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:DefinitionError = new DefinitionError()");
+    }
+
+    @Test
+    public void testError()
+    {
+        IVariableNode node = getVariable("var a:Error = new Error();");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Error = new Error()");
+    }
+
+    @Test
+    public void testEvalError()
+    {
+        IVariableNode node = getVariable("var a:EvalError = new EvalError();");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:EvalError = new EvalError()");
+    }
+
+    @Test
+    public void testFunction()
+    {
+        IVariableNode node = getVariable("var a:Function = new Function();");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Function = new Function()");
+    }
+
+    @Test
+    public void testInt()
+    {
+        IVariableNode node = getVariable("var a:int = new int(1.8);");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:int = new int(1.8)");
+    }
+
+    @Test
+    public void testJSON()
+    {
+        IVariableNode node = getVariable("var a:JSON = new JSON();");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:JSON = new JSON()");
+    }
+
+    @Test
+    public void testMath()
+    {
+        IVariableNode node = getVariable("var a:Number = Math.PI;");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Number = Math.PI");
+    }
+
+    @Test
+    public void testNamespace()
+    {
+        IVariableNode node = getVariable("var a:Namespace = new Namespace(\"http://example.com\");");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Namespace = new Namespace(\"http://example.com\")");
+    }
+
+    @Test
+    public void testNumber()
+    {
+        IVariableNode node = getVariable("var a:Number = new Number(\"1\");");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Number = new Number(\"1\")");
+    }
+
+    @Test
+    public void testObject()
+    {
+        IVariableNode node = getVariable("var a:Object = new Object();");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Object = new Object()");
+    }
+
+    @Test
+    public void testQName()
+    {
+        IVariableNode node = getVariable("var a:QName = new QName();");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:QName = new QName()");
+    }
+
+    @Test
+    public void testRangeError()
+    {
+        IVariableNode node = getVariable("var a:RangeError = new RangeError();");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:RangeError = new RangeError()");
+    }
+
+    @Test
+    public void testReferenceError()
+    {
+        IVariableNode node = getVariable("var a:ReferenceError = new ReferenceError();");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:ReferenceError = new ReferenceError()");
+    }
+
+    @Ignore
+    @Test
+    public void testRegExp()
+    {
+        // TODO (mschmalle) the backslashes in don't match the backslashes out...
+        IVariableNode node = getVariable("var a:RegExp = new RegExp('test-\\d', 'i');");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:RegExp = new RegExp('test-\\\\d', 'i')");
+    }
+
+    @Test
+    public void testRegExp_Literal()
+    {
+        IVariableNode node = getVariable("var a:RegExp = /test-\\d/i;");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:RegExp = /test-\\d/i");
+    }
+
+    @Test
+    public void testSecurityError()
+    {
+        IVariableNode node = getVariable("var a:SecurityError = new SecurityError();");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:SecurityError = new SecurityError()");
+    }
+
+    @Test
+    public void testString()
+    {
+        IVariableNode node = getVariable("var a:String = new String(\"100\");");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:String = new String(\"100\")");
+    }
+
+    @Test
+    public void testSyntaxError()
+    {
+        IVariableNode node = getVariable("var a:SyntaxError = new SyntaxError();");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:SyntaxError = new SyntaxError()");
+    }
+
+    @Test
+    public void testTypeError()
+    {
+        IVariableNode node = getVariable("var a:TypeError = new TypeError();");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:TypeError = new TypeError()");
+    }
+
+    @Test
+    public void testUint()
+    {
+        IVariableNode node = getVariable("var a:uint = new uint(-100);");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:uint = new uint(-100)");
+    }
+
+    @Test
+    public void testURIError()
+    {
+        IVariableNode node = getVariable("var a:URIError = new URIError();");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:URIError = new URIError()");
+    }
+
+    @Test
+    public void testVector()
+    {
+        IVariableNode node = getVariable("var a:Vector.<String> = new Vector.<String>(['Hello', 'World']);");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Vector.<String> = new Vector.<String>(['Hello', 'World'])");
+    }
+
+    @Test
+    public void testVerifyError()
+    {
+        IVariableNode node = getVariable("var a:VerifyError = new VerifyError();");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:VerifyError = new VerifyError()");
+    }
+
+    @Test
+    public void testXML()
+    {
+        IVariableNode node = getVariable("var a:XML = new XML('@');");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:XML = new XML('@')");
+    }
+
+    @Test
+    public void testXMLList()
+    {
+        IVariableNode node = getVariable("var a:XMLList = new XMLList('<!-- comment -->');");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:XMLList = new XMLList('<!-- comment -->')");
+    }
+}

Propchange: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalClasses.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalConstants.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalConstants.java?rev=1452955&view=auto
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalConstants.java (added)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalConstants.java Tue Mar  5 19:22:05 2013
@@ -0,0 +1,62 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.codegen.as;
+
+import org.apache.flex.compiler.internal.test.ASTestBase;
+import org.apache.flex.compiler.tree.as.IVariableNode;
+import org.junit.Test;
+
+/**
+ * @author Erik de Bruin
+ */
+public class TestGlobalConstants extends ASTestBase
+{
+    @Test
+    public void testInfinity()
+    {
+        IVariableNode node = getField("var a:Number = Infinity;");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Number = Infinity");
+    }
+
+    @Test
+    public void testNegativeInfinity()
+    {
+        IVariableNode node = getField("var a:Number = -Infinity;");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Number = -Infinity");
+    }
+
+    @Test
+    public void testNaN()
+    {
+        IVariableNode node = getField("var a:Number = NaN;");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Number = NaN");
+    }
+
+    @Test
+    public void testUndefined()
+    {
+        IVariableNode node = getField("var a:* = undefined;");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:* = undefined");
+    }
+}

Propchange: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalConstants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalFunctions.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalFunctions.java?rev=1452955&view=auto
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalFunctions.java (added)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalFunctions.java Tue Mar  5 19:22:05 2013
@@ -0,0 +1,208 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.codegen.as;
+
+import org.apache.flex.compiler.internal.test.ASTestBase;
+import org.apache.flex.compiler.tree.as.IFunctionCallNode;
+import org.apache.flex.compiler.tree.as.IVariableNode;
+import org.junit.Test;
+
+/**
+ * @author Erik de Bruin
+ */
+public class TestGlobalFunctions extends ASTestBase
+{
+    @Test
+    public void testArray()
+    {
+        IVariableNode node = getVariable("var a:Array = Array(1);");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Array = Array(1)");
+    }
+
+    @Test
+    public void testBoolean()
+    {
+        IVariableNode node = getVariable("var a:Boolean = Boolean(1);");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Boolean = Boolean(1)");
+    }
+
+    @Test
+    public void testDecodeURI()
+    {
+        IVariableNode node = getVariable("var a:String = decodeURI('http://whatever.com');");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:String = decodeURI('http://whatever.com')");
+    }
+
+    @Test
+    public void testDecodeURIComponent()
+    {
+        IVariableNode node = getVariable("var a:String = decodeURIComponent('http://whatever.com');");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:String = decodeURIComponent('http://whatever.com')");
+    }
+
+    @Test
+    public void testEncodeURI()
+    {
+        IVariableNode node = getVariable("var a:String = encodeURI('http://whatever.com');");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:String = encodeURI('http://whatever.com')");
+    }
+
+    @Test
+    public void testEncodeURIComponent()
+    {
+        IVariableNode node = getVariable("var a:String = encodeURIComponent('http://whatever.com');");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:String = encodeURIComponent('http://whatever.com')");
+    }
+
+    @Test
+    public void testEscape()
+    {
+        IVariableNode node = getVariable("var a:String = escape('http://whatever.com');");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:String = escape('http://whatever.com')");
+    }
+
+    @Test
+    public void testInt()
+    {
+        IVariableNode node = getVariable("var a:int = int(1.8);");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:int = int(1.8)");
+    }
+
+    @Test
+    public void testIsFinite()
+    {
+        IVariableNode node = getVariable("var a:Boolean = isFinite(1000000.9);");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Boolean = isFinite(1000000.9)");
+    }
+
+    @Test
+    public void testIsNaN()
+    {
+        IVariableNode node = getVariable("var a:Boolean = isNaN(NaN);");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Boolean = isNaN(NaN)");
+    }
+
+    @Test
+    public void testIsXMLName()
+    {
+        IVariableNode node = getVariable("var a:Boolean = isXMLName(\"?\");");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Boolean = isXMLName(\"?\")");
+    }
+
+    @Test
+    public void testNumber()
+    {
+        IVariableNode node = getVariable("var a:Number = Number(\"1\");");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Number = Number(\"1\")");
+    }
+
+    @Test
+    public void testObject()
+    {
+        IVariableNode node = getVariable("var a:Object = Object(\"1\");");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Object = Object(\"1\")");
+    }
+
+    @Test
+    public void testParseFloat()
+    {
+        IVariableNode node = getVariable("var a:Number = parseFloat(\"1.8\");");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Number = parseFloat(\"1.8\")");
+    }
+
+    @Test
+    public void testParseInt()
+    {
+        IVariableNode node = getVariable("var a:Number = parseInt(\"666\", 10);");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Number = parseInt(\"666\", 10)");
+    }
+
+    @Test
+    public void testString()
+    {
+        IVariableNode node = getVariable("var a:String = String(100);");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:String = String(100)");
+    }
+
+    @Test
+    public void testTrace()
+    {
+        IFunctionCallNode node = (IFunctionCallNode) getNode(
+                "trace('Hello World');", IFunctionCallNode.class);
+        asBlockWalker.visitFunctionCall(node);
+        assertOut("trace('Hello World')");
+    }
+
+    @Test
+    public void testUint()
+    {
+        IVariableNode node = getVariable("var a:uint = uint(-100);");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:uint = uint(-100)");
+    }
+
+    @Test
+    public void testUnescape()
+    {
+        IVariableNode node = getVariable("var a:String = unescape('%25');");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:String = unescape('%25')");
+    }
+
+    @Test
+    public void testVector()
+    {
+        IVariableNode node = getVariable("var a:Vector.<String> = Vector.<String>(['Hello', 'World']);");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:Vector.<String> = Vector.<String>(['Hello', 'World'])");
+    }
+
+    @Test
+    public void testXML()
+    {
+        IVariableNode node = getVariable("var a:XML = XML('@');");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:XML = XML('@')");
+    }
+
+    @Test
+    public void testXMLList()
+    {
+        IVariableNode node = getVariable("var a:XMLList = XMLList('<!-- comment -->');");
+        asBlockWalker.visitVariable(node);
+        assertOut("var a:XMLList = XMLList('<!-- comment -->')");
+    }
+}

Propchange: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/as/TestGlobalFunctions.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message