mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Add test cor checking leading zeroes in fractional part
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32433 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9c97415d69
commit
2edfecc95f
3 changed files with 13 additions and 2 deletions
|
@ -21,6 +21,12 @@ int main()
|
|||
|
||||
PASS_EQUAL(str, @"1,234.57", "default format same as Cocoa");
|
||||
|
||||
num = [[[NSNumber alloc] initWithFloat: 1.01] autorelease];
|
||||
str = [fmt stringFromNumber: num];
|
||||
|
||||
PASS_EQUAL(str, @"1.01", "Handle leading zeroes in fractional part: 1.01");
|
||||
|
||||
|
||||
[fmt setAllowsFloats: NO];
|
||||
str = [fmt stringForObjectValue: num];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue