Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch.hpp File Reference
#include <iosfwd>
#include <string>
#include <cstdint>
#include <vector>
#include <cstddef>
#include <type_traits>
#include <ostream>
#include <memory>
#include <exception>
#include <cmath>
#include <functional>
#include <algorithm>
#include <stdexcept>
#include <cassert>
#include <utility>
#include <random>
Include dependency graph for catch.hpp:

Go to the source code of this file.

Classes

struct  Catch_global_namespace_dummy
 
struct  Catch::CaseSensitive
 
class  Catch::NonCopyable
 
struct  Catch::SourceLineInfo
 
struct  Catch::StreamEndStop
 
struct  Catch::RegistrarForTagAliases
 
struct  Catch::ITestInvoker
 
struct  Catch::ITestCaseRegistry
 
class  Catch::StringRef
 
struct  Catch::is_unique<... >
 
struct  Catch::is_unique< T0, T1, Rest... >
 
struct  Catch::TypeList<... >
 
struct  Catch::append< L1< E1... >, L2< E2... > >
 
struct  Catch::append< L1< E1... >, L2< E2... >, Rest... >
 
struct  Catch::rewrap< Container, List< elems... > >
 
struct  Catch::rewrap< Container, List< Elems... >, Elements... >
 
struct  Catch::combine< Containers >
 
struct  Catch::combine< Containers >::with_types< Types >
 
struct  Catch::combine< Containers >::with_types< Types >::into< Final >
 
struct  Catch::always_false< T >
 
class  Catch::TestInvokerAsMethod< C >
 
struct  Catch::NameAndTags
 
struct  Catch::AutoReg
 
struct  Catch::ResultWas
 
struct  Catch::ResultDisposition
 
struct  Catch::AssertionInfo
 
struct  Catch::IStream
 
class  Catch::ReusableStringStream
 
class  Catch::Detail::IsStreamInsertable< T >
 
struct  Catch::StringMaker< T, typename >
 
struct  Catch::StringMaker< std::string >
 
struct  Catch::StringMaker< char const * >
 
struct  Catch::StringMaker< char * >
 
struct  Catch::StringMaker< std::wstring >
 
struct  Catch::StringMaker< wchar_t const * >
 
struct  Catch::StringMaker< wchar_t * >
 
struct  Catch::StringMaker< char[SZ]>
 
struct  Catch::StringMaker< signed char[SZ]>
 
struct  Catch::StringMaker< unsigned char[SZ]>
 
struct  Catch::StringMaker< int >
 
struct  Catch::StringMaker< long >
 
struct  Catch::StringMaker< long long >
 
struct  Catch::StringMaker< unsigned int >
 
struct  Catch::StringMaker< unsigned long >
 
struct  Catch::StringMaker< unsigned long long >
 
struct  Catch::StringMaker< bool >
 
struct  Catch::StringMaker< char >
 
struct  Catch::StringMaker< signed char >
 
struct  Catch::StringMaker< unsigned char >
 
struct  Catch::StringMaker< std::nullptr_t >
 
struct  Catch::StringMaker< float >
 
struct  Catch::StringMaker< double >
 
struct  Catch::StringMaker< T * >
 
struct  Catch::StringMaker< R C::* >
 
struct  Catch::not_this_one
 
struct  Catch::is_range< T >
 
struct  Catch::StringMaker< R, typename std::enable_if< is_range< R >::value &&!::Catch::Detail::IsStreamInsertable< R >::value >::type >
 
struct  Catch::StringMaker< T[SZ]>
 
struct  Catch::ITransientExpression
 
class  Catch::BinaryExpr< LhsT, RhsT >
 
class  Catch::UnaryExpr< LhsT >
 
class  Catch::ExprLhs< LhsT >
 
struct  Catch::Decomposer
 
struct  Catch::IResultCapture
 
struct  Catch::TestFailureException
 
class  Catch::LazyExpression
 
struct  Catch::AssertionReaction
 
class  Catch::AssertionHandler
 
struct  Catch::MessageInfo
 
struct  Catch::MessageStream
 
struct  Catch::MessageBuilder
 
class  Catch::ScopedMessage
 
class  Catch::Capturer
 
struct  Catch::Counts
 
struct  Catch::Totals
 
struct  Catch::SectionInfo
 
struct  Catch::SectionEndInfo
 
class  Catch::Timer
 
class  Catch::Section
 
class  Catch::BenchmarkLooper
 
struct  Catch::IRegistryHub
 
struct  Catch::IMutableRegistryHub
 
struct  Catch::IExceptionTranslator
 
struct  Catch::IExceptionTranslatorRegistry
 
class  Catch::ExceptionTranslatorRegistrar
 
class  Catch::Detail::Approx
 
struct  Catch::StringMaker< Catch::Detail::Approx >
 
struct  Catch::pluralise
 
class  Catch::Matchers::Impl::MatcherUntypedBase
 
struct  Catch::Matchers::Impl::MatcherMethod< ObjectT >
 
struct  Catch::Matchers::Impl::MatcherBase< T >
 
struct  Catch::Matchers::Impl::MatchAllOf< ArgT >
 
struct  Catch::Matchers::Impl::MatchAnyOf< ArgT >
 
struct  Catch::Matchers::Impl::MatchNotOf< ArgT >
 
struct  Catch::Matchers::Floating::WithinAbsMatcher
 
struct  Catch::Matchers::Floating::WithinUlpsMatcher
 
class  Catch::Matchers::Generic::PredicateMatcher< T >
 
struct  Catch::Matchers::StdString::CasedString
 
struct  Catch::Matchers::StdString::StringMatcherBase
 
struct  Catch::Matchers::StdString::EqualsMatcher
 
struct  Catch::Matchers::StdString::ContainsMatcher
 
struct  Catch::Matchers::StdString::StartsWithMatcher
 
struct  Catch::Matchers::StdString::EndsWithMatcher
 
struct  Catch::Matchers::StdString::RegexMatcher
 
struct  Catch::Matchers::Vector::ContainsElementMatcher< T >
 
struct  Catch::Matchers::Vector::ContainsMatcher< T >
 
struct  Catch::Matchers::Vector::EqualsMatcher< T >
 
struct  Catch::Matchers::Vector::ApproxMatcher< T >
 
struct  Catch::Matchers::Vector::UnorderedEqualsMatcher< T >
 
class  Catch::MatchExpr< ArgT, MatcherT >
 
class  Catch::Generators::GeneratorUntypedBase
 
struct  Catch::IGeneratorTracker
 
class  Catch::GeneratorException
 
struct  Catch::Generators::IGenerator< T >
 
class  Catch::Generators::SingleValueGenerator< T >
 
class  Catch::Generators::FixedValuesGenerator< T >
 
class  Catch::Generators::GeneratorWrapper< T >
 
class  Catch::Generators::Generators< T >
 
struct  Catch::Generators::as< T >
 
class  Catch::Generators::TakeGenerator< T >
 
class  Catch::Generators::FilterGenerator< T, Predicate >
 
class  Catch::Generators::RepeatGenerator< T >
 
class  Catch::Generators::MapGenerator< T, U, Func >
 
class  Catch::Generators::ChunkGenerator< T >
 
struct  Catch::IContext
 
struct  Catch::IMutableContext
 
struct  Catch::WarnAbout
 
struct  Catch::ShowDurations
 
struct  Catch::RunTests
 
struct  Catch::UseColour
 
struct  Catch::WaitForKeypress
 
struct  Catch::IConfig
 
class  Catch::Generators::RandomFloatingGenerator< Float >
 
class  Catch::Generators::RandomIntegerGenerator< Integer >
 
class  Catch::Generators::RangeGenerator< T >
 
struct  Catch::TestCaseInfo
 
class  Catch::TestCase
 
struct  Catch::IRunner
 

Namespaces

namespace  Catch
 
namespace  Catch::Detail
 
namespace  Catch::literals
 
namespace  Catch::Matchers
 
namespace  Catch::Matchers::Impl
 
namespace  Catch::Matchers::Floating
 
namespace  Catch::Matchers::Generic
 
namespace  Catch::Matchers::Generic::Detail
 
namespace  Catch::Matchers::StdString
 
namespace  Catch::Matchers::Vector
 
namespace  Catch::Generators
 
namespace  Catch::Generators::pf
 

Macros

#define CATCH_VERSION_MAJOR   2
 
#define CATCH_VERSION_MINOR   7
 
#define CATCH_VERSION_PATCH   2
 
#define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS
 
#define CATCH_INTERNAL_CONFIG_COUNTER
 
#define CATCH_CONFIG_COUNTER
 
#define CATCH_CONFIG_POSIX_SIGNALS
 
#define CATCH_CONFIG_WCHAR
 
#define CATCH_CONFIG_CPP11_TO_STRING
 
#define CATCH_CONFIG_DISABLE_EXCEPTIONS
 
#define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS
 
#define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS
 
#define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS
 
#define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS
 
#define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS
 
#define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS
 
#define CATCH_TRY   if ((true))
 
#define CATCH_CATCH_ALL   if ((false))
 
#define CATCH_CATCH_ANON(type)
 
#define INTERNAL_CATCH_UNIQUE_NAME_LINE2(name, line)
 
#define INTERNAL_CATCH_UNIQUE_NAME_LINE(name, line)
 
#define INTERNAL_CATCH_UNIQUE_NAME(name)
 
#define CATCH_INTERNAL_LINEINFO    ::Catch::SourceLineInfo( __FILE__, static_cast<std::size_t>( __LINE__ ) )
 
#define CATCH_REGISTER_TAG_ALIAS(alias, spec)
 
#define CATCH_RECURSION_LEVEL0(...)
 
#define CATCH_RECURSION_LEVEL1(...)
 
#define CATCH_RECURSION_LEVEL2(...)
 
#define CATCH_RECURSION_LEVEL3(...)
 
#define CATCH_RECURSION_LEVEL4(...)
 
#define CATCH_RECURSION_LEVEL5(...)
 
#define CATCH_RECURSE(...)
 
#define CATCH_REC_END(...)
 
#define CATCH_REC_OUT
 
#define CATCH_EMPTY()
 
#define CATCH_DEFER(id)
 
#define CATCH_REC_GET_END2()
 
#define CATCH_REC_GET_END1(...)
 
#define CATCH_REC_GET_END(...)
 
#define CATCH_REC_NEXT0(test, next, ...)
 
#define CATCH_REC_NEXT1(test, next)
 
#define CATCH_REC_NEXT(test, next)
 
