mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
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:
parent
3104649bc8
commit
a04ed1a9ff
6 changed files with 34 additions and 76 deletions
|
@ -1,20 +0,0 @@
|
|||
#import "ObjectTesting.h"
|
||||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSHashTable.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
[NSAutoreleasePool new];
|
||||
id pool = [NSAutoreleasePool new];
|
||||
NSHashTable *ht = [[NSHashTable hashTableWithWeakObjects] retain];
|
||||
id obj = [NSObject new];
|
||||
[ht addObject: obj];
|
||||
PASS([ht containsObject: obj], "Added object to weak hash table");
|
||||
PASS(1 == [ht count], "Weak hash table contains one object");
|
||||
PASS([ht containsObject: obj], "Added object to weak hash table");
|
||||
[obj release];
|
||||
[pool drain];
|
||||
PASS(0 == [ht count], "Weak hash table contains no objects");
|
||||
PASS(0 == [[ht allObjects] count], "Weak hash table contains no objects");
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue