libs-base/Testing/test02.m
fedor 3d949ca12d Makefile changes to compile thinkg in place.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3496 72102866-910b-0410-8b05-ffd578937521
1998-12-20 21:27:47 +00:00

41 lines
1 KiB
Objective-C

#include <base/all.h>
#include <Foundation/NSAutoreleasePool.h>
int main()
{
NSAutoreleasePool *arp = [NSAutoreleasePool new];
id dict = [Dictionary new];
id translator = [Dictionary new];
id mc;
[dict putObject:@"herd" atKey:@"cow"];
[dict putObject:@"pack" atKey:@"dog"];
[dict putObject:@"school" atKey:@"fish"];
[dict putObject:@"flock" atKey:@"bird"];
[dict putObject:@"pride" atKey:@"cat"];
[dict putObject:@"gaggle" atKey:@"goose"];
[dict printForDebugger];
printf("removing goose\n");
[dict removeObjectAtKey:@"goose"];
[dict printForDebugger];
[translator putObject:@"cow" atKey:@"vache"];
[translator putObject:@"dog" atKey:@"chien"];
[translator putObject:@"fish" atKey:@"poisson"];
[translator putObject:@"bird" atKey:@"oisseau"];
[translator putObject:@"cat" atKey:@"chat"];
mc = [[MappedCollector alloc] initWithCollection:dict map:translator];
[mc printForDebugger];
[mc release];
[dict release];
[translator release];
[arp release];
exit(0);
}