GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
catch.hpp File Reference
#include <iosfwd>
#include <string>
#include <cstdint>
#include <vector>
#include <memory>
#include <cstddef>
#include <type_traits>
#include <ostream>
#include <exception>
#include <stdexcept>
#include <cmath>
#include <functional>
#include <algorithm>
Include dependency graph for catch.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Catch::CaseSensitive
class  Catch::NonCopyable
struct  Catch::SourceLineInfo
struct  Catch::StreamEndStop
struct  Catch::RegistrarForTagAliases
struct  Catch::ITestInvoker
struct  Catch::ITestCaseRegistry
class  Catch::StringRef
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
struct  Catch_global_namespace_dummy
class  Catch::Detail::IsStreamInsertable< T >
struct  Catch::StringMaker< T, typename >
struct  Catch::StringMaker< std::string >
struct  Catch::StringMaker< std::wstring >
struct  Catch::StringMaker< char const * >
struct  Catch::StringMaker< char * >
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
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::MatcherMethod< PtrT * >
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::UnorderedEqualsMatcher< T >
class  Catch::MatchExpr< ArgT, MatcherT >
struct  Catch::TestCaseInfo
class  Catch::TestCase
struct  Catch::IRunner
struct  Catch::MatcherBase< T >
class  Approx

Namespaces

namespace  Catch
namespace  Catch::Detail
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::Matchers::Vector::Detail

Macros

#define CATCH_VERSION_MAJOR   2
#define CATCH_VERSION_MINOR   2
#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_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS
#define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS
#define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS
#define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS
#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 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 CATCH_INTERNAL_STRINGIFY(...)
#define INTERNAL_CATCH_TRY   try
#define INTERNAL_CATCH_CATCH(handler)
#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_INFO(macroName, log)
#define INTERNAL_CATCH_THROWS_STR_MATCHES(macroName, resultDisposition, matcher, ...)
#define INTERNAL_CATCH_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 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 WARN(msg)
#define CAPTURE(msg)
#define TEST_CASE(...)
#define TEST_CASE_METHOD(className, ...)
#define METHOD_AS_TEST_CASE(method, ...)
#define REGISTER_TEST_CASE(Function, ...)
#define SECTION(...)
#define FAIL(...)
#define FAIL_CHECK(...)
#define SUCCEED(...)
#define ANON_TEST_CASE()
#define CATCH_TRANSLATE_EXCEPTION(signature)
#define SCENARIO(...)
#define SCENARIO_METHOD(className, ...)
#define GIVEN(desc)
#define WHEN(desc)
#define AND_WHEN(desc)
#define THEN(desc)
#define AND_THEN(desc)

Typedefs

using Catch::ITestCasePtr = std::shared_ptr<ITestInvoker>
using Catch::IReporterFactoryPtr = std::shared_ptr<IReporterFactory>
using Catch::exceptionTranslateFunction = std::string(*)()
using Catch::ExceptionTranslators = std::vector<std::unique_ptr<IExceptionTranslator const>>
using Catch::StringMatcher = Matchers::Impl::MatcherBase<std::string>

Functions

