flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mih...@apache.org
Subject [1/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34854 Changes while investigating a mustella failure (probably) introduced by the changes to this ticket: added a new unit test, corrections to comments, optimizing object initializations and remov
Date Fri, 24 Jul 2015 18:08:53 GMT
Repository: flex-sdk
Updated Branches:
  refs/heads/develop a722cf981 -> e32044cdb


FLEX-34854
Changes while investigating a mustella failure (probably) introduced by the changes to this
ticket: added a new unit test, corrections to comments, optimizing object initializations
and removing unused variables.


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

Branch: refs/heads/develop
Commit: 390e65958eb340fa42f9ccc8fece419fd88639bd
Parents: a722cf9
Author: Mihai Chira <mihaic@apache.org>
Authored: Fri Jul 24 11:23:03 2015 +0200
Committer: Mihai Chira <mihaic@apache.org>
Committed: Fri Jul 24 11:23:03 2015 +0200

----------------------------------------------------------------------
 .../projects/framework/tests/SortField_Tests.as | 22 ------------
 .../tests/spark/skins/spark/SortField_Tests.as  | 37 ++++++++++++++++++++
 .../as3/src/mustella/ExcludeFileLocation.as     |  7 +---
 .../as3/src/mustella/IncludeFileLocation.as     |  2 +-
 .../as3/src/mustella/IncludeListTextFile.as     |  2 +-
 mustella/as3/src/mustella/TestCase.as           |  2 +-
 6 files changed, 41 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/390e6595/frameworks/projects/framework/tests/SortField_Tests.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/tests/SortField_Tests.as b/frameworks/projects/framework/tests/SortField_Tests.as
deleted file mode 100644
index 3cd3871..0000000
--- a/frameworks/projects/framework/tests/SortField_Tests.as
+++ /dev/null
@@ -1,22 +0,0 @@
-package {
-    import mx.collections.SortField;
-
-    import org.flexunit.asserts.assertFalse;
-
-    public class SortField_Tests {
-        private var _sut:SortField;
-
-        [Test]
-        public function fix_mustella_failure_due_to_FLEX_34852():void
-        {
-            //given
-            _sut = new SortField("someField");
-
-            //when
-            var emptyObjectHasASortField:Boolean = _sut.objectHasSortField({});
-
-            //then
-            assertFalse(emptyObjectHasASortField);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/390e6595/frameworks/projects/spark/tests/spark/skins/spark/SortField_Tests.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/tests/spark/skins/spark/SortField_Tests.as b/frameworks/projects/spark/tests/spark/skins/spark/SortField_Tests.as
new file mode 100644
index 0000000..1c5824f
--- /dev/null
+++ b/frameworks/projects/spark/tests/spark/skins/spark/SortField_Tests.as
@@ -0,0 +1,37 @@
+package spark.skins.spark {
+    import org.flexunit.asserts.assertEquals;
+    import org.flexunit.asserts.assertFalse;
+
+    import spark.collections.SortField;
+
+    public class SortField_Tests {
+        private var _sut:SortField;
+
+        [Test]
+        public function fix_mustella_failure_due_to_FLEX_34852():void
+        {
+            //given
+            _sut = new SortField("someField");
+
+            //when
+            const emptyObject:Object = {};
+            var emptyObjectHasASortField:Boolean = _sut.objectHasSortField(emptyObject);
+
+            //then
+            assertFalse(emptyObjectHasASortField);
+        }
+
+        [Test]
+        public function locale_setting_and_retrieving_work():void
+        {
+            //given
+            _sut = new SortField("someField");
+
+            //when
+            _sut.setStyle("locale", "ru-RU");
+
+            //then
+            assertEquals("ru-RU", _sut.getStyle("locale"));
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/390e6595/mustella/as3/src/mustella/ExcludeFileLocation.as
----------------------------------------------------------------------
diff --git a/mustella/as3/src/mustella/ExcludeFileLocation.as b/mustella/as3/src/mustella/ExcludeFileLocation.as
index 7b5ee20..ee5ce6f 100644
--- a/mustella/as3/src/mustella/ExcludeFileLocation.as
+++ b/mustella/as3/src/mustella/ExcludeFileLocation.as
@@ -123,8 +123,6 @@ public class ExcludeFileLocation
 
 		triedBrowser = true;
 
-		var currentOS:String = Capabilities.os;
-
 		var useFile:String = "http://localhost/" + excludeFile;
 
 		trace ("try excludes from here: " + useFile);
@@ -169,8 +167,6 @@ public class ExcludeFileLocation
 
 		trace ("excludes loadTryFile " + new Date().toString());
 
-		var currentOS:String = Capabilities.os;
-
 		var useFile:String;
 
 		useFile = mustellaTestDir +"/" + excludeFile;
@@ -212,7 +208,7 @@ public class ExcludeFileLocation
 		delimiter = new RegExp("\n", "g");
 		data = data.replace(delimiter, ",");
 
-		UnitTester.excludeList = new Object();
+		UnitTester.excludeList = {};
 		var items:Array = data.split(",");
 		var n:int = items.length;
 		for (var i:int = 0; i < n; i++)
@@ -220,7 +216,6 @@ public class ExcludeFileLocation
 			var s:String = items[i];
 			if (s.length)
 				UnitTester.excludeList[s] = 1;
-
 		}
 		
 		UnitTester.waitForExcludes = false;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/390e6595/mustella/as3/src/mustella/IncludeFileLocation.as
----------------------------------------------------------------------
diff --git a/mustella/as3/src/mustella/IncludeFileLocation.as b/mustella/as3/src/mustella/IncludeFileLocation.as
index 4d41dfe..6517c27 100644
--- a/mustella/as3/src/mustella/IncludeFileLocation.as
+++ b/mustella/as3/src/mustella/IncludeFileLocation.as
@@ -83,7 +83,7 @@ public class IncludeFileLocation
 		delimiter = new RegExp("\n", "g");
 		data = data.replace(delimiter, ",");
 
-		UnitTester.includeList = new Object();
+		UnitTester.includeList = {};
 		var items:Array = data.split(",");
 		var n:int = items.length;
 		for (var i:int = 0; i < n; i++)

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/390e6595/mustella/as3/src/mustella/IncludeListTextFile.as
----------------------------------------------------------------------
diff --git a/mustella/as3/src/mustella/IncludeListTextFile.as b/mustella/as3/src/mustella/IncludeListTextFile.as
index 44a120f..7be8649 100644
--- a/mustella/as3/src/mustella/IncludeListTextFile.as
+++ b/mustella/as3/src/mustella/IncludeListTextFile.as
@@ -56,7 +56,7 @@ public class IncludeListTextFile
 		delimiter = new RegExp("\n", "g");
 		data = data.replace(delimiter, ",");
 
-		UnitTester.includeList = new Object();
+		UnitTester.includeList = {};
 		var items:Array = data.split(",");
 		var n:int = items.length;
 		for (var i:int = 0; i < n; i++)

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/390e6595/mustella/as3/src/mustella/TestCase.as
----------------------------------------------------------------------
diff --git a/mustella/as3/src/mustella/TestCase.as b/mustella/as3/src/mustella/TestCase.as
index 44884e4..db6e937 100644
--- a/mustella/as3/src/mustella/TestCase.as
+++ b/mustella/as3/src/mustella/TestCase.as
@@ -181,7 +181,7 @@ public class TestCase extends EventDispatcher
 	 *
 	 *  @param root The SystemManager
 	 *  @param timer The shared Timer;
-	 *  @param the UnitTester that contains these tests
+	 *  @param context the UnitTester that contains these tests
 	 */
 	public function runTest(root:DisplayObject, timer:Timer, context:UnitTester):Boolean
 	{


Mime
View raw message