flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject git commit: [flex-falcon] [refs/heads/develop] - try using LinkedHashMap to get more consistent ordering in DefineProperties, otherwise tests can fail on various platforms and versions.
Date Sun, 04 Oct 2015 06:10:41 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/develop c180dbe40 -> 88578e4fe


try using LinkedHashMap to get more consistent ordering in DefineProperties, otherwise tests
can fail on various platforms and versions.


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

Branch: refs/heads/develop
Commit: 88578e4fe53103c416dceccb279514303a430f6f
Parents: c180dbe
Author: Alex Harui <aharui@apache.org>
Authored: Sat Oct 3 23:11:40 2015 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Sat Oct 3 23:11:40 2015 -0700

----------------------------------------------------------------------
 .../internal/codegen/js/flexjs/TestFlexJSClass.java |  2 +-
 .../test-files/flexjs/files/MyInitialView_result.js | 16 ++++++++--------
 .../flexjs/files/models/MyModel_result.js           |  8 ++++----
 .../internal/codegen/js/JSSessionModel.java         | 13 +++++++------
 4 files changed, 20 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/88578e4f/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
index 2bf3657..1d9f0b6 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
@@ -214,7 +214,7 @@ public class TestFlexJSClass extends TestGoogClass
                 + "foo_bar function get foo6():Object{return null;}"
                 + "foo_bar function set foo6(value:Object):void{}" + "}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\nObject.defineProperties(org.apache.flex.A.prototype,
/** @lends {org.apache.flex.A.prototype} */ {\n/** @export */\nfoo5: {\nget: /** @this {org.apache.flex.A}
*/ function() {\n  return null;\n},\nset: /** @this {org.apache.flex.A} */ function(value)
{\n}},\n/** @export */\nfoo3: {\nget: /** @this {org.apache.flex.A} */ function() {\n  return
null;\n},\nset: /** @this {org.apache.flex.A} */ function(value) {\n}},\n/** @export */\nfoo2:
{\nget: /** @this {org.apache.flex.A} */ function() {\n  return null;\n},\nset: /** @this
{org.apache.flex.A} */ function(value) {\n}},\n/** @export */\nfoo1: {\nget: /** @this {org.apache.flex.A}
*/ function() {\n  return null;\n},\nset: /** @this {org.apache.flex.A} */ function(value)
{\n}},\n/** @export */\nfoo6: {\nget: /** @this {org.apache.flex.A} */ function() {\n  return
null;\n},\nset: /** @this {org.apache.flex.A} */ function(value) {\n}}}\n);");
+        assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\nObject.defineProperties(org.apache.flex.A.prototype,
/** @lends {org.apache.flex.A.prototype} */ {\n/** @export */\nfoo1: {\nget: /** @this {org.apache.flex.A}
*/ function() {\n  return null;\n},\nset: /** @this {org.apache.flex.A} */ function(value)
{\n}},\n/** @export */\nfoo2: {\nget: /** @this {org.apache.flex.A} */ function() {\n  return
null;\n},\nset: /** @this {org.apache.flex.A} */ function(value) {\n}},\n/** @export */\nfoo3:
{\nget: /** @this {org.apache.flex.A} */ function() {\n  return null;\n},\nset: /** @this
{org.apache.flex.A} */ function(value) {\n}},\n/** @export */\nfoo5: {\nget: /** @this {org.apache.flex.A}
*/ function() {\n  return null;\n},\nset: /** @this {org.apache.flex.A} */ function(value)
{\n}},\n/** @export */\nfoo6: {\nget: /** @this {org.apache.flex.A} */ function() {\n  return
null;\n},\nset: /** @this {org.apache.flex.A} */ function(value) {\n}}}\n);");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/88578e4f/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js b/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
index 006de46..ff10b13 100644
--- a/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
@@ -252,24 +252,24 @@ MyInitialView.prototype.timerHandler = function(event) {
 
 Object.defineProperties(MyInitialView.prototype, /** @lends {MyInitialView.prototype} */
{
 /** @export */
-comboBoxValue: {
+symbol: {
 get: /** @this {MyInitialView} */ function() {
-  return String(this.comboBox.selectedItem);
+  return org.apache.flex.utils.Language.as(this.list.selectedItem, String);
 }},
 /** @export */
-inputText: {
+city: {
 get: /** @this {MyInitialView} */ function() {
-  return this.input.text;
+  return org.apache.flex.utils.Language.as(this.cityList.selectedItem, String);
 }},
 /** @export */
-symbol: {
+inputText: {
 get: /** @this {MyInitialView} */ function() {
-  return org.apache.flex.utils.Language.as(this.list.selectedItem, String);
+  return this.input.text;
 }},
 /** @export */
-city: {
+comboBoxValue: {
 get: /** @this {MyInitialView} */ function() {
-  return org.apache.flex.utils.Language.as(this.cityList.selectedItem, String);
+  return String(this.comboBox.selectedItem);
 }}}
 );/**
  * @export

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/88578e4f/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js b/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
index 7e3e371..436a2e7 100644
--- a/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
@@ -70,14 +70,14 @@ set: /** @this {models.MyModel} */ function(value) {
   }
 }},
 /** @export */
-cities: {
+strings: {
 get: /** @this {models.MyModel} */ function() {
-  return this._cities;
+  return this._strings;
 }},
 /** @export */
-strings: {
+cities: {
 get: /** @this {models.MyModel} */ function() {
-  return this._strings;
+  return this._cities;
 }}}
 );
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/88578e4f/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSSessionModel.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSSessionModel.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSSessionModel.java
index 2809937..86b0408 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSSessionModel.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSSessionModel.java
@@ -21,6 +21,7 @@ package org.apache.flex.compiler.internal.codegen.js;
 
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Stack;
 
@@ -47,19 +48,19 @@ public class JSSessionModel
 
     private static class Context
     {
-    	public HashMap<String, PropertyNodes> propertyMap;
+    	public LinkedHashMap<String, PropertyNodes> propertyMap;
     	public List<String> interfacePropertyMap;
-    	public HashMap<String, PropertyNodes> staticPropertyMap;
+    	public LinkedHashMap<String, PropertyNodes> staticPropertyMap;
     	public ArrayList<String> bindableVars;
     	public IClassDefinition classDefinition;
     }
     private Stack<Context> stack = new Stack<Context>();
     
-    private HashMap<String, PropertyNodes> propertyMap = new HashMap<String, PropertyNodes>();
+    private LinkedHashMap<String, PropertyNodes> propertyMap = new LinkedHashMap<String,
PropertyNodes>();
 
     private List<String> interfacePropertyMap = new ArrayList<String>();
 
-    private HashMap<String, PropertyNodes> staticPropertyMap = new HashMap<String,
PropertyNodes>();
+    private LinkedHashMap<String, PropertyNodes> staticPropertyMap = new LinkedHashMap<String,
PropertyNodes>();
 
     private ArrayList<String> bindableVars = new ArrayList<String>();
 
@@ -86,9 +87,9 @@ public class JSSessionModel
     	stack.push(context);
         this.currentClass = currentClass;
         bindableVars = new ArrayList<String>();
-        staticPropertyMap = new HashMap<String, PropertyNodes>();
+        staticPropertyMap = new LinkedHashMap<String, PropertyNodes>();
         interfacePropertyMap = new ArrayList<String>();
-        propertyMap = new HashMap<String, PropertyNodes>();
+        propertyMap = new LinkedHashMap<String, PropertyNodes>();
     }
 
     public void popClass()


Mime
View raw message