libs-base/Testing/test02.m
Andrew McCallum 24afb4ad7f Change all include objects/*.h to include gnustep/base/*.h.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1434 72102866-910b-0410-8b05-ffd578937521
1996-04-17 18:46:15 +00:00

38 lines
919 B
Objective-C

#include <gnustep/base/all.h>
int main()
{
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];
exit(0);
}