flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject svn commit: r1451144 [1/2] - in /flex/falcon/trunk/compiler.jx.tests: src/org/apache/flex/compiler/internal/as/codegen/ src/org/apache/flex/compiler/internal/js/codegen/amd/ src/org/apache/flex/compiler/internal/js/codegen/goog/ src/org/apache/flex/com...
Date Thu, 28 Feb 2013 09:08:55 GMT
Author: erikdebruin
Date: Thu Feb 28 09:08:54 2013
New Revision: 1451144

URL: http://svn.apache.org/r1451144
Log:
- Refactored TestBase and it's subclasses to prepare for MXML implementation
- All tests now run through the same compile method (AS and MXML)
- Moved 'FlexJS' test project to proper place in 'test-files'

Added:
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/TestMXMLApplication.java
      - copied, changed from r1449611, flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/TestMXMLDocument.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/flexjs/
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/flexjs/TestMXMLDocument.java
      - copied, changed from r1449611, flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/TestMXMLDocument.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/AMDTestBase.java
      - copied, changed from r1449611, flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/AMDTestProjectBase.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/ASTestBase.java
      - copied, changed from r1449611, flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestBase.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/ITestBase.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/MXMLTestBase.java   (with props)
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/TestBase.java
      - copied, changed from r1449611, flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestBase.java
    flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/
    flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/
    flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/
    flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/libs/
    flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/libs/FlexJSUI.swc   (with props)
    flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/
    flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/FlexJSTest.mxml   (with props)
    flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/MyInitialView.mxml   (with props)
    flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/MySimpleValuesImpl.as   (with props)
    flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/StockDataJSONItemConverter.as   (with props)
    flex/falcon/trunk/compiler.jx.tests/test-files/goog/projects/
Removed:
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestBase.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestWalkerBase.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/AMDTestProjectBase.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogComments.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/TestMXMLDocument.java
Modified:
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestAccessorMembers.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestClass.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestComments.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestExpressions.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestFieldMembers.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestGlobalClasses.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestGlobalConstants.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestGlobalFunctions.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestInterface.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestMethodMembers.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestPackage.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestStatements.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDClassA.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDClassB.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDEmiter.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDInterfaceI.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDInterfaceIOther.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDInterfaceISub.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDPackage.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogClass.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogEmiter.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogFile.java
    flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogPackage.java

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestAccessorMembers.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestAccessorMembers.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestAccessorMembers.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestAccessorMembers.java Thu Feb 28 09:08:54 2013
@@ -19,6 +19,7 @@
 
 package org.apache.flex.compiler.internal.as.codegen;
 
+import org.apache.flex.compiler.test.ASTestBase;
 import org.apache.flex.compiler.tree.as.IAccessorNode;
 import org.junit.Test;
 
@@ -28,7 +29,7 @@ import org.junit.Test;
  * 
  * @author Michael Schmalle
  */
-public class TestAccessorMembers extends TestWalkerBase
+public class TestAccessorMembers extends ASTestBase
 {
     //--------------------------------------------------------------------------
     // Accessor

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestClass.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestClass.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestClass.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestClass.java Thu Feb 28 09:08:54 2013
@@ -19,6 +19,7 @@
 
 package org.apache.flex.compiler.internal.as.codegen;
 
+import org.apache.flex.compiler.test.ASTestBase;
 import org.apache.flex.compiler.tree.as.IClassNode;
 import org.apache.flex.compiler.tree.as.IFileNode;
 import org.junit.Test;
@@ -29,7 +30,7 @@ import org.junit.Test;
  * 
  * @author Michael Schmalle
  */
-public class TestClass extends TestWalkerBase
+public class TestClass extends ASTestBase
 {
     //--------------------------------------------------------------------------
     // Class
@@ -225,7 +226,7 @@ public class TestClass extends TestWalke
     protected IClassNode getClassNode(String code)
     {
         String source = "package {" + code + "}";
-        IFileNode node = getFileNode(source);
+        IFileNode node = compileAS(source);
         IClassNode child = (IClassNode) findFirstDescendantOfType(node,
                 IClassNode.class);
         return child;

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestComments.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestComments.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestComments.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestComments.java Thu Feb 28 09:08:54 2013
@@ -19,57 +19,54 @@
 
 package org.apache.flex.compiler.internal.as.codegen;
 
-import org.apache.flex.compiler.tree.as.IFunctionNode;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.apache.flex.compiler.test.ASTestBase;
 
 /**
  * @author Erik de Bruin
  */
-public class TestComments extends TestWalkerBase
+public class TestComments extends ASTestBase
 {
-	@Ignore
-	@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}");
-    }
-
-	@Ignore
-    @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}");
-    }
-
-	@Ignore
-    @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}");
-    }
-
-	@Ignore
-    @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}");
-    }
-
-	@Ignore
-    @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 */};");
-    }
+    // (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 */};");
+//    }
+    
 }

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestExpressions.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestExpressions.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestExpressions.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestExpressions.java Thu Feb 28 09:08:54 2013
@@ -22,6 +22,7 @@ package org.apache.flex.compiler.interna
 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.test.ASTestBase;
 import org.apache.flex.compiler.tree.as.IBinaryOperatorNode;
 import org.apache.flex.compiler.tree.as.IDynamicAccessNode;
 import org.apache.flex.compiler.tree.as.IFunctionCallNode;
@@ -38,7 +39,7 @@ import org.junit.Test;
 /**
  * @author Michael Schmalle
  */
