mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
More leaks fixed
This commit is contained in:
parent
aedd13dc94
commit
c7f0c27dd7
8 changed files with 47 additions and 40 deletions
|
@ -48,7 +48,7 @@ int main()
|
|||
![[[NSArray new] autorelease] isClass]),
|
||||
"-isClass returns NO on an instance");
|
||||
|
||||
evilObject = [MyEvilClass new];
|
||||
evilObject = AUTORELEASE([MyEvilClass new]);
|
||||
[evilObject setInfo:1];
|
||||
PASS(![evilObject isClass],
|
||||
"-isClass returns NO on an instance (special test for broken libobjc)");
|
||||
|
|
|
@ -36,20 +36,22 @@
|
|||
|
||||
int main()
|
||||
{
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
ENTER_POOL
|
||||
id instance = AUTORELEASE([NicolaTest new]);
|
||||
|
||||
PASS([NicolaTest conformsToProtocol:@protocol(DoingNothing)],
|
||||
"+conformsToProtocol returns YES on an implemented protocol");
|
||||
PASS([NicolaTest conformsToProtocol:@protocol(DoingNothingCategory)],
|
||||
"+conformsToProtocol returns YES on a protocol implemented in a category");
|
||||
PASS(![NicolaTest conformsToProtocol:@protocol(NSCoding)],
|
||||
"+conformsToProtocol returns NO on an unimplemented protocol");
|
||||
PASS([[NicolaTest new] conformsToProtocol:@protocol(DoingNothing)],
|
||||
PASS([instance conformsToProtocol:@protocol(DoingNothing)],
|
||||
"-conformsToProtocol returns YES on an implemented protocol");
|
||||
PASS([[NicolaTest new] conformsToProtocol:@protocol(DoingNothingCategory)],
|
||||
PASS([instance conformsToProtocol:@protocol(DoingNothingCategory)],
|
||||
"-conformsToProtocol returns YES on a protocol implemented in a category");
|
||||
PASS(![[NicolaTest new] conformsToProtocol:@protocol(NSCoding)],
|
||||
PASS(![instance conformsToProtocol:@protocol(NSCoding)],
|
||||
"-conformsToProtocol returns NO on an unimplemented protocol");
|
||||
|
||||
[arp release]; arp = nil;
|
||||
LEAVE_POOL
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue