flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joshtynj...@apache.org
Subject [08/50] git commit: [flex-falcon] [refs/heads/master] - clean up tests now that we dig through dependencies during a test run
Date Tue, 21 Mar 2017 23:10:45 GMT
clean up tests now that we dig through dependencies during a test run


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

Branch: refs/heads/master
Commit: ab1e351ee8517a16f334c3b23eb484bfb84efd4c
Parents: 7ad5193
Author: Alex Harui <aharui@apache.org>
Authored: Fri Jan 6 10:19:14 2017 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Fri Jan 6 10:19:14 2017 -0800

----------------------------------------------------------------------
 .../internal/codegen/js/jx/PackageHeaderEmitter.java         | 5 +++++
 .../java/org/apache/flex/compiler/utils/NativeUtils.java     | 1 +
 .../compiler/internal/codegen/js/flexjs/TestFlexJSClass.java | 2 +-
 .../internal/codegen/js/flexjs/TestFlexJSEmitter.java        | 2 ++
 .../compiler/internal/codegen/js/flexjs/TestFlexJSFile.java  | 8 ++++----
 .../flexjs/files/controllers/MyController_result.js          | 7 ++++++-
 .../src/test/resources/flexjs/files/models/MyModel_result.js | 4 +++-
 7 files changed, 22 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ab1e351e/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/PackageHeaderEmitter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/PackageHeaderEmitter.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/PackageHeaderEmitter.java
index e71d497..805a6ee 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/PackageHeaderEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/PackageHeaderEmitter.java
@@ -306,6 +306,11 @@ public class PackageHeaderEmitter extends JSSubEmitter implements
                         continue;
                 }
 
+                if (NativeUtils.isJSNative(imp))
+                {
+                    continue;
+                }
+
                 if (writtenRequires.indexOf(imp) == -1)
                 {
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ab1e351e/compiler-jx/src/main/java/org/apache/flex/compiler/utils/NativeUtils.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/utils/NativeUtils.java b/compiler-jx/src/main/java/org/apache/flex/compiler/utils/NativeUtils.java
index c389a10..bdf031e 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/utils/NativeUtils.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/utils/NativeUtils.java
@@ -88,6 +88,7 @@ public class NativeUtils
     {
         // (erikdebruin) Ref.: https://cwiki.apache.org/confluence/display/FLEX/Full+Table
         
+        Event("Event"),
         Array("Array"),
         Date("Date"),
         Math("Math"),

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ab1e351e/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
index 1bb287b..a8e88d9 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
@@ -233,7 +233,7 @@ public class TestFlexJSClass extends TestGoogClass
     {
         FileNode node = (FileNode)getNode("package org.apache.flex {\npublic class A {\nimport
flash.display.Sprite; Sprite;\n}}", FileNode.class, 0);
         asBlockWalker.visitFile(node);
-        assertOut("/**\n * org.apache.flex.A\n *\n * @fileoverview\n *\n * @suppress {checkTypes|accessControls}\n
*/\n\ngoog.provide('org.apache.flex.A');\n\n\n\ngoog.require('flash.display.Sprite');\n\n\n/**\n
* @constructor\n */\norg.apache.flex.A = function() {\n};");
+        assertOut("/**\n * org.apache.flex.A\n *\n * @fileoverview\n *\n * @suppress {checkTypes|accessControls}\n
*/\n\ngoog.provide('org.apache.flex.A');\n\ngoog.require('flash.display.Sprite');\n\n\n\n/**\n
* @constructor\n */\norg.apache.flex.A = function() {\n};");
     }
     
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ab1e351e/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmitter.java
b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmitter.java
index 5d1c5bf..9891e3a 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmitter.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmitter.java
@@ -69,6 +69,8 @@ public class TestFlexJSEmitter extends TestGoogEmitter
         		"\n" +
         		"goog.provide('com.example.components.MyEventTarget');\n" +
         		"\n" +
+        		"goog.require('flash.events.EventDispatcher');\n" +
+        		"\n" +
         		"\n" +
         		"\n" +
         		"/**\n" +

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ab1e351e/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFile.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFile.java
b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFile.java
index 3e72c22..405b564 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFile.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFile.java
@@ -77,8 +77,8 @@ public class TestFlexJSFile extends FlexJSTestBase
         
         //writeResultToFile(writer.toString(), fileName);
         
-        assertOutWithMetadata(getCodeFromFile(fileName + "_result", true,
-                "flexjs" + File.separator + "files"));
+        assertOutPostProcess(getCodeFromFile(fileName + "_result", true,
+                "flexjs" + File.separator + "files"), true);
     }
 
     @Test
@@ -95,8 +95,8 @@ public class TestFlexJSFile extends FlexJSTestBase
         
         //writeResultToFile(writer.toString(), fileName);
         
-        assertOutWithMetadata(getCodeFromFile(fileName + "_result", true,
-                "flexjs" + File.separator + "files"));
+        assertOutPostProcess(getCodeFromFile(fileName + "_result", true,
+                "flexjs" + File.separator + "files"), true);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ab1e351e/compiler-jx/src/test/resources/flexjs/files/controllers/MyController_result.js
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/resources/flexjs/files/controllers/MyController_result.js
b/compiler-jx/src/test/resources/flexjs/files/controllers/MyController_result.js
index f07b2b3..7fde95a 100644
--- a/compiler-jx/src/test/resources/flexjs/files/controllers/MyController_result.js
+++ b/compiler-jx/src/test/resources/flexjs/files/controllers/MyController_result.js
@@ -21,6 +21,12 @@
 
 goog.provide('controllers.MyController');
 
+goog.require('FlexJSTest_again');
+goog.require('MyInitialView');
+goog.require('models.MyModel');
+goog.require('org.apache.flex.core.IDocument');
+goog.require('org.apache.flex.utils.Language');
+
 
 
 /**
@@ -172,4 +178,3 @@ controllers.MyController.prototype.FLEXJS_REFLECTION_INFO = function ()
{
     }
   };
 };
-

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ab1e351e/compiler-jx/src/test/resources/flexjs/files/models/MyModel_result.js
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/resources/flexjs/files/models/MyModel_result.js b/compiler-jx/src/test/resources/flexjs/files/models/MyModel_result.js
index 1575772..ff0160f 100644
--- a/compiler-jx/src/test/resources/flexjs/files/models/MyModel_result.js
+++ b/compiler-jx/src/test/resources/flexjs/files/models/MyModel_result.js
@@ -21,6 +21,9 @@
 
 goog.provide('models.MyModel');
 
+goog.require('org.apache.flex.events.Event');
+goog.require('org.apache.flex.events.EventDispatcher');
+
 
 
 /**
@@ -131,4 +134,3 @@ models.MyModel.prototype.FLEXJS_REFLECTION_INFO = function () {
     }
   };
 };
-


Mime
View raw message