unsigned int Catch::rngSeed ()
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< TestCase > Catch::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, char const *rhs) -> std::string
auto Catch::operator+ (char const *lhs, StringRef const &rhs) -> std::string
auto Catch::operator+= (std::string &lhs, StringRef const &sr) -> std::string &
auto Catch::operator<< (std::ostream &os, StringRef const &sr) -> std::ostream &
auto Catch::operator""_sr (char const *rawChars, std::size_t size) noexcept -> 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::ostream & operator<< (std::ostream &, Catch_global_namespace_dummy)
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::string >::type Catch::Detail::convertUnstreamable (T const &value)
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)
IResultCapture & Catch::getResultCapture ()
void Catch::handleExceptionMatchExpr (AssertionHandler &handler, std::string const &str, StringRef matcherString)
auto Catch::getCurrentNanosecondsSinceEpoch () -> uint64_t
auto Catch::getEstimatedClockResolution () -> uint64_t
IRegistryHub & Catch::getRegistryHub ()
IMutableRegistryHub & Catch::getMutableRegistryHub ()
void Catch::cleanUp ()
std::string Catch::translateActiveException ()
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< T > Catch::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=CaseSensitive::Yes)
StdString::ContainsMatcher Catch::Matchers::Contains (std::string const &str, CaseSensitive::Choice caseSensitivity=CaseSensitive::Yes)
StdString::EndsWithMatcher Catch::Matchers::EndsWith (std::string const &str, CaseSensitive::Choice caseSensitivity=CaseSensitive::Yes)
StdString::StartsWithMatcher Catch::Matchers::StartsWith (std::string const &str, CaseSensitive::Choice caseSensitivity=CaseSensitive::Yes)
StdString::RegexMatcher Catch::Matchers::Matches (std::string const &regex, CaseSensitive::Choice caseSensitivity=CaseSensitive::Yes)
template<typename InputIterator, typename T>
size_t Catch::Matchers::Vector::Detail::count (InputIterator first, InputIterator last, T const &item)
template<typename InputIterator, typename T>
bool Catch::Matchers::Vector::Detail::contains (InputIterator first, InputIterator last, T const &item)
template<typename T>
Vector::ContainsMatcher< T > Catch::Matchers::Contains (std::vector< T > const &comparator)
template<typename T>
Vector::ContainsElementMatcher< T > Catch::Matchers::VectorContains (T const &comparator)
template<typename T>
Vector::EqualsMatcher< T > Catch::Matchers::Equals (std::vector< T > const &comparator)
template<typename T>
Vector::UnorderedEqualsMatcher< T > Catch::Matchers::UnorderedEquals (std::vector< T > const &target)
void Catch::handleExceptionMatchExpr (AssertionHandler &handler, StringMatcher const &matcher, StringRef matcherString)
template<typename ArgT, typename MatcherT>
auto Catch::makeMatchExpr (ArgT const &arg, MatcherT const &matcher, StringRef matcherString) -> MatchExpr< ArgT, MatcherT >
TestCase Catch::makeTestCase (ITestInvoker *testCase, std::string const &className, NameAndTags const &nameAndTags, SourceLineInfo const &lineInfo)

Variables

const std::string Catch::Detail::unprintableString
not_this_one Catch::begin (...)
not_this_one Catch::end (...)

Macro Definition Documentation

◆ AND_THEN

#define AND_THEN ( desc)
Value:
SECTION( std::string(" And: ") + desc )
#define SECTION(...)
Definition catch.hpp:12884

◆ AND_WHEN

#define AND_WHEN ( desc)
Value:
SECTION( std::string("And when: ") + desc )

◆ ANON_TEST_CASE

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

◆ BENCHMARK

#define BENCHMARK ( name)
Value:
for( Catch::BenchmarkLooper looper( name ); looper; looper.increment() )
Definition catch.hpp:1895
void increment()
Definition catch.hpp:1920
iVBORw0KGgoAAAANSUhEUgAAANcAAAB5CAMAAACdtUQZAAAA51BMVEX</div ></div >< div style="padding: 0px 0px; width: 1324px;">< div style="height: 400px; width: 1324px;"></div >< div itemscope itemtype="https: </div><div itemscope itemtype="https:</div >< div itemscope itemtype="https: </div></div><p><div style="padding:0px 0px;width:1324px;"><div></div><div itemscope itemtype="https:< ul >< li >< b > Application name
8AkrcAgqgAs9wqQ0ey2tkAo8gAuuQfeI4hPUH09fXHy8z4+fng4uNKXF/Lz9BzfoAcgpkQMTUAKjAbOT4Qr9AXhJ8Rl7ktMCwTosA...
Definition meshpage.php:1610

◆ CAPTURE