#define CATCH_REC_LIST0(f, x, peek, ...)
 
#define CATCH_REC_LIST1(f, x, peek, ...)
 
#define CATCH_REC_LIST2(f, x, peek, ...)
 
#define CATCH_REC_LIST0_UD(f, userdata, x, peek, ...)
 
#define CATCH_REC_LIST1_UD(f, userdata, x, peek, ...)
 
#define CATCH_REC_LIST2_UD(f, userdata, x, peek, ...)
 
#define CATCH_REC_LIST_UD(f, userdata, ...)
 
#define CATCH_REC_LIST(f, ...)
 
#define INTERNAL_CATCH_EXPAND1(param)
 
#define INTERNAL_CATCH_EXPAND2(...)
 
#define INTERNAL_CATCH_DEF(...)
 
#define INTERNAL_CATCH_NOINTERNAL_CATCH_DEF
 
#define INTERNAL_CATCH_STRINGIZE(...)
 
#define INTERNAL_CATCH_STRINGIZE2(...)
 
#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param)
 
#define INTERNAL_CATCH_REMOVE_PARENS(...)
 
#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME2(Name, ...)
 
#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME3(Name, ...)
 
#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME(Name, ...)
 
#define INTERNAL_CATCH_MAKE_TYPE_LIST(types)
 
#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(types)
 
#define INTERNAL_CATCH_TESTCASE2(TestName, ...)
 
#define INTERNAL_CATCH_TESTCASE(...)
 
#define INTERNAL_CATCH_METHOD_AS_TEST_CASE(QualifiedMethod, ...)
 
#define INTERNAL_CATCH_TEST_CASE_METHOD2(TestName, ClassName, ...)
 
#define INTERNAL_CATCH_TEST_CASE_METHOD(ClassName, ...)
 
#define INTERNAL_CATCH_REGISTER_TESTCASE(Function, ...)
 
#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_2(TestName, TestFunc, Name, Tags, ...)
 
#define CATCH_INTERNAL_CHECK_UNIQUE_TYPES(...)
 
#define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...)
 
#define INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestName, Name, ...)
 
#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, TmplTypes, TypesList)
 
#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)
 
#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, ...)
 
#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD(ClassName, Name, Tags, ...)
 
#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, TmplTypes, TypesList)
 
#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD(ClassName, Name, Tags, ...)
 
#define CATCH_INTERNAL_STRINGIFY(...)
 
#define INTERNAL_CATCH_TRY
 
#define INTERNAL_CATCH_CATCH(capturer)
 
#define INTERNAL_CATCH_REACT(handler)
 
#define INTERNAL_CATCH_TEST(macroName, resultDisposition, ...)
 
#define INTERNAL_CATCH_IF(macroName, resultDisposition, ...)
 
#define INTERNAL_CATCH_ELSE(macroName, resultDisposition, ...)
 
#define INTERNAL_CATCH_NO_THROW(macroName, resultDisposition, ...)
 
#define INTERNAL_CATCH_THROWS(macroName, resultDisposition, ...)
 
#define INTERNAL_CATCH_THROWS_AS(macroName, exceptionType, resultDisposition, expr)
 
#define INTERNAL_CATCH_MSG(macroName, messageType, resultDisposition, ...)
 
#define INTERNAL_CATCH_CAPTURE(varName, macroName, ...)
 
#define INTERNAL_CATCH_INFO(macroName, log)
 
#define INTERNAL_CATCH_UNSCOPED_INFO(macroName, log)
 
#define INTERNAL_CATCH_THROWS_STR_MATCHES(macroName, resultDisposition, matcher, ...)
 
#define INTERNAL_CATCH_SECTION(...)
 
#define INTERNAL_CATCH_DYNAMIC_SECTION(...)
 
#define BENCHMARK(name)
 
#define INTERNAL_CATCH_TRANSLATE_EXCEPTION2(translatorName, signature)
 
#define INTERNAL_CATCH_TRANSLATE_EXCEPTION(signature)
 
#define INTERNAL_CHECK_THAT(macroName, matcher, resultDisposition, arg)
 
#define INTERNAL_CATCH_THROWS_MATCHES(macroName, exceptionType, resultDisposition, matcher, ...)
 
#define CATCH_PREPARE_EXCEPTION(type, msg)
 
#define CATCH_INTERNAL_ERROR(msg)
 
#define CATCH_ERROR(msg)
 
#define CATCH_RUNTIME_ERROR(msg)
 
#define CATCH_ENFORCE(condition, msg)
 
#define GENERATE(...)
 
#define GENERATE_COPY(...)
 
#define GENERATE_REF(...)
 
#define REQUIRE(...)
 
#define REQUIRE_FALSE(...)
 
#define REQUIRE_THROWS(...)
 
#define REQUIRE_THROWS_AS(expr, exceptionType)
 
#define REQUIRE_THROWS_WITH(expr, matcher)
 
#define REQUIRE_THROWS_MATCHES(expr, exceptionType, matcher)
 
#define REQUIRE_NOTHROW(...)
 
#define CHECK(...)
 
#define CHECK_FALSE(...)
 
#define CHECKED_IF(...)
 
#define CHECKED_ELSE(...)
 
#define CHECK_NOFAIL(...)
 
#define CHECK_THROWS(...)
 
#define CHECK_THROWS_AS(expr, exceptionType)
 
#define CHECK_THROWS_WITH(expr, matcher)
 
#define CHECK_THROWS_MATCHES(expr, exceptionType, matcher)
 
#define CHECK_NOTHROW(...)
 
#define CHECK_THAT(arg, matcher)
 
#define REQUIRE_THAT(arg, matcher)
 
#define INFO(msg)
 
#define UNSCOPED_INFO(msg)
 
#define WARN(msg)
 
#define CAPTURE(...)
 
#define TEST_CASE(...)
 
#define TEST_CASE_METHOD(className, ...)
 
#define METHOD_AS_TEST_CASE(method, ...)
 
#define REGISTER_TEST_CASE(Function, ...)
 
#define SECTION(...)
 
#define DYNAMIC_SECTION(...)
 
#define FAIL(...)
 
#define FAIL_CHECK(...)
 
#define SUCCEED(...)
 
#define ANON_TEST_CASE()
 
#define TEMPLATE_TEST_CASE(...)
 
#define TEMPLATE_TEST_CASE_METHOD(className, ...)
 
#define TEMPLATE_PRODUCT_TEST_CASE(...)
 
#define TEMPLATE_PRODUCT_TEST_CASE_METHOD(className, ...)
 
#define STATIC_REQUIRE(...)
 
#define STATIC_REQUIRE_FALSE(...)
 
#define CATCH_TRANSLATE_EXCEPTION(signature)
 
#define SCENARIO(...)
 
#define SCENARIO_METHOD(className, ...)
 
#define GIVEN(desc)
 
#define AND_GIVEN(desc)
 
#define WHEN(desc)
 
#define AND_WHEN(desc)
 
#define THEN(desc)
 
#define AND_THEN(desc)
 

Enumerations

enum class  Catch::Verbosity {
  Catch::Quiet = 0 , Catch::Normal , Catch::High , Catch::Quiet = 0 ,
  Catch::Normal , Catch::High
}
 

Functions

unsigned int Catch::rngSeed ()
 
std::ostream & operator<< (std::ostream &, Catch_global_namespace_dummy)
 
std::ostream & Catch::operator<< (std::ostream &os, SourceLineInfo const &info)
 
template<typename T >
T const & Catch::operator+ (T const &value, StreamEndStop)
 
bool Catch::matchTest (TestCase const &testCase, TestSpec const &testSpec, IConfig const &config)
 
std::vector< TestCaseCatch::filterTests (std::vector< TestCase > const &testCases, TestSpec const &testSpec, IConfig const &config)
 
std::vector< TestCase > const & Catch::getAllTestCasesSorted (IConfig const &config)
 
auto Catch::operator+ (StringRef const &lhs, StringRef const &rhs) -> std::string
 
auto Catch::operator+ (StringRef const &lhs, const char *rhs) -> std::string
 
auto Catch::operator+ (char const *lhs, StringRef const &rhs) -> std::string
 
auto Catch::operator+= (std::string &lhs, StringRef const &rhs) -> std::string &
 
auto Catch::operator<< (std::ostream &os, StringRef const &str) -> std::ostream &
 
auto Catch::operator""_sr (char const *rawChars, std::size_t size) noexcept -> StringRef
 
auto operator""_catch_sr (char const *rawChars, std::size_t size) noexcept -> Catch::StringRef
 
auto Catch::makeTestInvoker (void(*testAsFunction)()) noexcept -> ITestInvoker *
 
template<typename C >
auto Catch::makeTestInvoker (void(C::*testAsMethod)()) noexcept -> ITestInvoker *
 
bool Catch::isOk (ResultWas::OfType resultType)
 
bool Catch::isJustInfo (int flags)
 
ResultDisposition::Flags Catch::operator| (ResultDisposition::Flags lhs, ResultDisposition::Flags rhs)
 
bool Catch::shouldContinueOnFailure (int flags)
 
bool Catch::isFalseTest (int flags)
 
bool Catch::shouldSuppressFailure (int flags)
 
std::ostream & Catch::cout ()
 
std::ostream & Catch::cerr ()
 
std::ostream & Catch::clog ()
 
auto Catch::makeStream (StringRef const &filename) -> IStream const *
 
std::string Catch::Detail::rawMemoryToString (const void *object, std::size_t size)
 
template<typename T >
std::string Catch::Detail::rawMemoryToString (const T &object)
 
template<typename E >
std::string Catch::Detail::convertUnknownEnumToString (E e)
 
template<typename T >
std::enable_if<!std::is_enum< T >::value &&!std::is_base_of< std::exception, T >::value, std::string >::type Catch::Detail::convertUnstreamable (T const &)
 
template<typename T >
std::enable_if<!std::is_enum< T >::value &&std::is_base_of< std::exception, T >::value, std::string >::type Catch::Detail::convertUnstreamable (T const &ex)
 
template<typename T >
std::enable_if< std::is_enum< T >::value, std::string >::type Catch::Detail::convertUnstreamable (T const &value)
 
template<typename T >
std::string Catch::Detail::stringify (const T &e)
 
template<typename InputIterator >
std::string Catch::Detail::rangeToString (InputIterator first, InputIterator last)
 
template<typename Range >
std::string Catch::rangeToString (Range const &range)
 
template<typename Allocator >
std::string Catch::rangeToString (std::vector< bool, Allocator > const &v)
 
void Catch::formatReconstructedExpression (std::ostream &os, std::string const &lhs, StringRef op, std::string const &rhs)
 
template<typename LhsT , typename RhsT >
auto Catch::compareEqual (LhsT const &lhs, RhsT const &rhs) -> bool
 
template<typename T >
auto Catch::compareEqual (T *const &lhs, int rhs) -> bool
 
template<typename T >
auto Catch::compareEqual (T *const &lhs, long rhs) -> bool
 
template<typename T >
auto Catch::compareEqual (int lhs, T *const &rhs) -> bool
 
template<typename T >
auto Catch::compareEqual (long lhs, T *const &rhs) -> bool
 
template<typename LhsT , typename RhsT >
auto Catch::compareNotEqual (LhsT const &lhs, RhsT &&rhs) -> bool
 
template<typename T >
auto Catch::compareNotEqual (T *const &lhs, int rhs) -> bool
 
template<typename T >
auto Catch::compareNotEqual (T *const &lhs, long rhs) -> bool
 
template<typename T >
auto Catch::compareNotEqual (int lhs, T *const &rhs) -> bool
 
template<typename T >
auto Catch::compareNotEqual (long lhs, T *const &rhs) -> bool
 
void Catch::handleExpression (ITransientExpression const &expr)
 
template<typename T >
void Catch::handleExpression (ExprLhs< T > const &expr)
 
IResultCaptureCatch::getResultCapture ()
 
void Catch::handleExceptionMatchExpr (AssertionHandler &handler, std::string const &str, StringRef const &matcherString)
 
auto Catch::getCurrentNanosecondsSinceEpoch () -> uint64_t
 
auto Catch::getEstimatedClockResolution () -> uint64_t
 
IRegistryHub const & Catch::getRegistryHub ()
 
IMutableRegistryHubCatch::getMutableRegistryHub ()
 
void Catch::cleanUp ()
 
std::string Catch::translateActiveException ()
 
Detail::Approx Catch::literals::operator""_a (long double val)
 
Detail::Approx Catch::literals::operator""_a (unsigned long long val)
 
bool Catch::startsWith (std::string const &s, std::string const &prefix)
 
bool Catch::startsWith (std::string const &s, char prefix)
 
bool Catch::endsWith (std::string const &s, std::string const &suffix)
 
bool Catch::endsWith (std::string const &s, char suffix)
 
bool Catch::contains (std::string const &s, std::string const &infix)
 
void Catch::toLowerInPlace (std::string &s)
 
std::string Catch::toLower (std::string const &s)
 
std::string Catch::trim (std::string const &str)
 
bool Catch::replaceInPlace (std::string &str, std::string const &replaceThis, std::string const &withThis)
 
Floating::WithinUlpsMatcher Catch::Matchers::WithinULP (double target, int maxUlpDiff)
 
Floating::WithinUlpsMatcher Catch::Matchers::WithinULP (float target, int maxUlpDiff)
 
Floating::WithinAbsMatcher Catch::Matchers::WithinAbs (double target, double margin)
 
std::string Catch::Matchers::Generic::Detail::finalizeDescription (const std::string &desc)
 
template<typename T >
Generic::PredicateMatcher< TCatch::Matchers::Predicate (std::function< bool(T const &)> const &predicate, std::string const &description="")
 
StdString::EqualsMatcher Catch::Matchers::Equals (std::string const &str, CaseSensitive::Choice caseSensitivity)
 
StdString::ContainsMatcher Catch::Matchers::Contains (std::string const &str, CaseSensitive::Choice caseSensitivity)
 
StdString::EndsWithMatcher Catch::Matchers::EndsWith (std::string const &str, CaseSensitive::Choice caseSensitivity)
 
StdString::StartsWithMatcher Catch::Matchers::StartsWith (std::string const &str, CaseSensitive::Choice caseSensitivity)
 
StdString::RegexMatcher Catch::Matchers::Matches (std::string const &regex, CaseSensitive::Choice caseSensitivity)
 
template<typename T >
Vector::ContainsMatcher< TCatch::Matchers::Contains (std::vector< T > const &comparator)
 
template<typename T >
Vector::ContainsElementMatcher< TCatch::Matchers::VectorContains (T const &comparator)
 
template<typename T >
Vector::EqualsMatcher< TCatch::Matchers::Equals (std::vector< T > const &comparator)
 
template<typename T >
Vector::ApproxMatcher< TCatch::Matchers::Approx (std::vector< T > const &comparator)
 
template<typename T >
Vector::UnorderedEqualsMatcher< TCatch::Matchers::UnorderedEquals (std::vector< T > const &target)
 
void Catch::handleExceptionMatchExpr (AssertionHandler &handler, StringMatcher const &matcher, StringRef const &matcherString)
 
template<typename ArgT , typename MatcherT >
auto Catch::makeMatchExpr (ArgT const &arg, MatcherT const &matcher, StringRef const &matcherString) -> MatchExpr< ArgT, MatcherT >
 
void Catch::throw_exception (std::exception const &e)
 
template<typename T , typename... Args>
std::unique_ptr< TCatch::Generators::pf::make_unique (Args &&... args)
 
template<typename T >
GeneratorWrapper< TCatch::Generators::value (T &&value)
 
template<typename T >
GeneratorWrapper< TCatch::Generators::values (std::initializer_list< T > values)
 
template<typename... Ts>
GeneratorWrapper< std::tuple< Ts... > > Catch::Generators::table (std::initializer_list< std::tuple< typename std::decay< Ts >::type... > > tuples)
 
template<typename T , typename... Gs>
auto Catch::Generators::makeGenerators (GeneratorWrapper< T > &&generator, Gs... moreGenerators) -> Generators< T >
 
template<typename T >
auto Catch::Generators::makeGenerators (GeneratorWrapper< T > &&generator) -> Generators< T >
 
template<typename T , typename... Gs>
auto Catch::Generators::makeGenerators (T &&val, Gs... moreGenerators) -> Generators< T >
 
template<typename T , typename U , typename... Gs>
auto Catch::Generators::makeGenerators (as< T >, U &&val, Gs... moreGenerators) -> Generators< T >
 
auto Catch::Generators::acquireGeneratorTracker (SourceLineInfo const &lineInfo) -> IGeneratorTracker &
 
template<typename L >
auto Catch::Generators::generate (SourceLineInfo const &lineInfo, L const &generatorExpression) -> decltype(std::declval< decltype(generatorExpression())>().get())
 
template<typename T >
GeneratorWrapper< TCatch::Generators::take (size_t target, GeneratorWrapper< T > &&generator)
 
template<typename T , typename Predicate >
GeneratorWrapper< TCatch::Generators::filter (Predicate &&pred, GeneratorWrapper< T > &&generator)
 
template<typename T >
GeneratorWrapper< TCatch::Generators::repeat (size_t repeats, GeneratorWrapper< T > &&generator)
 
template<typename Func , typename U , typename T = MapFunctionReturnType<Func, U>>
GeneratorWrapper< TCatch::Generators::map (Func &&function, GeneratorWrapper< U > &&generator)
 
template<typename T >
GeneratorWrapper< std::vector< T > > Catch::Generators::chunk (size_t size, GeneratorWrapper< T > &&generator)
 
IMutableContextCatch::getCurrentMutableContext ()
 
IContextCatch::getCurrentContext ()
 
void Catch::cleanUpContext ()
 
template<typename T >
std::enable_if< std::is_integral< T >::value &&!std::is_same< T, bool >::value, GeneratorWrapper< T > >::type Catch::Generators::random (T a, T b)
 
template<typename T >
std::enable_if< std::is_floating_point< T >::value, GeneratorWrapper< T > >::type Catch::Generators::random (T a, T b)
 
template<typename T >
GeneratorWrapper< TCatch::Generators::range (T const &start, T const &end, T const &step)
 
template<typename T >
GeneratorWrapper< TCatch::Generators::range (T const &start, T const &end)
 
TestCase Catch::makeTestCase (ITestInvoker *_testCase, std::string const &_className, NameAndTags const &nameAndTags, SourceLineInfo const &_lineInfo)
 

Variables

not_this_one Catch::begin (...)
 
not_this_one Catch::end (...)
 

Macro Definition Documentation

◆ AND_GIVEN

#define AND_GIVEN ( desc)
Value:
INTERNAL_CATCH_DYNAMIC_SECTION( "And given: " << desc )
#define INTERNAL_CATCH_DYNAMIC_SECTION(...)
Definition catch.hpp:2559

Definition at line 14816 of file catch.hpp.

◆ AND_THEN

#define AND_THEN ( desc)
Value:
INTERNAL_CATCH_DYNAMIC_SECTION( " And: " << desc )

Definition at line 14820 of file catch.hpp.

◆ AND_WHEN

#define AND_WHEN ( desc)
Value:
INTERNAL_CATCH_DYNAMIC_SECTION( " And when: " << desc )

Definition at line 14818 of file catch.hpp.

◆ ANON_TEST_CASE

#define ANON_TEST_CASE ( )
Value:
#define INTERNAL_CATCH_TESTCASE(...)
Definition catch.hpp:878

Definition at line 14785 of file catch.hpp.

◆ BENCHMARK

#define BENCHMARK ( name)
Value:
for( Catch::BenchmarkLooper looper( name ); looper; looper.increment() )
std::string name

Definition at line 2607 of file catch.hpp.

2607#define BENCHMARK( name ) \
2608 for( Catch::BenchmarkLooper looper( name ); looper; looper.increment() )

◆ CAPTURE

#define CAPTURE ( ...)
Value:
INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), "CAPTURE",__VA_ARGS__ )
#define INTERNAL_CATCH_CAPTURE(varName, macroName,...)
Definition catch.hpp:2410
#define INTERNAL_CATCH_UNIQUE_NAME(name)
Definition catch.hpp:386

Definition at line 14774 of file catch.hpp.

◆ CATCH_CATCH_ALL

#define CATCH_CATCH_ALL   if ((false))

Definition at line 370 of file catch.hpp.

◆ CATCH_CATCH_ANON

#define CATCH_CATCH_ANON ( type)
Value:
if ((false))

Definition at line 371 of file catch.hpp.

◆ CATCH_CONFIG_COUNTER

#define CATCH_CONFIG_COUNTER

Definition at line 305 of file catch.hpp.

◆ CATCH_CONFIG_CPP11_TO_STRING

