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 23:16:48 UTC
git commit: [flex-sdk] - Added a few extra tests to check zero
padding and numbers between -1 and 1
Updated Branches:
refs/heads/develop 6bb057985 -> 9f4e10750
Added a few extra tests to check zero padding and numbers between -1 and 1
Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/9f4e1075
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/9f4e1075
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/9f4e1075
Branch: refs/heads/develop
Commit: 9f4e1075021ac7f42ff4c436094f8409d4274589
Parents: 6bb0579
Author: Justin Mclean <jm...@apache.org>
Authored: Thu Apr 18 07:16:25 2013 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Thu Apr 18 07:16:25 2013 +1000
----------------------------------------------------------------------
.../Formatters_Properties_Currencies.mxml | 39 +++++++++++++++
1 files changed, 39 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/9f4e1075/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 1ddc403..8e4eb10 100644
--- a/mustella/tests/Formatters/Properties/Formatters_Properties_Currencies.mxml
+++ b/mustella/tests/Formatters/Properties/Formatters_Properties_Currencies.mxml
@@ -50,6 +50,15 @@
public function FormatCurrencyMinusZero():void{
application.ti.text= application.cf.format("-0");
}
+ public function FormatCurrencyUnderOne():void{
+ application.ti.text= application.cf.format(0.98765);
+ }
+ public function FormatCurrencyNegativeUnderOne():void{
+ application.ti.text= application.cf.format(-0.98765);
+ }
+ public function FormatCurrencyZeroPadding():void{
+ application.ti.text= application.cf.format("000000000.98765");
+ }
public function FormatCurrencySimple():void{
application.ti.text= application.cf.format(98765);
}
@@ -161,7 +170,37 @@
<body>
<AssertPropertyValue target="ti" propertyName="text" value="$0.000" />
</body>
+ </TestCase>
+ <TestCase testID="Formatters_Currency_Under_One" 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="FormatCurrencyUnderOne();" waitEvent="updateComplete" waitTarget="ti"/>
+
+ </setup>
+ <body>
+ <AssertPropertyValue target="ti" propertyName="text" value="$0.988" />
+ </body>
+ </TestCase>
+ <TestCase testID="Formatters_Currency_Negative_Under_One" 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="FormatCurrencyNegativeUnderOne();" waitEvent="updateComplete" waitTarget="ti"/>
+
+ </setup>
+ <body>
+ <AssertPropertyValue target="ti" propertyName="text" value="-$0.987" />
+ </body>
</TestCase>
+ <TestCase testID="Formatters_Currency_Zero_padding" 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="FormatCurrencyZeroPadding();" waitEvent="updateComplete" waitTarget="ti"/>
+
+ </setup>
+ <body>
+ <AssertPropertyValue target="ti" propertyName="text" value="$0.988" />
+ </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"/>