You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by gr...@apache.org on 2016/09/29 08:45:18 UTC

git commit: [flex-falcon] [refs/heads/develop] - [TESTS] Tests maintenance to fix issues with flexjs.dependent.tests after Reflection updates

Repository: flex-falcon
Updated Branches:
  refs/heads/develop 7bafdadab -> d4ff97b03


[TESTS] Tests maintenance to fix issues with flexjs.dependent.tests after Reflection updates


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

Branch: refs/heads/develop
Commit: d4ff97b036022708b1cac70242c0cf24b37f6586
Parents: 7bafdad
Author: greg-dove <gr...@gmail.com>
Authored: Thu Sep 29 21:44:45 2016 +1300
Committer: greg-dove <gr...@gmail.com>
Committed: Thu Sep 29 21:44:45 2016 +1300

----------------------------------------------------------------------
 .../mxml/flexjs/TestFlexJSMXMLApplication.java  | 46 ++++------
 .../mxml/flexjs/TestFlexJSMXMLScript.java       | 88 +++++++++-----------
 .../flexjs/files/FlexJSTest_again_result.js     | 14 ++--
 .../flexjs/files/MyInitialView_result.js        | 60 ++++++-------
 .../files/controllers/MyController_result.js    |  4 +-
 .../flexjs/files/models/MyModel_result.js       |  6 +-
 .../flexjs/files/wildcard_import_result.js      | 13 ++-
 7 files changed, 112 insertions(+), 119 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d4ff97b0/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
index fc5ce66..f1c87b3 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
@@ -137,12 +137,13 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
         		"goog.inherits(AppName, org.apache.flex.core.Application);\n" +
         		"\n" +
         		"\n" +
+				"\n" +
         		"/**\n" +
         		" * Metadata\n" +
         		" *\n" +
         		" * @type {Object.<string, Array.<Object>>}\n" +
         		" */\n" +
-        		"AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName' }], interfaces: [org.apache.flex.core.IChrome] };\n" +
+        		"AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName', kind: 'class'  }], interfaces: [org.apache.flex.core.IChrome] };\n" +
           		"\n" +
         		"\n" +
         		"/**\n" +
@@ -159,22 +160,16 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
         		" */\n" +
         		"AppName.prototype.FLEXJS_REFLECTION_INFO = function () {\n" +
         		"  return {\n" +
-        		"    variables: function () {\n" +
-        		"      return {\n" +
-        		"      };\n" +
-        		"    },\n" +
-        		"    accessors: function () {\n" +
-        		"      return {\n" +
-        		"      };\n" +
-        		"    },\n" +
+        		"    variables: function () {return {};},\n" +
+				"    accessors: function () {return {};},\n" +
         		"    methods: function () {\n" +
         		"      return {\n" +
+				"        'AppName': { type: '', declaredBy: 'AppName'}\n"+
         		"      };\n" +
         		"    }\n" +
         		"  };\n" +
         		"};\n" +
         		"\n" +
-        		"\n" +
         		"\n";
 
         assertOutWithMetadata(outTemplate.replaceAll("AppName", appName));
@@ -233,12 +228,13 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
         		"goog.inherits(AppName, org.apache.flex.core.Application);\n" +
         		"\n" +
         		"\n" +
+				"\n" +
         		"/**\n" +
         		" * Metadata\n" +
         		" *\n" +
         		" * @type {Object.<string, Array.<Object>>}\n" +
         		" */\n" +
-        		"AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName' }], interfaces: [org.apache.flex.core.IChrome, org.apache.flex.core.IPopUp] };\n" +
+        		"AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName', kind: 'class'  }], interfaces: [org.apache.flex.core.IChrome, org.apache.flex.core.IPopUp] };\n" +
           		"\n" +
         		"\n" +
         		"/**\n" +
@@ -254,24 +250,18 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
         		" * @return {Object.<string, Function>}\n" +
         		" */\n" +
         		"AppName.prototype.FLEXJS_REFLECTION_INFO = function () {\n" +