#define CATCH_CONFIG_CPP11_TO_STRING

Definition at line 320 of file catch.hpp.

◆ CATCH_CONFIG_DISABLE_EXCEPTIONS

#define CATCH_CONFIG_DISABLE_EXCEPTIONS

Definition at line 348 of file catch.hpp.

◆ CATCH_CONFIG_POSIX_SIGNALS

#define CATCH_CONFIG_POSIX_SIGNALS

Definition at line 312 of file catch.hpp.

◆ CATCH_CONFIG_WCHAR

#define CATCH_CONFIG_WCHAR

Definition at line 316 of file catch.hpp.

◆ CATCH_DEFER

#define CATCH_DEFER ( id)
Value:
#define CATCH_EMPTY()
Definition catch.hpp:685

Definition at line 686 of file catch.hpp.

◆ CATCH_EMPTY

#define CATCH_EMPTY ( )

Definition at line 685 of file catch.hpp.

◆ CATCH_ENFORCE

#define CATCH_ENFORCE ( condition,
msg )
Value:
do{ if( !(condition) ) CATCH_ERROR( msg ); } while(false)
#define CATCH_ERROR(msg)
Definition catch.hpp:3490

Definition at line 3494 of file catch.hpp.

3494#define CATCH_ENFORCE( condition, msg ) \
3495 do{ if( !(condition) ) CATCH_ERROR( msg ); } while(false)

◆ CATCH_ERROR

#define CATCH_ERROR ( msg)
Value:
void throw_exception(std::exception const &e)
#define CATCH_PREPARE_EXCEPTION(type, msg)
Definition catch.hpp:3486

Definition at line 3490 of file catch.hpp.

3490#define CATCH_ERROR( msg ) \
3491 Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::domain_error, msg ))

◆ CATCH_INTERNAL_CHECK_UNIQUE_TYPES

#define CATCH_INTERNAL_CHECK_UNIQUE_TYPES ( ...)
Value:
static_assert(Catch::is_unique<__VA_ARGS__>::value,"Duplicate type detected in declaration of template test case");

Definition at line 931 of file catch.hpp.

◆ CATCH_INTERNAL_CONFIG_COUNTER

#define CATCH_INTERNAL_CONFIG_COUNTER

Definition at line 265 of file catch.hpp.

◆ CATCH_INTERNAL_CONFIG_POSIX_SIGNALS

#define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS

Definition at line 165 of file catch.hpp.

◆ CATCH_INTERNAL_ERROR

#define CATCH_INTERNAL_ERROR ( msg)
Value:
Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::logic_error, CATCH_INTERNAL_LINEINFO << ": Internal Catch error: " << msg))
#define CATCH_INTERNAL_LINEINFO
Definition catch.hpp:458

Definition at line 3488 of file catch.hpp.

3488#define CATCH_INTERNAL_ERROR( msg ) \
3489 Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::logic_error, CATCH_INTERNAL_LINEINFO << ": Internal Catch error: " << msg))

◆ CATCH_INTERNAL_LINEINFO

#define CATCH_INTERNAL_LINEINFO    ::Catch::SourceLineInfo( __FILE__, static_cast<std::size_t>( __LINE__ ) )

Definition at line 458 of file catch.hpp.

458#define CATCH_INTERNAL_LINEINFO \
459 ::Catch::SourceLineInfo( __FILE__, static_cast<std::size_t>( __LINE__ ) )

◆ CATCH_INTERNAL_STRINGIFY

#define CATCH_INTERNAL_STRINGIFY ( ...)
Value:
#__VA_ARGS__

Definition at line 2305 of file catch.hpp.

◆ CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS

#define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS

Definition at line 360 of file catch.hpp.

◆ CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS

#define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS

Definition at line 356 of file catch.hpp.

◆ CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS

#define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS

Definition at line 364 of file catch.hpp.

◆ CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS

#define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS

Definition at line 361 of file catch.hpp.

◆ CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS

#define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS

Definition at line 357 of file catch.hpp.

◆ CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS

#define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS

Definition at line 365 of file catch.hpp.

◆ CATCH_PREPARE_EXCEPTION

#define CATCH_PREPARE_EXCEPTION ( type,
msg )
Value:
type( ( Catch::ReusableStringStream() << msg ).str() )
yh_object_type type
Definition yubihsm.h:672

Definition at line 3486 of file catch.hpp.

3486#define CATCH_PREPARE_EXCEPTION( type, msg ) \
3487 type( ( Catch::ReusableStringStream() << msg ).str() )

◆ CATCH_REC_END

#define CATCH_REC_END ( ...)

Definition at line 682 of file catch.hpp.

◆ CATCH_REC_GET_END

#define CATCH_REC_GET_END ( ...)
Value:
#define CATCH_REC_GET_END1(...)
Definition catch.hpp:689

Definition at line 690 of file catch.hpp.

◆ CATCH_REC_GET_END1

#define CATCH_REC_GET_END1 ( ...)
Value:
#define CATCH_REC_GET_END2()
Definition catch.hpp:688

Definition at line 689 of file catch.hpp.

◆ CATCH_REC_GET_END2

#define CATCH_REC_GET_END2 ( )
Value:
#define CATCH_REC_END(...)
Definition catch.hpp:682

Definition at line 688 of file catch.hpp.

◆ CATCH_REC_LIST

#define CATCH_REC_LIST ( f,
... )
Value:
CATCH_RECURSE(CATCH_REC_LIST2(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0))
#define CATCH_REC_LIST2(f, x, peek,...)
Definition catch.hpp:697
#define CATCH_RECURSE(...)
Definition catch.hpp:679

Definition at line 708 of file catch.hpp.

◆ CATCH_REC_LIST0

#define CATCH_REC_LIST0 ( f,
x,
peek,
... )
Value:
, f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ )
#define CATCH_DEFER(id)
Definition catch.hpp:686
#define CATCH_REC_NEXT(test, next)
Definition catch.hpp:693
#define CATCH_REC_LIST1(f, x, peek,...)
Definition catch.hpp:696

Definition at line 695 of file catch.hpp.

◆ CATCH_REC_LIST0_UD

#define CATCH_REC_LIST0_UD ( f,
userdata,
x,
peek,
... )
Value:
, f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ )
#define CATCH_REC_LIST1_UD(f, userdata, x, peek,...)
Definition catch.hpp:700

Definition at line 699 of file catch.hpp.

◆ CATCH_REC_LIST1

#define CATCH_REC_LIST1 ( f,
x,
peek,
... )
Value:
, f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0) ) ( f, peek, __VA_ARGS__ )
#define CATCH_REC_LIST0(f, x, peek,...)
Definition catch.hpp:695

Definition at line 696 of file catch.hpp.

◆ CATCH_REC_LIST1_UD

#define CATCH_REC_LIST1_UD ( f,
userdata,
x,
peek,
... )
Value:
, f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0_UD) ) ( f, userdata, peek, __VA_ARGS__ )
#define CATCH_REC_LIST0_UD(f, userdata, x, peek,...)
Definition catch.hpp:699

Definition at line 700 of file catch.hpp.

◆ CATCH_REC_LIST2

#define CATCH_REC_LIST2 ( f,
x,
peek,
... )
Value:
f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ )

Definition at line 697 of file catch.hpp.

◆ CATCH_REC_LIST2_UD

#define CATCH_REC_LIST2_UD ( f,
userdata,
x,
peek,
... )
Value:
f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ )

Definition at line 701 of file catch.hpp.

◆ CATCH_REC_LIST_UD

#define CATCH_REC_LIST_UD ( f,
userdata,
... )
Value:
CATCH_RECURSE(CATCH_REC_LIST2_UD(f, userdata, __VA_ARGS__, ()()(), ()()(), ()()(), 0))
#define CATCH_REC_LIST2_UD(f, userdata, x, peek,...)
Definition catch.hpp:701

Definition at line 706 of file catch.hpp.

◆ CATCH_REC_NEXT

#define CATCH_REC_NEXT ( test,
next )
Value:
#define CATCH_REC_NEXT1(test, next)
Definition catch.hpp:692
#define CATCH_REC_GET_END(...)
Definition catch.hpp:690

Definition at line 693 of file catch.hpp.

◆ CATCH_REC_NEXT0

#define CATCH_REC_NEXT0 ( test,
next,
... )
Value:
#define CATCH_REC_OUT
Definition catch.hpp:683

Definition at line 691 of file catch.hpp.

◆ CATCH_REC_NEXT1

#define CATCH_REC_NEXT1 ( test,
next )
Value:
CATCH_DEFER ( CATCH_REC_NEXT0 ) ( test, next, 0)
#define CATCH_REC_NEXT0(test, next,...)
Definition catch.hpp:691

Definition at line 692 of file catch.hpp.

◆ CATCH_REC_OUT

#define CATCH_REC_OUT

Definition at line 683 of file catch.hpp.

◆ CATCH_RECURSE

#define CATCH_RECURSE ( ...)
Value:
#define CATCH_RECURSION_LEVEL5(...)
Definition catch.hpp:671

Definition at line 679 of file catch.hpp.

◆ CATCH_RECURSION_LEVEL0

#define CATCH_RECURSION_LEVEL0 ( ...)
Value:
__VA_ARGS__

Definition at line 666 of file catch.hpp.

◆ CATCH_RECURSION_LEVEL1

#define CATCH_RECURSION_LEVEL1 ( ...)
Value:

Definition at line 667 of file catch.hpp.

◆ CATCH_RECURSION_LEVEL2

#define CATCH_RECURSION_LEVEL2 ( ...)
Value:

Definition at line 668 of file catch.hpp.

◆ CATCH_RECURSION_LEVEL3

#define CATCH_RECURSION_LEVEL3 ( ...)
Value:

Definition at line 669 of file catch.hpp.

◆ CATCH_RECURSION_LEVEL4

#define CATCH_RECURSION_LEVEL4 ( ...)
Value:

Definition at line 670 of file catch.hpp.

◆ CATCH_RECURSION_LEVEL5

#define CATCH_RECURSION_LEVEL5 ( ...)
Value:

Definition at line 671 of file catch.hpp.

◆ CATCH_REGISTER_TAG_ALIAS

#define CATCH_REGISTER_TAG_ALIAS ( alias,
spec )
Value:
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \
#define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS
Definition catch.hpp:361

Definition at line 470 of file catch.hpp.

470#define CATCH_REGISTER_TAG_ALIAS( alias, spec ) \
471 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
472 namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \
473 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS

◆ CATCH_RUNTIME_ERROR

#define CATCH_RUNTIME_ERROR ( msg)
Value:
Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::runtime_error, msg ))

Definition at line 3492 of file catch.hpp.

3492#define CATCH_RUNTIME_ERROR( msg ) \
3493 Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::runtime_error, msg ))

◆ CATCH_TRANSLATE_EXCEPTION

#define CATCH_TRANSLATE_EXCEPTION ( signature)
Value:
#define INTERNAL_CATCH_TRANSLATE_EXCEPTION(signature)
Definition catch.hpp:2729

Definition at line 14809 of file catch.hpp.

◆ CATCH_TRY

#define CATCH_TRY   if ((true))

Definition at line 369 of file catch.hpp.

◆ CATCH_VERSION_MAJOR

#define CATCH_VERSION_MAJOR   2

Definition at line 16 of file catch.hpp.

◆ CATCH_VERSION_MINOR

#define CATCH_VERSION_MINOR   7

Definition at line 17 of file catch.hpp.

◆ CATCH_VERSION_PATCH

#define CATCH_VERSION_PATCH   2

Definition at line 18 of file catch.hpp.

◆ CHECK

#define CHECK ( ...)
Value:
#define INTERNAL_CATCH_TEST(macroName, resultDisposition,...)
Definition catch.hpp:2328

Definition at line 14751 of file catch.hpp.

◆ CHECK_FALSE

#define CHECK_FALSE ( ...)

◆ CHECK_NOFAIL

#define CHECK_NOFAIL ( ...)

◆ CHECK_NOTHROW

#define CHECK_NOTHROW ( ...)
Value:
#define INTERNAL_CATCH_NO_THROW(macroName, resultDisposition,...)
Definition catch.hpp:2351

Definition at line 14763 of file catch.hpp.

◆ CHECK_THAT

#define CHECK_THAT ( arg,
matcher )
Value:
#define INTERNAL_CHECK_THAT(macroName, matcher, resultDisposition, arg)
Definition catch.hpp:3404

Definition at line 14766 of file catch.hpp.

◆ CHECK_THROWS

#define CHECK_THROWS ( ...)
Value:
#define INTERNAL_CATCH_THROWS(macroName, resultDisposition,...)
Definition catch.hpp:2365

Definition at line 14757 of file catch.hpp.

◆ CHECK_THROWS_AS

#define CHECK_THROWS_AS ( expr,
exceptionType )
Value:
#define INTERNAL_CATCH_THROWS_AS(macroName, exceptionType, resultDisposition, expr)
Definition catch.hpp:2382

Definition at line 14758 of file catch.hpp.

◆ CHECK_THROWS_MATCHES

#define CHECK_THROWS_MATCHES ( expr,
exceptionType,
matcher )
Value:
INTERNAL_CATCH_THROWS_MATCHES( "CHECK_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::ContinueOnFailure, matcher, expr )
#define INTERNAL_CATCH_THROWS_MATCHES(macroName, exceptionType, resultDisposition, matcher,...)
Definition catch.hpp:3414

Definition at line 14761 of file catch.hpp.

◆ CHECK_THROWS_WITH

#define CHECK_THROWS_WITH ( expr,
matcher )
Value:
#define INTERNAL_CATCH_THROWS_STR_MATCHES(macroName, resultDisposition, matcher,...)
Definition catch.hpp:2424

Definition at line 14759 of file catch.hpp.

◆ CHECKED_ELSE

#define CHECKED_ELSE ( ...)
Value:
#define INTERNAL_CATCH_ELSE(macroName, resultDisposition,...)
Definition catch.hpp:2346

Definition at line 14754 of file catch.hpp.

◆ CHECKED_IF

#define CHECKED_IF ( ...)
Value:
#define INTERNAL_CATCH_IF(macroName, resultDisposition,...)
Definition catch.hpp:2341

Definition at line 14753 of file catch.hpp.

◆ DYNAMIC_SECTION

#define DYNAMIC_SECTION ( ...)
Value:

Definition at line 14781 of file catch.hpp.

◆ FAIL

#define FAIL ( ...)
Value:
#define INTERNAL_CATCH_MSG(macroName, messageType, resultDisposition,...)
Definition catch.hpp:2402

Definition at line 14782 of file catch.hpp.

◆ FAIL_CHECK

#define FAIL_CHECK ( ...)

◆ GENERATE

#define GENERATE ( ...)
Value:
Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [ ]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } )
auto generate(SourceLineInfo const &lineInfo, L const &generatorExpression) -> decltype(std::declval< decltype(generatorExpression())>().get())

Definition at line 3686 of file catch.hpp.

3686#define GENERATE( ... ) \
3687 Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [ ]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } )

◆ GENERATE_COPY

#define GENERATE_COPY ( ...)
Value:
Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [=]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } )

Definition at line 3688 of file catch.hpp.

3688#define GENERATE_COPY( ... ) \
3689 Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [=]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } )

◆ GENERATE_REF

#define GENERATE_REF ( ...)
Value:
Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } )

Definition at line 3690 of file catch.hpp.

3690#define GENERATE_REF( ... ) \
3691 Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } )

◆ GIVEN

#define GIVEN ( desc)
Value:
INTERNAL_CATCH_DYNAMIC_SECTION( " Given: " << desc )

Definition at line 14815 of file catch.hpp.

◆ INFO

#define INFO ( msg)
Value:
INTERNAL_CATCH_INFO( "INFO", msg )
#define INTERNAL_CATCH_INFO(macroName, log)
Definition catch.hpp:2415

Definition at line 14771 of file catch.hpp.

◆ INTERNAL_CATCH_CAPTURE

#define INTERNAL_CATCH_CAPTURE ( varName,
macroName,
... )
Value:
auto varName = Catch::Capturer( macroName, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info, #__VA_ARGS__ ); \
varName.captureValues( 0, __VA_ARGS__ )

Definition at line 2410 of file catch.hpp.

2410#define INTERNAL_CATCH_CAPTURE( varName, macroName, ... ) \
2411 auto varName = Catch::Capturer( macroName, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info, #__VA_ARGS__ ); \
2412 varName.captureValues( 0, __VA_ARGS__ )

◆ INTERNAL_CATCH_CATCH

#define INTERNAL_CATCH_CATCH ( capturer)

Definition at line 2316 of file catch.hpp.

◆ INTERNAL_CATCH_DEF

#define INTERNAL_CATCH_DEF ( ...)
Value:
INTERNAL_CATCH_DEF __VA_ARGS__
#define INTERNAL_CATCH_DEF(...)
Definition catch.hpp:712

Definition at line 712 of file catch.hpp.

◆ INTERNAL_CATCH_DYNAMIC_SECTION

#define INTERNAL_CATCH_DYNAMIC_SECTION ( ...)
Value:
CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \
if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, (Catch::ReusableStringStream() << __VA_ARGS__).str() ) ) \
#define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS
Definition catch.hpp:365

Definition at line 2559 of file catch.hpp.

2559#define INTERNAL_CATCH_DYNAMIC_SECTION( ... ) \
2560 CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \
2561 if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, (Catch::ReusableStringStream() << __VA_ARGS__).str() ) ) \
2562 CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS

◆ INTERNAL_CATCH_ELSE

#define INTERNAL_CATCH_ELSE ( macroName,
resultDisposition,
... )
Value:
INTERNAL_CATCH_TEST( macroName, resultDisposition, __VA_ARGS__ ); \
if( !Catch::getResultCapture().lastAssertionPassed() )
IResultCapture & getResultCapture()

Definition at line 2346 of file catch.hpp.

2346#define INTERNAL_CATCH_ELSE( macroName, resultDisposition, ... ) \
2347 INTERNAL_CATCH_TEST( macroName, resultDisposition, __VA_ARGS__ ); \
2348 if( !Catch::getResultCapture().lastAssertionPassed() )

◆ INTERNAL_CATCH_EXPAND1

#define INTERNAL_CATCH_EXPAND1 ( param)
Value:
#define INTERNAL_CATCH_EXPAND2(...)
Definition catch.hpp:711

Definition at line 710 of file catch.hpp.

◆ INTERNAL_CATCH_EXPAND2

#define INTERNAL_CATCH_EXPAND2 ( ...)
Value:
INTERNAL_CATCH_NO## __VA_ARGS__

Definition at line 711 of file catch.hpp.

◆ INTERNAL_CATCH_IF

#define INTERNAL_CATCH_IF ( macroName,
resultDisposition,
... )
Value:
INTERNAL_CATCH_TEST( macroName, resultDisposition, __VA_ARGS__ ); \
if( Catch::getResultCapture().lastAssertionPassed() )

Definition at line 2341 of file catch.hpp.

2341#define INTERNAL_CATCH_IF( macroName, resultDisposition, ... ) \
2342 INTERNAL_CATCH_TEST( macroName, resultDisposition, __VA_ARGS__ ); \
2343 if( Catch::getResultCapture().lastAssertionPassed() )

◆ INTERNAL_CATCH_INFO

#define INTERNAL_CATCH_INFO ( macroName,
log )
Value:

Definition at line 2415 of file catch.hpp.

2415#define INTERNAL_CATCH_INFO( macroName, log ) \
2416 Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage )( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log );

◆ INTERNAL_CATCH_MAKE_TYPE_LIST

#define INTERNAL_CATCH_MAKE_TYPE_LIST ( types)
Value:
#define INTERNAL_CATCH_REMOVE_PARENS(...)
Definition catch.hpp:725

Definition at line 738 of file catch.hpp.

◆ INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES

#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES ( types)
Value:
#define CATCH_REC_LIST(f,...)
Definition catch.hpp:708
#define INTERNAL_CATCH_MAKE_TYPE_LIST(types)
Definition catch.hpp:738

Definition at line 740 of file catch.hpp.

740#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(types)\
741 CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,INTERNAL_CATCH_REMOVE_PARENS(types))

◆ INTERNAL_CATCH_METHOD_AS_TEST_CASE

#define INTERNAL_CATCH_METHOD_AS_TEST_CASE ( QualifiedMethod,
... )
Value:
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &QualifiedMethod ), CATCH_INTERNAL_LINEINFO, "&" #QualifiedMethod, Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \
auto makeTestInvoker(void(*testAsFunction)()) noexcept -> ITestInvoker *

Definition at line 882 of file catch.hpp.

882 #define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \
883 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
884 namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &QualifiedMethod ), CATCH_INTERNAL_LINEINFO, "&" #QualifiedMethod, Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \
885 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS

◆ INTERNAL_CATCH_MSG

#define INTERNAL_CATCH_MSG ( macroName,
messageType,
resultDisposition,
... )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::StringRef(), resultDisposition ); \
catchAssertionHandler.handleMessage( messageType, ( Catch::MessageStream() << __VA_ARGS__ + ::Catch::StreamEndStop() ).m_stream.str() ); \
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
} while( false )

Definition at line 2402 of file catch.hpp.

2402#define INTERNAL_CATCH_MSG( macroName, messageType, resultDisposition, ... ) \
2403 do { \
2404 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::StringRef(), resultDisposition ); \
2405 catchAssertionHandler.handleMessage( messageType, ( Catch::MessageStream() << __VA_ARGS__ + ::Catch::StreamEndStop() ).m_stream.str() ); \
2406 INTERNAL_CATCH_REACT( catchAssertionHandler ) \
2407 } while( false )

◆ INTERNAL_CATCH_NO_THROW

#define INTERNAL_CATCH_NO_THROW ( macroName,
resultDisposition,
... )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \
try { \
static_cast<void>(__VA_ARGS__); \
catchAssertionHandler.handleExceptionNotThrownAsExpected(); \
} \
catch( ... ) { \
catchAssertionHandler.handleUnexpectedInflightException(); \
} \
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
} while( false )
#define CATCH_INTERNAL_STRINGIFY(...)
Definition catch.hpp:2305

Definition at line 2351 of file catch.hpp.

2351#define INTERNAL_CATCH_NO_THROW( macroName, resultDisposition, ... ) \
2352 do { \
2353 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \
2354 try { \
2355 static_cast<void>(__VA_ARGS__); \
2356 catchAssertionHandler.handleExceptionNotThrownAsExpected(); \
2357 } \
2358 catch( ... ) { \
2359 catchAssertionHandler.handleUnexpectedInflightException(); \
2360 } \
2361 INTERNAL_CATCH_REACT( catchAssertionHandler ) \
2362 } while( false )

◆ INTERNAL_CATCH_NOINTERNAL_CATCH_DEF

#define INTERNAL_CATCH_NOINTERNAL_CATCH_DEF

Definition at line 713 of file catch.hpp.

◆ INTERNAL_CATCH_REACT

#define INTERNAL_CATCH_REACT ( handler)
Value:
handler.complete();

Definition at line 2325 of file catch.hpp.

◆ INTERNAL_CATCH_REGISTER_TESTCASE

#define INTERNAL_CATCH_REGISTER_TESTCASE ( Function,
... )
Value:
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( Function ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \

Definition at line 902 of file catch.hpp.

902 #define INTERNAL_CATCH_REGISTER_TESTCASE( Function, ... ) \
903 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
904 Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( Function ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \
905 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS

◆ INTERNAL_CATCH_REMOVE_PARENS

#define INTERNAL_CATCH_REMOVE_PARENS ( ...)
Value:
#define INTERNAL_CATCH_EXPAND1(param)
Definition catch.hpp:710

Definition at line 725 of file catch.hpp.

◆ INTERNAL_CATCH_SECTION

#define INTERNAL_CATCH_SECTION ( ...)
Value:
CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \
if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, __VA_ARGS__ ) ) \

Definition at line 2554 of file catch.hpp.

2554#define INTERNAL_CATCH_SECTION( ... ) \
2555 CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \
2556 if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, __VA_ARGS__ ) ) \
2557 CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS

◆ INTERNAL_CATCH_STRINGIZE

#define INTERNAL_CATCH_STRINGIZE ( ...)
Value:
#define INTERNAL_CATCH_STRINGIZE2(...)
Definition catch.hpp:716

Definition at line 714 of file catch.hpp.

◆ INTERNAL_CATCH_STRINGIZE2

#define INTERNAL_CATCH_STRINGIZE2 ( ...)
Value:
#__VA_ARGS__

Definition at line 716 of file catch.hpp.

◆ INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS

#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS ( param)
Value:

Definition at line 717 of file catch.hpp.

◆ INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE

#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE ( Name,
Tags,
... )
Value:
INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ),Name,Tags,__VA_ARGS__)
#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, TmplTypes, TypesList)
Definition catch.hpp:948

Definition at line 976 of file catch.hpp.

976 #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\
977 INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ),Name,Tags,__VA_ARGS__)

◆ INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2

#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2 ( TestName,
TestFuncName,
Name,
Tags,
TmplTypes,
TypesList )
Value:
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
template<typename TestType> static void TestFuncName(); \
namespace { \
template<typename... Types> \
struct TestName { \
TestName() { \
CATCH_INTERNAL_CHECK_UNIQUE_TYPES(Types...) \
int index = 0; \
using expander = int[]; \
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++, 0)... };/* NOLINT */\
} \
}; \
static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \
using TestInit = Catch::combine<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)> \
::with_types<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(TypesList)>::into<TestName>::type; \
TestInit(); \
return 0; \
}(); \
} \
CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
template<typename TestType> \
static void TestFuncName()
#define CATCH_INTERNAL_LINEINFO
#define CATCH_REC_LIST(f,...)
#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param)
#define INTERNAL_CATCH_REMOVE_PARENS(...)
#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(types)
Definition catch.hpp:740

Definition at line 948 of file catch.hpp.

948 #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, TmplTypes, TypesList) \
949 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
950 template<typename TestType> static void TestFuncName(); \
951 namespace { \
952 template<typename... Types> \
953 struct TestName { \
954 TestName() { \
955 CATCH_INTERNAL_CHECK_UNIQUE_TYPES(Types...) \
956 int index = 0; \
957 using expander = int[]; \
958 constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\
959 constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\
960 constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\
961 (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++, 0)... };/* NOLINT */\
962 } \
963 }; \
964 static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \
965 using TestInit = Catch::combine<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)> \
966 ::with_types<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(TypesList)>::into<TestName>::type; \
967 TestInit(); \
968 return 0; \
969 }(); \
970 } \
971 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
972 template<typename TestType> \
973 static void TestFuncName()

◆ INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD

#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD ( ClassName,
Name,
Tags,
... )
Value:
INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, __VA_ARGS__ )
#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, TmplTypes, TypesList)
Definition catch.hpp:1013

Definition at line 1044 of file catch.hpp.

1044 #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\
1045 INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, __VA_ARGS__ )

◆ INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2

#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2 ( TestNameClass,
TestName,
ClassName,
Name,
Tags,
TmplTypes,
TypesList )
Value:
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
template<typename TestType> \
struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \
void test();\
};\
namespace {\
template<typename...Types>\
struct TestNameClass{\
TestNameClass(){\
CATCH_INTERNAL_CHECK_UNIQUE_TYPES(Types...)\
int index = 0;\
using expander = int[];\
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++, 0)... };/* NOLINT */ \
}\
};\
static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
using TestInit = Catch::combine<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>\
::with_types<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(TypesList)>::into<TestNameClass>::type;\
TestInit();\
return 0;\
}(); \
}\
CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
template<typename TestType> \
void TestName<TestType>::test()

Definition at line 1013 of file catch.hpp.

1013 #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, TmplTypes, TypesList)\
1014 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
1015 template<typename TestType> \
1016 struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \
1017 void test();\
1018 };\
1019 namespace {\
1020 template<typename...Types>\
1021 struct TestNameClass{\
1022 TestNameClass(){\
1023 CATCH_INTERNAL_CHECK_UNIQUE_TYPES(Types...)\
1024 int index = 0;\
1025 using expander = int[];\
1026 constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\
1027 constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\
1028 constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\
1029 (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++, 0)... };/* NOLINT */ \
1030 }\
1031 };\
1032 static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
1033 using TestInit = Catch::combine<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>\
1034 ::with_types<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(TypesList)>::into<TestNameClass>::type;\
1035 TestInit();\
1036 return 0;\
1037 }(); \
1038 }\
1039 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
1040 template<typename TestType> \
1041 void TestName<TestType>::test()

◆ INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE

#define INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE ( TestName,
Name,
... )
Value:
static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
TestName<CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)>(CATCH_REC_LIST_UD(INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME,Name, __VA_ARGS__));\
return 0;\
}();
#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME(Name,...)
Definition catch.hpp:730
#define CATCH_REC_LIST_UD(f, userdata,...)
Definition catch.hpp:706

Definition at line 942 of file catch.hpp.

942 #define INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestName, Name, ...)\
943 static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
944 TestName<CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)>(CATCH_REC_LIST_UD(INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME,Name, __VA_ARGS__));\
945 return 0;\
946 }();

◆ INTERNAL_CATCH_TEMPLATE_TEST_CASE

#define INTERNAL_CATCH_TEMPLATE_TEST_CASE ( Name,
Tags,
... )
Value:
INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, __VA_ARGS__ )
#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_2(TestName, TestFunc, Name, Tags,...)
Definition catch.hpp:908

Definition at line 935 of file catch.hpp.

935 #define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \
936 INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, __VA_ARGS__ )

◆ INTERNAL_CATCH_TEMPLATE_TEST_CASE_2

#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_2 ( TestName,
TestFunc,
Name,
Tags,
... )
Value:
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
template<typename TestType> \
static void TestFunc();\
namespace {\
template<typename...Types> \
struct TestName{\
template<typename...Ts> \
TestName(Ts...names){\
CATCH_INTERNAL_CHECK_UNIQUE_TYPES(CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)) \
using expander = int[];\
(void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ names, Tags } ), 0)... };/* NOLINT */ \
}\
};\
INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestName, Name, __VA_ARGS__) \
}\
CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
template<typename TestType> \
static void TestFunc()

Definition at line 908 of file catch.hpp.

908 #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_2(TestName, TestFunc, Name, Tags, ... )\
909 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
910 template<typename TestType> \
911 static void TestFunc();\
912 namespace {\
913 template<typename...Types> \
914 struct TestName{\
915 template<typename...Ts> \
916 TestName(Ts...names){\
917 CATCH_INTERNAL_CHECK_UNIQUE_TYPES(CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)) \
918 using expander = int[];\
919 (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ names, Tags } ), 0)... };/* NOLINT */ \
920 }\
921 };\
922 INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestName, Name, __VA_ARGS__) \
923 }\
924 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
925 template<typename TestType> \
926 static void TestFunc()

◆ INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD

#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD ( ClassName,
Name,
Tags,
... )
Value:
INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, __VA_ARGS__ )
#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags,...)
Definition catch.hpp:983

