[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Buglet in NSNumberFormatter tests
From: |
Philippe Roussel |
Subject: |
Buglet in NSNumberFormatter tests |
Date: |
Wed, 23 Feb 2011 16:57:54 +0100 |
Hi,
Two tests in base/NSNumberFormatter/basic10_4.m are failing because of a
localization problem : in my fr_FR locale the decimal separator is ','
but the 2 tests expect a '.' in the result.
Setting the formatter's locale to 'en' should do the trick.
Philippe
Index: Tests/base/NSNumberFormatter/basic10_4.m
===================================================================
--- Tests/base/NSNumberFormatter/basic10_4.m (révision 32329)
+++ Tests/base/NSNumberFormatter/basic10_4.m (copie de travail)
@@ -70,6 +70,7 @@
str = [fmt stringFromNumber: num];
PASS_EQUAL(str, @"1235", "default 10.4 format same as Cocoa")
+ [fmt setLocale: [[NSLocale alloc] initWithLocaleIdentifier: @"en"]];
[fmt setMaximumFractionDigits: 2];
str = [fmt stringFromNumber: num];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Buglet in NSNumberFormatter tests,
Philippe Roussel <=