mirror of
https://github.com/catchorg/Catch2.git
synced 2025-11-15 14:59:38 +01:00
Moved matcher-based capture macros into their own file
- this file excluded from the CATCH_CONFIG_DISABLE_MATCHERS path. - matchers are always compiled in to the impl file - _THROWS_WITH macros are still available with matchers disabled - but only the ones that take a string - tests that use matchers have #ifdefs, so the whole SelfTest project can compile with matchers disable.
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
|
||||
#include "catch.hpp"
|
||||
|
||||
#ifndef CATCH_CONFIG_DISABLE_MATCHERS
|
||||
|
||||
inline const char* testStringForMatching()
|
||||
{
|
||||
return "this string contains 'abc' as a substring";
|
||||
@@ -223,3 +225,5 @@ TEST_CASE("Exception matchers that fail", "[matchers][exceptions][!throws][.fail
|
||||
REQUIRE_THROWS_MATCHES(throws(4), SpecialException, ExceptionMatcher{ 1 });
|
||||
}
|
||||
}
|
||||
|
||||
#endif // CATCH_CONFIG_DISABLE_MATCHERS
|
||||
|
||||
Reference in New Issue
Block a user