mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
fix faulty test
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32217 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e3d0cb531f
commit
de088f97a4
1 changed files with 8 additions and 4 deletions
|
@ -4,11 +4,12 @@
|
|||
|
||||
int main()
|
||||
{
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
NSNumberFormatter *fmt;
|
||||
NSNumber *num;
|
||||
NSString *str;
|
||||
|
||||
START_SET(YES)
|
||||
|
||||
fmt = [[[NSNumberFormatter alloc] init] autorelease];
|
||||
num = [[[NSNumber alloc] initWithFloat: 1234.567] autorelease];
|
||||
|
||||
|
@ -58,10 +59,13 @@ int main()
|
|||
|
||||
PASS_EQUAL(str, @"-1235", "format string of length 1");
|
||||
|
||||
[fmt getObjectValue: &num forString: @"0.00", nil];
|
||||
PASS_EQUAL(num, [NSNumber numberWithFloat: 0.0], "getObjectValue inited with 0.00");
|
||||
num = nil;
|
||||
PASS_RUNS(({[fmt getObjectValue: &num forString: @"0.00" errorDescription: &str];}),
|
||||
"getObjectValue:forString:errorDescription: runs")
|
||||
PASS_EQUAL(num, [NSNumber numberWithFloat: 0.0],
|
||||
"getObjectValue inited with 0.00")
|
||||
END_SET("NSNumberFormatter 10.4")
|
||||
|
||||
[arp release]; arp = nil;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue