Prevent exception translator registration with CATCH_CONFIG_DISABLE

This commit is contained in:
Martin Hořeňovský 2017-08-29 09:52:25 +02:00
parent 05b6f03f3e
commit 75f143835e
2 changed files with 8 additions and 3 deletions

View File

@ -308,7 +308,7 @@ using Catch::Detail::Approx;
#endif
#define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature )
#define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature )
// "BDD-style" convenience wrappers
#define SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ) )

View File

@ -8,11 +8,16 @@
#ifndef TWOBLUECUBES_CATCH_INTERFACES_EXCEPTION_H_INCLUDED
#define TWOBLUECUBES_CATCH_INTERFACES_EXCEPTION_H_INCLUDED
#include "catch_interfaces_registry_hub.h"
#if defined(CATCH_CONFIG_DISABLE)
#define INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( translatorName, signature) \
static std::string translatorName( signature )
#endif
#include <string>
#include <vector>
#include "catch_interfaces_registry_hub.h"
namespace Catch {
using exceptionTranslateFunction = std::string(*)();