-        		"  return {\n" +
-        		"    variables: function () {\n" +
-        		"      return {\n" +
-        		"      };\n" +
-        		"    },\n" +
-        		"    accessors: function () {\n" +
-        		"      return {\n" +
-        		"      };\n" +
-        		"    },\n" +
-        		"    methods: function () {\n" +
-        		"      return {\n" +
-        		"      };\n" +
-        		"    }\n" +
-        		"  };\n" +
-        		"};\n" +
+				"  return {\n" +
+				"    variables: function () {return {};},\n" +
+				"    accessors: function () {return {};},\n" +
+				"    methods: function () {\n" +
+				"      return {\n" +
+				"        'AppName': { type: '', declaredBy: 'AppName'}\n"+
+				"      };\n" +
+				"    }\n" +
+				"  };\n" +
+				"};\n" +
         		"\n" +
-        		"\n" +
-        		"\n";
+        		"\n" ;
 
         assertOutWithMetadata(outTemplate.replaceAll("AppName", appName));
     }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d4ff97b0/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java
index 3da0c36..2f2d0de 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java
@@ -79,12 +79,23 @@ public class TestFlexJSMXMLScript extends FlexJSTestBase
         		"goog.inherits(AppName, org.apache.flex.core.Application);\n" +
         		"\n" +
         		"\n" +
+				"\n" +
+				"/**\n" +
+				" * @export\n" +
+				" * @override\n" +
+				" */\n" +
+				"AppName.prototype.addedToParent = function() {\n" +
+				"  AppName.base(this, 'addedToParent');\n" +
+				"};\n" +
+				"\n" +
+				"\n" +
+
         		"/**\n" +
         		" * Metadata\n" +
         		" *\n" +
         		" * @type {Object.<string, Array.<Object>>}\n" +
         		" */\n" +
-        		"AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName' }] };\n" +
+        		"AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName', kind: 'class'  }] };\n" +
           		"\n" +
         		"\n" +
         		"/**\n" +
@@ -101,32 +112,17 @@ public class TestFlexJSMXMLScript extends FlexJSTestBase
         		" */\n" +
         		"AppName.prototype.FLEXJS_REFLECTION_INFO = function () {\n" +
         		"  return {\n" +
-        		"    variables: function () {\n" +
-        		"      return {\n" +
-        		"      };\n" + 
-        		"    },\n" +
-        		"    accessors: function () {\n" +
-        		"      return {\n" +
-        		"      };\n" +
-        		"    },\n" +
+        		"    variables: function () {return {};},\n" +
+        		"    accessors: function () {return {};},\n" +
         		"    methods: function () {\n" +
         		"      return {\n" +
-        		"        'addedToParent': { type: 'void', declaredBy: 'AppName'}\n" +
+        		"        'addedToParent': { type: 'void', declaredBy: 'AppName'},\n" +
+				"        'AppName': { type: '', declaredBy: 'AppName'}\n" +
         		"      };\n" +
         		"    }\n" +
         		"  };\n" +
         		"};\n" +
         		"\n" +
-        		"\n" +
-        		"\n" +
-        		"/**\n" +
-        		" * @export\n" +
-        		" * @override\n" +
-        		" */\n" +
-        		"AppName.prototype.addedToParent = function() {\n" +
-        		"  AppName.base(this, 'addedToParent');\n" +
-        		"};\n" +
-        		"\n" +
         		"\n";
         	
         assertOutWithMetadata(outTemplate.replaceAll("AppName", appName));
@@ -184,12 +180,20 @@ public class TestFlexJSMXMLScript extends FlexJSTestBase
         		"goog.inherits(AppName, org.apache.flex.core.Application);\n" +
         		"\n" +
         		"\n" +
+				"\n" +
+				"/**\n" +
+				" * @export\n" +
+				" * @type {Array}\n" +
+				" */\n" +
+				"AppName.prototype.foo;\n" +
+				"\n" +
+				"\n" +
         		"/**\n" +
         		" * Metadata\n" +
         		" *\n" +
         		" * @type {Object.<string, Array.<Object>>}\n" +
         		" */\n" +
