mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
More leak fixes
This commit is contained in:
parent
d68e8be8ee
commit
5b46efa8cd
14 changed files with 65 additions and 55 deletions
|
@ -20,7 +20,7 @@ int main()
|
|||
unichar u = 163;
|
||||
unichar buf[256];
|
||||
|
||||
TEST_FOR_CLASS(@"NSURL", [NSURL alloc],
|
||||
TEST_FOR_CLASS(@"NSURL", AUTORELEASE([NSURL alloc]),
|
||||
"NSURL +alloc returns an NSURL");
|
||||
|
||||
TEST_FOR_CLASS(@"NSURL", [NSURL fileURLWithPath: @"."],
|
||||
|
@ -366,16 +366,18 @@ GSPathHandling("right");
|
|||
NSURLQueryItem* item = [[NSURLQueryItem alloc] init];
|
||||
PASS_EQUAL(item.name, @"", "NSURLQueryItem.name should not be nil");
|
||||
PASS_EQUAL(item.value, nil, "NSURLQueryItem.value should be nil");
|
||||
RELEASE(item);
|
||||
|
||||
//OSX behavior is to return query item with an empty string name
|
||||
item = [[NSURLQueryItem alloc] initWithName:nil value:nil];
|
||||
PASS_EQUAL(item.name, @"", "NSURLQueryItem.name should not be nil");
|
||||
PASS_EQUAL(item.value, nil, "NSURLQueryItem.value should be nil");
|
||||
RELEASE(item);
|
||||
|
||||
item = [[NSURLQueryItem alloc] initWithName:@"myName" value:@"myValue"];
|
||||
PASS_EQUAL(item.name, @"myName", "NSURLQueryItem.name should not be nil");
|
||||
PASS_EQUAL(item.value, @"myValue", "NSURLQueryItem.value should not be nil");
|
||||
|
||||
RELEASE(item);
|
||||
|
||||
[arp release]; arp = nil;
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue