Fix inverted CATCH_CONFIG_DISABLE_MATCHERS toggle

This commit is contained in:
Martin Hořeňovský
2017-07-29 08:43:32 +02:00
parent 0ca4cfb743
commit d08e31d89e
10 changed files with 16 additions and 16 deletions

View File

@@ -42,7 +42,7 @@
INTERNAL_CATCH_REACT( __catchResult ) \
} while( Catch::isTrue( false && static_cast<bool>( !!(expr) ) ) ) // expr here is never evaluated at runtime but it forces the compiler to give it a look
// The double negation silences MSVC's C4800 warning, the static_cast forces short-circuit evaluation if the type has overloaded &&.
#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)
#define INTERNAL_CHECK_THAT_NO_TRY( macroName, matcher, resultDisposition, arg ) \
do { \
Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #arg ", " #matcher, resultDisposition ); \
@@ -155,7 +155,7 @@
#define INTERNAL_CATCH_INFO( macroName, log ) \
Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage ) = Catch::MessageBuilder( macroName, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log;
#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CHECK_THAT( macroName, matcher, resultDisposition, arg ) \
do { \

View File

@@ -5,7 +5,7 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)
#include "catch_matchers.hpp"

View File

@@ -8,7 +8,7 @@
#ifndef TWOBLUECUBES_CATCH_MATCHERS_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_MATCHERS_HPP_INCLUDED
#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)
#include "catch_common.h"

View File

@@ -6,7 +6,7 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)
#include "catch_matchers_string.h"
#include "catch_string_manip.h"

View File

@@ -8,7 +8,7 @@
#ifndef TWOBLUECUBES_CATCH_MATCHERS_STRING_H_INCLUDED
#define TWOBLUECUBES_CATCH_MATCHERS_STRING_H_INCLUDED
#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)
#include "catch_matchers.hpp"

View File

@@ -8,7 +8,7 @@
#ifndef TWOBLUECUBES_CATCH_MATCHERS_VECTOR_H_INCLUDED
#define TWOBLUECUBES_CATCH_MATCHERS_VECTOR_H_INCLUDED
#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)
#include "catch_matchers.hpp"

View File

@@ -101,7 +101,7 @@ namespace Catch {
return noTestMethods;
}
#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)
namespace Matchers {
namespace Impl {

View File

@@ -72,7 +72,7 @@ namespace Catch {
setResultType( resultType );
captureExpression();
}
#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)
void ResultBuilder::captureExpectedException( std::string const& expectedMessage ) {
if( expectedMessage.empty() )
captureExpectedException( Matchers::Impl::MatchAllOf<std::string>() );

View File

@@ -58,7 +58,7 @@ namespace Catch {
void useActiveException( ResultDisposition::Flags resultDisposition = ResultDisposition::Normal );
void captureResult( ResultWas::OfType resultType );
void captureExpression();
#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)
void captureExpectedException( std::string const& expectedMessage );
void captureExpectedException( Matchers::Impl::MatcherBase<std::string> const& matcher );
#endif // CATCH_CONFIG_DISABLE_MATCHERS