mirror of
https://github.com/gnustep/tools-make.git
synced 2025-05-31 17:31:24 +00:00
Don't try to release object which may have been released already
This commit is contained in:
parent
27cbcbf6ca
commit
2ee48ebe21
1 changed files with 2 additions and 3 deletions
|
@ -94,15 +94,14 @@ static void test_alloc(NSString *CN)
|
||||||
PASS_EXCEPTION([obj0 description], NSInvalidArgumentException, \
|
PASS_EXCEPTION([obj0 description], NSInvalidArgumentException, \
|
||||||
"raises NSInvalidArgumentException in description") \
|
"raises NSInvalidArgumentException in description") \
|
||||||
\
|
\
|
||||||
PASS_EXCEPTION(if([obj0 init]==nil)[NSException raise: NSInvalidArgumentException format: @""], \
|
PASS_EXCEPTION(if((obj0=[obj0 init])==nil)[NSException raise: NSInvalidArgumentException format: @""], \
|
||||||
NSInvalidArgumentException, \
|
NSInvalidArgumentException, \
|
||||||
"returns nil or raises NSInvalidArgumentException in init") \
|
"returns nil or raises NSInvalidArgumentException in init") \
|
||||||
\
|
\
|
||||||
PASS_EXCEPTION(if([theClass new]==nil)[NSException raise: NSInvalidArgumentException format: @""], \
|
PASS_EXCEPTION(if((obj0=[theClass new])==nil)[NSException raise: NSInvalidArgumentException format: @""], \
|
||||||
NSInvalidArgumentException, \
|
NSInvalidArgumentException, \
|
||||||
"returns nil or raises NSInvalidArgumentException in new") \
|
"returns nil or raises NSInvalidArgumentException in new") \
|
||||||
\
|
\
|
||||||
DESTROY(obj0); \
|
|
||||||
obj1 = [theClass allocWithZone: testZone]; \
|
obj1 = [theClass allocWithZone: testZone]; \
|
||||||
PASS([obj1 isKindOfClass: theClass],"%s has working allocWithZone",prefix); \
|
PASS([obj1 isKindOfClass: theClass],"%s has working allocWithZone",prefix); \
|
||||||
DESTROY(obj1); \
|
DESTROY(obj1); \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue