mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 18:21:04 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32187 72102866-910b-0410-8b05-ffd578937521
23 lines
628 B
Objective-C
23 lines
628 B
Objective-C
#import <Foundation/Foundation.h>
|
|
#import "ObjectTesting.h"
|
|
|
|
int
|
|
main()
|
|
{
|
|
NSGarbageCollector *collector = [NSGarbageCollector defaultCollector];
|
|
NSZone *z;
|
|
|
|
if (collector == nil) return 0; // No garbage collection.
|
|
|
|
PASS([collector zone] == NSDefaultMallocZone(),
|
|
"collector zone is default");
|
|
PASS([[NSObject new] zone] == NSDefaultMallocZone(),
|
|
"object zone is default");
|
|
PASS((z = NSCreateZone(1024, 128, YES)) == NSDefaultMallocZone(),
|
|
"created zone is default");
|
|
PASS((z = NSCreateZone(1024, 128, YES)) == NSDefaultMallocZone(),
|
|
"created zone is default");
|
|
NSRecycleZone(z);
|
|
|
|
return 0;
|
|
}
|