You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2013/04/17 09:41:48 UTC

[1/3] git commit: [flex-sdk] - FLEX-26698 Fixed formatting of zero

Updated Branches:
  refs/heads/develop 16dab33db -> 38122b443


FLEX-26698 Fixed formatting of zero


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

Branch: refs/heads/develop
Commit: d02be3020fa9d745fde7f6913638e18a3e548a8a
Parents: 16dab33
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Apr 17 17:37:38 2013 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Apr 17 17:39:31 2013 +1000

----------------------------------------------------------------------
 .../src/mx/formatters/CurrencyFormatter.as         |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d02be302/frameworks/projects/framework/src/mx/formatters/CurrencyFormatter.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/formatters/CurrencyFormatter.as b/frameworks/projects/framework/src/mx/formatters/CurrencyFormatter.as
index 3a8ab77..02be362 100644
--- a/frameworks/projects/framework/src/mx/formatters/CurrencyFormatter.as
+++ b/frameworks/projects/framework/src/mx/formatters/CurrencyFormatter.as
@@ -724,8 +724,13 @@ public class CurrencyFormatter extends Formatter
         	// Handle leading zero if we got one give one if not don't
         	var position:Number = numStr.indexOf(".");
         	var leading:String = position > 0 ? "0" : "";
-            numStr = leading + decimalSeparatorTo +
-					 numStr.substring(position + 1);
+			
+			// must be zero ("0") if no "." and >= 0 and < 1
+			if (position != -1)
+			{
+	            numStr = leading + decimalSeparatorTo +
+						 numStr.substring(position + 1);
+			}
         }
         
         numStr = dataFormatter.formatPrecision(numStr, int(precision));


[2/3] git commit: [flex-sdk] - FLEX-26698 Added tests for zero

Posted by jm...@apache.org.
FLEX-26698 Added tests for zero


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

Branch: refs/heads/develop
Commit: 41e2b8e32d1669b473a398d715cb3e799b5c9644
Parents: d02be30
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Apr 17 17:40:20 2013 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Apr 17 17:40:20 2013 +1000

----------------------------------------------------------------------
 .../Formatters_Properties_Currencies.mxml          |   61 ++++++++++++---
 1 files changed, 50 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/41e2b8e3/mustella/tests/Formatters/Properties/Formatters_Properties_Currencies.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/Formatters/Properties/Formatters_Properties_Currencies.mxml b/mustella/tests/Formatters/Properties/Formatters_Properties_Currencies.mxml
index 76d66be..1ddc403 100644
--- a/mustella/tests/Formatters/Properties/Formatters_Properties_Currencies.mxml
+++ b/mustella/tests/Formatters/Properties/Formatters_Properties_Currencies.mxml
@@ -40,7 +40,16 @@
     import mx.controls.TextInput;
     import mx.formatters.CurrencyFormatter;
     import mx.managers.SystemManager;
-    
+ 
+	public function FormatCurrencyZero():void{
+		application.ti.text= application.cf.format(0);
+	}
+	public function FormatCurrencyZeroPointZero():void{
+		application.ti.text= application.cf.format("0.0");
+	}
+	public function FormatCurrencyMinusZero():void{
+		application.ti.text= application.cf.format("-0");
+	}
     public function FormatCurrencySimple():void{
         application.ti.text= application.cf.format(98765);
     }
@@ -123,16 +132,46 @@
     </mx:Script>
 
     <testCases>
-        <TestCase testID="Formatters_Currency" description="Test the properties of Currency Formatters." keywords="[Simple, Currency, Formatter]">
-            <setup>
-                <ResetComponent target="ti" className="mx.controls.TextInput" waitEvent="updateComplete" waitTarget="ti"/>
-                <RunCode code="FormatCurrencySimple();" waitEvent="updateComplete" waitTarget="ti"/>
-                
-            </setup>
-            <body>
-                <AssertPropertyValue target="ti" propertyName="text" value="$98,765.000" />
-            </body>
-        </TestCase>
+		<TestCase testID="Formatters_Currency_Zero" description="Test the properties of Currency Formatters." keywords="[Simple, Currency, Formatter]">
+			<setup>
+				<ResetComponent target="ti" className="mx.controls.TextInput" waitEvent="updateComplete" waitTarget="ti"/>
+				<RunCode code="FormatCurrencyZero();" waitEvent="updateComplete" waitTarget="ti"/>
+				
+			</setup>
+			<body>
+				<AssertPropertyValue target="ti" propertyName="text" value="$0.000" />
+			</body>
+		</TestCase>
+		<TestCase testID="Formatters_Currency_Zero_Point_Zero" description="Test the properties of Currency Formatters." keywords="[Simple, Currency, Formatter]">
+			<setup>
+				<ResetComponent target="ti" className="mx.controls.TextInput" waitEvent="updateComplete" waitTarget="ti"/>
+				<RunCode code="FormatCurrencyZeroPointZero();" waitEvent="updateComplete" waitTarget="ti"/>
+				
+			</setup>
+			<body>
+				<AssertPropertyValue target="ti" propertyName="text" value="$0.000" />
+			</body>
+		</TestCase>
+		<TestCase testID="Formatters_Currency_Minus_Zero" description="Test the properties of Currency Formatters." keywords="[Simple, Currency, Formatter]">
+			<setup>
+				<ResetComponent target="ti" className="mx.controls.TextInput" waitEvent="updateComplete" waitTarget="ti"/>
+				<RunCode code="FormatCurrencyMinusZero();" waitEvent="updateComplete" waitTarget="ti"/>
+				
+			</setup>
+			<body>
+				<AssertPropertyValue target="ti" propertyName="text" value="$0.000" />
+			</body>
+		</TestCase>
+		<TestCase testID="Formatters_Currency_Simple" description="Test the properties of Currency Formatters." keywords="[Simple, Currency, Formatter]">
+			<setup>
+				<ResetComponent target="ti" className="mx.controls.TextInput" waitEvent="updateComplete" waitTarget="ti"/>
+				<RunCode code="FormatCurrencySimple();" waitEvent="updateComplete" waitTarget="ti"/>
+				
+			</setup>
+			<body>
+				<AssertPropertyValue target="ti" propertyName="text" value="$98,765.000" />
+			</body>
+		</TestCase>
         <TestCase testID="Formatters_Currency_currencySymbol" description="Test the properties of Currency Formatters." keywords="[currencySymbol, inline, Currency, Formatter]">
             <setup>
                 <ResetComponent target="ti" className="mx.controls.TextInput" waitEvent="updateComplete" waitTarget="ti"/>


[3/3] git commit: [flex-sdk] - quote in wrong place

Posted by jm...@apache.org.
quote in wrong place


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

Branch: refs/heads/develop
Commit: 38122b443270c128f661294b3916972d8e9c6f68
Parents: 41e2b8e
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Apr 17 17:41:18 2013 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Apr 17 17:41:18 2013 +1000

----------------------------------------------------------------------
 ide/flashbuilder/makeApacheFlexForFlashBuilder.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/38122b44/ide/flashbuilder/makeApacheFlexForFlashBuilder.sh
----------------------------------------------------------------------
diff --git a/ide/flashbuilder/makeApacheFlexForFlashBuilder.sh b/ide/flashbuilder/makeApacheFlexForFlashBuilder.sh
index 9919321..4c7ce91 100755
--- a/ide/flashbuilder/makeApacheFlexForFlashBuilder.sh
+++ b/ide/flashbuilder/makeApacheFlexForFlashBuilder.sh
@@ -104,7 +104,7 @@ curl "$ADOBE_FLASHPLAYER_GLOBALPLAYER_SWC_URL" --output "$FLEX_HOME/frameworks/l
 
 # copy the config files formatted for Flash Builder to frameworks 
 echo "Installing the frameworks config files configured for use with Adobe Flash Builder"
-cp -p -v "$FLEX_HOME"/ide/flashbuilder/config/*-config.xml "$FLEX_HOME/frameworks"
+cp -p -v "$FLEX_HOME/ide/flashbuilder/config/*-config.xml" "$FLEX_HOME/frameworks"
 
 # remove the zipped kits
 rm -rf "$tempDir"