#define CAPTURE ( msg)
Value:
INTERNAL_CATCH_INFO( "CAPTURE", #msg " := " << ::Catch::Detail::stringify(msg) )
#define INTERNAL_CATCH_INFO(macroName, log)
Definition catch.hpp:1752
std::string stringify(const T &e)
Definition catch.hpp:825

◆ CATCH_CONFIG_COUNTER

#define CATCH_CONFIG_COUNTER

◆ CATCH_CONFIG_POSIX_SIGNALS

#define CATCH_CONFIG_POSIX_SIGNALS

◆ CATCH_CONFIG_WCHAR

#define CATCH_CONFIG_WCHAR

◆ CATCH_INTERNAL_CONFIG_COUNTER

#define CATCH_INTERNAL_CONFIG_COUNTER

◆ CATCH_INTERNAL_CONFIG_POSIX_SIGNALS

#define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS

◆ CATCH_INTERNAL_LINEINFO

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

◆ CATCH_INTERNAL_STRINGIFY

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

◆ CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS

#define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS

◆ CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS

#define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS

◆ CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS

#define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS

◆ CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS

#define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS

◆ 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:238
#define CATCH_INTERNAL_LINEINFO
Definition catch.hpp:308
#define INTERNAL_CATCH_UNIQUE_NAME(name)
Definition catch.hpp:245
Definition catch.hpp:314

◆ CATCH_TRANSLATE_EXCEPTION

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

◆ CATCH_VERSION_MAJOR

#define CATCH_VERSION_MAJOR   2

◆ CATCH_VERSION_MINOR

#define CATCH_VERSION_MINOR   2

◆ CATCH_VERSION_PATCH

#define CATCH_VERSION_PATCH   2

◆ CHECK

#define CHECK ( ...)
Value:
#define INTERNAL_CATCH_TEST(macroName, resultDisposition,...)
Definition catch.hpp:1670
@ ContinueOnFailure
Definition catch.hpp:604

◆ 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:1693

◆ CHECK_THAT

#define CHECK_THAT ( arg,
matcher )
Value:
float arg(Complex z)
Definition GameApi_pl.cc:31413
#define INTERNAL_CHECK_THAT(macroName, matcher, resultDisposition, arg)
Definition catch.hpp:2725

◆ CHECK_THROWS

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

◆ CHECK_THROWS_AS

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

◆ 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:2735

◆ CHECK_THROWS_WITH

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

◆ CHECKED_ELSE

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

◆ CHECKED_IF

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

◆ FAIL

#define FAIL ( ...)
Value:
#define INTERNAL_CATCH_MSG(macroName, messageType, resultDisposition,...)
Definition catch.hpp:1744
@ Normal
Definition catch.hpp:602
@ ExplicitFailure
Definition catch.hpp:586

◆ FAIL_CHECK

#define FAIL_CHECK ( ...)

◆ GIVEN

#define GIVEN ( desc)
Value:
SECTION( std::string(" Given: ") + desc )

◆ INFO

#define INFO ( msg)
Value:
INTERNAL_CATCH_INFO( "INFO", msg )

◆ INTERNAL_CATCH_CATCH

#define INTERNAL_CATCH_CATCH ( handler)
Value:
catch(...) { handler.handleUnexpectedInflightException(); }

◆ INTERNAL_CATCH_ELSE

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

◆ INTERNAL_CATCH_IF

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

◆ INTERNAL_CATCH_INFO

#define INTERNAL_CATCH_INFO ( macroName,
log )
Value:
Definition catch.hpp:1633
void log(const std::string &msg)
Definition example.cpp:14
Definition catch.hpp:1619
@ Info
Definition catch.hpp:580

◆ 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 catch.hpp:509
Definition catch.hpp:503

◆ INTERNAL_CATCH_MSG

#define INTERNAL_CATCH_MSG ( macroName,
messageType,
resultDisposition,
... )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName, CATCH_INTERNAL_LINEINFO, "", resultDisposition ); \
catchAssertionHandler.handleMessage( messageType, ( Catch::MessageStream() << __VA_ARGS__ + ::Catch::StreamEndStop() ).m_stream.str() ); \
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
} while( false )
Definition catch.hpp:1541
Definition catch.hpp:1608
Definition catch.hpp:299

◆ INTERNAL_CATCH_NO_THROW

#define INTERNAL_CATCH_NO_THROW ( macroName,
resultDisposition,
... )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName, 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:1647

◆ INTERNAL_CATCH_REACT

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

◆ 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::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \
Definition EffectI.hh:11

