diff options
| author | Martin Hořeňovský | 2020-04-24 20:42:52 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-04-24 20:42:52 +0200 |
| commit | 7c9755456592e718a72d96d203b6ff775c03e14a (patch) | |
| tree | d9727d250bdfe0e425838647d50a828e6b7b0e69 /src/catch2/internal | |
| parent | e1e6872c4c0f79731894c9b763843af33d16bdab (diff) | |
| download | catch3-7c9755456592e718a72d96d203b6ff775c03e14a.tar.gz | |
Remove Obj-C(++) support
Diffstat (limited to 'src/catch2/internal')
| -rw-r--r-- | src/catch2/internal/catch_default_main.hpp | 22 | ||||
| -rw-r--r-- | src/catch2/internal/catch_exception_translator_registry.cpp | 14 |
2 files changed, 0 insertions, 36 deletions
diff --git a/src/catch2/internal/catch_default_main.hpp b/src/catch2/internal/catch_default_main.hpp index faefc70b..4404f0c8 100644 --- a/src/catch2/internal/catch_default_main.hpp +++ b/src/catch2/internal/catch_default_main.hpp @@ -20,8 +20,6 @@ namespace Catch { CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION } -#ifndef __OBJC__ - #if defined(CATCH_CONFIG_WCHAR) && defined(CATCH_PLATFORM_WINDOWS) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN) // Standard C/C++ Win32 Unicode wmain entry point extern "C" int wmain (int argc, wchar_t * argv[], wchar_t * []) { @@ -37,24 +35,4 @@ int main (int argc, char * argv[]) { return Catch::Session().run( argc, argv ); } -#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**)argv ); - -#if !CATCH_ARC_ENABLED - [pool drain]; -#endif - - return result; -} - -#endif // __OBJC__ - #endif // TWOBLUECUBES_CATCH_DEFAULT_MAIN_HPP_INCLUDED diff --git a/src/catch2/internal/catch_exception_translator_registry.cpp b/src/catch2/internal/catch_exception_translator_registry.cpp index 8394bfd7..b09dc05f 100644 --- a/src/catch2/internal/catch_exception_translator_registry.cpp +++ b/src/catch2/internal/catch_exception_translator_registry.cpp @@ -11,10 +11,6 @@ #include <catch2/internal/catch_compiler_capabilities.hpp> #include <catch2/internal/catch_enforce.hpp> -#ifdef __OBJC__ -#import "Foundation/Foundation.h" -#endif - namespace Catch { ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry() { @@ -27,15 +23,6 @@ namespace Catch { #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) std::string ExceptionTranslatorRegistry::translateActiveException() const { try { -#ifdef __OBJC__ - // In Objective-C try objective-c exceptions first - @try { - return tryTranslators(); - } - @catch (NSException *exception) { - return Catch::Detail::stringify( [exception description] ); - } -#else // Compiling a mixed mode project with MSVC means that CLR // exceptions will be caught in (...) as well. However, these // do not fill-in std::current_exception and thus lead to crash @@ -48,7 +35,6 @@ namespace Catch { return "Non C++ exception. Possibly a CLR exception."; } return tryTranslators(); -#endif } catch( TestFailureException& ) { std::rethrow_exception(std::current_exception()); |