incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ftho...@apache.org
Subject svn commit: r1424357 - /incubator/flex/sdk/branches/develop/mustella/tests/spark/formatters/CurrencyFormatter/Fallback/CF_Fallback_format_Main_tester.mxml
Date Thu, 20 Dec 2012 07:59:23 GMT
Author: fthomas
Date: Thu Dec 20 07:59:23 2012
New Revision: 1424357

URL: http://svn.apache.org/viewvc?rev=1424357&view=rev
Log:
FLEX-33319 Fix: spark/formatters/CurrencyFormatter/Fallback/ some tests fail in FP 11.4+

Modified:
    incubator/flex/sdk/branches/develop/mustella/tests/spark/formatters/CurrencyFormatter/Fallback/CF_Fallback_format_Main_tester.mxml

Modified: incubator/flex/sdk/branches/develop/mustella/tests/spark/formatters/CurrencyFormatter/Fallback/CF_Fallback_format_Main_tester.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/spark/formatters/CurrencyFormatter/Fallback/CF_Fallback_format_Main_tester.mxml?rev=1424357&r1=1424356&r2=1424357&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/spark/formatters/CurrencyFormatter/Fallback/CF_Fallback_format_Main_tester.mxml
(original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/spark/formatters/CurrencyFormatter/Fallback/CF_Fallback_format_Main_tester.mxml
Thu Dec 20 07:59:23 2012
@@ -32,6 +32,11 @@
         {
  
         }
+		
+		private function fixToFixed(numberToFormat:uint, baseCompare:String):String {
+			var s:String = application.cf_inline.format(numberToFormat); 
+			return (s.indexOf(".") > -1) ? baseCompare + "." : baseCompare;
+		}
     ]]>
     </mx:Script>
 
@@ -55,7 +60,7 @@
 			<AssertMethodValue method="value=application.cf_inline.format(123456789)" 
 							   valueExpression="value='USD123456789'"/>
 			<AssertMethodValue method="value=application.cf_inline.format(0.12345)" 
-							   valueExpression="value='USD0.'"/>
+							   valueExpression="value=fixToFixed(0.12345, 'USD0')"/>
 			<AssertMethodValue method="value=application.cf_inline.format(-1234567.345)" 
 							   valueExpression="value='USD-1234567'"/>
 		</body>
@@ -114,7 +119,7 @@
 			<AssertMethodValue method="value=application.cf_inline.format(123456789)" 
 							   valueExpression="value='RUR123456789'"/>
 			<AssertMethodValue method="value=application.cf_inline.format(0.12345)" 
-							   valueExpression="value='RUR0.'"/>
+							   valueExpression="value=fixToFixed(0.12345, 'RUR0')"/>
 			<AssertMethodValue method="value=application.cf_inline.format(-1234567.345)" 
 							   valueExpression="value='RUR-1234567'"/>
 		</body>
@@ -137,7 +142,7 @@
 			<AssertMethodValue method="value=application.cf_inline.format(123456789)" 
 							   valueExpression="value='RUR123456789'"/>
 			<AssertMethodValue method="value=application.cf_inline.format(0.12345)" 
-							   valueExpression="value='RUR0.'"/>
+							   valueExpression="value=fixToFixed(0.12345, 'RUR0')"/>
 			<AssertMethodValue method="value=application.cf_inline.format(-1234567.345)" 
 							   valueExpression="value='RUR-1234567'"/>
 		</body>
@@ -160,7 +165,7 @@
 			<AssertMethodValue method="value=application.cf_inline.format(123456789)" 
 							   valueExpression="value='RUR123456789'"/>
 			<AssertMethodValue method="value=application.cf_inline.format(0.12345)" 
-							   valueExpression="value='RUR0.'"/>
+							   valueExpression="value=fixToFixed(0.12345, 'RUR0')"/>
 			<AssertMethodValue method="value=application.cf_inline.format(-1234567.345)" 
 							   valueExpression="value='RUR-1234567'"/>
 		</body>
@@ -182,7 +187,7 @@
 			<AssertMethodValue method="value=application.cf_inline.format(123456789)" 
 							   valueExpression="value='RUR123456789'"/>
 			<AssertMethodValue method="value=application.cf_inline.format(0.12345)" 
-							   valueExpression="value='RUR0.'"/>
+							   valueExpression="value=fixToFixed(0.12345, 'RUR0')"/>
 			<AssertMethodValue method="value=application.cf_inline.format(-1234567.345)" 
 							   valueExpression="value='RUR-1234567'"/>
 		</body>
@@ -347,7 +352,7 @@
 			<AssertMethodValue method="value=application.cf_inline.format(123456789)" 
 							   valueExpression="value='€123456789'"/>
 			<AssertMethodValue method="value=application.cf_inline.format(0.12345)" 
-							   valueExpression="value='€0.'"/>
+							   valueExpression="value=fixToFixed(0.12345, '€0')"/>
 			<AssertMethodValue method="value=application.cf_inline.format(123.345)" 
 							   valueExpression="value='€123'"/>
 		</body>
@@ -365,7 +370,7 @@
 			<AssertMethodValue method="value=application.cf.format(123456789)" 
 							   valueExpression="value='USD123456789'"/>
 			<AssertMethodValue method="value=application.cf.format(0.12345)" 
-							   valueExpression="value='USD0.'"/>
+							   valueExpression="value=fixToFixed(0.12345, 'USD0')"/>
 			<AssertMethodValue method="value=application.cf.format(-1234567.345)" 
 							   valueExpression="value='USD-1234567'"/>
 		</body>
@@ -386,7 +391,7 @@
 			<AssertMethodValue method="value=application.cf.format(123456789)" 
 							   valueExpression="value='CNY123456789'"/>
 			<AssertMethodValue method="value=application.cf.format(0.12345)" 
-							   valueExpression="value='CNY0.'"/>
+							   valueExpression="value=fixToFixed(0.12345, 'CNY0')"/>
 			<AssertMethodValue method="value=application.cf.format(-1234567.345)" 
 							   valueExpression="value='CNY-1234567'"/>
 		</body>



Mime
View raw message