Index: src/OFApplication.h ================================================================== --- src/OFApplication.h +++ src/OFApplication.h @@ -11,10 +11,17 @@ #import "OFObject.h" @class OFArray; @class OFMutableArray; + +#define OF_APPLICATION_DELEGATE(cls) \ + int \ + main(int argc, char *argv[]) \ + { \ + return of_application_main(argc, argv, [cls class]); \ + } /** * \brief A protocol for delegates of OFApplication. */ @protocol OFApplicationDelegate Index: tests/TestsAppDelegate.m ================================================================== --- tests/TestsAppDelegate.m +++ tests/TestsAppDelegate.m @@ -13,10 +13,12 @@ #import "OFFile.h" #import "OFAutoreleasePool.h" #import "TestsAppDelegate.h" +OF_APPLICATION_DELEGATE(TestsAppDelegate) + @implementation TestsAppDelegate - (void)outputString: (OFString*)str withColor: (int)color { #ifdef STDOUT @@ -95,11 +97,5 @@ #ifdef OF_HAVE_PROPERTIES [self propertiesTests]; #endif } @end - -int -main(int argc, char *argv[]) -{ - return of_application_main(argc, argv, [TestsAppDelegate class]); -}