mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 05:45:39 +02:00
v3.9.0
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
// Catch v3.8.1
|
||||
// Generated: 2025-04-08 12:33:19.851017
|
||||
// Catch v3.9.0
|
||||
// Generated: 2025-07-24 22:00:24.654688
|
||||
// ----------------------------------------------------------
|
||||
// This file is an amalgamation of multiple different files.
|
||||
// You probably shouldn't edit it directly.
|
||||
@@ -1100,9 +1100,7 @@ namespace Catch {
|
||||
AssertionReaction &reaction ) = 0;
|
||||
|
||||
|
||||
|
||||
virtual bool lastAssertionPassed() = 0;
|
||||
virtual void assertionPassed() = 0;
|
||||
|
||||
// Deprecated, do not use:
|
||||
virtual std::string getCurrentTestName() const = 0;
|
||||
@@ -1129,6 +1127,7 @@ namespace Catch {
|
||||
|
||||
//! Deriving classes become noncopyable and nonmovable
|
||||
class NonCopyable {
|
||||
public:
|
||||
NonCopyable( NonCopyable const& ) = delete;
|
||||
NonCopyable( NonCopyable&& ) = delete;
|
||||
NonCopyable& operator=( NonCopyable const& ) = delete;
|
||||
@@ -1144,7 +1143,6 @@ namespace Catch {
|
||||
#endif // CATCH_NONCOPYABLE_HPP_INCLUDED
|
||||
|
||||
#include <chrono>
|
||||
#include <iosfwd>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -1599,8 +1597,7 @@ namespace Catch {
|
||||
namespace Benchmark {
|
||||
namespace Detail {
|
||||
template <typename T, typename U>
|
||||
struct is_related
|
||||
: std::is_same<std::decay_t<T>, std::decay_t<U>> {};
|
||||
static constexpr bool is_related_v = std::is_same<std::decay_t<T>, std::decay_t<U>>::value;
|
||||
|
||||
/// We need to reinvent std::function because every piece of code that might add overhead
|
||||
/// in a measurement context needs to have consistent performance characteristics so that we
|
||||
@@ -1641,7 +1638,7 @@ namespace Catch {
|
||||
BenchmarkFunction();
|
||||
|
||||
template <typename Fun,
|
||||
std::enable_if_t<!is_related<Fun, BenchmarkFunction>::value, int> = 0>
|
||||
std::enable_if_t<!is_related_v<Fun, BenchmarkFunction>, int> = 0>
|
||||
BenchmarkFunction(Fun&& fun)
|
||||
: f(new model<std::decay_t<Fun>>(CATCH_FORWARD(fun))) {}
|
||||
|
||||
@@ -1767,8 +1764,6 @@ namespace Catch {
|
||||
#define CATCH_TIMING_HPP_INCLUDED
|
||||
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace Catch {
|
||||
namespace Benchmark {
|
||||
template <typename Result>
|
||||
@@ -2167,7 +2162,7 @@ namespace Catch {
|
||||
}
|
||||
|
||||
// sets lambda to be used in fun *and* executes benchmark!
|
||||
template <typename Fun, std::enable_if_t<!Detail::is_related<Fun, Benchmark>::value, int> = 0>
|
||||
template <typename Fun, std::enable_if_t<!Detail::is_related_v<Fun, Benchmark>, int> = 0>
|
||||
Benchmark & operator=(Fun func) {
|
||||
auto const* cfg = getCurrentContext().getConfig();
|
||||
if (!cfg->skipBenchmarks()) {
|
||||
@@ -2496,18 +2491,14 @@ namespace Catch {
|
||||
return rawMemoryToString( &object, sizeof(object) );
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
class IsStreamInsertable {
|
||||
template<typename Stream, typename U>
|
||||
static auto test(int)
|
||||
-> decltype(std::declval<Stream&>() << std::declval<U>(), std::true_type());
|
||||
template<typename T,typename = void>
|
||||
static constexpr bool IsStreamInsertable_v = false;
|
||||
|
||||
template<typename, typename>
|
||||
static auto test(...)->std::false_type;
|
||||
|
||||
public:
|
||||
static const bool value = decltype(test<std::ostream, const T&>(0))::value;
|
||||
};
|
||||
template <typename T>
|
||||
static constexpr bool IsStreamInsertable_v<
|
||||
T,
|
||||
decltype( void( std::declval<std::ostream&>() << std::declval<T>() ) )> =
|
||||
true;
|
||||
|
||||
template<typename E>
|
||||
std::string convertUnknownEnumToString( E e );
|
||||
@@ -2552,7 +2543,7 @@ namespace Catch {
|
||||
struct StringMaker {
|
||||
template <typename Fake = T>
|
||||
static
|
||||
std::enable_if_t<::Catch::Detail::IsStreamInsertable<Fake>::value, std::string>
|
||||
std::enable_if_t<::Catch::Detail::IsStreamInsertable_v<Fake>, std::string>
|
||||
convert(const Fake& value) {
|
||||
ReusableStringStream rss;
|
||||
// NB: call using the function-like syntax to avoid ambiguity with
|
||||
@@ -2563,7 +2554,7 @@ namespace Catch {
|
||||
|
||||
template <typename Fake = T>
|
||||
static
|
||||
std::enable_if_t<!::Catch::Detail::IsStreamInsertable<Fake>::value, std::string>
|
||||
std::enable_if_t<!::Catch::Detail::IsStreamInsertable_v<Fake>, std::string>
|
||||
convert( const Fake& value ) {
|
||||
#if !defined(CATCH_CONFIG_FALLBACK_STRINGIFIER)
|
||||
return Detail::convertUnstreamable(value);
|
||||
@@ -2955,7 +2946,7 @@ namespace Catch {
|
||||
}
|
||||
|
||||
template<typename R>
|
||||
struct StringMaker<R, std::enable_if_t<is_range<R>::value && !::Catch::Detail::IsStreamInsertable<R>::value>> {
|
||||
struct StringMaker<R, std::enable_if_t<is_range<R>::value && !::Catch::Detail::IsStreamInsertable_v<R>>> {
|
||||
static std::string convert( R const& range ) {
|
||||
return rangeToString( range );
|
||||
}
|
||||
@@ -3792,7 +3783,7 @@ namespace Catch {
|
||||
WarnAbout::What warnings = WarnAbout::Nothing;
|
||||
ShowDurations showDurations = ShowDurations::DefaultForReporter;
|
||||
double minDuration = -1;
|
||||
TestRunOrder runOrder = TestRunOrder::Declared;
|
||||
TestRunOrder runOrder = TestRunOrder::Randomized;
|
||||
ColourMode defaultColourMode = ColourMode::PlatformDefault;
|
||||
WaitForKeypress::When waitForKeypress = WaitForKeypress::Never;
|
||||
|
||||
@@ -3938,6 +3929,19 @@ namespace Catch {
|
||||
#define CATCH_MESSAGE_INFO_HPP_INCLUDED
|
||||
|
||||
|
||||
|
||||
#ifndef CATCH_DEPRECATION_MACRO_HPP_INCLUDED
|
||||
#define CATCH_DEPRECATION_MACRO_HPP_INCLUDED
|
||||
|
||||
|
||||
#if !defined( CATCH_CONFIG_NO_DEPRECATION_ANNOTATIONS )
|
||||
# define DEPRECATED( msg ) [[deprecated( msg )]]
|
||||
#else
|
||||
# define DEPRECATED( msg )
|
||||
#endif
|
||||
|
||||
#endif // CATCH_DEPRECATION_MACRO_HPP_INCLUDED
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Catch {
|
||||
@@ -3953,9 +3957,11 @@ namespace Catch {
|
||||
ResultWas::OfType type;
|
||||
unsigned int sequence;
|
||||
|
||||
DEPRECATED( "Explicitly use the 'sequence' member instead" )
|
||||
bool operator == (MessageInfo const& other) const {
|
||||
return sequence == other.sequence;
|
||||
}
|
||||
DEPRECATED( "Explicitly use the 'sequence' member instead" )
|
||||
bool operator < (MessageInfo const& other) const {
|
||||
return sequence < other.sequence;
|
||||
}
|
||||
@@ -4237,15 +4243,13 @@ namespace Catch {
|
||||
};
|
||||
|
||||
template <typename F, typename = void>
|
||||
struct is_unary_function : std::false_type {};
|
||||
static constexpr bool is_unary_function_v = false;
|
||||
|
||||
template <typename F>
|
||||
struct is_unary_function<
|
||||
static constexpr bool is_unary_function_v<
|
||||
F,
|
||||
Catch::Detail::void_t<decltype(
|
||||
std::declval<F>()( fake_arg() ) )
|
||||
>
|
||||
> : std::true_type {};
|
||||
Catch::Detail::void_t<decltype( std::declval<F>()(
|
||||
fake_arg() ) )>> = true;
|
||||
|
||||
// Traits for extracting arg and return type of lambdas (for single
|
||||
// argument lambdas)
|
||||
@@ -4678,14 +4682,14 @@ namespace Catch {
|
||||
|
||||
template <typename T,
|
||||
typename = typename std::enable_if_t<
|
||||
!Detail::is_unary_function<T>::value>>
|
||||
!Detail::is_unary_function_v<T>>>
|
||||
ParserRefImpl( T& ref, StringRef hint ):
|
||||
m_ref( std::make_shared<BoundValueRef<T>>( ref ) ),
|
||||
m_hint( hint ) {}
|
||||
|
||||
template <typename LambdaT,
|
||||
typename = typename std::enable_if_t<
|
||||
Detail::is_unary_function<LambdaT>::value>>
|
||||
Detail::is_unary_function_v<LambdaT>>>
|
||||
ParserRefImpl( LambdaT const& ref, StringRef hint ):
|
||||
m_ref( std::make_shared<BoundLambda<LambdaT>>( ref ) ),
|
||||
m_hint( hint ) {}
|
||||
@@ -4752,7 +4756,7 @@ namespace Catch {
|
||||
|
||||
template <typename LambdaT,
|
||||
typename = typename std::enable_if_t<
|
||||
Detail::is_unary_function<LambdaT>::value>>
|
||||
Detail::is_unary_function_v<LambdaT>>>
|
||||
Opt( LambdaT const& ref, StringRef hint ):
|
||||
ParserRefImpl( ref, hint ) {}
|
||||
|
||||
@@ -4762,7 +4766,7 @@ namespace Catch {
|
||||
|
||||
template <typename T,
|
||||
typename = typename std::enable_if_t<
|
||||
!Detail::is_unary_function<T>::value>>
|
||||
!Detail::is_unary_function_v<T>>>
|
||||
Opt( T& ref, StringRef hint ):
|
||||
ParserRefImpl( ref, hint ) {}
|
||||
|
||||
@@ -4932,6 +4936,14 @@ namespace Catch {
|
||||
|
||||
namespace Catch {
|
||||
|
||||
// TODO: Use C++17 `inline` variables
|
||||
constexpr int UnspecifiedErrorExitCode = 1;
|
||||
constexpr int NoTestsRunExitCode = 2;
|
||||
constexpr int UnmatchedTestSpecExitCode = 3;
|
||||
constexpr int AllTestsSkippedExitCode = 4;
|
||||
constexpr int InvalidTestSpecExitCode = 5;
|
||||
constexpr int TestFailureExitCode = 42;
|
||||
|
||||
class Session : Detail::NonCopyable {
|
||||
public:
|
||||
|
||||
@@ -5016,7 +5028,7 @@ namespace Catch {
|
||||
#define CATCH_REGISTER_TAG_ALIAS( alias, spec ) \
|
||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
|
||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
||||
namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \
|
||||
namespace{ const Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \
|
||||
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
|
||||
|
||||
#endif // CATCH_TAG_ALIAS_AUTOREGISTRAR_HPP_INCLUDED
|
||||
@@ -5193,7 +5205,7 @@ namespace Detail {
|
||||
* when the compiler handles `ExprLhs<T> == b`, it also tries to resolve
|
||||
* the overload set for `b == ExprLhs<T>`.
|
||||
*
|
||||
* To accomodate these use cases, decomposer ended up rather complex.
|
||||
* To accommodate these use cases, decomposer ended up rather complex.
|
||||
*
|
||||
* 1) These types are handled by adding SFINAE overloads to our comparison
|
||||
* operators, checking whether `T == U` are comparable with the given
|
||||
@@ -5311,7 +5323,7 @@ namespace Catch {
|
||||
public:
|
||||
constexpr auto isBinaryExpression() const -> bool { return m_isBinaryExpression; }
|
||||
constexpr auto getResult() const -> bool { return m_result; }
|
||||
//! This function **has** to be overriden by the derived class.
|
||||
//! This function **has** to be overridden by the derived class.
|
||||
virtual void streamReconstructedExpression( std::ostream& os ) const;
|
||||
|
||||
constexpr ITransientExpression( bool isBinaryExpression, bool result )
|
||||
@@ -5912,7 +5924,7 @@ namespace Catch {
|
||||
#else
|
||||
|
||||
// These section definitions imply that at most one section at one level
|
||||
// will be intered (because only one section's __LINE__ can be equal to
|
||||
// will be entered (because only one section's __LINE__ can be equal to
|
||||
// the dummy `catchInternalSectionHint` variable from `TEST_CASE`).
|
||||
|
||||
namespace Catch {
|
||||
@@ -6195,6 +6207,53 @@ static int catchInternalSectionHint = 0;
|
||||
#endif // CATCH_TEST_REGISTRY_HPP_INCLUDED
|
||||
|
||||
|
||||
#ifndef CATCH_UNREACHABLE_HPP_INCLUDED
|
||||
#define CATCH_UNREACHABLE_HPP_INCLUDED
|
||||
|
||||
/**\file
|
||||
* Polyfill `std::unreachable`
|
||||
*
|
||||
* We need something like `std::unreachable` to tell the compiler that
|
||||
* some macros, e.g. `FAIL` or `SKIP`, do not continue execution in normal
|
||||
* manner, and should handle it as such, e.g. not warn if there is no return
|
||||
* from non-void function after a `FAIL` or `SKIP`.
|
||||
*/
|
||||
|
||||
#include <exception>
|
||||
|
||||
#if defined( __cpp_lib_unreachable ) && __cpp_lib_unreachable > 202202L
|
||||
# include <utility>
|
||||
namespace Catch {
|
||||
namespace Detail {
|
||||
using Unreachable = std::unreachable;
|
||||
}
|
||||
} // namespace Catch
|
||||
|
||||
#else // vv If we do not have std::unreachable, we implement something similar
|
||||
|
||||
namespace Catch {
|
||||
namespace Detail {
|
||||
|
||||
[[noreturn]]
|
||||
inline void Unreachable() noexcept {
|
||||
# if defined( NDEBUG )
|
||||
# if defined( _MSC_VER ) && !defined( __clang__ )
|
||||
__assume( false );
|
||||
# elif defined( __GNUC__ )
|
||||
__builtin_unreachable();
|
||||
# endif
|
||||
# endif // ^^ NDEBUG
|
||||
std::terminate();
|
||||
}
|
||||
|
||||
} // namespace Detail
|
||||
} // end namespace Catch
|
||||
|
||||
#endif
|
||||
|
||||
#endif // CATCH_UNREACHABLE_HPP_INCLUDED
|
||||
|
||||
|
||||
// All of our user-facing macros support configuration toggle, that
|
||||
// forces them to be defined prefixed with CATCH_. We also like to
|
||||
// support another toggle that can minimize (disable) their implementation.
|
||||
@@ -6226,10 +6285,16 @@ static int catchInternalSectionHint = 0;
|
||||
#define CATCH_REGISTER_TEST_CASE( Function, ... ) INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ )
|
||||
#define CATCH_SECTION( ... ) INTERNAL_CATCH_SECTION( __VA_ARGS__ )
|
||||
#define CATCH_DYNAMIC_SECTION( ... ) INTERNAL_CATCH_DYNAMIC_SECTION( __VA_ARGS__ )
|
||||
#define CATCH_FAIL( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ )
|
||||
#define CATCH_FAIL( ... ) do { \
|
||||
INTERNAL_CATCH_MSG("CATCH_FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ ); \
|
||||
Catch::Detail::Unreachable(); \
|
||||
} while ( false )
|
||||
#define CATCH_FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
|
||||
#define CATCH_SUCCEED( ... ) INTERNAL_CATCH_MSG( "CATCH_SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
|
||||
#define CATCH_SKIP( ... ) INTERNAL_CATCH_MSG( "SKIP", Catch::ResultWas::ExplicitSkip, Catch::ResultDisposition::Normal, __VA_ARGS__ )
|
||||
#define CATCH_SKIP( ... ) do { \
|
||||
INTERNAL_CATCH_MSG( "CATCH_SKIP", Catch::ResultWas::ExplicitSkip, Catch::ResultDisposition::Normal, __VA_ARGS__ ); \
|
||||
Catch::Detail::Unreachable(); \
|
||||
} while (false)
|
||||
|
||||
|
||||
#if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE)
|
||||
@@ -6327,10 +6392,16 @@ static int catchInternalSectionHint = 0;
|
||||
#define REGISTER_TEST_CASE( Function, ... ) INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ )
|
||||
#define SECTION( ... ) INTERNAL_CATCH_SECTION( __VA_ARGS__ )
|
||||
#define DYNAMIC_SECTION( ... ) INTERNAL_CATCH_DYNAMIC_SECTION( __VA_ARGS__ )
|
||||
#define FAIL( ... ) INTERNAL_CATCH_MSG( "FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ )
|
||||
#define FAIL( ... ) do { \
|
||||
INTERNAL_CATCH_MSG( "FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ ); \
|
||||
Catch::Detail::Unreachable(); \
|
||||
} while (false)
|
||||
#define FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( "FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
|
||||
#define SUCCEED( ... ) INTERNAL_CATCH_MSG( "SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
|
||||
#define SKIP( ... ) INTERNAL_CATCH_MSG( "SKIP", Catch::ResultWas::ExplicitSkip, Catch::ResultDisposition::Normal, __VA_ARGS__ )
|
||||
#define SKIP( ... ) do { \
|
||||
INTERNAL_CATCH_MSG( "SKIP", Catch::ResultWas::ExplicitSkip, Catch::ResultDisposition::Normal, __VA_ARGS__ ); \
|
||||
Catch::Detail::Unreachable(); \
|
||||
} while (false)
|
||||
|
||||
|
||||
#if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE)
|
||||
@@ -6424,6 +6495,15 @@ static int catchInternalSectionHint = 0;
|
||||
#endif
|
||||
|
||||
|
||||
namespace Catch {
|
||||
namespace Detail {
|
||||
template <int N>
|
||||
struct priority_tag : priority_tag<N - 1> {};
|
||||
template <>
|
||||
struct priority_tag<0> {};
|
||||
}
|
||||
}
|
||||
|
||||
#define CATCH_RECURSION_LEVEL0(...) __VA_ARGS__
|
||||
#define CATCH_RECURSION_LEVEL1(...) CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(__VA_ARGS__)))
|
||||
#define CATCH_RECURSION_LEVEL2(...) CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(__VA_ARGS__)))
|
||||
@@ -6483,10 +6563,10 @@ static int catchInternalSectionHint = 0;
|
||||
#define INTERNAL_CATCH_MAKE_NAMESPACE(name) INTERNAL_CATCH_MAKE_NAMESPACE2(name)
|
||||
|
||||
#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
|
||||
#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS_GEN(__VA_ARGS__)>())
|
||||
#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS_GEN(__VA_ARGS__)>(Catch::Detail::priority_tag<1>{}))
|
||||
#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))
|
||||
#else
|
||||
#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) INTERNAL_CATCH_EXPAND_VARGS(decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS_GEN(__VA_ARGS__)>()))
|
||||
#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) INTERNAL_CATCH_EXPAND_VARGS(decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS_GEN(__VA_ARGS__)>(Catch::Detail::priority_tag<1>{})))
|
||||
#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)))
|
||||
#endif
|
||||
|
||||
@@ -6509,11 +6589,11 @@ static int catchInternalSectionHint = 0;
|
||||
|
||||
#define INTERNAL_CATCH_TYPE_GEN\
|
||||
template<typename...> struct TypeList {};\
|
||||
template<typename...Ts>\
|
||||
constexpr auto get_wrapper() noexcept -> TypeList<Ts...> { return {}; }\
|
||||
template<typename... Ts>\
|
||||
constexpr auto get_wrapper(Catch::Detail::priority_tag<1>) noexcept -> TypeList<Ts...> { return {}; }\
|
||||
template<template<typename...> class...> struct TemplateTypeList{};\
|
||||
template<template<typename...> class...Cs>\
|
||||
constexpr auto get_wrapper() noexcept -> TemplateTypeList<Cs...> { return {}; }\
|
||||
constexpr auto get_wrapper(Catch::Detail::priority_tag<1>) noexcept -> TemplateTypeList<Cs...> { return {}; }\
|
||||
template<typename...>\
|
||||
struct append;\
|
||||
template<typename...>\
|
||||
@@ -6543,10 +6623,10 @@ static int catchInternalSectionHint = 0;
|
||||
#define INTERNAL_CATCH_NTTP_1(signature, ...)\
|
||||
template<INTERNAL_CATCH_REMOVE_PARENS(signature)> struct Nttp{};\
|
||||
template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
|
||||
constexpr auto get_wrapper() noexcept -> Nttp<__VA_ARGS__> { return {}; } \
|
||||
constexpr auto get_wrapper(Catch::Detail::priority_tag<0>) noexcept -> Nttp<__VA_ARGS__> { return {}; } \
|
||||
template<template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...> struct NttpTemplateTypeList{};\
|
||||
template<template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...Cs>\
|
||||
constexpr auto get_wrapper() noexcept -> NttpTemplateTypeList<Cs...> { return {}; } \
|
||||
constexpr auto get_wrapper(Catch::Detail::priority_tag<0>) noexcept -> NttpTemplateTypeList<Cs...> { return {}; } \
|
||||
\
|
||||
template< template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class Container, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class List, INTERNAL_CATCH_REMOVE_PARENS(signature)>\
|
||||
struct rewrap<NttpTemplateTypeList<Container>, List<__VA_ARGS__>> { using type = TypeList<Container<__VA_ARGS__>>; };\
|
||||
@@ -6571,13 +6651,14 @@ static int catchInternalSectionHint = 0;
|
||||
template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
|
||||
static void TestName()
|
||||
|
||||
#define INTERNAL_CATCH_NTTP_REGISTER0(TestFunc, signature)\
|
||||
template<typename Type>\
|
||||
void reg_test(TypeList<Type>, Catch::NameAndTags nameAndTags)\
|
||||
#define INTERNAL_CATCH_TYPES_REGISTER(TestFunc)\
|
||||
template<typename... Ts>\
|
||||
void reg_test(TypeList<Ts...>, Catch::NameAndTags nameAndTags)\
|
||||
{\
|
||||
Catch::AutoReg( Catch::makeTestInvoker(&TestFunc<Type>), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), nameAndTags);\
|
||||
Catch::AutoReg( Catch::makeTestInvoker(&TestFunc<Ts...>), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), nameAndTags);\
|
||||
}
|
||||
|
||||
#define INTERNAL_CATCH_NTTP_REGISTER0(TestFunc, signature, ...)
|
||||
#define INTERNAL_CATCH_NTTP_REGISTER(TestFunc, signature, ...)\
|
||||
template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
|
||||
void reg_test(Nttp<__VA_ARGS__>, Catch::NameAndTags nameAndTags)\
|
||||
@@ -6626,7 +6707,7 @@ static int catchInternalSectionHint = 0;
|
||||
#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0)(TestName, __VA_ARGS__)
|
||||
#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0)(TestName, ClassName, __VA_ARGS__)
|
||||
#define INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD0, INTERNAL_CATCH_NTTP_REGISTER_METHOD0)(TestName, __VA_ARGS__)
|
||||
#define INTERNAL_CATCH_NTTP_REG_GEN(TestFunc, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER0, INTERNAL_CATCH_NTTP_REGISTER0)(TestFunc, __VA_ARGS__)
|
||||
#define INTERNAL_CATCH_NTTP_REG_GEN(TestFunc, ...) INTERNAL_CATCH_TYPES_REGISTER(TestFunc) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER0, INTERNAL_CATCH_NTTP_REGISTER0)(TestFunc, __VA_ARGS__)
|
||||
#define INTERNAL_CATCH_DEFINE_SIG_TEST(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST1, INTERNAL_CATCH_DEFINE_SIG_TEST0)(TestName, __VA_ARGS__)
|
||||
#define INTERNAL_CATCH_DECLARE_SIG_TEST(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST1, INTERNAL_CATCH_DECLARE_SIG_TEST0)(TestName, __VA_ARGS__)
|
||||
#define INTERNAL_CATCH_REMOVE_PARENS_GEN(...) INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_REMOVE_PARENS_11_ARG,INTERNAL_CATCH_REMOVE_PARENS_10_ARG,INTERNAL_CATCH_REMOVE_PARENS_9_ARG,INTERNAL_CATCH_REMOVE_PARENS_8_ARG,INTERNAL_CATCH_REMOVE_PARENS_7_ARG,INTERNAL_CATCH_REMOVE_PARENS_6_ARG,INTERNAL_CATCH_REMOVE_PARENS_5_ARG,INTERNAL_CATCH_REMOVE_PARENS_4_ARG,INTERNAL_CATCH_REMOVE_PARENS_3_ARG,INTERNAL_CATCH_REMOVE_PARENS_2_ARG,INTERNAL_CATCH_REMOVE_PARENS_1_ARG)(__VA_ARGS__)
|
||||
@@ -6636,7 +6717,7 @@ static int catchInternalSectionHint = 0;
|
||||
#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0)(TestName, __VA_ARGS__))
|
||||
#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0)(TestName, ClassName, __VA_ARGS__))
|
||||
#define INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD0, INTERNAL_CATCH_NTTP_REGISTER_METHOD0)(TestName, __VA_ARGS__))
|
||||
#define INTERNAL_CATCH_NTTP_REG_GEN(TestFunc, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER0, INTERNAL_CATCH_NTTP_REGISTER0)(TestFunc, __VA_ARGS__))
|
||||
#define INTERNAL_CATCH_NTTP_REG_GEN(TestFunc, ...) INTERNAL_CATCH_TYPES_REGISTER(TestFunc) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER0, INTERNAL_CATCH_NTTP_REGISTER0)(TestFunc, __VA_ARGS__))
|
||||
#define INTERNAL_CATCH_DEFINE_SIG_TEST(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST1, INTERNAL_CATCH_DEFINE_SIG_TEST0)(TestName, __VA_ARGS__))
|
||||
#define INTERNAL_CATCH_DECLARE_SIG_TEST(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST1, INTERNAL_CATCH_DECLARE_SIG_TEST0)(TestName, __VA_ARGS__))
|
||||
#define INTERNAL_CATCH_REMOVE_PARENS_GEN(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_REMOVE_PARENS_11_ARG,INTERNAL_CATCH_REMOVE_PARENS_10_ARG,INTERNAL_CATCH_REMOVE_PARENS_9_ARG,INTERNAL_CATCH_REMOVE_PARENS_8_ARG,INTERNAL_CATCH_REMOVE_PARENS_7_ARG,INTERNAL_CATCH_REMOVE_PARENS_6_ARG,INTERNAL_CATCH_REMOVE_PARENS_5_ARG,INTERNAL_CATCH_REMOVE_PARENS_4_ARG,INTERNAL_CATCH_REMOVE_PARENS_3_ARG,INTERNAL_CATCH_REMOVE_PARENS_2_ARG,INTERNAL_CATCH_REMOVE_PARENS_1_ARG)(__VA_ARGS__))
|
||||
@@ -6765,11 +6846,11 @@ static int catchInternalSectionHint = 0;
|
||||
constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\
|
||||
constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\
|
||||
constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\
|
||||
(void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFuncName<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + '<' + std::string(types_list[index % num_types]) + '>', Tags } ), index++)... };/* NOLINT */\
|
||||
(void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFuncName<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + '<' + types_list[index % num_types] + '>', Tags } ), index++)... };/* NOLINT */\
|
||||
} \
|
||||
}; \
|
||||
static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \
|
||||
using TestInit = typename create<TestName, decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>()), TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>>::type; \
|
||||
static const int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \
|
||||
using TestInit = typename create<TestName, decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>(Catch::Detail::priority_tag<1>{})), TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>>::type; \
|
||||
TestInit t; \
|
||||
t.reg_tests(); \
|
||||
return 0; \
|
||||
@@ -6814,7 +6895,7 @@ static int catchInternalSectionHint = 0;
|
||||
(void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " INTERNAL_CATCH_STRINGIZE(TmplList) " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */\
|
||||
} \
|
||||
};\
|
||||
static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \
|
||||
static const int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \
|
||||
using TestInit = typename convert<TestName, TmplList>::type; \
|
||||
TestInit t; \
|
||||
t.reg_tests(); \
|
||||
@@ -6850,7 +6931,7 @@ static int catchInternalSectionHint = 0;
|
||||
(void)expander{(reg_test(Types{}, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \
|
||||
}\
|
||||
};\
|
||||
static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
|
||||
static const int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
|
||||
TestNameClass<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(__VA_ARGS__)>();\
|
||||
return 0;\
|
||||
}();\
|
||||
@@ -6897,11 +6978,11 @@ static int catchInternalSectionHint = 0;
|
||||
constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\
|
||||
constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\
|
||||
constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\
|
||||
(void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + '<' + std::string(types_list[index % num_types]) + '>', Tags } ), index++)... };/* NOLINT */ \
|
||||
(void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + '<' + types_list[index % num_types] + '>', Tags } ), index++)... };/* NOLINT */ \
|
||||
}\
|
||||
};\
|
||||
static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
|
||||
using TestInit = typename create<TestNameClass, decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>()), TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>>::type;\
|
||||
static const int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
|
||||
using TestInit = typename create<TestNameClass, decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>(Catch::Detail::priority_tag<1>{})), TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>>::type;\
|
||||
TestInit t;\
|
||||
t.reg_tests();\
|
||||
return 0;\
|
||||
@@ -6949,7 +7030,7 @@ static int catchInternalSectionHint = 0;
|
||||
(void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName##_catch_sr, Catch::NameAndTags{ Name " - " INTERNAL_CATCH_STRINGIZE(TmplList) " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */ \
|
||||
}\
|
||||
};\
|
||||
static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
|
||||
static const int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
|
||||
using TestInit = typename convert<TestNameClass, TmplList>::type;\
|
||||
TestInit t;\
|
||||
t.reg_tests();\
|
||||
@@ -7201,6 +7282,22 @@ namespace Catch {
|
||||
#endif // CATCH_TEST_CASE_INFO_HPP_INCLUDED
|
||||
|
||||
|
||||
#ifndef CATCH_TEST_RUN_INFO_HPP_INCLUDED
|
||||
#define CATCH_TEST_RUN_INFO_HPP_INCLUDED
|
||||
|
||||
|
||||
namespace Catch {
|
||||
|
||||
struct TestRunInfo {
|
||||
constexpr TestRunInfo(StringRef _name) : name(_name) {}
|
||||
StringRef name;
|
||||
};
|
||||
|
||||
} // end namespace Catch
|
||||
|
||||
#endif // CATCH_TEST_RUN_INFO_HPP_INCLUDED
|
||||
|
||||
|
||||
#ifndef CATCH_TRANSLATE_EXCEPTION_HPP_INCLUDED
|
||||
#define CATCH_TRANSLATE_EXCEPTION_HPP_INCLUDED
|
||||
|
||||
@@ -7288,7 +7385,7 @@ namespace Catch {
|
||||
static std::string translatorName( signature ); \
|
||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
|
||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
||||
namespace{ Catch::ExceptionTranslatorRegistrar INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionRegistrar )( &translatorName ); } \
|
||||
namespace{ const Catch::ExceptionTranslatorRegistrar INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionRegistrar )( &translatorName ); } \
|
||||
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
|
||||
static std::string translatorName( signature )
|
||||
|
||||
@@ -7349,8 +7446,8 @@ namespace Catch {
|
||||
#define CATCH_VERSION_MACROS_HPP_INCLUDED
|
||||
|
||||
#define CATCH_VERSION_MAJOR 3
|
||||
#define CATCH_VERSION_MINOR 8
|
||||
#define CATCH_VERSION_PATCH 1
|
||||
#define CATCH_VERSION_MINOR 9
|
||||
#define CATCH_VERSION_PATCH 0
|
||||
|
||||
#endif // CATCH_VERSION_MACROS_HPP_INCLUDED
|
||||
|
||||
@@ -7391,7 +7488,7 @@ namespace Catch {
|
||||
m_msg(msg)
|
||||
{}
|
||||
|
||||
const char* what() const noexcept override final;
|
||||
const char* what() const noexcept final;
|
||||
};
|
||||
|
||||
} // end namespace Catch
|
||||
@@ -8778,26 +8875,9 @@ auto from_range(Container const& cnt) {
|
||||
#define CATCH_INTERFACES_REPORTER_HPP_INCLUDED
|
||||
|
||||
|
||||
|
||||
#ifndef CATCH_TEST_RUN_INFO_HPP_INCLUDED
|
||||
#define CATCH_TEST_RUN_INFO_HPP_INCLUDED
|
||||
|
||||
|
||||
namespace Catch {
|
||||
|
||||
struct TestRunInfo {
|
||||
constexpr TestRunInfo(StringRef _name) : name(_name) {}
|
||||
StringRef name;
|
||||
};
|
||||
|
||||
} // end namespace Catch
|
||||
|
||||
#endif // CATCH_TEST_RUN_INFO_HPP_INCLUDED
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <iosfwd>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
@@ -8893,6 +8973,11 @@ namespace Catch {
|
||||
//! Catch2 should call `Reporter::assertionEnded` even for passing
|
||||
//! assertions
|
||||
bool shouldReportAllAssertions = false;
|
||||
//! Catch2 should call `Reporter::assertionStarting` for all assertions
|
||||
// Defaults to true for backwards compatibility, but none of our current
|
||||
// reporters actually want this, and it enables a fast path in assertion
|
||||
// handling.
|
||||
bool shouldReportAllAssertionStarts = true;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -9472,7 +9557,7 @@ namespace Catch {
|
||||
#define CATCH_ENFORCE_HPP_INCLUDED
|
||||
|
||||
|
||||
#include <exception>
|
||||
#include <exception> // for `std::exception` in no-exception configuration
|
||||
|
||||
namespace Catch {
|
||||
#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
|
||||
@@ -9568,7 +9653,6 @@ namespace Catch {
|
||||
#define CATCH_EXCEPTION_TRANSLATOR_REGISTRY_HPP_INCLUDED
|
||||
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
namespace Catch {
|
||||
@@ -9768,8 +9852,8 @@ namespace Detail {
|
||||
#ifndef CATCH_IS_PERMUTATION_HPP_INCLUDED
|
||||
#define CATCH_IS_PERMUTATION_HPP_INCLUDED
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
namespace Catch {
|
||||
namespace Detail {
|
||||
@@ -9906,8 +9990,6 @@ namespace Catch {
|
||||
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cstddef>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
|
||||
namespace Catch {
|
||||
@@ -10491,6 +10573,48 @@ using TestCaseTracking::SectionTracker;
|
||||
|
||||
#endif // CATCH_TEST_CASE_TRACKER_HPP_INCLUDED
|
||||
|
||||
|
||||
#ifndef CATCH_THREAD_SUPPORT_HPP_INCLUDED
|
||||
#define CATCH_THREAD_SUPPORT_HPP_INCLUDED
|
||||
|
||||
|
||||
#if defined( CATCH_CONFIG_EXPERIMENTAL_THREAD_SAFE_ASSERTIONS )
|
||||
# include <atomic>
|
||||
# include <mutex>
|
||||
#endif
|
||||
|
||||
|
||||
namespace Catch {
|
||||
namespace Detail {
|
||||
#if defined( CATCH_CONFIG_EXPERIMENTAL_THREAD_SAFE_ASSERTIONS )
|
||||
using Mutex = std::mutex;
|
||||
using LockGuard = std::lock_guard<std::mutex>;
|
||||
struct AtomicCounts {
|
||||
std::atomic<std::uint64_t> passed = 0;
|
||||
std::atomic<std::uint64_t> failed = 0;
|
||||
std::atomic<std::uint64_t> failedButOk = 0;
|
||||
std::atomic<std::uint64_t> skipped = 0;
|
||||
};
|
||||
#else // ^^ Use actual mutex, lock and atomics
|
||||
// vv Dummy implementations for single-thread performance
|
||||
|
||||
struct Mutex {
|
||||
void lock() {}
|
||||
void unlock() {}
|
||||
};
|
||||
|
||||
struct LockGuard {
|
||||
LockGuard( Mutex ) {}
|
||||
};
|
||||
|
||||
using AtomicCounts = Counts;
|
||||
#endif
|
||||
|
||||
} // namespace Detail
|
||||
} // namespace Catch
|
||||
|
||||
#endif // CATCH_THREAD_SUPPORT_HPP_INCLUDED
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Catch {
|
||||
@@ -10578,18 +10702,18 @@ namespace Catch {
|
||||
|
||||
bool lastAssertionPassed() override;
|
||||
|
||||
void assertionPassed() override;
|
||||
|
||||
public:
|
||||
// !TBD We need to do this another way!
|
||||
bool aborting() const;
|
||||
|
||||
private:
|
||||
void assertionPassedFastPath( SourceLineInfo lineInfo );
|
||||
// Update the non-thread-safe m_totals from the atomic assertion counts.
|
||||
void updateTotalsFromAtomics();
|
||||
|
||||
void runCurrentTest();
|
||||
void invokeActiveTestCase();
|
||||
|
||||
void resetAssertionInfo();
|
||||
bool testForMissingAssertions( Counts& assertions );
|
||||
|
||||
void assertionEnded( AssertionResult&& result );
|
||||
@@ -10599,31 +10723,42 @@ namespace Catch {
|
||||
ITransientExpression const *expr,
|
||||
bool negated );
|
||||
|
||||
void populateReaction( AssertionReaction& reaction );
|
||||
void populateReaction( AssertionReaction& reaction, bool has_normal_disposition );
|
||||
|
||||
// Creates dummy info for unexpected exceptions/fatal errors,
|
||||
// where we do not have the access to one, but we still need
|
||||
// to send one to the reporters.
|
||||
AssertionInfo makeDummyAssertionInfo();
|
||||
|
||||
private:
|
||||
|
||||
void handleUnfinishedSections();
|
||||
|
||||
mutable Detail::Mutex m_assertionMutex;
|
||||
TestRunInfo m_runInfo;
|
||||
TestCaseHandle const* m_activeTestCase = nullptr;
|
||||
ITracker* m_testCaseTracker = nullptr;
|
||||
Optional<AssertionResult> m_lastResult;
|
||||
|
||||
IConfig const* m_config;
|
||||
Totals m_totals;
|
||||
Detail::AtomicCounts m_atomicAssertionCount;
|
||||
IEventListenerPtr m_reporter;
|
||||
std::vector<MessageInfo> m_messages;
|
||||
std::vector<ScopedMessage> m_messageScopes; /* Keeps owners of so-called unscoped messages. */
|
||||
AssertionInfo m_lastAssertionInfo;
|
||||
// Owners for the UNSCOPED_X information macro
|
||||
std::vector<ScopedMessage> m_messageScopes;
|
||||
std::vector<SectionEndInfo> m_unfinishedSections;
|
||||
std::vector<ITracker*> m_activeSections;
|
||||
TrackerContext m_trackerContext;
|
||||
Detail::unique_ptr<OutputRedirect> m_outputRedirect;
|
||||
FatalConditionHandler m_fatalConditionhandler;
|
||||
bool m_lastAssertionPassed = false;
|
||||
// Caches m_config->abortAfter() to avoid vptr calls/allow inlining
|
||||
size_t m_abortAfterXFailedAssertions;
|
||||
bool m_shouldReportUnexpected = true;
|
||||
// Caches whether `assertionStarting` events should be sent to the reporter.
|
||||
bool m_reportAssertionStarting;
|
||||
// Caches whether `assertionEnded` events for successful assertions should be sent to the reporter
|
||||
bool m_includeSuccessfulResults;
|
||||
// Caches m_config->shouldDebugBreak() to avoid vptr calls/allow inlining
|
||||
bool m_shouldDebugBreak;
|
||||
};
|
||||
|
||||
void seedRng(IConfig const& config);
|
||||
@@ -10637,7 +10772,6 @@ namespace Catch {
|
||||
#define CATCH_SHARDING_HPP_INCLUDED
|
||||
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
|
||||
namespace Catch {
|
||||
@@ -11860,19 +11994,19 @@ namespace Matchers {
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
using is_generic_matcher = std::is_base_of<
|
||||
static constexpr bool is_generic_matcher_v = std::is_base_of<
|
||||
Catch::Matchers::MatcherGenericBase,
|
||||
std::remove_cv_t<std::remove_reference_t<T>>
|
||||
>;
|
||||
>::value;
|
||||
|
||||
template<typename... Ts>
|
||||
using are_generic_matchers = Catch::Detail::conjunction<is_generic_matcher<Ts>...>;
|
||||
static constexpr bool are_generic_matchers_v = Catch::Detail::conjunction<std::integral_constant<bool,is_generic_matcher_v<Ts>>...>::value;
|
||||
|
||||
template<typename T>
|
||||
using is_matcher = std::is_base_of<
|
||||
static constexpr bool is_matcher_v = std::is_base_of<
|
||||
Catch::Matchers::MatcherUntypedBase,
|
||||
std::remove_cv_t<std::remove_reference_t<T>>
|
||||
>;
|
||||
>::value;
|
||||
|
||||
|
||||
template<std::size_t N, typename Arg>
|
||||
@@ -11945,7 +12079,7 @@ namespace Matchers {
|
||||
|
||||
//! Avoids type nesting for `GenericAllOf && some matcher` case
|
||||
template<typename MatcherRHS>
|
||||
friend std::enable_if_t<is_matcher<MatcherRHS>::value,
|
||||
friend std::enable_if_t<is_matcher_v<MatcherRHS>,
|
||||
MatchAllOfGeneric<MatcherTs..., MatcherRHS>> operator && (
|
||||
MatchAllOfGeneric<MatcherTs...>&& lhs,
|
||||
MatcherRHS const& rhs) {
|
||||
@@ -11954,7 +12088,7 @@ namespace Matchers {
|
||||
|
||||
//! Avoids type nesting for `some matcher && GenericAllOf` case
|
||||
template<typename MatcherLHS>
|
||||
friend std::enable_if_t<is_matcher<MatcherLHS>::value,
|
||||
friend std::enable_if_t<is_matcher_v<MatcherLHS>,
|
||||
MatchAllOfGeneric<MatcherLHS, MatcherTs...>> operator && (
|
||||
MatcherLHS const& lhs,
|
||||
MatchAllOfGeneric<MatcherTs...>&& rhs) {
|
||||
@@ -11999,7 +12133,7 @@ namespace Matchers {
|
||||
|
||||
//! Avoids type nesting for `GenericAnyOf || some matcher` case
|
||||
template<typename MatcherRHS>
|
||||
friend std::enable_if_t<is_matcher<MatcherRHS>::value,
|
||||
friend std::enable_if_t<is_matcher_v<MatcherRHS>,
|
||||
MatchAnyOfGeneric<MatcherTs..., MatcherRHS>> operator || (
|
||||
MatchAnyOfGeneric<MatcherTs...>&& lhs,
|
||||
MatcherRHS const& rhs) {
|
||||
@@ -12008,7 +12142,7 @@ namespace Matchers {
|
||||
|
||||
//! Avoids type nesting for `some matcher || GenericAnyOf` case
|
||||
template<typename MatcherLHS>
|
||||
friend std::enable_if_t<is_matcher<MatcherLHS>::value,
|
||||
friend std::enable_if_t<is_matcher_v<MatcherLHS>,
|
||||
MatchAnyOfGeneric<MatcherLHS, MatcherTs...>> operator || (
|
||||
MatcherLHS const& lhs,
|
||||
MatchAnyOfGeneric<MatcherTs...>&& rhs) {
|
||||
@@ -12048,20 +12182,20 @@ namespace Matchers {
|
||||
|
||||
// compose only generic matchers
|
||||
template<typename MatcherLHS, typename MatcherRHS>
|
||||
std::enable_if_t<Detail::are_generic_matchers<MatcherLHS, MatcherRHS>::value, Detail::MatchAllOfGeneric<MatcherLHS, MatcherRHS>>
|
||||
std::enable_if_t<Detail::are_generic_matchers_v<MatcherLHS, MatcherRHS>, Detail::MatchAllOfGeneric<MatcherLHS, MatcherRHS>>
|
||||
operator && (MatcherLHS const& lhs, MatcherRHS const& rhs) {
|
||||
return { lhs, rhs };
|
||||
}
|
||||
|
||||
template<typename MatcherLHS, typename MatcherRHS>
|
||||
std::enable_if_t<Detail::are_generic_matchers<MatcherLHS, MatcherRHS>::value, Detail::MatchAnyOfGeneric<MatcherLHS, MatcherRHS>>
|
||||
std::enable_if_t<Detail::are_generic_matchers_v<MatcherLHS, MatcherRHS>, Detail::MatchAnyOfGeneric<MatcherLHS, MatcherRHS>>
|
||||
operator || (MatcherLHS const& lhs, MatcherRHS const& rhs) {
|
||||
return { lhs, rhs };
|
||||
}
|
||||
|
||||
//! Wrap provided generic matcher in generic negator
|
||||
template<typename MatcherT>
|
||||
std::enable_if_t<Detail::is_generic_matcher<MatcherT>::value, Detail::MatchNotOfGeneric<MatcherT>>
|
||||
std::enable_if_t<Detail::is_generic_matcher_v<MatcherT>, Detail::MatchNotOfGeneric<MatcherT>>
|
||||
operator ! (MatcherT const& matcher) {
|
||||
return Detail::MatchNotOfGeneric<MatcherT>{matcher};
|
||||
}
|
||||
@@ -12069,25 +12203,25 @@ namespace Matchers {
|
||||
|
||||
// compose mixed generic and non-generic matchers
|
||||
template<typename MatcherLHS, typename ArgRHS>
|
||||
std::enable_if_t<Detail::is_generic_matcher<MatcherLHS>::value, Detail::MatchAllOfGeneric<MatcherLHS, MatcherBase<ArgRHS>>>
|
||||
std::enable_if_t<Detail::is_generic_matcher_v<MatcherLHS>, Detail::MatchAllOfGeneric<MatcherLHS, MatcherBase<ArgRHS>>>
|
||||
operator && (MatcherLHS const& lhs, MatcherBase<ArgRHS> const& rhs) {
|
||||
return { lhs, rhs };
|
||||
}
|
||||
|
||||
template<typename ArgLHS, typename MatcherRHS>
|
||||
std::enable_if_t<Detail::is_generic_matcher<MatcherRHS>::value, Detail::MatchAllOfGeneric<MatcherBase<ArgLHS>, MatcherRHS>>
|
||||
std::enable_if_t<Detail::is_generic_matcher_v<MatcherRHS>, Detail::MatchAllOfGeneric<MatcherBase<ArgLHS>, MatcherRHS>>
|
||||
operator && (MatcherBase<ArgLHS> const& lhs, MatcherRHS const& rhs) {
|
||||
return { lhs, rhs };
|
||||
}
|
||||
|
||||
template<typename MatcherLHS, typename ArgRHS>
|
||||
std::enable_if_t<Detail::is_generic_matcher<MatcherLHS>::value, Detail::MatchAnyOfGeneric<MatcherLHS, MatcherBase<ArgRHS>>>
|
||||
std::enable_if_t<Detail::is_generic_matcher_v<MatcherLHS>, Detail::MatchAnyOfGeneric<MatcherLHS, MatcherBase<ArgRHS>>>
|
||||
operator || (MatcherLHS const& lhs, MatcherBase<ArgRHS> const& rhs) {
|
||||
return { lhs, rhs };
|
||||
}
|
||||
|
||||
template<typename ArgLHS, typename MatcherRHS>
|
||||
std::enable_if_t<Detail::is_generic_matcher<MatcherRHS>::value, Detail::MatchAnyOfGeneric<MatcherBase<ArgLHS>, MatcherRHS>>
|
||||
std::enable_if_t<Detail::is_generic_matcher_v<MatcherRHS>, Detail::MatchAnyOfGeneric<MatcherBase<ArgLHS>, MatcherRHS>>
|
||||
operator || (MatcherBase<ArgLHS> const& lhs, MatcherRHS const& rhs) {
|
||||
return { lhs, rhs };
|
||||
}
|
||||
@@ -12164,7 +12298,7 @@ namespace Catch {
|
||||
//! Creates a matcher that accepts ranges/containers with specific size
|
||||
HasSizeMatcher SizeIs(std::size_t sz);
|
||||
template <typename Matcher>
|
||||
std::enable_if_t<Detail::is_matcher<Matcher>::value,
|
||||
std::enable_if_t<Detail::is_matcher_v<Matcher>,
|
||||
SizeMatchesMatcher<Matcher>> SizeIs(Matcher&& m) {
|
||||
return SizeMatchesMatcher<Matcher>{CATCH_FORWARD(m)};
|
||||
}
|
||||
@@ -12179,8 +12313,8 @@ namespace Catch {
|
||||
#define CATCH_MATCHERS_CONTAINS_HPP_INCLUDED
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <type_traits>
|
||||
|
||||
namespace Catch {
|
||||
namespace Matchers {
|
||||
@@ -12242,14 +12376,14 @@ namespace Catch {
|
||||
* Uses `std::equal_to` to do the comparison
|
||||
*/
|
||||
template <typename T>
|
||||
std::enable_if_t<!Detail::is_matcher<T>::value,
|
||||
std::enable_if_t<!Detail::is_matcher_v<T>,
|
||||
ContainsElementMatcher<T, std::equal_to<>>> Contains(T&& elem) {
|
||||
return { CATCH_FORWARD(elem), std::equal_to<>{} };
|
||||
}
|
||||
|
||||
//! Creates a matcher that checks whether a range contains element matching a matcher
|
||||
template <typename Matcher>
|
||||
std::enable_if_t<Detail::is_matcher<Matcher>::value,
|
||||
std::enable_if_t<Detail::is_matcher_v<Matcher>,
|
||||
ContainsMatcherMatcher<Matcher>> Contains(Matcher&& matcher) {
|
||||
return { CATCH_FORWARD(matcher) };
|
||||
}
|
||||
@@ -12626,8 +12760,7 @@ namespace Catch {
|
||||
#define CATCH_MATCHERS_RANGE_EQUALS_HPP_INCLUDED
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
#include <functional>
|
||||
|
||||
namespace Catch {
|
||||
namespace Matchers {
|
||||
@@ -13211,9 +13344,11 @@ namespace Catch {
|
||||
public:
|
||||
// GCC5 compat: we cannot use inherited constructor, because it
|
||||
// doesn't implement backport of P0136
|
||||
AutomakeReporter(ReporterConfig&& _config):
|
||||
StreamingReporterBase(CATCH_MOVE(_config))
|
||||
{}
|
||||
AutomakeReporter( ReporterConfig&& _config ):
|
||||
StreamingReporterBase( CATCH_MOVE( _config ) ) {
|
||||
m_preferences.shouldReportAllAssertionStarts = false;
|
||||
}
|
||||
|
||||
~AutomakeReporter() override;
|
||||
|
||||
static std::string getDescription() {
|
||||
@@ -13240,7 +13375,10 @@ namespace Catch {
|
||||
|
||||
class CompactReporter final : public StreamingReporterBase {
|
||||
public:
|
||||
using StreamingReporterBase::StreamingReporterBase;
|
||||
CompactReporter( ReporterConfig&& _config ):
|
||||
StreamingReporterBase( CATCH_MOVE( _config ) ) {
|
||||
m_preferences.shouldReportAllAssertionStarts = false;
|
||||
}
|
||||
|
||||
~CompactReporter() override;
|
||||
|
||||
@@ -13282,8 +13420,6 @@ namespace Catch {
|
||||
void noMatchingTestCases( StringRef unmatchedSpec ) override;
|
||||
void reportInvalidTestSpec( StringRef arg ) override;
|
||||
|
||||
void assertionStarting(AssertionInfo const&) override;
|
||||
|
||||
void assertionEnded(AssertionStats const& _assertionStats) override;
|
||||
|
||||
void sectionStarting(SectionInfo const& _sectionInfo) override;
|
||||
@@ -13637,7 +13773,6 @@ namespace Catch {
|
||||
void sectionStarting( SectionInfo const& sectionInfo ) override;
|
||||
void sectionEnded( SectionStats const& sectionStats ) override;
|
||||
|
||||
void assertionStarting( AssertionInfo const& assertionInfo ) override;
|
||||
void assertionEnded( AssertionStats const& assertionStats ) override;
|
||||
|
||||
//void testRunEndedCumulative() override;
|
||||
@@ -13764,6 +13899,11 @@ namespace Catch {
|
||||
void updatePreferences(IEventListener const& reporterish);
|
||||
|
||||
public:
|
||||
MultiReporter( IConfig const* config ):
|
||||
IEventListener( config ) {
|
||||
m_preferences.shouldReportAllAssertionStarts = false;
|
||||
}
|
||||
|
||||
using IEventListener::IEventListener;
|
||||
|
||||
void addListener( IEventListenerPtr&& listener );
|
||||
@@ -13899,22 +14039,24 @@ namespace Catch {
|
||||
|
||||
#if !defined(CATCH_CONFIG_DISABLE)
|
||||
|
||||
# define CATCH_REGISTER_REPORTER( name, reporterType ) \
|
||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
|
||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
||||
namespace { \
|
||||
Catch::ReporterRegistrar<reporterType> INTERNAL_CATCH_UNIQUE_NAME( \
|
||||
catch_internal_RegistrarFor )( name ); \
|
||||
} \
|
||||
# define CATCH_REGISTER_REPORTER( name, reporterType ) \
|
||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
|
||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
||||
namespace { \
|
||||
const Catch::ReporterRegistrar<reporterType> \
|
||||
INTERNAL_CATCH_UNIQUE_NAME( catch_internal_RegistrarFor )( \
|
||||
name ); \
|
||||
} \
|
||||
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
|
||||
|
||||
# define CATCH_REGISTER_LISTENER( listenerType ) \
|
||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
|
||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
||||
namespace { \
|
||||
Catch::ListenerRegistrar<listenerType> INTERNAL_CATCH_UNIQUE_NAME( \
|
||||
catch_internal_RegistrarFor )( #listenerType##_catch_sr ); \
|
||||
} \
|
||||
# define CATCH_REGISTER_LISTENER( listenerType ) \
|
||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
|
||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
||||
namespace { \
|
||||
const Catch::ListenerRegistrar<listenerType> \
|
||||
INTERNAL_CATCH_UNIQUE_NAME( catch_internal_RegistrarFor )( \
|
||||
#listenerType##_catch_sr ); \
|
||||
} \
|
||||
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
|
||||
|
||||
#else // CATCH_CONFIG_DISABLE
|
||||
@@ -13941,6 +14083,7 @@ namespace Catch {
|
||||
, xml(m_stream) {
|
||||
m_preferences.shouldRedirectStdOut = true;
|
||||
m_preferences.shouldReportAllAssertions = false;
|
||||
m_preferences.shouldReportAllAssertionStarts = false;
|
||||
m_shouldStoreSuccesfulAssertions = false;
|
||||
}
|
||||
|
||||
@@ -13989,6 +14132,7 @@ namespace Catch {
|
||||
TAPReporter( ReporterConfig&& config ):
|
||||
StreamingReporterBase( CATCH_MOVE(config) ) {
|
||||
m_preferences.shouldReportAllAssertions = true;
|
||||
m_preferences.shouldReportAllAssertionStarts = false;
|
||||
}
|
||||
|
||||
static std::string getDescription() {
|
||||
@@ -14032,6 +14176,7 @@ namespace Catch {
|
||||
: StreamingReporterBase( CATCH_MOVE(_config) )
|
||||
{
|
||||
m_preferences.shouldRedirectStdOut = true;
|
||||
m_preferences.shouldReportAllAssertionStarts = false;
|
||||
}
|
||||
|
||||
~TeamCityReporter() override;
|
||||
@@ -14099,8 +14244,6 @@ namespace Catch {
|
||||
|
||||
void sectionStarting(SectionInfo const& sectionInfo) override;
|
||||
|
||||
void assertionStarting(AssertionInfo const&) override;
|
||||
|
||||
void assertionEnded(AssertionStats const& assertionStats) override;
|
||||
|
||||
void sectionEnded(SectionStats const& sectionStats) override;
|
||||
|
Reference in New Issue
Block a user