Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-07-29 08:43:32 +0200
committerMartin Hořeňovský2017-07-29 08:43:32 +0200
commitd08e31d89e8f117732af07b501c8718c867f8342 (patch)
tree15bf76eeed176110469c5140debad7699891a3af /include
parent0ca4cfb7432d37dbca4164c274a6b4f6e37d2dd4 (diff)
downloadcatch3-d08e31d89e8f117732af07b501c8718c867f8342.tar.gz
Fix inverted CATCH_CONFIG_DISABLE_MATCHERS toggle
Diffstat (limited to 'include')
-rw-r--r--include/catch.hpp12
-rw-r--r--include/internal/catch_capture.hpp4
-rw-r--r--include/internal/catch_matchers.cpp2
-rw-r--r--include/internal/catch_matchers.hpp2
-rw-r--r--include/internal/catch_matchers_string.cpp2
-rw-r--r--include/internal/catch_matchers_string.h2
-rw-r--r--include/internal/catch_matchers_vector.h2
-rw-r--r--include/internal/catch_objc.hpp2
-rw-r--r--include/internal/catch_result_builder.cpp2
-rw-r--r--include/internal/catch_result_builder.h2
10 files changed, 16 insertions, 16 deletions
diff --git a/include/catch.hpp b/include/catch.hpp
index ead6c337..0acd25da 100644
--- a/include/catch.hpp
+++ b/include/catch.hpp
@@ -76,7 +76,7 @@
#define CATCH_REQUIRE_THROWS( ... ) INTERNAL_CATCH_THROWS( "CATCH_REQUIRE_THROWS", Catch::ResultDisposition::Normal, "", __VA_ARGS__ )
#define CATCH_REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CATCH_REQUIRE_THROWS_AS", exceptionType, Catch::ResultDisposition::Normal, expr )
-#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
+#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)
#define CATCH_REQUIRE_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( "CATCH_REQUIRE_THROWS_WITH", Catch::ResultDisposition::Normal, matcher, expr )
#define CATCH_REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( "CATCH_REQUIRE_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::Normal, matcher, expr )
#endif// CATCH_CONFIG_DISABLE_MATCHERS
@@ -90,13 +90,13 @@
#define CATCH_CHECK_THROWS( ... ) INTERNAL_CATCH_THROWS( "CATCH_CHECK_THROWS", Catch::ResultDisposition::ContinueOnFailure, "", __VA_ARGS__ )
#define CATCH_CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CATCH_CHECK_THROWS_AS", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr )
-#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
+#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)
#define CATCH_CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( "CATCH_CHECK_THROWS_WITH", Catch::ResultDisposition::ContinueOnFailure, matcher, expr )
#define CATCH_CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( "CATCH_CHECK_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::ContinueOnFailure, matcher, expr )
#endif // CATCH_CONFIG_DISABLE_MATCHERS
#define CATCH_CHECK_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "CATCH_CHECK_NOTHROW", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
-#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
+#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)
#define CATCH_CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "CATCH_CHECK_THAT", matcher, Catch::ResultDisposition::ContinueOnFailure, arg )
#if defined(CATCH_CONFIG_FAST_COMPILE)
@@ -148,7 +148,7 @@
#define REQUIRE_THROWS( ... ) INTERNAL_CATCH_THROWS( "REQUIRE_THROWS", Catch::ResultDisposition::Normal, __VA_ARGS__ )
#define REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "REQUIRE_THROWS_AS", exceptionType, Catch::ResultDisposition::Normal, expr )
-#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
+#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)
#define REQUIRE_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( "REQUIRE_THROWS_WITH", Catch::ResultDisposition::Normal, matcher, expr )
#define REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( "REQUIRE_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::Normal, matcher, expr )
#endif // CATCH_CONFIG_DISABLE_MATCHERS
@@ -162,14 +162,14 @@
#define CHECK_THROWS( ... ) INTERNAL_CATCH_THROWS( "CHECK_THROWS", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
#define CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CHECK_THROWS_AS", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr )
-#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
+#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)
#define CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( "CHECK_THROWS_WITH", Catch::ResultDisposition::ContinueOnFailure, matcher, expr )
#define CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( "CHECK_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::ContinueOnFailure, matcher, expr )
#endif // CATCH_CONFIG_DISABLE_MATCHERS
#define CHECK_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "CHECK_NOTHROW", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
-#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
+#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)
#define CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "CHECK_THAT", matcher, Catch::ResultDisposition::ContinueOnFailure, arg )
#if defined(CATCH_CONFIG_FAST_COMPILE)
diff --git a/include/internal/catch_capture.hpp b/include/internal/catch_capture.hpp
index fa6952e4..574361d0 100644
--- a/include/internal/catch_capture.hpp
+++ b/include/internal/catch_capture.hpp
@@ -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 { \
diff --git a/include/internal/catch_matchers.cpp b/include/internal/catch_matchers.cpp
index a2620bc5..76d0332c 100644
--- a/include/internal/catch_matchers.cpp
+++ b/include/internal/catch_matchers.cpp
@@ -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"
diff --git a/include/internal/catch_matchers.hpp b/include/internal/catch_matchers.hpp
index 37787a9c..12aa0d7b 100644
--- a/include/internal/catch_matchers.hpp
+++ b/include/internal/catch_matchers.hpp
@@ -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"
diff --git a/include/internal/catch_matchers_string.cpp b/include/internal/catch_matchers_string.cpp
index 54f44d6d..2f899e8d 100644
--- a/include/internal/catch_matchers_string.cpp
+++ b/include/internal/catch_matchers_string.cpp
@@ -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"
diff --git a/include/internal/catch_matchers_string.h b/include/internal/catch_matchers_string.h
index ab3f1c44..27e5b4cc 100644
--- a/include/internal/catch_matchers_string.h
+++ b/include/internal/catch_matchers_string.h
@@ -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"
diff --git a/include/internal/catch_matchers_vector.h b/include/internal/catch_matchers_vector.h
index de1c52b2..a2f5cb6c 100644
--- a/include/internal/catch_matchers_vector.h
+++ b/include/internal/catch_matchers_vector.h
@@ -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"
diff --git a/include/internal/catch_objc.hpp b/include/internal/catch_objc.hpp
index 2a8ec2f9..188f5577 100644
--- a/include/internal/catch_objc.hpp
+++ b/include/internal/catch_objc.hpp
@@ -101,7 +101,7 @@ namespace Catch {
return noTestMethods;
}
-#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
+#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)
namespace Matchers {
namespace Impl {
diff --git a/include/internal/catch_result_builder.cpp b/include/internal/catch_result_builder.cpp
index cf0b1b16..6268f8d1 100644
--- a/include/internal/catch_result_builder.cpp
+++ b/include/internal/catch_result_builder.cpp
@@ -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>() );
diff --git a/include/internal/catch_result_builder.h b/include/internal/catch_result_builder.h
index 2b5dd145..9ea6d038 100644
--- a/include/internal/catch_result_builder.h
+++ b/include/internal/catch_result_builder.h
@@ -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