mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Make object allocation and deallocation use the runtime.
All objects are now created and destroyed by the runtime, so we have clean layering between -base and libobjc.
This commit is contained in:
parent
c3921ee1f7
commit
e35eb61dbc
2 changed files with 40 additions and 0 deletions
|
@ -1,6 +1,9 @@
|
|||
#import "ObjectTesting.h"
|
||||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSProxy.h>
|
||||
#if __has_include(<objc/capabilities.h>
|
||||
#include <objc/capabilities.h>
|
||||
#endif
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -24,8 +27,10 @@ int main()
|
|||
|
||||
obj1 = [NSProxy allocWithZone:testZone];
|
||||
PASS(obj1 != nil, "%s has working allocWithZone:",prefix);
|
||||
#ifndef OBJC_CAP_ARC
|
||||
PASS(NSZoneFromPointer(obj1) == testZone, "%s uses zone for alloc",prefix);
|
||||
PASS([obj1 zone] == testZone, "%s -zone works",prefix);
|
||||
#endif
|
||||
|
||||
PASS([obj1 hash] != 0, "%s has working -hash",prefix);
|
||||
PASS([obj1 isEqual:obj1] == YES, "%s has working -isEqual:",prefix);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue