Make base do unintuitive and stupid things in the name of Apple compatibility (hopefully Apple will fix their implementation in 10.7.something...).

Fix some tests.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33687 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Chisnall 2011-08-03 09:04:12 +00:00
parent 6dfb591252
commit 682c9beb5b
6 changed files with 34 additions and 76 deletions

View file

@ -1,17 +0,0 @@
#import "ObjectTesting.h"
#import <Foundation/NSPointerArray.h>
int main(void)
{
[NSAutoreleasePool new];
id pool = [NSAutoreleasePool new];
NSPointerArray *pa = [[NSPointerArray pointerArrayWithWeakObjects] retain];
id obj = [NSObject new];
[pa addPointer: obj];
PASS([pa count] == 1, "Added object to weak array");
[obj release];
[pool drain];
[pa compact];
PASS([pa count] == 0, "Removed object to weak array");
return 0;
}