Definition at line 1006 of file catch.hpp.

1006 #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \
1007 INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, __VA_ARGS__ )

◆ INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2

#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2 ( TestNameClass,
TestName,
ClassName,
Name,
Tags,
... )
Value:
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
namespace{ \
template<typename TestType> \
struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \
void test();\
};\
template<typename...Types> \
struct TestNameClass{\
template<typename...Ts> \
TestNameClass(Ts...names){\
CATCH_INTERNAL_CHECK_UNIQUE_TYPES(CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)) \
using expander = int[];\
(void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ names, Tags } ), 0)... };/* NOLINT */ \
}\
};\
INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestNameClass, Name, __VA_ARGS__)\
}\
CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS\
template<typename TestType> \
void TestName<TestType>::test()

Definition at line 983 of file catch.hpp.

983 #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, ... ) \
984 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
985 namespace{ \
986 template<typename TestType> \
987 struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \
988 void test();\
989 };\
990 template<typename...Types> \
991 struct TestNameClass{\
992 template<typename...Ts> \
993 TestNameClass(Ts...names){\
994 CATCH_INTERNAL_CHECK_UNIQUE_TYPES(CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)) \
995 using expander = int[];\
996 (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ names, Tags } ), 0)... };/* NOLINT */ \
997 }\
998 };\
999 INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestNameClass, Name, __VA_ARGS__)\
1000 }\
1001 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS\
1002 template<typename TestType> \
1003 void TestName<TestType>::test()

◆ INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME

#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME ( Name,
... )
Value:
#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME2(Name,...)
Definition catch.hpp:727

Definition at line 730 of file catch.hpp.

◆ INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME2

#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME2 ( Name,
... )
Value:
#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME3(Name,...)
Definition catch.hpp:729

Definition at line 727 of file catch.hpp.

◆ INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME3

#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME3 ( Name,
... )
Value:
Name " - " #__VA_ARGS__

Definition at line 729 of file catch.hpp.

◆ INTERNAL_CATCH_TEST

#define INTERNAL_CATCH_TEST ( macroName,
resultDisposition,
... )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \
CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \
catchAssertionHandler.handleExpr( Catch::Decomposer() <= __VA_ARGS__ ); \
} INTERNAL_CATCH_CATCH( catchAssertionHandler ) \
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
} while( (void)0, (false) && static_cast<bool>( !!(__VA_ARGS__) ) )
#define INTERNAL_CATCH_CATCH(capturer)
Definition catch.hpp:2316
#define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS
Definition catch.hpp:357
#define INTERNAL_CATCH_TRY
Definition catch.hpp:2315

Definition at line 2328 of file catch.hpp.

2328#define INTERNAL_CATCH_TEST( macroName, resultDisposition, ... ) \
2329 do { \
2330 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \
2331 INTERNAL_CATCH_TRY { \
2332 CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \
2333 catchAssertionHandler.handleExpr( Catch::Decomposer() <= __VA_ARGS__ ); \
2334 CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS \
2335 } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \
2336 INTERNAL_CATCH_REACT( catchAssertionHandler ) \
2337 } while( (void)0, (false) && static_cast<bool>( !!(__VA_ARGS__) ) ) // the expression here is never evaluated at runtime but it forces the compiler to give it a look

◆ INTERNAL_CATCH_TEST_CASE_METHOD

#define INTERNAL_CATCH_TEST_CASE_METHOD ( ClassName,
... )
Value:
INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), ClassName, __VA_ARGS__ )
#define INTERNAL_CATCH_TEST_CASE_METHOD2(TestName, ClassName,...)
Definition catch.hpp:888

Definition at line 898 of file catch.hpp.

898 #define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, ... ) \
899 INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), ClassName, __VA_ARGS__ )

◆ INTERNAL_CATCH_TEST_CASE_METHOD2

#define INTERNAL_CATCH_TEST_CASE_METHOD2 ( TestName,
ClassName,
... )
Value:
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
namespace{ \
struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \
void test(); \
}; \
Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \
} \
CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
void TestName::test()

Definition at line 888 of file catch.hpp.

888 #define INTERNAL_CATCH_TEST_CASE_METHOD2( TestName, ClassName, ... )\
889 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
890 namespace{ \
891 struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \
892 void test(); \
893 }; \
894 Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \
895 } \
896 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
897 void TestName::test()

◆ INTERNAL_CATCH_TESTCASE

#define INTERNAL_CATCH_TESTCASE ( ...)
Value:
INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), __VA_ARGS__ )
#define INTERNAL_CATCH_TESTCASE2(TestName,...)
Definition catch.hpp:872

Definition at line 878 of file catch.hpp.

878 #define INTERNAL_CATCH_TESTCASE( ... ) \
879 INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), __VA_ARGS__ )

◆ INTERNAL_CATCH_TESTCASE2

#define INTERNAL_CATCH_TESTCASE2 ( TestName,
... )
Value:
static void TestName(); \
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \
CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
static void TestName()

Definition at line 872 of file catch.hpp.

872 #define INTERNAL_CATCH_TESTCASE2( TestName, ... ) \
873 static void TestName(); \
874 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
875 namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \
876 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
877 static void TestName()

◆ INTERNAL_CATCH_THROWS

#define INTERNAL_CATCH_THROWS ( macroName,
resultDisposition,
... )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition); \
if( catchAssertionHandler.allowThrows() ) \
try { \
static_cast<void>(__VA_ARGS__); \
catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \
} \
catch( ... ) { \
catchAssertionHandler.handleExceptionThrownAsExpected(); \
} \
else \
catchAssertionHandler.handleThrowingCallSkipped(); \
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
} while( false )

Definition at line 2365 of file catch.hpp.

2365#define INTERNAL_CATCH_THROWS( macroName, resultDisposition, ... ) \
2366 do { \
2367 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition); \
2368 if( catchAssertionHandler.allowThrows() ) \
2369 try { \
2370 static_cast<void>(__VA_ARGS__); \
2371 catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \
2372 } \
2373 catch( ... ) { \
2374 catchAssertionHandler.handleExceptionThrownAsExpected(); \
2375 } \
2376 else \
2377 catchAssertionHandler.handleThrowingCallSkipped(); \
2378 INTERNAL_CATCH_REACT( catchAssertionHandler ) \
2379 } while( false )

◆ INTERNAL_CATCH_THROWS_AS

#define INTERNAL_CATCH_THROWS_AS ( macroName,
exceptionType,
resultDisposition,
expr )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(expr) ", " CATCH_INTERNAL_STRINGIFY(exceptionType), resultDisposition ); \
if( catchAssertionHandler.allowThrows() ) \
try { \
static_cast<void>(expr); \
catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \
} \
catch( exceptionType const& ) { \
catchAssertionHandler.handleExceptionThrownAsExpected(); \
} \
catch( ... ) { \
catchAssertionHandler.handleUnexpectedInflightException(); \
} \
else \
catchAssertionHandler.handleThrowingCallSkipped(); \
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
} while( false )

Definition at line 2382 of file catch.hpp.

2382#define INTERNAL_CATCH_THROWS_AS( macroName, exceptionType, resultDisposition, expr ) \
2383 do { \
2384 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(expr) ", " CATCH_INTERNAL_STRINGIFY(exceptionType), resultDisposition ); \
2385 if( catchAssertionHandler.allowThrows() ) \
2386 try { \
2387 static_cast<void>(expr); \
2388 catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \
2389 } \
2390 catch( exceptionType const& ) { \
2391 catchAssertionHandler.handleExceptionThrownAsExpected(); \
2392 } \
2393 catch( ... ) { \
2394 catchAssertionHandler.handleUnexpectedInflightException(); \
2395 } \
2396 else \
2397 catchAssertionHandler.handleThrowingCallSkipped(); \
2398 INTERNAL_CATCH_REACT( catchAssertionHandler ) \
2399 } while( false )

◆ INTERNAL_CATCH_THROWS_MATCHES

#define INTERNAL_CATCH_THROWS_MATCHES ( macroName,
exceptionType,
resultDisposition,
matcher,
... )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) ", " CATCH_INTERNAL_STRINGIFY(exceptionType) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \
if( catchAssertionHandler.allowThrows() ) \
try { \
static_cast<void>(__VA_ARGS__ ); \
catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \
} \
catch( exceptionType const& ex ) { \
catchAssertionHandler.handleExpr( Catch::makeMatchExpr( ex, matcher, #matcher##_catch_sr ) ); \
} \
catch( ... ) { \
catchAssertionHandler.handleUnexpectedInflightException(); \
} \
else \
catchAssertionHandler.handleThrowingCallSkipped(); \
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
} while( false )
auto makeMatchExpr(ArgT const &arg, MatcherT const &matcher, StringRef const &matcherString) -> MatchExpr< ArgT, MatcherT >

Definition at line 3414 of file catch.hpp.

3414#define INTERNAL_CATCH_THROWS_MATCHES( macroName, exceptionType, resultDisposition, matcher, ... ) \
3415 do { \
3416 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) ", " CATCH_INTERNAL_STRINGIFY(exceptionType) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \
3417 if( catchAssertionHandler.allowThrows() ) \
3418 try { \
3419 static_cast<void>(__VA_ARGS__ ); \
3420 catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \
3421 } \
3422 catch( exceptionType const& ex ) { \
3423 catchAssertionHandler.handleExpr( Catch::makeMatchExpr( ex, matcher, #matcher##_catch_sr ) ); \
3424 } \
3425 catch( ... ) { \
3426 catchAssertionHandler.handleUnexpectedInflightException(); \
3427 } \
3428 else \
3429 catchAssertionHandler.handleThrowingCallSkipped(); \
3430 INTERNAL_CATCH_REACT( catchAssertionHandler ) \
3431 } while( false )

◆ INTERNAL_CATCH_THROWS_STR_MATCHES

#define INTERNAL_CATCH_THROWS_STR_MATCHES ( macroName,
resultDisposition,
matcher,
... )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \
if( catchAssertionHandler.allowThrows() ) \
try { \
static_cast<void>(__VA_ARGS__); \
catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \
} \
catch( ... ) { \
Catch::handleExceptionMatchExpr( catchAssertionHandler, matcher, #matcher##_catch_sr ); \
} \
else \
catchAssertionHandler.handleThrowingCallSkipped(); \
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
} while( false )

Definition at line 2424 of file catch.hpp.

2424#define INTERNAL_CATCH_THROWS_STR_MATCHES( macroName, resultDisposition, matcher, ... ) \
2425 do { \
2426 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \
2427 if( catchAssertionHandler.allowThrows() ) \
2428 try { \
2429 static_cast<void>(__VA_ARGS__); \
2430 catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \
2431 } \
2432 catch( ... ) { \
2433 Catch::handleExceptionMatchExpr( catchAssertionHandler, matcher, #matcher##_catch_sr ); \
2434 } \
2435 else \
2436 catchAssertionHandler.handleThrowingCallSkipped(); \
2437 INTERNAL_CATCH_REACT( catchAssertionHandler ) \
2438 } while( false )

◆ INTERNAL_CATCH_TRANSLATE_EXCEPTION

#define INTERNAL_CATCH_TRANSLATE_EXCEPTION ( signature)
Value:
INTERNAL_CATCH_TRANSLATE_EXCEPTION2( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature )
#define INTERNAL_CATCH_TRANSLATE_EXCEPTION2(translatorName, signature)
Definition catch.hpp:2722

Definition at line 2729 of file catch.hpp.

◆ INTERNAL_CATCH_TRANSLATE_EXCEPTION2

#define INTERNAL_CATCH_TRANSLATE_EXCEPTION2 ( translatorName,
signature )
Value:
static std::string translatorName( signature ); \
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
namespace{ Catch::ExceptionTranslatorRegistrar INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionRegistrar )( &translatorName ); } \
CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
static std::string translatorName( signature )

