Re-added (unintentionly removed) OBJC main entry point implementation

This commit is contained in:
Lukasz Forynski
2013-12-17 14:54:38 +00:00
parent 2c1e71b6ad
commit 2b5f88496c
4 changed files with 40 additions and 5 deletions

View File

@@ -147,6 +147,24 @@ int main (int argc, char * const argv[]) {
return ret;
}
#else // __OBJC__
// Objective-C entry point
int main (int argc, char * const argv[]) {
#if !CATCH_ARC_ENABLED
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
#endif
Catch::registerTestMethods();
int result = Catch::Session().run( argc, (char* const*)argv );
#if !CATCH_ARC_ENABLED
[pool drain];
#endif
return result;
#endif // __OBJC__
#endif // TWOBLUECUBES_CATCH_DEFAULT_MAIN_HPP_INCLUDED

View File

@@ -13,7 +13,7 @@
namespace Catch {
// These numbers are maintained by a script
Version libraryVersion( 1, 0, 24, "master" );
Version libraryVersion( 1, 0, 25, "master" );
}
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED