mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
More leak management fixes
This commit is contained in:
parent
90082eccac
commit
cd3e69245d
9 changed files with 119 additions and 79 deletions
|
@ -11,10 +11,10 @@ int main()
|
|||
|
||||
httpURL = [NSURL URLWithString: @"http://www.gnustep.org"];
|
||||
|
||||
TEST_FOR_CLASS(@"NSURLProtocol", [NSURLProtocol alloc],
|
||||
TEST_FOR_CLASS(@"NSURLProtocol", AUTORELEASE([NSURLProtocol alloc]),
|
||||
"NSURLProtocol +alloc returns an NSURLProtocol");
|
||||
|
||||
mutable = [[NSMutableURLRequest requestWithURL: httpURL] retain];
|
||||
mutable = [NSMutableURLRequest requestWithURL: httpURL];
|
||||
PASS_EXCEPTION([NSURLProtocol canInitWithRequest: mutable], nil,
|
||||
"NSURLProtocol +canInitWithRequest throws an exeception (subclasses should be used)");
|
||||
|
||||
|
@ -22,13 +22,12 @@ int main()
|
|||
TEST_FOR_CLASS(@"NSURLRequest", canon,
|
||||
"NSURLProtocol +canonicalRequestForRequest: returns an NSURLProtocol");
|
||||
|
||||
copy = [mutable copy];
|
||||
copy = AUTORELEASE([mutable copy]);
|
||||
PASS([NSURLProtocol requestIsCacheEquivalent: mutable toRequest: copy],
|
||||
"NSURLProtocol +requestIsCacheEquivalent:toRequest returns YES with a request and its copy");
|
||||
[copy setHTTPMethod: @"POST"];
|
||||
PASS([NSURLProtocol requestIsCacheEquivalent: mutable toRequest: copy] == NO,
|
||||
"NSURLProtocol +requestIsCacheEquivalent:toRequest returns NO after a method change");
|
||||
[copy release];
|
||||
|
||||
[arp release]; arp = nil;
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue