libs-base/Testing/basic.m
Richard Frith-MacDonald bb4197a1d3 URL fixes and implementation of unimplemented methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7584 72102866-910b-0410-8b05-ffd578937521
2000-09-22 13:45:58 +00:00

34 lines
708 B
Objective-C

#include <Foundation/Foundation.h>
#include <stdio.h>
#define _(X) \
[[NSBundle mainBundle] localizedStringForKey: @#X value: nil table: nil]
#define $(X) \
[[NSBundle mainBundle] localizedStringForKey: X value: nil table: nil]
#if 0
int main ()
{
id o = [NSObject new];
printf ("Hello from object at 0x%x\n", (unsigned)[o self]);
exit (0);
}
#else
int main (int argc, char **argv)
{
NSString *string;
id pool = [NSAutoreleasePool new];
NSURL *url = [NSURL fileURLWithPath: @"/tmp/a"];
NSData *data = [url resourceDataUsingCache: YES];
NSLog(@"%@", data);
NSLog(@"%@", _(Testing));
NSLog(@"%@", $(@"Testing"));
string = [NSString stringWithCString:argv[1]];
return 0;
}
#endif