need to calculate dependencies in order to see databinding output, but that 
also means that some output needs to go through the postProcess


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/64e1a175
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/64e1a175
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/64e1a175

Branch: refs/heads/master
Commit: 64e1a17512ba98b6d208fabee105cb8415d51285
Parents: dfa0815
Author: Alex Harui <[email protected]>
Authored: Fri Jan 6 09:34:31 2017 -0800
Committer: Alex Harui <[email protected]>
Committed: Fri Jan 6 09:34:31 2017 -0800

----------------------------------------------------------------------
 .../flex/compiler/internal/test/TestBase.java   | 49 ++++++++++++++++++++
 1 file changed, 49 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/64e1a175/compiler-jx/src/test/java/org/apache/flex/compiler/internal/test/TestBase.java
----------------------------------------------------------------------
diff --git 
a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/test/TestBase.java
 
b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/test/TestBase.java
index 4bc9cbd..346ee10 100644
--- 
a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/test/TestBase.java
+++ 
b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/test/TestBase.java
@@ -123,6 +123,13 @@ public class TestBase implements ITestBase
         }
         project.setProblems(errors);
         FlexProjectConfigurator.configure(project);
+        try {
+               Configurator projectConfigurator = backend.createConfigurator();
+               
project.setTargetSettings(projectConfigurator.getTargetSettings(null));
+        }
+        catch (UnsupportedOperationException e)
+        {
+        }
 
         writer = backend.createWriterBuffer(project);
 
@@ -164,10 +171,38 @@ public class TestBase implements ITestBase
                        continue;
                if (problem.toString().equals("An externally-visible definition 
with the name 'String' was unexpectedly found."))
                        continue;
+               if (problem.toString().equals("An externally-visible definition 
with the name 'Boolean' was unexpectedly found."))
+                       continue;
+               if (problem.toString().equals("An externally-visible definition 
with the name 'Number' was unexpectedly found."))
+                       continue;
+               if (problem.toString().equals("An externally-visible definition 
with the name 'Error' was unexpectedly found."))
+                       continue;
+               if (problem.toString().equals("An externally-visible definition 
with the name 'RangeError' was unexpectedly found."))
+                       continue;
+               if (problem.toString().equals("An externally-visible definition 
with the name 'ReferenceError' was unexpectedly found."))
+                       continue;
+               if (problem.toString().equals("An externally-visible definition 
with the name 'TypeError' was unexpectedly found."))
+                       continue;
                if (problem.toString().equals("No externally-visible definition 
with the name 'externals.as.classes.Object' was found."))
                        continue;
                if (problem.toString().equals("No externally-visible definition 
with the name 'externals.as.classes.String' was found."))
                        continue;
+               if (problem.toString().equals("No externally-visible definition 
with the name 'externals.as.classes.Number' was found."))
+                       continue;
+               if (problem.toString().equals("No externally-visible definition 
with the name 'externals.as.classes.Boolean' was found."))
+                       continue;
+               if (problem.toString().equals("No externally-visible definition 
with the name 'externals.as.classes.Error' was found."))
+                       continue;
+               if (problem.toString().equals("No externally-visible definition 
with the name 'externals.as.classes.RangeError' was found."))
+                       continue;
+               if (problem.toString().equals("No externally-visible definition 
with the name 'externals.as.classes.ReferenceError' was found."))
+                       continue;
+               if (problem.toString().equals("No externally-visible definition 
with the name 'externals.as.classes.TypeError' was found."))
+                       continue;
+               if (problem.toString().equals("An externally-visible definition 
with the name 'FalconTest_A' was unexpectedly found."))
+                       continue;
+               if (problem.toString().startsWith("No externally-visible 
definition with the name 'TestFlexJSGlobalFunctions"))
+                       continue;
                actualErrors.append(problem.toString());
        }
         assertThat(actualErrors.toString(), is(errorReport));
@@ -186,6 +221,19 @@ public class TestBase implements ITestBase
         assertThat(mCode, is(code));
     }
     
+    protected void assertOutPostProcess(String code, boolean keepMetadata)
+    {
+       mCode = removeGeneratedString(asEmitter.postProcess(writer.toString()));
+       if (!keepMetadata)
+               mCode = removeMetadata(mCode);
+        //System.out.println(mCode);
+        /*if (!code.equals(mCode)) {
+            System.out.println("mCode:\n"+mCode);
+            System.out.println("code:\n"+code);
+        }*/
+        assertThat(mCode, is(code));
+    }
+    
     protected void assertOut(String code)
     {
         assertOut(code, false);
@@ -273,6 +321,7 @@ public class TestBase implements ITestBase
                        return null;
                }
             fileNode = result.getAST();
+            project.getDependencies(cu);
         }
         catch (InterruptedException e)
         {

Reply via email to