[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #60871] NSNumberFormatter does not behave as in Mac OS X
From: |
Larry Campbell |
Subject: |
[bug #60871] NSNumberFormatter does not behave as in Mac OS X |
Date: |
Thu, 1 Jul 2021 14:13:11 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15 |
URL:
<https://savannah.gnu.org/bugs/?60871>
Summary: NSNumberFormatter does not behave as in Mac OS X
Project: GNUstep
Submitted by: lcampbel
Submitted on: Thu 01 Jul 2021 06:13:10 PM UTC
Category: Base/Foundation
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
The following snippet demonstrates an incompatibility with Mac OS X. On Mac OS
X the test succeeds; on gnustep-base (linux, libicu) the test fails, returning
".9" instead of "0.9".
NSNumberFormatter *nf = [[NSNumberFormatter new] autorelease];
NSString *expected = @"0.9";
NSString *got;
[nf setMaximumFractionDigits:3];
got = [nf stringFromNumber:[NSNumber numberWithDouble:0.9]];
NSAssert([expected isEqualToString:got], @"number formatter botch,
expected \"%@\", got \"%@\"", expected, got);
On linux:
2021-07-01 18:09:42.517 gnustep-base-tests[55286:55286]
gnustep-base-tests.m:593 Assertion failed in GnustepBaseTests(instance),
method numberFormatterTest. number formatter botch, expected "0.9", got ".9"
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60871>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #60871] NSNumberFormatter does not behave as in Mac OS X,
Larry Campbell <=