◆ INTERNAL_CATCH_SECTION

#define INTERNAL_CATCH_SECTION ( ...)
Value:
if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, __VA_ARGS__ ) )
Definition catch.hpp:1865
Definition catch.hpp:1817

◆ INTERNAL_CATCH_TEST

#define INTERNAL_CATCH_TEST ( macroName,
resultDisposition,
... )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName, 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(handler)
Definition catch.hpp:1663
#define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS
Definition catch.hpp:234
#define INTERNAL_CATCH_TRY
Definition catch.hpp:1662
Definition catch.hpp:1423

◆ 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:546

◆ INTERNAL_CATCH_TEST_CASE_METHOD2

#define INTERNAL_CATCH_TEST_CASE_METHOD2 ( TestName,
ClassName,
... )
Value:
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
namespace{ \
struct TestName : 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 memory_leak_test.cpp:32

◆ 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:530

◆ 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::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \
CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
static void TestName()

◆ INTERNAL_CATCH_THROWS

#define INTERNAL_CATCH_THROWS ( macroName,
resultDisposition,
... )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName, 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 )

◆ INTERNAL_CATCH_THROWS_AS

#define INTERNAL_CATCH_THROWS_AS ( macroName,
exceptionType,
resultDisposition,
expr )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName, 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 )

◆ INTERNAL_CATCH_THROWS_MATCHES

#define INTERNAL_CATCH_THROWS_MATCHES ( macroName,
exceptionType,
resultDisposition,
matcher,
... )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName, 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( ... ) { \
catchAssertionHandler.handleUnexpectedInflightException(); \
} \
else \
catchAssertionHandler.handleThrowingCallSkipped(); \
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
} while( false )
auto makeMatchExpr(ArgT const &arg, MatcherT const &matcher, StringRef matcherString) -> MatchExpr< ArgT, MatcherT >
Definition catch.hpp:2718

◆ INTERNAL_CATCH_THROWS_STR_MATCHES

#define INTERNAL_CATCH_THROWS_STR_MATCHES ( macroName,
resultDisposition,
matcher,
... )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName, 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 ); \
} \
else \
catchAssertionHandler.handleThrowingCallSkipped(); \
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
} 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:2045

◆ 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 catch.hpp:2010

◆ INTERNAL_CATCH_TRY

#define INTERNAL_CATCH_TRY   try

◆ INTERNAL_CATCH_UNIQUE_NAME

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

◆ 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:242

◆ INTERNAL_CATCH_UNIQUE_NAME_LINE2

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

◆ INTERNAL_CHECK_THAT

#define INTERNAL_CHECK_THAT ( macroName,
matcher,
resultDisposition,
arg )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(arg) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \
catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher, #matcher ) ); \
} INTERNAL_CATCH_CATCH( catchAssertionHandler ) \
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
} 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:540

◆ REGISTER_TEST_CASE

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

◆ REQUIRE

#define REQUIRE ( ...)
Value:

◆ REQUIRE_FALSE

#define REQUIRE_FALSE ( ...)

◆ REQUIRE_NOTHROW

#define REQUIRE_NOTHROW ( ...)
Value:

◆ REQUIRE_THAT

#define REQUIRE_THAT ( arg,
matcher )
Value:

◆ REQUIRE_THROWS

#define REQUIRE_THROWS ( ...)
Value:

◆ REQUIRE_THROWS_AS

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

◆ REQUIRE_THROWS_MATCHES

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

◆ REQUIRE_THROWS_WITH

#define REQUIRE_THROWS_WITH ( expr,
matcher )
Value:

◆ SCENARIO

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

◆ 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:556

◆ SECTION

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

◆ SUCCEED

#define SUCCEED ( ...)

◆ TEST_CASE

#define TEST_CASE ( ...)
Value:

◆ TEST_CASE_METHOD

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

◆ THEN

#define THEN ( desc)
Value:
SECTION( std::string(" Then: ") + desc )

◆ WARN

#define WARN ( msg)

◆ WHEN

#define WHEN ( desc)
Value:
SECTION( std::string(" When: ") + desc )

Function Documentation

◆ operator<<()

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