mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Merges objc top level headers into main headers (using #ifdef __OBJC__)
This commit is contained in:
@@ -30,6 +30,10 @@
|
||||
#include "internal/catch_generators.hpp"
|
||||
#include "internal/catch_interfaces_exception.h"
|
||||
|
||||
#ifdef __OBJC__
|
||||
#include "internal/catch_objc.hpp"
|
||||
#endif
|
||||
|
||||
//////
|
||||
|
||||
#define REQUIRE( expr ) INTERNAL_CATCH_TEST( expr, false, true, "REQUIRE" )
|
||||
|
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* catch_objc_main.hpp
|
||||
* Catch
|
||||
*
|
||||
* Created by Phil on 28/12/2010.
|
||||
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TWOBLUECUBES_CATCH_OBJC_MAIN_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_OBJC_MAIN_HPP_INCLUDED
|
||||
|
||||
#include "catch_runner.hpp"
|
||||
#include "catch_objc.hpp"
|
||||
|
||||
int main (int argc, const char * argv[])
|
||||
{
|
||||
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
Catch::registerTestMethods();
|
||||
|
||||
int result = Catch::Main( argc, (char* const*)argv );
|
||||
|
||||
[pool drain];
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
@@ -17,7 +17,22 @@
|
||||
|
||||
int main (int argc, char * const argv[])
|
||||
{
|
||||
#ifdef __OBJC__
|
||||
|
||||
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
Catch::registerTestMethods();
|
||||
|
||||
int result = Catch::Main( argc, (char* const*)argv );
|
||||
|
||||
[pool drain];
|
||||
return result;
|
||||
|
||||
#else
|
||||
|
||||
return Catch::Main( argc, argv );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // TWOBLUECUBES_CATCH_WITH_MAIN_HPP_INCLUDED
|
||||
|
@@ -183,6 +183,7 @@ namespace Catch
|
||||
if( m_args.size() != 0 )
|
||||
return setErrorMode( m_command + " does not accept arguments" );
|
||||
m_config.setShouldDebugBreak( true );
|
||||
break;
|
||||
case modeName:
|
||||
if( m_args.size() != 1 )
|
||||
return setErrorMode( m_command + " requires exactly one argument (a name)" );
|
||||
|
@@ -16,7 +16,6 @@
|
||||
#import <objc/runtime.h>
|
||||
#include <string>
|
||||
|
||||
#include "catch.hpp"
|
||||
#include "internal/catch_test_case_info.hpp"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
Reference in New Issue
Block a user