Definition at line 2722 of file catch.hpp.

2722#define INTERNAL_CATCH_TRANSLATE_EXCEPTION2( translatorName, signature ) \
2723 static std::string translatorName( signature ); \
2724 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
2725 namespace{ Catch::ExceptionTranslatorRegistrar INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionRegistrar )( &translatorName ); } \
2726 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
2727 static std::string translatorName( signature )

◆ INTERNAL_CATCH_TRY

#define INTERNAL_CATCH_TRY

Definition at line 2315 of file catch.hpp.

◆ INTERNAL_CATCH_UNIQUE_NAME

#define INTERNAL_CATCH_UNIQUE_NAME ( name)
Value:
#define INTERNAL_CATCH_UNIQUE_NAME_LINE(name, line)
Definition catch.hpp:384

Definition at line 386 of file catch.hpp.

◆ INTERNAL_CATCH_UNIQUE_NAME_LINE

#define INTERNAL_CATCH_UNIQUE_NAME_LINE ( name,
line )
Value:
#define INTERNAL_CATCH_UNIQUE_NAME_LINE2(name, line)
Definition catch.hpp:383

Definition at line 384 of file catch.hpp.

◆ INTERNAL_CATCH_UNIQUE_NAME_LINE2

#define INTERNAL_CATCH_UNIQUE_NAME_LINE2 ( name,
line )
Value:
name##line

Definition at line 383 of file catch.hpp.

◆ INTERNAL_CATCH_UNSCOPED_INFO

#define INTERNAL_CATCH_UNSCOPED_INFO ( macroName,
log )
Value:
virtual void emplaceUnscopedMessage(MessageBuilder const &builder)=0

Definition at line 2419 of file catch.hpp.

2419#define INTERNAL_CATCH_UNSCOPED_INFO( macroName, log ) \
2420 Catch::getResultCapture().emplaceUnscopedMessage( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log )

◆ INTERNAL_CHECK_THAT

#define INTERNAL_CHECK_THAT ( macroName,
matcher,
resultDisposition,
arg )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(arg) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \
catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher, #matcher##_catch_sr ) ); \
} INTERNAL_CATCH_CATCH( catchAssertionHandler ) \
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
} while( false )

Definition at line 3404 of file catch.hpp.

3404#define INTERNAL_CHECK_THAT( macroName, matcher, resultDisposition, arg ) \
3405 do { \
3406 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(arg) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \
3407 INTERNAL_CATCH_TRY { \
3408 catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher, #matcher##_catch_sr ) ); \
3409 } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \
3410 INTERNAL_CATCH_REACT( catchAssertionHandler ) \
3411 } while( false )

◆ METHOD_AS_TEST_CASE

#define METHOD_AS_TEST_CASE ( method,
... )
Value:
INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ )
#define INTERNAL_CATCH_METHOD_AS_TEST_CASE(QualifiedMethod,...)
Definition catch.hpp:882

Definition at line 14778 of file catch.hpp.

◆ REGISTER_TEST_CASE

#define REGISTER_TEST_CASE ( Function,
... )
Value:
INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ )
#define INTERNAL_CATCH_REGISTER_TESTCASE(Function,...)
Definition catch.hpp:902

Definition at line 14779 of file catch.hpp.

◆ REQUIRE

#define REQUIRE ( ...)
Value:

Definition at line 14740 of file catch.hpp.

◆ REQUIRE_FALSE

#define REQUIRE_FALSE ( ...)
Value:

Definition at line 14741 of file catch.hpp.

◆ REQUIRE_NOTHROW

#define REQUIRE_NOTHROW ( ...)
Value:

Definition at line 14749 of file catch.hpp.

◆ REQUIRE_THAT

#define REQUIRE_THAT ( arg,
matcher )
Value:
INTERNAL_CHECK_THAT( "REQUIRE_THAT", matcher, Catch::ResultDisposition::Normal, arg )

Definition at line 14768 of file catch.hpp.

◆ REQUIRE_THROWS

#define REQUIRE_THROWS ( ...)
Value:

Definition at line 14743 of file catch.hpp.

◆ REQUIRE_THROWS_AS

#define REQUIRE_THROWS_AS ( expr,
exceptionType )
Value:
INTERNAL_CATCH_THROWS_AS( "REQUIRE_THROWS_AS", exceptionType, Catch::ResultDisposition::Normal, expr )

Definition at line 14744 of file catch.hpp.

◆ REQUIRE_THROWS_MATCHES

#define REQUIRE_THROWS_MATCHES ( expr,
exceptionType,
matcher )
Value:
INTERNAL_CATCH_THROWS_MATCHES( "REQUIRE_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::Normal, matcher, expr )

Definition at line 14747 of file catch.hpp.

◆ REQUIRE_THROWS_WITH

#define REQUIRE_THROWS_WITH ( expr,
matcher )
Value:

Definition at line 14745 of file catch.hpp.

◆ SCENARIO

#define SCENARIO ( ...)
Value:
TEST_CASE( "Scenario: " __VA_ARGS__ )
#define TEST_CASE(...)
Definition catch.hpp:14776

Definition at line 14812 of file catch.hpp.

◆ SCENARIO_METHOD

#define SCENARIO_METHOD ( className,
... )
Value:
INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " __VA_ARGS__ )
#define INTERNAL_CATCH_TEST_CASE_METHOD(ClassName,...)
Definition catch.hpp:898

Definition at line 14813 of file catch.hpp.

◆ SECTION

#define SECTION ( ...)
Value:
INTERNAL_CATCH_SECTION( __VA_ARGS__ )
#define INTERNAL_CATCH_SECTION(...)
Definition catch.hpp:2554

Definition at line 14780 of file catch.hpp.

◆ STATIC_REQUIRE

#define STATIC_REQUIRE ( ...)
Value:
static_assert( __VA_ARGS__, #__VA_ARGS__ ); SUCCEED( #__VA_ARGS__ )
#define SUCCEED(...)
Definition catch.hpp:14784

Definition at line 14800 of file catch.hpp.

◆ STATIC_REQUIRE_FALSE

#define STATIC_REQUIRE_FALSE ( ...)
Value:
static_assert( !(__VA_ARGS__), "!(" #__VA_ARGS__ ")" ); SUCCEED( "!(" #__VA_ARGS__ ")" )

Definition at line 14801 of file catch.hpp.

◆ SUCCEED

#define SUCCEED ( ...)

◆ TEMPLATE_PRODUCT_TEST_CASE

#define TEMPLATE_PRODUCT_TEST_CASE ( ...)
Value:
#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags,...)
Definition catch.hpp:976

Definition at line 14790 of file catch.hpp.

◆ TEMPLATE_PRODUCT_TEST_CASE_METHOD

#define TEMPLATE_PRODUCT_TEST_CASE_METHOD ( className,
... )
Value:
#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD(ClassName, Name, Tags,...)
Definition catch.hpp:1044

Definition at line 14791 of file catch.hpp.

◆ TEMPLATE_TEST_CASE

#define TEMPLATE_TEST_CASE ( ...)
Value:
#define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags,...)
Definition catch.hpp:935

Definition at line 14788 of file catch.hpp.

◆ TEMPLATE_TEST_CASE_METHOD

#define TEMPLATE_TEST_CASE_METHOD ( className,
... )
Value:
#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD(ClassName, Name, Tags,...)
Definition catch.hpp:1006

Definition at line 14789 of file catch.hpp.

◆ TEST_CASE

#define TEST_CASE ( ...)
Value:

Definition at line 14776 of file catch.hpp.

◆ TEST_CASE_METHOD

#define TEST_CASE_METHOD ( className,
... )
Value:
INTERNAL_CATCH_TEST_CASE_METHOD( className, __VA_ARGS__ )

Definition at line 14777 of file catch.hpp.

◆ THEN

#define THEN ( desc)
Value:
INTERNAL_CATCH_DYNAMIC_SECTION( " Then: " << desc )

Definition at line 14819 of file catch.hpp.

◆ UNSCOPED_INFO

#define UNSCOPED_INFO ( msg)
Value:
INTERNAL_CATCH_UNSCOPED_INFO( "UNSCOPED_INFO", msg )
#define INTERNAL_CATCH_UNSCOPED_INFO(macroName, log)
Definition catch.hpp:2419

Definition at line 14772 of file catch.hpp.

◆ WARN

#define WARN ( msg)

◆ WHEN

#define WHEN ( desc)
Value:
INTERNAL_CATCH_DYNAMIC_SECTION( " When: " << desc )

Definition at line 14817 of file catch.hpp.

Function Documentation

◆ operator""_catch_sr()

auto operator""_catch_sr ( char const * rawChars,
std::size_t size ) -> Catch::StringRef
inlinenoexcept

Definition at line 626 of file catch.hpp.

626 {
627 return Catch::StringRef( rawChars, size );
628}

◆ operator<<()

std::ostream & operator<< ( std::ostream & ,
Catch_global_namespace_dummy  )