-public class TestExpressions extends TestWalkerBase
+public class TestExpressions extends ASTestBase
 {
 
     // ILanguageIdentifierNode -> IIdentifierNode

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestFieldMembers.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestFieldMembers.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestFieldMembers.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestFieldMembers.java Thu Feb 28 09:08:54 2013
@@ -19,6 +19,7 @@
 
 package org.apache.flex.compiler.internal.as.codegen;
 
+import org.apache.flex.compiler.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;
@@ -30,7 +31,7 @@ import org.junit.Test;
  * 
  * @author Michael Schmalle
  */
-public class TestFieldMembers extends TestWalkerBase
+public class TestFieldMembers extends ASTestBase
 {
     /*
      * Field, Constant, [Namespace]
@@ -196,7 +197,7 @@ public class TestFieldMembers extends Te
     protected INamespaceNode getNamespace(String code)
     {
         String source = "package {public class A {" + code + "}}";
-        IFileNode node = getFileNode(source);
+        IFileNode node = compileAS(source);
         INamespaceNode child = (INamespaceNode) findFirstDescendantOfType(node,
                 INamespaceNode.class);
         return child;

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestGlobalClasses.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestGlobalClasses.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestGlobalClasses.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestGlobalClasses.java Thu Feb 28 09:08:54 2013
@@ -19,6 +19,7 @@
 
 package org.apache.flex.compiler.internal.as.codegen;
 
+import org.apache.flex.compiler.test.ASTestBase;
 import org.apache.flex.compiler.tree.as.IFunctionNode;
 import org.apache.flex.compiler.tree.as.IVariableNode;
 import org.junit.Ignore;
@@ -27,7 +28,7 @@ import org.junit.Test;
 /**
  * @author Erik de Bruin
  */
-public class TestGlobalClasses extends TestWalkerBase
+public class TestGlobalClasses extends ASTestBase
 {
     @Test
     public void testArgumentError()

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestGlobalConstants.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestGlobalConstants.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestGlobalConstants.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestGlobalConstants.java Thu Feb 28 09:08:54 2013
@@ -19,13 +19,14 @@
 
 package org.apache.flex.compiler.internal.as.codegen;
 
+import org.apache.flex.compiler.test.ASTestBase;
 import org.apache.flex.compiler.tree.as.IVariableNode;
 import org.junit.Test;
 
 /**
  * @author Erik de Bruin
  */
-public class TestGlobalConstants extends TestWalkerBase
+public class TestGlobalConstants extends ASTestBase
 {
     @Test
     public void testInfinity()

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestGlobalFunctions.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestGlobalFunctions.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestGlobalFunctions.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestGlobalFunctions.java Thu Feb 28 09:08:54 2013
@@ -19,6 +19,7 @@
 
 package org.apache.flex.compiler.internal.as.codegen;
 
+import org.apache.flex.compiler.test.ASTestBase;
 import org.apache.flex.compiler.tree.as.IFunctionCallNode;
 import org.apache.flex.compiler.tree.as.IVariableNode;
 import org.junit.Test;
@@ -26,7 +27,7 @@ import org.junit.Test;
 /**
  * @author Erik de Bruin
  */
-public class TestGlobalFunctions extends TestWalkerBase
+public class TestGlobalFunctions extends ASTestBase
 {
     @Test
     public void testArray()

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestInterface.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestInterface.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestInterface.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestInterface.java Thu Feb 28 09:08:54 2013
@@ -19,6 +19,7 @@
 
 package org.apache.flex.compiler.internal.as.codegen;
 
+import org.apache.flex.compiler.test.ASTestBase;
 import org.apache.flex.compiler.tree.as.IInterfaceNode;
 import org.junit.Test;
 
@@ -28,7 +29,7 @@ import org.junit.Test;
  * 
  * @author Michael Schmalle
  */
-public class TestInterface extends TestWalkerBase
+public class TestInterface extends ASTestBase
 {
     //--------------------------------------------------------------------------
     // Interface

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestMethodMembers.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestMethodMembers.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestMethodMembers.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestMethodMembers.java Thu Feb 28 09:08:54 2013
@@ -19,6 +19,7 @@
 
 package org.apache.flex.compiler.internal.as.codegen;
 
+import org.apache.flex.compiler.test.ASTestBase;
 import org.apache.flex.compiler.tree.as.IFunctionNode;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -29,7 +30,7 @@ import org.junit.Test;
  * 
  * @author Michael Schmalle
  */
-public class TestMethodMembers extends TestWalkerBase
+public class TestMethodMembers extends ASTestBase
 {
     /*
      * Method

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestPackage.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestPackage.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestPackage.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestPackage.java Thu Feb 28 09:08:54 2013
@@ -19,6 +19,7 @@
 
 package org.apache.flex.compiler.internal.as.codegen;
 
+import org.apache.flex.compiler.test.ASTestBase;
 import org.apache.flex.compiler.tree.as.IFileNode;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -29,7 +30,7 @@ import org.junit.Test;
  * 
  * @author Michael Schmalle
  */
-public class TestPackage extends TestWalkerBase
+public class TestPackage extends ASTestBase
 {
     //--------------------------------------------------------------------------
     // Package
@@ -38,7 +39,7 @@ public class TestPackage extends TestWal
     @Test
     public void testPackage_Simple()
     {
-        IFileNode node = getFileNode("package{}");
+        IFileNode node = compileAS("package{}");
         visitor.visitFile(node);
         assertOut("package {\n}");
     }
@@ -46,7 +47,7 @@ public class TestPackage extends TestWal
     @Test
     public void testPackage_SimpleName()
     {
-        IFileNode node = getFileNode("package foo {}");
+        IFileNode node = compileAS("package foo {}");
         visitor.visitFile(node);
         assertOut("package foo {\n}");
     }
@@ -54,7 +55,7 @@ public class TestPackage extends TestWal
     @Test
     public void testPackage_Name()
     {
-        IFileNode node = getFileNode("package foo.bar.baz {}");
+        IFileNode node = compileAS("package foo.bar.baz {}");
         visitor.visitFile(node);
         assertOut("package foo.bar.baz {\n}");
     }
@@ -62,7 +63,7 @@ public class TestPackage extends TestWal
     @Test
     public void testPackageSimple_Class()
     {
-        IFileNode node = getFileNode("package {public class A{}}");
+        IFileNode node = compileAS("package {public class A{}}");
         visitor.visitFile(node);
         assertOut("package {\n\tpublic class A {\n\t}\n}");
     }
@@ -70,7 +71,7 @@ public class TestPackage extends TestWal
     @Test
     public void testPackageQualified_Class()
     {
-        IFileNode node = getFileNode("package foo.bar.baz {public class A{}}");
+        IFileNode node = compileAS("package foo.bar.baz {public class A{}}");
         visitor.visitFile(node);
         assertOut("package foo.bar.baz {\n\tpublic class A {\n\t}\n}");
     }
@@ -78,7 +79,7 @@ public class TestPackage extends TestWal
     @Test
     public void testPackageQualified_ClassBody()
     {
-        IFileNode node = getFileNode("package foo.bar.baz {public class A{public function A(){}}}");
+        IFileNode node = compileAS("package foo.bar.baz {public class A{public function A(){}}}");
         visitor.visitFile(node);
         assertOut("package foo.bar.baz {\n\tpublic class A {\n\t\tpublic function A() {\n\t\t}\n\t}\n}");
     }
@@ -86,7 +87,7 @@ public class TestPackage extends TestWal
     @Test
     public void testPackageQualified_ClassBodyMethodContents()
     {
-        IFileNode node = getFileNode("package foo.bar.baz {public class A{public function A(){if (a){for each(var i:Object in obj){doit();}}}}}");
+        IFileNode node = compileAS("package foo.bar.baz {public class A{public function A(){if (a){for each(var i:Object in obj){doit();}}}}}");
         visitor.visitFile(node);
         assertOut("package foo.bar.baz {\n\tpublic class A {\n\t\tpublic function A() {\n\t\t\t"
                 + "if (a) {\n\t\t\t\tfor each (var i:Object in obj) {\n\t\t\t\t\tdoit();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}");
@@ -97,7 +98,7 @@ public class TestPackage extends TestWal
     public void testPackage_Import()
     {
         // TODO (mschmalle) implement Import unit tests for as
-        IFileNode node = getFileNode("package{import foo.bar.Baz;}");
+        IFileNode node = compileAS("package{import foo.bar.Baz;}");
         visitor.visitFile(node);
         assertOut("package {\nimport foo.bar.Baz;}");
     }

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestStatements.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestStatements.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestStatements.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestStatements.java Thu Feb 28 09:08:54 2013
@@ -20,6 +20,7 @@
 package org.apache.flex.compiler.internal.as.codegen;
 
 import org.apache.flex.compiler.internal.tree.as.LabeledStatementNode;
+import org.apache.flex.compiler.test.ASTestBase;
 import org.apache.flex.compiler.tree.as.IFileNode;
 import org.apache.flex.compiler.tree.as.IForLoopNode;
 import org.apache.flex.compiler.tree.as.IIfNode;
@@ -34,7 +35,7 @@ import org.junit.Test;
 /**
  * @author Michael Schmalle
  */
-public class TestStatements extends TestWalkerBase
+public class TestStatements extends ASTestBase
 {
     //--------------------------------------------------------------------------
     // if

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDClassA.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDClassA.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDClassA.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDClassA.java Thu Feb 28 09:08:54 2013
@@ -19,6 +19,7 @@
 
 package org.apache.flex.compiler.internal.js.codegen.amd;
 
+import org.apache.flex.compiler.test.AMDTestBase;
 import org.apache.flex.compiler.tree.as.IFunctionNode;
 import org.apache.flex.compiler.tree.as.IGetterNode;
 import org.apache.flex.compiler.tree.as.ISetterNode;
@@ -31,7 +32,7 @@ import org.junit.Test;
  * 
  * @author Michael Schmalle
  */
-public class TestAMDClassA extends AMDTestProjectBase
+public class TestAMDClassA extends AMDTestBase
 {
     // !!! the errors have to do with how I change 'this' on member expressions
     

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDClassB.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDClassB.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDClassB.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDClassB.java Thu Feb 28 09:08:54 2013
@@ -19,6 +19,7 @@
 
 package org.apache.flex.compiler.internal.js.codegen.amd;
 
+import org.apache.flex.compiler.test.AMDTestBase;
 import org.apache.flex.compiler.tree.as.IFunctionNode;
 import org.apache.flex.compiler.tree.as.IVariableNode;
 import org.junit.Test;
@@ -29,7 +30,7 @@ import org.junit.Test;
  * 
  * @author Michael Schmalle
  */
-public class TestAMDClassB extends AMDTestProjectBase
+public class TestAMDClassB extends AMDTestBase
 {
     //--------------------------------------------------------------------------
     // Class B

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDEmiter.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDEmiter.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDEmiter.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDEmiter.java Thu Feb 28 09:08:54 2013
@@ -20,8 +20,8 @@
 package org.apache.flex.compiler.internal.js.codegen.amd;
 
 import org.apache.flex.compiler.clients.IBackend;
-import org.apache.flex.compiler.internal.as.codegen.TestWalkerBase;
 import org.apache.flex.compiler.internal.js.driver.amd.AMDBackend;
+import org.apache.flex.compiler.test.ASTestBase;
 import org.apache.flex.compiler.tree.as.IFileNode;
 import org.apache.flex.compiler.tree.as.IFunctionNode;
 import org.junit.Ignore;
@@ -35,7 +35,7 @@ import org.junit.Test;
  * 
  * @author Michael Schmalle
  */
-public class TestAMDEmiter extends TestWalkerBase
+public class TestAMDEmiter extends ASTestBase
 {
     @Ignore
     @Test
@@ -49,7 +49,7 @@ public class TestAMDEmiter extends TestW
                 + "public var publicProperty:Number = 100;"
                 + "public function myFunction(value: String): String{"
                 + "return \"Don't \" + _privateVar + value; }";
-        IFileNode node = getFileNode(code);
+        IFileNode node = compileAS(code);
         visitor.visitFile(node);
         assertOut("package com.example.components {\n\tpublic class MyTextButton extends TextButton {\n\t\tcom.example.components.MyTextButton = function() {\n\t\t\tif (foo() != 42) {\n\t\t\t\tbar();\n\t\t\t}\n\t\t}\n\t\tprivate var _privateVar:String = \"do \";\n\t\tpublic var publicProperty:Number = 100;\n\t\tcom.example.components.MyTextButton.prototype.myFunction = function(value) {\n\t\t\treturn \"Don't \" + _privateVar + value;\n\t\t}\n\t}\n}");
     }

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDInterfaceI.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDInterfaceI.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDInterfaceI.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDInterfaceI.java Thu Feb 28 09:08:54 2013
@@ -19,6 +19,7 @@
 
 package org.apache.flex.compiler.internal.js.codegen.amd;
 
+import org.apache.flex.compiler.test.AMDTestBase;
 import org.junit.Test;
 
 /**
@@ -27,7 +28,7 @@ import org.junit.Test;
  * 
  * @author Michael Schmalle
  */
-public class TestAMDInterfaceI extends AMDTestProjectBase
+public class TestAMDInterfaceI extends AMDTestBase
 {
     //--------------------------------------------------------------------------
     // Interface I

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDInterfaceIOther.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDInterfaceIOther.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDInterfaceIOther.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDInterfaceIOther.java Thu Feb 28 09:08:54 2013
@@ -19,6 +19,7 @@
 
 package org.apache.flex.compiler.internal.js.codegen.amd;
 
+import org.apache.flex.compiler.test.AMDTestBase;
 import org.junit.Test;
 
 /**
@@ -27,7 +28,7 @@ import org.junit.Test;
  * 
  * @author Michael Schmalle
  */
-public class TestAMDInterfaceIOther extends AMDTestProjectBase
+public class TestAMDInterfaceIOther extends AMDTestBase
 {
     //--------------------------------------------------------------------------
     // Interface IOther

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDInterfaceISub.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDInterfaceISub.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDInterfaceISub.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDInterfaceISub.java Thu Feb 28 09:08:54 2013
@@ -19,6 +19,7 @@
 
 package org.apache.flex.compiler.internal.js.codegen.amd;
 
+import org.apache.flex.compiler.test.AMDTestBase;
 import org.junit.Test;
 
 /**
@@ -27,7 +28,7 @@ import org.junit.Test;
  * 
  * @author Michael Schmalle
  */
-public class TestAMDInterfaceISub extends AMDTestProjectBase
+public class TestAMDInterfaceISub extends AMDTestBase
 {
     //--------------------------------------------------------------------------
     // Interface ISub

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDPackage.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDPackage.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDPackage.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/TestAMDPackage.java Thu Feb 28 09:08:54 2013
@@ -41,7 +41,7 @@ public class TestAMDPackage extends Test
     @Test
     public void testPackage_Simple()
     {
-        IFileNode node = getFileNode("package{}");
+        IFileNode node = compileAS("package{}");
         visitor.visitFile(node);
         assertOut("");
     }
@@ -50,7 +50,7 @@ public class TestAMDPackage extends Test
     @Test
     public void testPackage_SimpleName()
     {
-        IFileNode node = getFileNode("package foo {}");
+        IFileNode node = compileAS("package foo {}");
         visitor.visitFile(node);
         assertOut("");
     }
@@ -59,7 +59,7 @@ public class TestAMDPackage extends Test
     @Test
     public void testPackage_Name()
     {
-        IFileNode node = getFileNode("package foo.bar.baz {}");
+        IFileNode node = compileAS("package foo.bar.baz {}");
         visitor.visitFile(node);
         assertOut("");
     }
@@ -68,7 +68,7 @@ public class TestAMDPackage extends Test
     @Test
     public void testPackageSimple_Class()
     {
-        IFileNode node = getFileNode("package {public class A{}}");
+        IFileNode node = compileAS("package {public class A{}}");
         visitor.visitFile(node);
         //assertOut("");
     }
@@ -83,7 +83,7 @@ public class TestAMDPackage extends Test
     @Test
     public void testPackageQualified_Class()
     {
-        IFileNode node = getFileNode("package foo.bar.baz {public class A{}}");
+        IFileNode node = compileAS("package foo.bar.baz {public class A{}}");
         visitor.visitFile(node);
         //assertOut("");
     }
@@ -92,7 +92,7 @@ public class TestAMDPackage extends Test
     @Test
     public void testPackageQualified_ClassBody()
     {
-        IFileNode node = getFileNode("package foo.bar.baz {public class A{public function A(){}}}");
+        IFileNode node = compileAS("package foo.bar.baz {public class A{public function A(){}}}");
         visitor.visitFile(node);
         //assertOut("");
     }
@@ -101,7 +101,7 @@ public class TestAMDPackage extends Test
     @Test
     public void testPackageQualified_ClassBodyMethodContents()
     {
-        IFileNode node = getFileNode("package foo.bar.baz {public class A{public function A(){if (a){for (var i:Object in obj){doit();}}}}}");
+        IFileNode node = compileAS("package foo.bar.baz {public class A{public function A(){if (a){for (var i:Object in obj){doit();}}}}}");
         visitor.visitFile(node);
         //assertOut("");
     }
@@ -122,7 +122,7 @@ public class TestAMDPackage extends Test
 
     protected IFileNode getFile(String code)
     {
-        IFileNode node = getFileNode(code);
+        IFileNode node = compileAS(code);
         return node;
     }
 }

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogClass.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogClass.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogClass.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogClass.java Thu Feb 28 09:08:54 2013
@@ -230,7 +230,7 @@ public class TestGoogClass extends TestC
     {
         String source = "package org.apache.flex {import flash.events.IEventDispatcher;import mx.logging.ILogger;import spark.components.Button;"
                 + code + "}";
-        IFileNode node = getFileNode(source);
+        IFileNode node = compileAS(source);
         IClassNode child = (IClassNode) findFirstDescendantOfType(node,
                 IClassNode.class);
         return child;

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogEmiter.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogEmiter.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogEmiter.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogEmiter.java Thu Feb 28 09:08:54 2013
@@ -20,8 +20,8 @@
 package org.apache.flex.compiler.internal.js.codegen.goog;
 
 import org.apache.flex.compiler.clients.IBackend;
-import org.apache.flex.compiler.internal.as.codegen.TestWalkerBase;
 import org.apache.flex.compiler.internal.js.driver.goog.GoogBackend;
+import org.apache.flex.compiler.test.ASTestBase;
 import org.apache.flex.compiler.tree.as.IFileNode;
 import org.apache.flex.compiler.tree.as.IFunctionNode;
 import org.junit.Test;
@@ -34,7 +34,7 @@ import org.junit.Test;
  * 
  * @author Michael Schmalle
  */
-public class TestGoogEmiter extends TestWalkerBase
+public class TestGoogEmiter extends ASTestBase
 {
     @Test
     public void testSimple()
@@ -47,7 +47,7 @@ public class TestGoogEmiter extends Test
                 + "public var publicProperty:Number = 100;"
                 + "public function myFunction(value: String): String{"
                 + "return \"Don't \" + _privateVar + value; }";
-        IFileNode node = getFileNode(code);
+        IFileNode node = compileAS(code);
         visitor.visitFile(node);
         assertOut("goog.provide('com.example.components.MyTextButton');\n\ngoog.require('spark.components.Button');\n\n/**\n * @constructor\n * @extends {spark.components.Button}\n */\ncom.example.components.MyTextButton = function() {\n\tvar self = this;\n\tgoog.base(this);\n\tif (foo() != 42) {\n\t\tbar();\n\t}\n}\ngoog.inherits(com.example.components.MyTextButton, spark.components.Button);\n\n/**\n * @private\n * @type {string}\n */\ncom.example.components.MyTextButton.prototype._privateVar = \"do \";\n\n/**\n * @type {number}\n */\ncom.example.components.MyTextButton.prototype.publicProperty = 100;\n\n/**\n * @param {string} value\n * @return {string}\n */\ncom.example.components.MyTextButton.prototype.myFunction = function(value) {\n\tvar self = this;\n\treturn \"Don't \" + self._privateVar + value;\n};");
     }

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogFile.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogFile.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogFile.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogFile.java Thu Feb 28 09:08:54 2013
@@ -22,8 +22,8 @@ package org.apache.flex.compiler.interna
 import java.io.File;
 
 import org.apache.flex.compiler.clients.IBackend;
-import org.apache.flex.compiler.internal.as.codegen.TestWalkerBase;
 import org.apache.flex.compiler.internal.js.driver.goog.GoogBackend;
+import org.apache.flex.compiler.test.ASTestBase;
 import org.apache.flex.compiler.tree.as.IFileNode;
 import org.junit.Test;
 
@@ -33,12 +33,12 @@ import org.junit.Test;
  * 
  * @author Erik de Bruin
  */
-public class TestGoogFile extends TestWalkerBase
+public class TestGoogFile extends ASTestBase
 {
     @Test
     public void testFile_plain()
     {
-        IFileNode node = getFileNode("input", true, "goog"
+        IFileNode node = compileAS("input", true, "goog"
                 + File.separator + "files");
         visitor.visitFile(node);
         assertOut(getCodeFromFile("output", true, "goog"
@@ -48,7 +48,7 @@ public class TestGoogFile extends TestWa
     @Test
     public void testFile_getset()
     {
-        IFileNode node = getFileNode("get-set", true, "goog"
+        IFileNode node = compileAS("get-set", true, "goog"
                 + File.separator + "files");
         visitor.visitFile(node);
         assertOut(getCodeFromFile("get-set_result", true, "goog"
@@ -58,7 +58,7 @@ public class TestGoogFile extends TestWa
     @Test
     public void testFile_callsuper()
     {
-        IFileNode node = getFileNode("call-super", true, "goog"
+        IFileNode node = compileAS("call-super", true, "goog"
                 + File.separator + "files");
         visitor.visitFile(node);
         assertOut(getCodeFromFile("call-super_result", true, "goog"
@@ -68,7 +68,7 @@ public class TestGoogFile extends TestWa
     @Test
     public void testFile_qualifynewobject()
     {
-        IFileNode node = getFileNode("qualify-new-object", true, "goog"
+        IFileNode node = compileAS("qualify-new-object", true, "goog"
                 + File.separator + "files");
         visitor.visitFile(node);
         assertOut(getCodeFromFile("qualify-new-object_result", true, "goog"
@@ -78,7 +78,7 @@ public class TestGoogFile extends TestWa
     @Test
     public void testFile_poc()
     {
-        IFileNode node = getFileNode("poc", true, "goog"
+        IFileNode node = compileAS("poc", true, "goog"
                 + File.separator + "files");
         visitor.visitFile(node);
         assertOut(getCodeFromFile("poc_result", true, "goog"

Modified: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogPackage.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogPackage.java?rev=1451144&r1=1451143&r2=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogPackage.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogPackage.java Thu Feb 28 09:08:54 2013
@@ -37,7 +37,7 @@ public class TestGoogPackage extends Tes
     @Test
     public void testPackage_Simple()
     {
-        IFileNode node = getFileNode("package{}");
+        IFileNode node = compileAS("package{}");
         visitor.visitFile(node);
         assertOut("");
     }
@@ -45,7 +45,7 @@ public class TestGoogPackage extends Tes
     @Test
     public void testPackage_SimpleName()
     {
-        IFileNode node = getFileNode("package foo {}");
+        IFileNode node = compileAS("package foo {}");
         visitor.visitFile(node);
         assertOut("");
     }
@@ -54,7 +54,7 @@ public class TestGoogPackage extends Tes
     @Test
     public void testPackage_Name()
     {
-        IFileNode node = getFileNode("package foo.bar.baz {}");
+        IFileNode node = compileAS("package foo.bar.baz {}");
         visitor.visitFile(node);
         assertOut("");
     }
@@ -72,7 +72,7 @@ public class TestGoogPackage extends Tes
         //               therefor we need to write out implicit constructors 
         //               (if I understand the term correctly)
 
-        IFileNode node = getFileNode("package {public class A{}}");
+        IFileNode node = compileAS("package {public class A{}}");
         visitor.visitFile(node);
         assertOut("goog.provide('A');\n\n/**\n * @constructor\n */\nA = function() {\n};");
     }
@@ -81,7 +81,7 @@ public class TestGoogPackage extends Tes
     @Test
     public void testPackageQualified_Class()
     {
-        IFileNode node = getFileNode("package foo.bar.baz {public class A{}}");
+        IFileNode node = compileAS("package foo.bar.baz {public class A{}}");
         visitor.visitFile(node);
         assertOut("goog.provide('foo.bar.baz.A');\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n};");
     }
@@ -90,7 +90,7 @@ public class TestGoogPackage extends Tes
     @Test
     public void testPackageQualified_ClassBody()
     {
-        IFileNode node = getFileNode("package foo.bar.baz {public class A{public function A(){}}}");
+        IFileNode node = compileAS("package foo.bar.baz {public class A{public function A(){}}}");
         visitor.visitFile(node);
         assertOut("goog.provide('foo.bar.baz.A');\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n};");
     }
@@ -99,7 +99,7 @@ public class TestGoogPackage extends Tes
     @Test
     public void testPackageQualified_ClassBodyMethodContents()
     {
-        IFileNode node = getFileNode("package foo.bar.baz {public class A{public function A(){if (a){for (var i:Object in obj){doit();}}}}}");
+        IFileNode node = compileAS("package foo.bar.baz {public class A{public function A(){if (a){for (var i:Object in obj){doit();}}}}}");
         visitor.visitFile(node);
         assertOut("goog.provide('foo.bar.baz.A');\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n\tvar self = this;\n\tif (a) {\n\t\tfor (var /** @type {Object} */ i in obj) {\n\t\t\tdoit();\n\t\t}\n\t}\n};");
     }

Copied: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/TestMXMLApplication.java (from r1449611, flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/TestMXMLDocument.java)
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/TestMXMLApplication.java?p2=flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/TestMXMLApplication.java&p1=flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/TestMXMLDocument.java&r1=1449611&r2=1451144&rev=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/TestMXMLDocument.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/TestMXMLApplication.java Thu Feb 28 09:08:54 2013
@@ -1,157 +1,33 @@
 package org.apache.flex.compiler.internal.mxml.codegen;
 
-import static org.junit.Assert.assertNotNull;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.flex.compiler.clients.IBackend;
-import org.apache.flex.compiler.internal.as.codegen.TestWalkerBase;
-import org.apache.flex.compiler.internal.js.driver.goog.GoogBackend;
-import org.apache.flex.compiler.internal.projects.FlexProject;
-import org.apache.flex.compiler.internal.projects.FlexProjectConfigurator;
-import org.apache.flex.compiler.mxml.IMXMLNamespaceMapping;
-import org.apache.flex.compiler.mxml.MXMLNamespaceMapping;
+import org.apache.flex.compiler.test.MXMLTestBase;
 import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
-import org.apache.flex.compiler.units.ICompilationUnit;
-import org.apache.flex.compiler.utils.EnvProperties;
-import org.apache.flex.compiler.visitor.IASBlockWalker;
-import org.apache.flex.compiler.visitor.IMXMLBlockWalker;
-import org.apache.flex.utils.FilenameNormalization;
 import org.junit.Ignore;
 import org.junit.Test;
 
-public class TestMXMLDocument extends TestWalkerBase
+public class TestMXMLApplication extends MXMLTestBase
 {
 
-    private static EnvProperties env = EnvProperties.initiate();
-
-    private IMXMLBlockWalker walker;
-
-    @Override
-    public void setUp()
-    {
-        super.setUp();
-
-        IASBlockWalker asWalker = (IASBlockWalker) visitor;
-        walker = backend.createMXMLWalker(asWalker.getEmitter(), project,
-                errors);
-    }
-
     @Ignore
-	@Test
-    public void MXMLClassNode_flashDisplaySprite()
+    @Test
+    public void MXML_simple()
     {
-        IMXMLFileNode node = _getMXMLFileNode("");
+        String code = "<s:application />";
+        
+        IMXMLFileNode node = compileMXML(code);
 
         walker.visitFile(node);
     }
 
-    // <component className="org.apache.flex.core:Application" name="Application" uri="library://ns.apache.org/flexjs/basic"  />
-
-    protected IMXMLFileNode _getMXMLFileNode(String code)
+    @Ignore
+    @Test
+    public void MXMLApplication_component()
     {
-        assertNotNull("Environment variable FLEX_HOME is not set", env.SDK);
-        assertNotNull("Environment variable PLAYERGLOBAL_HOME is not set",
-                env.FPSDK);
-
-        project = new FlexProject(workspace);
-        FlexProjectConfigurator.configure(project);
-
-        String tempDir = FilenameNormalization.normalize("temp"); // ensure this exists
-
-        //        File tempMXMLFile = null;
-        //        try
-        //        {
-        //            tempMXMLFile = File.createTempFile(getClass().getSimpleName(),
-        //                    ".mxml", new File(tempDir));
-        //            tempMXMLFile.deleteOnExit();
-        //
-        //            BufferedWriter out = new BufferedWriter(
-        //                    new FileWriter(tempMXMLFile));
-        //            out.write(code);
-        //            out.close();
-        //        }
-        //        catch (IOException e1)
-        //        {
-        //            e1.printStackTrace();
-        //        }
-
-        List<File> sourcePath = new ArrayList<File>();
-        sourcePath.add(new File(tempDir, "src"));
-        project.setSourcePath(sourcePath);
-
-        // Compile the code against playerglobal.swc.
-        List<File> libraries = new ArrayList<File>();
-        libraries.add(new File(FilenameNormalization.normalize(env.FPSDK
-                + "\\11.1\\playerglobal.swc")));
-        libraries.add(new File(FilenameNormalization.normalize(env.SDK
-                + "\\frameworks\\libs\\framework.swc")));
-        libraries.add(new File(FilenameNormalization.normalize(env.SDK
-                + "\\frameworks\\libs\\rpc.swc")));
-        libraries.add(new File(FilenameNormalization.normalize(env.SDK
-                + "\\frameworks\\libs\\spark.swc")));
-
-        // asjs library
-        // XXX (erikdebruin) this should be an option, as the VanillaSDK output
-        //                   type only uses the regular (vanilla ;-)) Flex SDK...
-        libraries.add(new File(tempDir, "libs/FlexJSUI.swc"));
-
-        project.setLibraries(libraries);
-
-        // Use the MXML 2009 manifest.
-        List<IMXMLNamespaceMapping> namespaceMappings = new ArrayList<IMXMLNamespaceMapping>();
-        IMXMLNamespaceMapping mxml2009 = new MXMLNamespaceMapping(
-                "http://ns.adobe.com/mxml/2009", env.SDK
-                        + "\\frameworks\\mxml-2009-manifest.xml");
-
-        IMXMLNamespaceMapping flexJS = new MXMLNamespaceMapping(
-                "library://ns.apache.org/flexjs/basic", new File(tempDir,
-                        "libs/manifest.xml").getAbsolutePath());
-
-        namespaceMappings.add(mxml2009);
-        namespaceMappings.add(flexJS);
-        project.setNamespaceMappings(namespaceMappings);
-
-        ICompilationUnit cu = null;
-        File mainMXMLFile = new File(tempDir, "src/FlexJSTest.mxml");
-        String normalizedMainFileName = FilenameNormalization
-                .normalize(mainMXMLFile.getAbsolutePath());
-
-        Collection<ICompilationUnit> mainFileCompilationUnits = workspace
-                .getCompilationUnits(normalizedMainFileName, project);
-
-        List<ICompilationUnit> root = new ArrayList<ICompilationUnit>();
-        root.add(mainFileCompilationUnits.iterator().next());
-
-        for (ICompilationUnit cu2 : mainFileCompilationUnits)
-        {
-            if (cu2 != null)
-                cu = cu2;
-        }
-
-        //List<ICompilationUnit> list = project
-        //        .getReachableCompilationUnitsInSWFOrder(mainFileCompilationUnits);
-
-        // Build the AST.
-        IMXMLFileNode fileNode = null;
-        try
-        {
-            fileNode = (IMXMLFileNode) cu.getSyntaxTreeRequest().get().getAST();
-        }
-        catch (InterruptedException e)
-        {
-            e.printStackTrace();
-        }
+        String code = "<component className=\"org.apache.flex.core:Application\" name=\"Application\" uri=\"library://ns.apache.org/flexjs/basic\"  />";
+        
+        IMXMLFileNode node = compileMXML(code);
 
-        return fileNode;
+        walker.visitFile(node);
     }
 
-    @Override
-    protected IBackend createBackend()
-    {
-        return new GoogBackend();
-    }
 }

Copied: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/flexjs/TestMXMLDocument.java (from r1449611, flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/TestMXMLDocument.java)
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/flexjs/TestMXMLDocument.java?p2=flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/flexjs/TestMXMLDocument.java&p1=flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/TestMXMLDocument.java&r1=1449611&r2=1451144&rev=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/TestMXMLDocument.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/mxml/codegen/flexjs/TestMXMLDocument.java Thu Feb 28 09:08:54 2013
@@ -1,157 +1,27 @@
-package org.apache.flex.compiler.internal.mxml.codegen;
-
-import static org.junit.Assert.assertNotNull;
+package org.apache.flex.compiler.internal.mxml.codegen.flexjs;
 
 import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.flex.compiler.clients.IBackend;
-import org.apache.flex.compiler.internal.as.codegen.TestWalkerBase;
-import org.apache.flex.compiler.internal.js.driver.goog.GoogBackend;
-import org.apache.flex.compiler.internal.projects.FlexProject;
-import org.apache.flex.compiler.internal.projects.FlexProjectConfigurator;
-import org.apache.flex.compiler.mxml.IMXMLNamespaceMapping;
-import org.apache.flex.compiler.mxml.MXMLNamespaceMapping;
+
+import org.apache.flex.compiler.test.MXMLTestBase;
 import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
-import org.apache.flex.compiler.units.ICompilationUnit;
-import org.apache.flex.compiler.utils.EnvProperties;
-import org.apache.flex.compiler.visitor.IASBlockWalker;
-import org.apache.flex.compiler.visitor.IMXMLBlockWalker;
-import org.apache.flex.utils.FilenameNormalization;
 import org.junit.Ignore;
 import org.junit.Test;
 
-public class TestMXMLDocument extends TestWalkerBase
+public class TestMXMLDocument extends MXMLTestBase
 {
 
-    private static EnvProperties env = EnvProperties.initiate();
-
-    private IMXMLBlockWalker walker;
-
-    @Override
-    public void setUp()
-    {
-        super.setUp();
-
-        IASBlockWalker asWalker = (IASBlockWalker) visitor;
-        walker = backend.createMXMLWalker(asWalker.getEmitter(), project,
-                errors);
-    }
-
     @Ignore
-	@Test
+    @Test
     public void MXMLClassNode_flashDisplaySprite()
     {
-        IMXMLFileNode node = _getMXMLFileNode("");
+        String path = "flexjs" + File.separator + 
+                      "projects" + File.separator + 
+                      "FlexJSTest" + File.separator + 
+                      "src";
+        
+        IMXMLFileNode node = compileMXML("FlexJSTest", true, path);
 
         walker.visitFile(node);
     }
 
-    // <component className="org.apache.flex.core:Application" name="Application" uri="library://ns.apache.org/flexjs/basic"  />
-
-    protected IMXMLFileNode _getMXMLFileNode(String code)
-    {
-        assertNotNull("Environment variable FLEX_HOME is not set", env.SDK);
-        assertNotNull("Environment variable PLAYERGLOBAL_HOME is not set",
-                env.FPSDK);
-
-        project = new FlexProject(workspace);
-        FlexProjectConfigurator.configure(project);
-
-        String tempDir = FilenameNormalization.normalize("temp"); // ensure this exists
-
-        //        File tempMXMLFile = null;
-        //        try
-        //        {
-        //            tempMXMLFile = File.createTempFile(getClass().getSimpleName(),
-        //                    ".mxml", new File(tempDir));
-        //            tempMXMLFile.deleteOnExit();
-        //
-        //            BufferedWriter out = new BufferedWriter(
-        //                    new FileWriter(tempMXMLFile));
-        //            out.write(code);
-        //            out.close();
-        //        }
-        //        catch (IOException e1)
-        //        {
-        //            e1.printStackTrace();
-        //        }
-
-        List<File> sourcePath = new ArrayList<File>();
-        sourcePath.add(new File(tempDir, "src"));
-        project.setSourcePath(sourcePath);
-
-        // Compile the code against playerglobal.swc.
-        List<File> libraries = new ArrayList<File>();
-        libraries.add(new File(FilenameNormalization.normalize(env.FPSDK
-                + "\\11.1\\playerglobal.swc")));
-        libraries.add(new File(FilenameNormalization.normalize(env.SDK
-                + "\\frameworks\\libs\\framework.swc")));
-        libraries.add(new File(FilenameNormalization.normalize(env.SDK
-                + "\\frameworks\\libs\\rpc.swc")));
-        libraries.add(new File(FilenameNormalization.normalize(env.SDK
-                + "\\frameworks\\libs\\spark.swc")));
-
-        // asjs library
-        // XXX (erikdebruin) this should be an option, as the VanillaSDK output
-        //                   type only uses the regular (vanilla ;-)) Flex SDK...
-        libraries.add(new File(tempDir, "libs/FlexJSUI.swc"));
-
-        project.setLibraries(libraries);
-
-        // Use the MXML 2009 manifest.
-        List<IMXMLNamespaceMapping> namespaceMappings = new ArrayList<IMXMLNamespaceMapping>();
-        IMXMLNamespaceMapping mxml2009 = new MXMLNamespaceMapping(
-                "http://ns.adobe.com/mxml/2009", env.SDK
-                        + "\\frameworks\\mxml-2009-manifest.xml");
-
-        IMXMLNamespaceMapping flexJS = new MXMLNamespaceMapping(
-                "library://ns.apache.org/flexjs/basic", new File(tempDir,
-                        "libs/manifest.xml").getAbsolutePath());
-
-        namespaceMappings.add(mxml2009);
-        namespaceMappings.add(flexJS);
-        project.setNamespaceMappings(namespaceMappings);
-
-        ICompilationUnit cu = null;
-        File mainMXMLFile = new File(tempDir, "src/FlexJSTest.mxml");
-        String normalizedMainFileName = FilenameNormalization
-                .normalize(mainMXMLFile.getAbsolutePath());
-
-        Collection<ICompilationUnit> mainFileCompilationUnits = workspace
-                .getCompilationUnits(normalizedMainFileName, project);
-
-        List<ICompilationUnit> root = new ArrayList<ICompilationUnit>();
-        root.add(mainFileCompilationUnits.iterator().next());
-
-        for (ICompilationUnit cu2 : mainFileCompilationUnits)
-        {
-            if (cu2 != null)
-                cu = cu2;
-        }
-
-        //List<ICompilationUnit> list = project
-        //        .getReachableCompilationUnitsInSWFOrder(mainFileCompilationUnits);
-
-        // Build the AST.
-        IMXMLFileNode fileNode = null;
-        try
-        {
-            fileNode = (IMXMLFileNode) cu.getSyntaxTreeRequest().get().getAST();
-        }
-        catch (InterruptedException e)
-        {
-            e.printStackTrace();
-        }
-
-        return fileNode;
-    }
-
-    @Override
-    protected IBackend createBackend()
-    {
-        return new GoogBackend();
-    }
 }

Copied: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/AMDTestBase.java (from r1449611, flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/AMDTestProjectBase.java)
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/AMDTestBase.java?p2=flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/AMDTestBase.java&p1=flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/AMDTestProjectBase.java&r1=1449611&r2=1451144&rev=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/amd/AMDTestProjectBase.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/AMDTestBase.java Thu Feb 28 09:08:54 2013
@@ -17,19 +17,12 @@
  *
  */
 
-package org.apache.flex.compiler.internal.js.codegen.amd;
+package org.apache.flex.compiler.test;
 
 import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
 
 import org.apache.flex.compiler.clients.IBackend;
-import org.apache.flex.compiler.internal.as.codegen.TestWalkerBase;
 import org.apache.flex.compiler.internal.js.driver.amd.AMDBackend;
-import org.apache.flex.compiler.internal.units.SourceCompilationUnitFactory;
-import org.apache.flex.compiler.mxml.IMXMLNamespaceMapping;
-import org.apache.flex.compiler.mxml.MXMLNamespaceMapping;
 import org.apache.flex.compiler.tree.as.IClassNode;
 import org.apache.flex.compiler.tree.as.IDefinitionNode;
 import org.apache.flex.compiler.tree.as.IFileNode;
@@ -39,8 +32,6 @@ import org.apache.flex.compiler.tree.as.
 import org.apache.flex.compiler.tree.as.ISetterNode;
 import org.apache.flex.compiler.tree.as.ITypeNode;
 import org.apache.flex.compiler.tree.as.IVariableNode;
-import org.apache.flex.compiler.units.ICompilationUnit;
-import org.apache.flex.compiler.utils.EnvProperties;
 import org.apache.flex.utils.FilenameNormalization;
 
 /**
@@ -48,29 +39,30 @@ import org.apache.flex.utils.FilenameNor
  * 
  * @author Michael Schmalle
  */
-public abstract class AMDTestProjectBase extends TestWalkerBase
+public abstract class AMDTestBase extends TestBase
 {
-    private static EnvProperties env = EnvProperties.initiate();
-
     protected IFileNode fileNode;
 
     protected IClassNode classNode;
 
     protected IInterfaceNode interfaceNode;
 
+    private String projectPath;
+    
     @Override
     public void setUp()
     {
         super.setUp();
 
-        String qualifiedName = getTypeUnderTest();
-        String target = qualifiedName.replace(".", File.separator);
-
-        target = FilenameNormalization
-                .normalize("test-files/amd/simple-project/src"
-                        + File.separator + target + ".as");
+        projectPath = "test-files/amd/simple-project/src";
+        
+        String target = getTypeUnderTest().replace(".", File.separator);
+        String targetDir = projectPath + File.separator
+                + target.substring(0, target.lastIndexOf(File.separator));
+        String targetFile = target.substring(
+                target.lastIndexOf(File.separator) + 1, target.length());
 
-        fileNode = compile(target);
+        fileNode = compileAS(targetFile, true, targetDir, false);
         ITypeNode type = (ITypeNode) findFirstDescendantOfType(fileNode,
                 ITypeNode.class);
         if (type instanceof IClassNode)
@@ -82,63 +74,22 @@ public abstract class AMDTestProjectBase
 
     abstract protected String getTypeUnderTest();
 
-    protected IFileNode compile(String main)
+    @Override
+    public void addLibraries()
     {
-        List<File> sourcePaths = new ArrayList<File>();
-        addSourcePaths(sourcePaths);
-        project.setSourcePath(sourcePaths);
-
-        List<File> libraries = new ArrayList<File>();
         libraries.add(new File(FilenameNormalization.normalize(env.FPSDK
-                + "\\11.1\\playerglobal.swc")));
-
-        addLibrary(libraries);
-        project.setLibraries(libraries);
-
-        // Use the MXML 2009 manifest.
-        List<IMXMLNamespaceMapping> namespaceMappings = new ArrayList<IMXMLNamespaceMapping>();
-        IMXMLNamespaceMapping mxml2009 = new MXMLNamespaceMapping(
-                "http://ns.adobe.com/mxml/2009", env.SDK
-                        + "\\frameworks\\mxml-2009-manifest.xml");
-        namespaceMappings.add(mxml2009);
-        project.setNamespaceMappings(namespaceMappings);
-
-        ICompilationUnit cu = null;
-        String normalizedMainFileName = FilenameNormalization.normalize(main);
-
-        SourceCompilationUnitFactory compilationUnitFactory = project
-                .getSourceCompilationUnitFactory();
-        File normalizedMainFile = new File(normalizedMainFileName);
-        if (compilationUnitFactory.canCreateCompilationUnit(normalizedMainFile))
-        {
-            Collection<ICompilationUnit> mainFileCompilationUnits = workspace
-                    .getCompilationUnits(normalizedMainFileName, project);
-            for (ICompilationUnit cu2 : mainFileCompilationUnits)
-            {
-                if (cu2 != null)
-                    cu = cu2;
-            }
-        }
-
-        IFileNode fileNode = null;
-        try
-        {
-            fileNode = (IFileNode) cu.getSyntaxTreeRequest().get().getAST();
-        }
-        catch (InterruptedException e)
-        {
-            e.printStackTrace();
-        }
-
-        return fileNode;
+                + "/11.1/playerglobal.swc")));
+        
+        super.addLibraries();
     }
-
+    
     @Override
-    protected void addSourcePaths(List<File> sourcePaths)
+    public void addSourcePaths()
     {
-        super.addSourcePaths(sourcePaths);
         sourcePaths.add(new File(FilenameNormalization
-                .normalize("test-files/amd/simple-project/src")));
+                .normalize(projectPath)));
+        
+        super.addSourcePaths();
     }
 
     @Override

Copied: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/ASTestBase.java (from r1449611, flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestBase.java)
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/ASTestBase.java?p2=flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/ASTestBase.java&p1=flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestBase.java&r1=1449611&r2=1451144&rev=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestBase.java (original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/ASTestBase.java Thu Feb 28 09:08:54 2013
@@ -1,26 +1,9 @@
-package org.apache.flex.compiler.internal.as.codegen;
+package org.apache.flex.compiler.test;
 
-import static org.junit.Assert.assertNotNull;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
 import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.flex.compiler.internal.projects.FlexProject;
-import org.apache.flex.compiler.internal.projects.FlexProjectConfigurator;
-import org.apache.flex.compiler.internal.tree.as.FunctionNode;
-import org.apache.flex.compiler.internal.units.SourceCompilationUnitFactory;
-import org.apache.flex.compiler.internal.workspaces.Workspace;
-import org.apache.flex.compiler.mxml.IMXMLNamespaceMapping;
-import org.apache.flex.compiler.mxml.MXMLNamespaceMapping;
-import org.apache.flex.compiler.problems.ICompilerProblem;
+
+import org.apache.flex.compiler.clients.IBackend;
+import org.apache.flex.compiler.internal.as.driver.ASBackend;
 import org.apache.flex.compiler.tree.as.IASNode;
 import org.apache.flex.compiler.tree.as.IAccessorNode;
 import org.apache.flex.compiler.tree.as.IBinaryOperatorNode;
@@ -31,202 +14,31 @@ import org.apache.flex.compiler.tree.as.
 import org.apache.flex.compiler.tree.as.IInterfaceNode;
 import org.apache.flex.compiler.tree.as.IUnaryOperatorNode;
 import org.apache.flex.compiler.tree.as.IVariableNode;
-import org.apache.flex.compiler.units.ICompilationUnit;
-import org.apache.flex.compiler.utils.EnvProperties;
 import org.apache.flex.utils.FilenameNormalization;
-import org.junit.Before;
 import org.junit.Ignore;
 
 @Ignore
-public class TestBase
+public class ASTestBase extends TestBase
 {
-    protected List<ICompilerProblem> errors;
-
-    private static EnvProperties env = EnvProperties.initiate();
-
-    protected static Workspace workspace = new Workspace();
-
-    protected FlexProject project;
-
-    @Before
-    public void setUp()
-    {
-        assertNotNull("Environment variable FLEX_HOME is not set", env.SDK);
-        assertNotNull("Environment variable PLAYERGLOBAL_HOME is not set",
-                env.FPSDK);
-
-        errors = new ArrayList<ICompilerProblem>();
-
-        project = new FlexProject(workspace);
-        FlexProjectConfigurator.configure(project);
-    }
-
-    protected IASNode findFirstDescendantOfType(IASNode node,
-            Class<? extends IASNode> nodeType)
-    {
-        int n = node.getChildCount();
-        for (int i = 0; i < n; i++)
-        {
-            IASNode child = node.getChild(i);
-            if (child instanceof FunctionNode)
-            {
-                ((FunctionNode) child).parseFunctionBody(errors);
-            }
-            if (nodeType.isInstance(child))
-                return child;
-
-            IASNode found = findFirstDescendantOfType(child, nodeType);
-            if (found != null)
-                return found;
-        }
-
-        return null;
-    }
-
-    protected IFileNode getFileNode(String input)
-    {
-        return getFileNode(input, false);
-    }
 
-    protected IFileNode getFileNode(String input, boolean isFileName)
+    @Override
+    public void addLibraries()
     {
-        return getFileNode(input, isFileName, "");
-    }
-
-    protected IFileNode getFileNode(String input, boolean isFileName,
-            String inputDir)
-    {
-        String tempDir = FilenameNormalization.normalize("temp"); // ensure this exists
-
-        File tempASFile = null;
-        try
-        {
-            String tempFileName = (isFileName) ? input : getClass()
-                    .getSimpleName();
-
-            tempASFile = File.createTempFile(tempFileName, ".as", new File(
-                    tempDir));
-            tempASFile.deleteOnExit();
-
-            String code = "";
-            if (!isFileName)
-            {
-                code = input;
-            }
-            else
-            {
-                code = getCodeFromFile(input, false, inputDir);
-            }
-
-            BufferedWriter out = new BufferedWriter(new FileWriter(tempASFile));
-            out.write(code);
-            out.close();
-        }
-        catch (IOException e1)
-        {
-            e1.printStackTrace();
-        }
-
-        List<File> sourcePaths = new ArrayList<File>();
-        sourcePaths.add(new File(tempDir));
-        addSourcePaths(sourcePaths);
-        project.setSourcePath(sourcePaths);
-
-        // Compile the code against playerglobal.swc.
-        List<File> libraries = new ArrayList<File>();
         libraries.add(new File(FilenameNormalization.normalize(env.FPSDK
-                + "\\11.1\\playerglobal.swc")));
-        libraries.add(new File(FilenameNormalization.normalize(env.SDK
-                + "\\frameworks\\libs\\framework.swc")));
+                + "/11.1/playerglobal.swc")));
         libraries.add(new File(FilenameNormalization.normalize(env.SDK
-                + "\\frameworks\\libs\\rpc.swc")));
+                + "/frameworks/libs/framework.swc")));
         libraries.add(new File(FilenameNormalization.normalize(env.SDK
-                + "\\frameworks\\libs\\spark.swc")));
-
-        addLibrary(libraries);
-        project.setLibraries(libraries);
-
-        // Use the MXML 2009 manifest.
-        List<IMXMLNamespaceMapping> namespaceMappings = new ArrayList<IMXMLNamespaceMapping>();
-        IMXMLNamespaceMapping mxml2009 = new MXMLNamespaceMapping(
-                "http://ns.adobe.com/mxml/2009", env.SDK
-                        + "\\frameworks\\mxml-2009-manifest.xml");
-        namespaceMappings.add(mxml2009);
-        project.setNamespaceMappings(namespaceMappings);
-
-        ICompilationUnit cu = null;
-        String normalizedMainFileName = FilenameNormalization
-                .normalize(tempASFile.getAbsolutePath());
-
-        SourceCompilationUnitFactory compilationUnitFactory = project
-                .getSourceCompilationUnitFactory();
-        File normalizedMainFile = new File(normalizedMainFileName);
-        if (compilationUnitFactory.canCreateCompilationUnit(normalizedMainFile))
-        {
-            Collection<ICompilationUnit> mainFileCompilationUnits = workspace
-                    .getCompilationUnits(normalizedMainFileName, project);
-            for (ICompilationUnit cu2 : mainFileCompilationUnits)
-            {
-                if (cu2 != null)
-                    cu = cu2;
-            }
-        }
-
-        // Build the AST.
-        IFileNode fileNode = null;
-        try
-        {
-            fileNode = (IFileNode) cu.getSyntaxTreeRequest().get().getAST();
-        }
-        catch (InterruptedException e)
-        {
-            e.printStackTrace();
-        }
-
-        return fileNode;
-    }
-
-    protected void addSourcePaths(List<File> sourcePaths)
-    {
-    }
-
-    protected void addLibrary(List<File> libraries)
-    {
-    }
-
-    protected String getCodeFromFile(String fileName, boolean isJS,
-            String sourceDir)
-    {
-        String testFileDir = FilenameNormalization.normalize("test-files");
-
-        File testFile = new File(testFileDir
-                + File.separator + sourceDir + File.separator + fileName
-                + (isJS ? ".js" : ".as"));
-
-        String code = "";
-        try
-        {
-            BufferedReader in = new BufferedReader(new InputStreamReader(
-                    new FileInputStream(testFile), "UTF8"));
-
-            String line = in.readLine();
-
-            while (line != null)
-            {
-                code += line + "\n";
-                line = in.readLine();
-            }
-            code = code.substring(0, code.length() - 1); // (erikdebruin) remove last line break
-
-            in.close();
-        }
-        catch (Exception e)
-        {
-        }
-
-        return code;
+                + "/frameworks/libs/spark.swc")));
+        
+        super.addLibraries();
     }
 
+    @Override
+    protected IBackend createBackend()
+    {
+        return new ASBackend();
+    }
     //--------------------------------------------------------------------------
     // Node "factory"
     //--------------------------------------------------------------------------
@@ -259,7 +71,7 @@ public class TestBase
             code = "package"
                     + ((includePackage) ? " foo.bar" : "") + " {" + code + "}";
 
-        IFileNode node = getFileNode(code);
+        IFileNode node = compileAS(code);
 
         if (type.isInstance(node))
             return node;
@@ -322,4 +134,5 @@ public class TestBase
     {
         return (IVariableNode) getNode(code, IVariableNode.class);
     }
+
 }

Added: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/ITestBase.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/ITestBase.java?rev=1451144&view=auto
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/ITestBase.java (added)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/ITestBase.java Thu Feb 28 09:08:54 2013
@@ -0,0 +1,10 @@
+package org.apache.flex.compiler.test;
+
+public interface ITestBase
+{
+
+    void addLibraries();
+    void addNamespaceMappings();
+    void addSourcePaths();
+
+}

Propchange: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/ITestBase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/MXMLTestBase.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/MXMLTestBase.java?rev=1451144&view=auto
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/MXMLTestBase.java (added)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/MXMLTestBase.java Thu Feb 28 09:08:54 2013
@@ -0,0 +1,52 @@
+package org.apache.flex.compiler.test;
+
+import java.io.File;
+
+import org.apache.flex.compiler.clients.IBackend;
+import org.apache.flex.compiler.internal.js.driver.goog.GoogBackend;
+import org.apache.flex.compiler.mxml.MXMLNamespaceMapping;
+import org.apache.flex.compiler.visitor.IASBlockWalker;
+import org.apache.flex.compiler.visitor.IMXMLBlockWalker;
+import org.junit.Ignore;
+
+@Ignore
+public class MXMLTestBase extends TestBase
+{
+
+    protected IMXMLBlockWalker walker;
+
+    @Override
+    public void setUp()
+    {
+        super.setUp();
+
+        IASBlockWalker asWalker = (IASBlockWalker) visitor;
+        walker = backend.createMXMLWalker(asWalker.getEmitter(), project,
+                errors);
+    }
+
+    @Override
+    public void addLibraries()
+    {
+        libraries.add(new File(tempDir, "libs/FlexJSUI.swc"));
+        
+        super.addLibraries();
+    }
+
+    @Override
+    public void addNamespaceMappings()
+    {
+        namespaceMappings.add(new MXMLNamespaceMapping(
+                "library://ns.apache.org/flexjs/basic", new File(tempDir,
+                        "libs/manifest.xml").getAbsolutePath()));
+        
+        super.addNamespaceMappings();
+    }
+    
+    @Override
+    protected IBackend createBackend()
+    {
+        return new GoogBackend();
+    }
+
+}

Propchange: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/MXMLTestBase.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message