-        		"AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName' }] };\n" +
+        		"AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName', kind: 'class'  }] };\n" +
           		"\n" +
         		"\n" +
         		"/**\n" +
@@ -205,32 +209,22 @@ public class TestFlexJSMXMLScript extends FlexJSTestBase
         		" * @return {Object.<string, Function>}\n" +
         		" */\n" +
         		"AppName.prototype.FLEXJS_REFLECTION_INFO = function () {\n" +
-        		"  return {\n" +
-        		"    variables: function () {\n" +
-        		"      return {\n" +
-        		"      };\n" + 
-        		"    },\n" +
-        		"    accessors: function () {\n" +
-        		"      return {\n" +
-        		"      };\n" +
-        		"    },\n" +
-        		"    methods: function () {\n" +
-        		"      return {\n" +
-        		"      };\n" +
-        		"    }\n" +
-        		"  };\n" +
-        		"};\n" +
-        		"\n" +
-        		"\n" +
-        		"\n" +
-        		"/**\n" +
-        		" * @export\n" +
-        		" * @type {Array}\n" +
-        		" */\n" +
-        		"AppName.prototype.foo;\n" +
-        		"\n" +
-        		"\n" +
-        		"";
+				"  return {\n" +
+				"    variables: function () {\n" +
+				"      return {\n" +
+				"        'foo': { type: 'Array'}\n" +
+				"      };\n" +
+				"    },\n" +
+				"    accessors: function () {return {};},\n" +
+				"    methods: function () {\n" +
+				"      return {\n" +
+				"        'AppName': { type: '', declaredBy: 'AppName'}\n" +
+				"      };\n" +
+				"    }\n" +
+				"  };\n" +
+				"};\n" +
+        		"\n" +
+        		"\n" ;
         	
         assertOutWithMetadata(outTemplate.replaceAll("AppName", appName));
     }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d4ff97b0/compiler-jx/src/test/resources/flexjs/files/FlexJSTest_again_result.js
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/resources/flexjs/files/FlexJSTest_again_result.js b/compiler-jx/src/test/resources/flexjs/files/FlexJSTest_again_result.js
index af271c5..7da2ae9 100644
--- a/compiler-jx/src/test/resources/flexjs/files/FlexJSTest_again_result.js
+++ b/compiler-jx/src/test/resources/flexjs/files/FlexJSTest_again_result.js
@@ -127,6 +127,7 @@ this.$EH0
 goog.inherits(FlexJSTest_again, org.apache.flex.core.Application);
 
 
+
 /**
  * @export
  * @param {org.apache.flex.events.Event} event
@@ -167,16 +168,12 @@ Object.defineProperties(FlexJSTest_again.prototype, /** @lends {FlexJSTest_again
     }
   }
 });
-
-
-
-
 /**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
  */
