import testsuite

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32187 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2011-02-16 08:21:17 +00:00
parent 734c214892
commit 0e02133729
374 changed files with 20864 additions and 0 deletions

View file

@ -0,0 +1,36 @@
#import "ObjectTesting.h"
#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSProxy.h>
int main()
{
NSAutoreleasePool *arp = [NSAutoreleasePool new];
char *prefix = "Class 'NSProxy'";
Class theClass = Nil;
id obj0;
id obj1;
NSZone *testZone = NSCreateZone(1024,1024,1);
theClass = [NSProxy class];
PASS(theClass != Nil, "%s exists",prefix);
obj0 = [NSProxy alloc];
PASS(obj0 != nil, "%s has working alloc",prefix);
TEST_EXCEPTION([obj0 isKindOfClass:theClass];, NSInvalidArgumentException,
YES, "NSProxy -isKindOfClass raises exception");
TEST_EXCEPTION([obj0 isMemberOfClass:theClass];,
NSInvalidArgumentException, YES,
"NSProxy -isKindOfClass raises exception");
obj1 = [NSProxy allocWithZone:testZone];
PASS(obj1 != nil, "%s has working allocWithZone:",prefix);
PASS(NSZoneFromPointer(obj1) == testZone, "%s uses zone for alloc",prefix);
PASS([obj1 zone] == testZone, "%s -zone works",prefix);
PASS([obj1 hash] != 0, "%s has working -hash",prefix);
PASS([obj1 isEqual:obj1] == YES, "%s has working -isEqual:",prefix);
PASS([obj1 class] == theClass, "%s has working -class",prefix);
[arp release]; arp = nil;
return 0;
}