-FlexJSTest_again.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'FlexJSTest_again', qName: 'FlexJSTest_again', kind: 'class' }] };
+FlexJSTest_again.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'FlexJSTest_again', qName: 'FlexJSTest_again', kind: 'class'  }] };
 
 
 /**
@@ -196,15 +193,18 @@ FlexJSTest_again.prototype.FLEXJS_REFLECTION_INFO = function () {
     variables: function () {return {};},
     accessors: function () {
       return {
-        'service': { type: 'org.apache.flex.net.HTTPService', declaredBy: 'FlexJSTest_again'},
-        'collection': { type: 'org.apache.flex.collections.LazyCollection', declaredBy: 'FlexJSTest_again'}
+        'service': { type: 'org.apache.flex.net.HTTPService', access: 'readwrite', declaredBy: 'FlexJSTest_again'},
+        'collection': { type: 'org.apache.flex.collections.LazyCollection', access: 'readwrite', declaredBy: 'FlexJSTest_again'}
       };
     },
     methods: function () {
       return {
+        'FlexJSTest_again': { type: '', declaredBy: 'FlexJSTest_again'},
         '$EH0': { type: 'void', declaredBy: 'FlexJSTest_again'}
       };
     }
   };
 };
 
+
+

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d4ff97b0/compiler-jx/src/test/resources/flexjs/files/MyInitialView_result.js
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/resources/flexjs/files/MyInitialView_result.js b/compiler-jx/src/test/resources/flexjs/files/MyInitialView_result.js
index 9ea211f..c0bfc75 100644
--- a/compiler-jx/src/test/resources/flexjs/files/MyInitialView_result.js
+++ b/compiler-jx/src/test/resources/flexjs/files/MyInitialView_result.js
@@ -201,7 +201,6 @@ goog.inherits(MyInitialView, org.apache.flex.core.View);
 
 
 
-
 /**
  * @private
  * @type {org.apache.flex.utils.Timer}
@@ -841,21 +840,18 @@ null
       }
     }
   });
-
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-MyInitialView.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyInitialView', qName: 'MyInitialView', kind: 'class'  }] };
-
-
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('MyInitialView', MyInitialView);
+  /**
+   * Metadata
+   *
+   * @type {Object.<string, Array.<Object>>}
+   */
+  MyInitialView.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyInitialView', qName: 'MyInitialView', kind: 'class'  }] };
+  
+  
+  /**
+   * Prevent renaming of class. Needed for reflection.
+   */
+  goog.exportSymbol('MyInitialView', MyInitialView);
 
 
 
@@ -869,23 +865,24 @@ MyInitialView.prototype.FLEXJS_REFLECTION_INFO = function () {
     variables: function () {return {};},
     accessors: function () {
       return {
-        'symbol': { type: 'String', declaredBy: 'MyInitialView'},
-        'city': { type: 'String', declaredBy: 'MyInitialView'},
-        'inputText': { type: 'String', declaredBy: 'MyInitialView'},
-        'comboBoxValue': { type: 'String', declaredBy: 'MyInitialView'},
-        'lbl': { type: 'org.apache.flex.html.Label', declaredBy: 'MyInitialView'},
-        'timerLabel': { type: 'org.apache.flex.html.Label', declaredBy: 'MyInitialView'},
-        'cityList': { type: 'org.apache.flex.html.List', declaredBy: 'MyInitialView'},
-        'input': { type: 'org.apache.flex.html.TextInput', declaredBy: 'MyInitialView'},
-        'checkbox': { type: 'org.apache.flex.html.CheckBox', declaredBy: 'MyInitialView'},
-        'list': { type: 'org.apache.flex.html.DropDownList', declaredBy: 'MyInitialView'},
-        'comboBox': { type: 'org.apache.flex.html.ComboBox', declaredBy: 'MyInitialView'}
+        'symbol': { type: 'String', access: 'readonly', declaredBy: 'MyInitialView'},
+        'city': { type: 'String', access: 'readonly', declaredBy: 'MyInitialView'},
+        'inputText': { type: 'String', access: 'readonly', declaredBy: 'MyInitialView'},
+        'comboBoxValue': { type: 'String', access: 'readonly', declaredBy: 'MyInitialView'},
+        'lbl': { type: 'org.apache.flex.html.Label', access: 'readwrite', declaredBy: 'MyInitialView'},
+        'timerLabel': { type: 'org.apache.flex.html.Label', access: 'readwrite', declaredBy: 'MyInitialView'},
+        'cityList': { type: 'org.apache.flex.html.List', access: 'readwrite', declaredBy: 'MyInitialView'},
+        'input': { type: 'org.apache.flex.html.TextInput', access: 'readwrite', declaredBy: 'MyInitialView'},
+        'checkbox': { type: 'org.apache.flex.html.CheckBox', access: 'readwrite', declaredBy: 'MyInitialView'},
+        'list': { type: 'org.apache.flex.html.DropDownList', access: 'readwrite', declaredBy: 'MyInitialView'},
+        'comboBox': { type: 'org.apache.flex.html.ComboBox', access: 'readwrite', declaredBy: 'MyInitialView'}
       };
     },
     methods: function () {
       return {
-        'startTimer': { type: 'void', declaredBy: 'MyInitialView'},
-        'timerHandler': { type: 'void', declaredBy: 'MyInitialView'},
+        'startTimer': { type: 'void', declaredBy: 'MyInitialView', parameters: function () { return [  { index: 1, type: 'org.apache.flex.events.Event', optional: false } ]; }},
+        'timerHandler': { type: 'void', declaredBy: 'MyInitialView', parameters: function () { return [  { index: 1, type: 'org.apache.flex.events.Event', optional: false } ]; }},
+        'MyInitialView': { type: '', declaredBy: 'MyInitialView'},
         '$EH0': { type: 'void', declaredBy: 'MyInitialView'},
         '$EH1': { type: 'void', declaredBy: 'MyInitialView'},
         '$EH2': { type: 'void', declaredBy: 'MyInitialView'},
@@ -896,4 +893,7 @@ MyInitialView.prototype.FLEXJS_REFLECTION_INFO = function () {
       };
     }
   };
-};
\ No newline at end of file
+};
+
+  
+  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d4ff97b0/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 310bb87..f07b2b3 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
@@ -166,8 +166,8 @@ controllers.MyController.prototype.FLEXJS_REFLECTION_INFO = function () {
     accessors: function () {return {};},
     methods: function () {
       return {
-        'MyController': { type: '', declaredBy: 'controllers.MyController'},
-        'setDocument': { type: 'void', declaredBy: 'controllers.MyController'}
+        'MyController': { type: '', declaredBy: 'controllers.MyController', parameters: function () { return [  { index: 1, type: 'org.apache.flex.core.Application', optional: true } ]; }},
+        'setDocument': { type: 'void', declaredBy: 'controllers.MyController', parameters: function () { return [  { index: 1, type: 'Object', optional: false },{ index: 2, type: 'String', optional: true } ]; }}
       };
     }
   };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d4ff97b0/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 7b02eba..1575772 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
@@ -119,9 +119,9 @@ models.MyModel.prototype.FLEXJS_REFLECTION_INFO = function () {
     variables: function () {return {};},
     accessors: function () {
       return {
-        'labelText': { type: 'String', declaredBy: 'models.MyModel'},
-        'strings': { type: 'Array', declaredBy: 'models.MyModel'},
-        'cities': { type: 'Array', declaredBy: 'models.MyModel'}
+        'labelText': { type: 'String', access: 'readwrite', declaredBy: 'models.MyModel'},
+        'strings': { type: 'Array', access: 'readonly', declaredBy: 'models.MyModel'},
+        'cities': { type: 'Array', access: 'readonly', declaredBy: 'models.MyModel'}
       };
     },
     methods: function () {

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d4ff97b0/compiler-jx/src/test/resources/flexjs/files/wildcard_import_result.js
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/resources/flexjs/files/wildcard_import_result.js b/compiler-jx/src/test/resources/flexjs/files/wildcard_import_result.js
index 11702ea..7bc6a18 100644
--- a/compiler-jx/src/test/resources/flexjs/files/wildcard_import_result.js
+++ b/compiler-jx/src/test/resources/flexjs/files/wildcard_import_result.js
@@ -48,6 +48,7 @@ wildcard_import = function() {
 goog.inherits(wildcard_import, org.apache.flex.core.Application);
 
 
+
 /**
  * @private
  */
@@ -56,6 +57,7 @@ wildcard_import.prototype.tmp = function() {
   myButton = new org.apache.flex.html.Button();
 };
 
+
 /**
  * Metadata
  *
@@ -80,6 +82,13 @@ wildcard_import.prototype.FLEXJS_REFLECTION_INFO = function () {
   return {
     variables: function () {return {};},
     accessors: function () {return {};},
-    methods: function () {return {};}
+    methods: function () {
+      return {
+        'wildcard_import': { type: '', declaredBy: 'wildcard_import'}
+      };
+    }
   };
-};
\ No newline at end of file
+};
+
+
+