Classes | Namespaces | Macros | Typedefs | Functions | Variables
catch.hpp File Reference
#include <iosfwd>
#include <string>
#include <cstdint>
#include <vector>
#include <memory>
#include <cstddef>
#include <type_traits>
#include <ostream>
#include <exception>
#include <cmath>
#include <functional>
#include <algorithm>
#include <stdexcept>
#include <cassert>
#include <utility>
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

class  Catch::Detail::Approx
 
class  Catch::AssertionHandler
 
struct  Catch::AssertionInfo
 
struct  Catch::AssertionReaction
 
struct  Catch::AutoReg
 
class  Catch::BenchmarkLooper
 
class  Catch::BinaryExpr< LhsT, RhsT >
 
class  Catch::Capturer
 
struct  Catch::Matchers::StdString::CasedString
 
struct  Catch::CaseSensitive
 
struct  Catch_global_namespace_dummy
 
struct  Catch::Matchers::Vector::ContainsElementMatcher< T >
 
struct  Catch::Matchers::Vector::ContainsMatcher< T >
 
struct  Catch::Matchers::StdString::ContainsMatcher
 
struct  Catch::Counts
 
struct  Catch::Decomposer
 
struct  Catch::Matchers::StdString::EndsWithMatcher
 
struct  Catch::Matchers::Vector::EqualsMatcher< T >
 
struct  Catch::Matchers::StdString::EqualsMatcher
 
class  Catch::ExceptionTranslatorRegistrar::ExceptionTranslator< T >
 
class  Catch::ExceptionTranslatorRegistrar
 
class  Catch::ExprLhs< LhsT >
 
class  Catch::Generators::FixedValuesGenerator< T >
 
class  Catch::Generators::Generator< T >
 
class  Catch::Generators::GeneratorBase
 
class  Catch::Generators::GeneratorRandomiser< T >
 
struct  Catch::Generators::Generators< T >
 
struct  Catch::IExceptionTranslator
 
struct  Catch::IExceptionTranslatorRegistry
 
struct  Catch::Generators::IGenerator< T >
 
struct  Catch::IGeneratorTracker
 
struct  Catch::IMutableRegistryHub
 
struct  Catch::IRegistryHub
 
struct  Catch::IResultCapture
 
struct  Catch::IRunner
 
struct  Catch::is_range< T >
 
class  Catch::Detail::IsStreamInsertable< T >
 
struct  Catch::IStream
 
struct  Catch::ITestCaseRegistry
 
struct  Catch::ITestInvoker
 
struct  Catch::ITransientExpression
 
class  Catch::LazyExpression
 
struct  Catch::Matchers::Impl::MatchAllOf< ArgT >
 
struct  Catch::Matchers::Impl::MatchAllOf< ArgT >
 
struct  Catch::Matchers::Impl::MatchAnyOf< ArgT >
 
struct  Catch::Matchers::Impl::MatchAnyOf< ArgT >
 
struct  Catch::Matchers::Impl::MatcherBase< T >
 
struct  Catch::Matchers::Impl::MatcherMethod< ObjectT >
 
struct  Catch::Matchers::Impl::MatcherMethod< PtrT * >
 
class  Catch::Matchers::Impl::MatcherUntypedBase
 
class  Catch::MatchExpr< ArgT, MatcherT >
 
struct  Catch::Matchers::Impl::MatchNotOf< ArgT >
 
struct  Catch::Matchers::Impl::MatchNotOf< ArgT >
 
struct  Catch::MessageBuilder
 
struct  Catch::MessageInfo
 
struct  Catch::MessageStream
 
struct  Catch::NameAndTags
 
class  Catch::NonCopyable
 
struct  Catch::not_this_one
 
struct  Catch::Generators::NullGenerator< T >
 
struct  Catch::pluralise
 
class  Catch::Matchers::Generic::PredicateMatcher< T >
 
class  Catch::Generators::RangeGenerator< T >
 
struct  Catch::Matchers::StdString::RegexMatcher
 
struct  Catch::RegistrarForTagAliases
 
struct  Catch::Generators::RequiresASpecialisationFor< T >
 
struct  Catch::ResultDisposition
 
struct  Catch::ResultWas
 
class  Catch::ReusableStringStream
 
class  Catch::ScopedMessage
 
class  Catch::Section
 
struct  Catch::SectionEndInfo
 
struct  Catch::SectionInfo
 
class  Catch::Generators::SingleValueGenerator< T >
 
struct  Catch::SourceLineInfo
 
struct  Catch::Matchers::StdString::StartsWithMatcher
 
struct  Catch::StreamEndStop
 
struct  Catch::StringMaker< T, typename >
 
struct  Catch::StringMaker< bool >
 
struct  Catch::StringMaker< Catch::Detail::Approx >
 
struct  Catch::StringMaker< char * >
 
struct  Catch::StringMaker< char >
 
struct  Catch::StringMaker< char const * >
 
struct  Catch::StringMaker< char[SZ]>
 
struct  Catch::StringMaker< double >
 
struct  Catch::StringMaker< float >
 
struct  Catch::StringMaker< int >
 
struct  Catch::StringMaker< long >
 
struct  Catch::StringMaker< long long >
 
struct  Catch::StringMaker< R C::* >
 
struct  Catch::StringMaker< R, typename std::enable_if< is_range< R >::value &&!::Catch::Detail::IsStreamInsertable< R >::value >::type >
 
struct  Catch::StringMaker< signed char >
 
struct  Catch::StringMaker< signed char[SZ]>
 
struct  Catch::StringMaker< std::nullptr_t >
 
struct  Catch::StringMaker< std::string >
 
struct  Catch::StringMaker< std::wstring >
 
struct  Catch::StringMaker< T * >
 
struct  Catch::StringMaker< T[SZ]>
 
struct  Catch::StringMaker< unsigned char >
 
struct  Catch::StringMaker< unsigned char[SZ]>
 
struct  Catch::StringMaker< unsigned int >
 
struct  Catch::StringMaker< unsigned long >
 
struct  Catch::StringMaker< unsigned long long >
 
struct  Catch::StringMaker< wchar_t * >
 
struct  Catch::StringMaker< wchar_t const * >
 
struct  Catch::Matchers::StdString::StringMatcherBase
 
class  Catch::StringRef
 
class  Catch::TestCase
 
struct  Catch::TestCaseInfo
 
struct  Catch::TestFailureException
 
class  Catch::TestInvokerAsMethod< C >
 
class  Catch::Timer
 
struct  Catch::Totals
 
class  Catch::UnaryExpr< LhsT >
 
struct  Catch::Matchers::Vector::UnorderedEqualsMatcher< T >
 
struct  Catch::Matchers::Floating::WithinAbsMatcher
 
struct  Catch::Matchers::Floating::WithinUlpsMatcher
 

Namespaces

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

Macros

#define AND_GIVEN(desc)   INTERNAL_CATCH_DYNAMIC_SECTION( "And given: " << desc )
 
#define AND_THEN(desc)   INTERNAL_CATCH_DYNAMIC_SECTION( " And: " << desc )
 
#define AND_WHEN(desc)   INTERNAL_CATCH_DYNAMIC_SECTION( " And when: " << desc )
 
#define ANON_TEST_CASE()   INTERNAL_CATCH_TESTCASE()
 
#define BENCHMARK(name)   for( Catch::BenchmarkLooper looper( name ); looper; looper.increment() )
 
#define CAPTURE(...)   INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), "CAPTURE",__VA_ARGS__ )
 
#define CATCH_CATCH_ALL   if ((false))
 
#define CATCH_CATCH_ANON(type)   if ((false))
 
#define CATCH_CONFIG_COUNTER
 
#define CATCH_CONFIG_CPP11_TO_STRING
 
#define CATCH_CONFIG_DISABLE_EXCEPTIONS
 
#define CATCH_CONFIG_POSIX_SIGNALS
 
#define CATCH_CONFIG_WCHAR
 
#define CATCH_ENFORCE(condition, msg)   do{ if( !(condition) ) CATCH_ERROR( msg ); } while(false)
 
#define CATCH_ERROR(msg)   Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::domain_error, msg ))
 
#define CATCH_INTERNAL_CONFIG_COUNTER
 
#define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS
 
#define CATCH_INTERNAL_ERROR(msg)   Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::logic_error, CATCH_INTERNAL_LINEINFO << ": Internal Catch error: " << msg))
 
#define CATCH_INTERNAL_LINEINFO   ::Catch::SourceLineInfo( __FILE__, static_cast<std::size_t>( __LINE__ ) )
 
#define CATCH_INTERNAL_STRINGIFY(...)   #__VA_ARGS__
 
#define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS
 
#define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS
 
#define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS
 
#define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS
 
#define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS
 
#define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS
 
#define CATCH_PREPARE_EXCEPTION(type, msg)   type( ( Catch::ReusableStringStream() << msg ).str() )
 
#define CATCH_REGISTER_TAG_ALIAS(alias, spec)
 
#define CATCH_RUNTIME_ERROR(msg)   Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::runtime_error, msg ))
 
#define CATCH_TRANSLATE_EXCEPTION(signature)   INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature )
 
#define CATCH_TRY   if ((true))
 
#define CATCH_VERSION_MAJOR   2
 
#define CATCH_VERSION_MINOR   4
 
#define CATCH_VERSION_PATCH   2
 
#define CHECK(...)   INTERNAL_CATCH_TEST( "CHECK", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
 
#define CHECK_FALSE(...)   INTERNAL_CATCH_TEST( "CHECK_FALSE", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )
 
#define CHECK_NOFAIL(...)   INTERNAL_CATCH_TEST( "CHECK_NOFAIL", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ )
 
#define CHECK_NOTHROW(...)   INTERNAL_CATCH_NO_THROW( "CHECK_NOTHROW", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
 
#define CHECK_THAT(arg, matcher)   INTERNAL_CHECK_THAT( "CHECK_THAT", matcher, Catch::ResultDisposition::ContinueOnFailure, arg )
 
#define CHECK_THROWS(...)   INTERNAL_CATCH_THROWS( "CHECK_THROWS", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
 
#define CHECK_THROWS_AS(expr, exceptionType)   INTERNAL_CATCH_THROWS_AS( "CHECK_THROWS_AS", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr )
 
#define CHECK_THROWS_MATCHES(expr, exceptionType, matcher)   INTERNAL_CATCH_THROWS_MATCHES( "CHECK_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::ContinueOnFailure, matcher, expr )
 
#define CHECK_THROWS_WITH(expr, matcher)   INTERNAL_CATCH_THROWS_STR_MATCHES( "CHECK_THROWS_WITH", Catch::ResultDisposition::ContinueOnFailure, matcher, expr )
 
#define CHECKED_ELSE(...)   INTERNAL_CATCH_ELSE( "CHECKED_ELSE", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
 
#define CHECKED_IF(...)   INTERNAL_CATCH_IF( "CHECKED_IF", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
 
#define DYNAMIC_SECTION(...)   INTERNAL_CATCH_DYNAMIC_SECTION( __VA_ARGS__ )
 
#define FAIL(...)   INTERNAL_CATCH_MSG( "FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ )
 
#define FAIL_CHECK(...)   INTERNAL_CATCH_MSG( "FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
 
#define GENERATE(...)   Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, []{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } )
 
#define GIVEN(desc)   INTERNAL_CATCH_DYNAMIC_SECTION( " Given: " << desc )
 
#define INFO(msg)   INTERNAL_CATCH_INFO( "INFO", msg )
 
#define INTERNAL_CATCH_CAPTURE(varName, macroName, ...)
 
#define INTERNAL_CATCH_CATCH(capturer)
 
#define INTERNAL_CATCH_DEF(...)   INTERNAL_CATCH_DEF __VA_ARGS__
 
#define INTERNAL_CATCH_DYNAMIC_SECTION(...)
 
#define INTERNAL_CATCH_ELSE(macroName, resultDisposition, ...)
 
#define INTERNAL_CATCH_EXPAND1(param)   INTERNAL_CATCH_EXPAND2(param)
 
#define INTERNAL_CATCH_EXPAND2(...)   INTERNAL_CATCH_NO## __VA_ARGS__
 
#define INTERNAL_CATCH_IF(macroName, resultDisposition, ...)
 
#define INTERNAL_CATCH_INFO(macroName, log)   Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage )( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log );
 
#define INTERNAL_CATCH_METHOD_AS_TEST_CASE(QualifiedMethod, ...)
 
#define INTERNAL_CATCH_MSG(macroName, messageType, resultDisposition, ...)
 
#define INTERNAL_CATCH_NO_THROW(macroName, resultDisposition, ...)
 
#define INTERNAL_CATCH_NOINTERNAL_CATCH_DEF
 
#define INTERNAL_CATCH_REACT(handler)   handler.complete();
 
#define INTERNAL_CATCH_REGISTER_TESTCASE(Function, ...)
 
#define INTERNAL_CATCH_SECTION(...)
 
#define INTERNAL_CATCH_TEST(macroName, resultDisposition, ...)
 
#define INTERNAL_CATCH_TEST_CASE_METHOD(ClassName, ...)   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, ...)
 
#define INTERNAL_CATCH_TESTCASE(...)   INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), __VA_ARGS__ )
 
#define INTERNAL_CATCH_TESTCASE2(TestName, ...)
 
#define INTERNAL_CATCH_THROWS(macroName, resultDisposition, ...)
 
#define INTERNAL_CATCH_THROWS_AS(macroName, exceptionType, resultDisposition, expr)
 
#define INTERNAL_CATCH_THROWS_MATCHES(macroName, exceptionType, resultDisposition, matcher, ...)
 
#define INTERNAL_CATCH_THROWS_STR_MATCHES(macroName, resultDisposition, matcher, ...)
 
#define INTERNAL_CATCH_TRANSLATE_EXCEPTION(signature)   INTERNAL_CATCH_TRANSLATE_EXCEPTION2( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature )
 
#define INTERNAL_CATCH_TRANSLATE_EXCEPTION2(translatorName, signature)
 
#define INTERNAL_CATCH_TRY
 
#define INTERNAL_CATCH_UNIQUE_NAME(name)   INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ )
 
#define INTERNAL_CATCH_UNIQUE_NAME_LINE(name, line)   INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line )
 
#define INTERNAL_CATCH_UNIQUE_NAME_LINE2(name, line)   name##line
 
#define INTERNAL_CHECK_THAT(macroName, matcher, resultDisposition, arg)
 
#define METHOD_AS_TEST_CASE(method, ...)   INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ )
 
#define REGISTER_TEST_CASE(Function, ...)   INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ )
 
#define REQUIRE(...)   INTERNAL_CATCH_TEST( "REQUIRE", Catch::ResultDisposition::Normal, __VA_ARGS__ )
 
#define REQUIRE_FALSE(...)   INTERNAL_CATCH_TEST( "REQUIRE_FALSE", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )
 
#define REQUIRE_NOTHROW(...)   INTERNAL_CATCH_NO_THROW( "REQUIRE_NOTHROW", Catch::ResultDisposition::Normal, __VA_ARGS__ )
 
#define REQUIRE_THAT(arg, matcher)   INTERNAL_CHECK_THAT( "REQUIRE_THAT", matcher, Catch::ResultDisposition::Normal, arg )
 
#define REQUIRE_THROWS(...)   INTERNAL_CATCH_THROWS( "REQUIRE_THROWS", Catch::ResultDisposition::Normal, __VA_ARGS__ )
 
#define REQUIRE_THROWS_AS(expr, exceptionType)   INTERNAL_CATCH_THROWS_AS( "REQUIRE_THROWS_AS", exceptionType, Catch::ResultDisposition::Normal, expr )
 
#define REQUIRE_THROWS_MATCHES(expr, exceptionType, matcher)   INTERNAL_CATCH_THROWS_MATCHES( "REQUIRE_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::Normal, matcher, expr )
 
#define REQUIRE_THROWS_WITH(expr, matcher)   INTERNAL_CATCH_THROWS_STR_MATCHES( "REQUIRE_THROWS_WITH", Catch::ResultDisposition::Normal, matcher, expr )
 
#define SCENARIO(...)   TEST_CASE( "Scenario: " __VA_ARGS__ )
 
#define SCENARIO_METHOD(className, ...)   INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " __VA_ARGS__ )
 
#define SECTION(...)   INTERNAL_CATCH_SECTION( __VA_ARGS__ )
 
#define STATIC_REQUIRE(...)   static_assert( __VA_ARGS__, #__VA_ARGS__ ); SUCCEED( #__VA_ARGS__ )
 
#define STATIC_REQUIRE_FALSE(...)   static_assert( !(__VA_ARGS__), "!(" #__VA_ARGS__ ")" ); SUCCEED( "!(" #__VA_ARGS__ ")" )
 
#define SUCCEED(...)   INTERNAL_CATCH_MSG( "SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
 
#define TEST_CASE(...)   INTERNAL_CATCH_TESTCASE( __VA_ARGS__ )
 
#define TEST_CASE_METHOD(className, ...)   INTERNAL_CATCH_TEST_CASE_METHOD( className, __VA_ARGS__ )
 
#define THEN(desc)   INTERNAL_CATCH_DYNAMIC_SECTION( " Then: " << desc )
 
#define WARN(msg)   INTERNAL_CATCH_MSG( "WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg )
 
#define WHEN(desc)   INTERNAL_CATCH_DYNAMIC_SECTION( " When: " << desc )
 

Typedefs

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

Functions

auto Catch::Generators::acquireGeneratorTracker (SourceLineInfo const &lineInfo) -> IGeneratorTracker &
 
template<typename T >
auto Catch::Generators::all () -> Generator< T >
 
template<>
auto Catch::Generators::all< int > () -> Generator< int >
 
template<typename T >
auto Catch::Generators::as () -> Generator< T >
 
std::ostream & Catch::cerr ()
 
void Catch::cleanUp ()
 
std::ostream & Catch::clog ()
 
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
 
bool Catch::contains (std::string const &s, std::string const &infix)
 
StdString::ContainsMatcher Catch::Matchers::Contains (std::string const &str, CaseSensitive::Choice caseSensitivity=CaseSensitive::Yes)
 
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 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 InputIterator , typename T >
size_t Catch::Matchers::Vector::Detail::count (InputIterator first, InputIterator last, T const &item)
 
std::ostream & Catch::cout ()
 
bool Catch::endsWith (std::string const &s, std::string const &suffix)
 
bool Catch::endsWith (std::string const &s, char suffix)
 
StdString::EndsWithMatcher Catch::Matchers::EndsWith (std::string const &str, CaseSensitive::Choice caseSensitivity=CaseSensitive::Yes)
 
StdString::EqualsMatcher Catch::Matchers::Equals (std::string const &str, CaseSensitive::Choice caseSensitivity=CaseSensitive::Yes)
 
template<typename T >
Vector::EqualsMatcher< T > Catch::Matchers::Equals (std::vector< T > const &comparator)
 
std::vector< TestCase > Catch::filterTests (std::vector< TestCase > const &testCases, TestSpec const &testSpec, IConfig const &config)
 
std::string Catch::Matchers::Generic::Detail::finalizeDescription (const std::string &desc)
 
void Catch::formatReconstructedExpression (std::ostream &os, std::string const &lhs, StringRef op, std::string const &rhs)
 
template<typename L >
auto Catch::Generators::generate (SourceLineInfo const &lineInfo, L const &generatorExpression) -> decltype(std::declval< decltype(generatorExpression())>()[0])
 
std::vector< TestCase > const & Catch::getAllTestCasesSorted (IConfig const &config)
 
auto Catch::getCurrentNanosecondsSinceEpoch () -> uint64_t
 
auto Catch::getEstimatedClockResolution () -> uint64_t
 
IMutableRegistryHub & Catch::getMutableRegistryHub ()
 
IRegistryHub const & Catch::getRegistryHub ()
 
IResultCapture & Catch::getResultCapture ()
 
void Catch::handleExceptionMatchExpr (AssertionHandler &handler, std::string const &str, StringRef const &matcherString)
 
void Catch::handleExceptionMatchExpr (AssertionHandler &handler, StringMatcher const &matcher, StringRef const &matcherString)
 
void Catch::handleExpression (ITransientExpression const &expr)
 
template<typename T >
void Catch::handleExpression (ExprLhs< T > const &expr)
 
bool Catch::isFalseTest (int flags)
 
bool Catch::isJustInfo (int flags)
 
bool Catch::isOk (ResultWas::OfType resultType)
 
template<typename T , typename... Args>
std::unique_ptr< T > Catch::Generators::pf::make_unique (Args &&...args)
 
template<typename T , typename... Gs>
auto Catch::Generators::makeGenerators (Generator< T > &&generator, Gs...moreGenerators) -> Generators< T >
 
template<typename T >
auto Catch::Generators::makeGenerators (Generator< 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 (U &&val, Gs...moreGenerators) -> Generators< T >
 
template<typename ArgT , typename MatcherT >
auto Catch::makeMatchExpr (ArgT const &arg, MatcherT const &matcher, StringRef const &matcherString) -> MatchExpr< ArgT, MatcherT >
 
auto Catch::makeStream (StringRef const &filename) -> IStream const *
 
TestCase Catch::makeTestCase (ITestInvoker *testCase, std::string const &className, NameAndTags const &nameAndTags, SourceLineInfo const &lineInfo)
 
auto Catch::makeTestInvoker (void(*testAsFunction)()) noexcept-> ITestInvoker *
 
template<typename C >
auto Catch::makeTestInvoker (void(C::*testAsMethod)()) noexcept-> ITestInvoker *
 
StdString::RegexMatcher Catch::Matchers::Matches (std::string const &regex, CaseSensitive::Choice caseSensitivity=CaseSensitive::Yes)
 
bool Catch::matchTest (TestCase const &testCase, TestSpec const &testSpec, IConfig const &config)
 
Detail::Approx Catch::literals::operator""_a (long double val)
 
Detail::Approx Catch::literals::operator""_a (unsigned long long val)
 
auto operator""_catch_sr (char const *rawChars, std::size_t size) noexcept-> Catch::StringRef
 
auto Catch::operator""_sr (char const *rawChars, std::size_t size) noexcept-> StringRef
 
template<typename T >
T const & Catch::operator+ (T const &value, StreamEndStop)
 
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 &
 
std::ostream & operator<< (std::ostream &, Catch_global_namespace_dummy)
 
std::ostream & Catch::operator<< (std::ostream &os, SourceLineInfo const &info)
 
auto Catch::operator<< (std::ostream &os, StringRef const &sr) -> std::ostream &
 
ResultDisposition::Flags Catch::operator| (ResultDisposition::Flags lhs, ResultDisposition::Flags rhs)
 
template<typename T >
Generic::PredicateMatcher< T > Catch::Matchers::Predicate (std::function< bool(T const &)> const &predicate, std::string const &description="")
 
template<typename T >
auto Catch::Generators::random (T const &first, T const &last) -> Generator< T >
 
template<typename T >
auto Catch::Generators::random (size_t size) -> Generator< T >
 
std::vector< size_t > Catch::Generators::randomiseIndices (size_t selectionSize, size_t sourceSize)
 
template<typename T >
auto Catch::Generators::range (T const &first, T const &last) -> Generator< T >
 
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)
 
std::string Catch::Detail::rawMemoryToString (const void *object, std::size_t size)
 
template<typename T >
std::string Catch::Detail::rawMemoryToString (const T &object)
 
bool Catch::replaceInPlace (std::string &str, std::string const &replaceThis, std::string const &withThis)
 
unsigned int Catch::rngSeed ()
 
bool Catch::shouldContinueOnFailure (int flags)
 
bool Catch::shouldSuppressFailure (int flags)
 
bool Catch::startsWith (std::string const &s, std::string const &prefix)
 
bool Catch::startsWith (std::string const &s, char prefix)
 
StdString::StartsWithMatcher Catch::Matchers::StartsWith (std::string const &str, CaseSensitive::Choice caseSensitivity=CaseSensitive::Yes)
 
template<typename T >
std::string Catch::Detail::stringify (const T &e)
 
template<typename... Ts>
auto Catch::Generators::table (std::initializer_list< std::tuple< Ts... >> &&tuples) -> Generator< std::tuple< Ts... >>
 
void Catch::throw_exception (std::exception const &e)
 
std::string Catch::toLower (std::string const &s)
 
void Catch::toLowerInPlace (std::string &s)
 
std::string Catch::translateActiveException ()
 
std::string Catch::trim (std::string const &str)
 
template<typename T >
Vector::UnorderedEqualsMatcher< T > Catch::Matchers::UnorderedEquals (std::vector< T > const &target)
 
template<typename T >
auto Catch::Generators::value (T const &val) -> Generator< T >
 
template<typename T >
auto Catch::Generators::values (std::initializer_list< T > values) -> Generator< T >
 
template<typename T >
Vector::ContainsElementMatcher< T > Catch::Matchers::VectorContains (T const &comparator)
 
Floating::WithinAbsMatcher Catch::Matchers::WithinAbs (double target, double margin)
 
Floating::WithinUlpsMatcher Catch::Matchers::WithinULP (double target, int maxUlpDiff)
 
Floating::WithinUlpsMatcher Catch::Matchers::WithinULP (float target, int maxUlpDiff)
 

Variables

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

Macro Definition Documentation

#define AND_GIVEN (   desc)    INTERNAL_CATCH_DYNAMIC_SECTION( "And given: " << desc )

Definition at line 13912 of file catch.hpp.

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

Definition at line 13916 of file catch.hpp.

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

Definition at line 13914 of file catch.hpp.

#define ANON_TEST_CASE ( )    INTERNAL_CATCH_TESTCASE()

Definition at line 13893 of file catch.hpp.

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

Definition at line 2144 of file catch.hpp.

#define CAPTURE (   ...)    INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), "CAPTURE",__VA_ARGS__ )

Definition at line 13882 of file catch.hpp.

#define CATCH_CATCH_ALL   if ((false))

Definition at line 338 of file catch.hpp.

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

Definition at line 339 of file catch.hpp.

#define CATCH_CONFIG_COUNTER

Definition at line 281 of file catch.hpp.

#define CATCH_CONFIG_CPP11_TO_STRING

Definition at line 296 of file catch.hpp.

#define CATCH_CONFIG_DISABLE_EXCEPTIONS

Definition at line 320 of file catch.hpp.

#define CATCH_CONFIG_POSIX_SIGNALS

Definition at line 288 of file catch.hpp.

#define CATCH_CONFIG_WCHAR

Definition at line 292 of file catch.hpp.

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

Definition at line 3037 of file catch.hpp.

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

Definition at line 3033 of file catch.hpp.

#define CATCH_INTERNAL_CONFIG_COUNTER

Definition at line 251 of file catch.hpp.

#define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS

Definition at line 164 of file catch.hpp.

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

Definition at line 3031 of file catch.hpp.

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

Definition at line 422 of file catch.hpp.

#define CATCH_INTERNAL_STRINGIFY (   ...)    #__VA_ARGS__

Definition at line 1846 of file catch.hpp.

#define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS

Definition at line 328 of file catch.hpp.

#define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS

Definition at line 324 of file catch.hpp.

#define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS

Definition at line 332 of file catch.hpp.

#define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS

Definition at line 329 of file catch.hpp.

#define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS

Definition at line 325 of file catch.hpp.

#define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS

Definition at line 333 of file catch.hpp.

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

Definition at line 3029 of file catch.hpp.

#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:329
#define CATCH_INTERNAL_LINEINFO
Definition: catch.hpp:422
#define INTERNAL_CATCH_UNIQUE_NAME(name)
Definition: catch.hpp:350

Definition at line 434 of file catch.hpp.

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

Definition at line 3035 of file catch.hpp.

#define CATCH_TRANSLATE_EXCEPTION (   signature)    INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature )

Definition at line 13905 of file catch.hpp.

#define CATCH_TRY   if ((true))

Definition at line 337 of file catch.hpp.

#define CATCH_VERSION_MAJOR   2

Definition at line 16 of file catch.hpp.

#define CATCH_VERSION_MINOR   4

Definition at line 17 of file catch.hpp.

#define CATCH_VERSION_PATCH   2

Definition at line 18 of file catch.hpp.

#define CHECK (   ...)    INTERNAL_CATCH_TEST( "CHECK", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )

Definition at line 13860 of file catch.hpp.

#define CHECK_FALSE (   ...)    INTERNAL_CATCH_TEST( "CHECK_FALSE", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )

Definition at line 13861 of file catch.hpp.

#define CHECK_NOFAIL (   ...)    INTERNAL_CATCH_TEST( "CHECK_NOFAIL", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ )

Definition at line 13864 of file catch.hpp.

#define CHECK_NOTHROW (   ...)    INTERNAL_CATCH_NO_THROW( "CHECK_NOTHROW", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )

Definition at line 13872 of file catch.hpp.

#define CHECK_THAT (   arg,
  matcher 
)    INTERNAL_CHECK_THAT( "CHECK_THAT", matcher, Catch::ResultDisposition::ContinueOnFailure, arg )

Definition at line 13875 of file catch.hpp.

#define CHECK_THROWS (   ...)    INTERNAL_CATCH_THROWS( "CHECK_THROWS", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )

Definition at line 13866 of file catch.hpp.

#define CHECK_THROWS_AS (   expr,
  exceptionType 
)    INTERNAL_CATCH_THROWS_AS( "CHECK_THROWS_AS", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr )

Definition at line 13867 of file catch.hpp.

#define CHECK_THROWS_MATCHES (   expr,
  exceptionType,
  matcher 
)    INTERNAL_CATCH_THROWS_MATCHES( "CHECK_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::ContinueOnFailure, matcher, expr )

Definition at line 13870 of file catch.hpp.

#define CHECK_THROWS_WITH (   expr,
  matcher 
)    INTERNAL_CATCH_THROWS_STR_MATCHES( "CHECK_THROWS_WITH", Catch::ResultDisposition::ContinueOnFailure, matcher, expr )

Definition at line 13868 of file catch.hpp.

#define CHECKED_ELSE (   ...)    INTERNAL_CATCH_ELSE( "CHECKED_ELSE", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )

Definition at line 13863 of file catch.hpp.

#define CHECKED_IF (   ...)    INTERNAL_CATCH_IF( "CHECKED_IF", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )

Definition at line 13862 of file catch.hpp.

#define DYNAMIC_SECTION (   ...)    INTERNAL_CATCH_DYNAMIC_SECTION( __VA_ARGS__ )

Definition at line 13889 of file catch.hpp.

#define FAIL (   ...)    INTERNAL_CATCH_MSG( "FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ )

Definition at line 13890 of file catch.hpp.

#define FAIL_CHECK (   ...)    INTERNAL_CATCH_MSG( "FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )

Definition at line 13891 of file catch.hpp.

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

Definition at line 3272 of file catch.hpp.

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

Definition at line 13911 of file catch.hpp.

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

Definition at line 13880 of file catch.hpp.

#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__ )
#define CATCH_INTERNAL_LINEINFO
Definition: catch.hpp:422

Definition at line 1951 of file catch.hpp.

#define INTERNAL_CATCH_CATCH (   capturer)

Definition at line 1857 of file catch.hpp.

#define INTERNAL_CATCH_DEF (   ...)    INTERNAL_CATCH_DEF __VA_ARGS__

Definition at line 636 of file catch.hpp.

#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:333
#define CATCH_INTERNAL_LINEINFO
Definition: catch.hpp:422
#define INTERNAL_CATCH_UNIQUE_NAME(name)
Definition: catch.hpp:350

Definition at line 2096 of file catch.hpp.

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

Definition at line 1887 of file catch.hpp.

#define INTERNAL_CATCH_EXPAND1 (   param)    INTERNAL_CATCH_EXPAND2(param)

Definition at line 634 of file catch.hpp.

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

Definition at line 635 of file catch.hpp.

#define INTERNAL_CATCH_IF (   macroName,
  resultDisposition,
  ... 
)
Value:
INTERNAL_CATCH_TEST( macroName, resultDisposition, __VA_ARGS__ ); \
if( Catch::getResultCapture().lastAssertionPassed() )
IResultCapture & getResultCapture()
#define INTERNAL_CATCH_TEST(macroName, resultDisposition,...)
Definition: catch.hpp:1869

Definition at line 1882 of file catch.hpp.

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

Definition at line 1956 of file catch.hpp.

#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 */ \
#define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS
Definition: catch.hpp:329
auto makeTestInvoker(void(*testAsFunction)()) noexcept-> ITestInvoker *
#define CATCH_INTERNAL_LINEINFO
Definition: catch.hpp:422
#define INTERNAL_CATCH_UNIQUE_NAME(name)
Definition: catch.hpp:350

Definition at line 663 of file catch.hpp.

#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 )
#define CATCH_INTERNAL_LINEINFO
Definition: catch.hpp:422
#define INTERNAL_CATCH_REACT(handler)
Definition: catch.hpp:1866

Definition at line 1943 of file catch.hpp.

#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_LINEINFO
Definition: catch.hpp:422
#define INTERNAL_CATCH_REACT(handler)
Definition: catch.hpp:1866
#define CATCH_INTERNAL_STRINGIFY(...)
Definition: catch.hpp:1846

Definition at line 1892 of file catch.hpp.

#define INTERNAL_CATCH_NOINTERNAL_CATCH_DEF

Definition at line 637 of file catch.hpp.

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

Definition at line 1866 of file catch.hpp.

#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 */ \
#define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS
Definition: catch.hpp:329
auto makeTestInvoker(void(*testAsFunction)()) noexcept-> ITestInvoker *
#define CATCH_INTERNAL_LINEINFO
Definition: catch.hpp:422
#define INTERNAL_CATCH_UNIQUE_NAME(name)
Definition: catch.hpp:350

Definition at line 683 of file catch.hpp.

#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__ ) ) \
#define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS
Definition: catch.hpp:333
#define CATCH_INTERNAL_LINEINFO
Definition: catch.hpp:422
#define INTERNAL_CATCH_UNIQUE_NAME(name)
Definition: catch.hpp:350

Definition at line 2091 of file catch.hpp.

#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_TRY
Definition: catch.hpp:1856
#define INTERNAL_CATCH_CATCH(capturer)
Definition: catch.hpp:1857
#define CATCH_INTERNAL_LINEINFO
Definition: catch.hpp:422
#define INTERNAL_CATCH_REACT(handler)
Definition: catch.hpp:1866
#define CATCH_INTERNAL_STRINGIFY(...)
Definition: catch.hpp:1846
#define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS
Definition: catch.hpp:325

Definition at line 1869 of file catch.hpp.

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

Definition at line 679 of file catch.hpp.

#define INTERNAL_CATCH_TEST_CASE_METHOD2 (   TestName,
  ClassName,
  ... 
)
Value:
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
namespace{ \
struct TestName : INTERNAL_CATCH_EXPAND1(INTERNAL_CATCH_DEF 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()
auto makeTestInvoker(void(*testAsFunction)()) noexcept-> ITestInvoker *
#define CATCH_INTERNAL_LINEINFO
Definition: catch.hpp:422
#define INTERNAL_CATCH_DEF(...)
Definition: catch.hpp:636
#define INTERNAL_CATCH_UNIQUE_NAME(name)
Definition: catch.hpp:350
#define INTERNAL_CATCH_EXPAND1(param)
Definition: catch.hpp:634

Definition at line 669 of file catch.hpp.

#define INTERNAL_CATCH_TESTCASE (   ...)    INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), __VA_ARGS__ )

Definition at line 659 of file catch.hpp.

#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()
auto makeTestInvoker(void(*testAsFunction)()) noexcept-> ITestInvoker *
#define CATCH_INTERNAL_LINEINFO
Definition: catch.hpp:422
#define INTERNAL_CATCH_UNIQUE_NAME(name)
Definition: catch.hpp:350

Definition at line 653 of file catch.hpp.

#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 )
#define CATCH_INTERNAL_LINEINFO
Definition: catch.hpp:422
#define INTERNAL_CATCH_REACT(handler)
Definition: catch.hpp:1866
#define CATCH_INTERNAL_STRINGIFY(...)
Definition: catch.hpp:1846

Definition at line 1906 of file catch.hpp.

#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 )
#define CATCH_INTERNAL_LINEINFO
Definition: catch.hpp:422
#define INTERNAL_CATCH_REACT(handler)
Definition: catch.hpp:1866
#define CATCH_INTERNAL_STRINGIFY(...)
Definition: catch.hpp:1846

Definition at line 1923 of file catch.hpp.

#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 )
#define CATCH_INTERNAL_LINEINFO
Definition: catch.hpp:422
#define INTERNAL_CATCH_REACT(handler)
Definition: catch.hpp:1866
#define CATCH_INTERNAL_STRINGIFY(...)
Definition: catch.hpp:1846
auto makeMatchExpr(ArgT const &arg, MatcherT const &matcher, StringRef const &matcherString) -> MatchExpr< ArgT, MatcherT >
Definition: catch.hpp:2940

Definition at line 2957 of file catch.hpp.

#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 )
#define CATCH_INTERNAL_LINEINFO
Definition: catch.hpp:422
#define INTERNAL_CATCH_REACT(handler)
Definition: catch.hpp:1866
#define CATCH_INTERNAL_STRINGIFY(...)
Definition: catch.hpp:1846
void handleExceptionMatchExpr(AssertionHandler &handler, StringMatcher const &matcher, StringRef const &matcherString)

Definition at line 1961 of file catch.hpp.

#define INTERNAL_CATCH_TRANSLATE_EXCEPTION (   signature)    INTERNAL_CATCH_TRANSLATE_EXCEPTION2( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature )

Definition at line 2266 of file catch.hpp.

#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 )
#define INTERNAL_CATCH_UNIQUE_NAME(name)
Definition: catch.hpp:350

Definition at line 2259 of file catch.hpp.

#define INTERNAL_CATCH_TRY

Definition at line 1856 of file catch.hpp.

#define INTERNAL_CATCH_UNIQUE_NAME (   name)    INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ )

Definition at line 350 of file catch.hpp.

#define INTERNAL_CATCH_UNIQUE_NAME_LINE (   name,
  line 
)    INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line )

Definition at line 348 of file catch.hpp.

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

Definition at line 347 of file catch.hpp.

#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 )
#define INTERNAL_CATCH_TRY
Definition: catch.hpp:1856
#define INTERNAL_CATCH_CATCH(capturer)
Definition: catch.hpp:1857
#define CATCH_INTERNAL_LINEINFO
Definition: catch.hpp:422
#define INTERNAL_CATCH_REACT(handler)
Definition: catch.hpp:1866
#define CATCH_INTERNAL_STRINGIFY(...)
Definition: catch.hpp:1846
auto makeMatchExpr(ArgT const &arg, MatcherT const &matcher, StringRef const &matcherString) -> MatchExpr< ArgT, MatcherT >
Definition: catch.hpp:2940

Definition at line 2947 of file catch.hpp.

#define METHOD_AS_TEST_CASE (   method,
  ... 
)    INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ )

Definition at line 13886 of file catch.hpp.

#define REGISTER_TEST_CASE (   Function,
  ... 
)    INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ )

Definition at line 13887 of file catch.hpp.

#define REQUIRE (   ...)    INTERNAL_CATCH_TEST( "REQUIRE", Catch::ResultDisposition::Normal, __VA_ARGS__ )

Definition at line 13849 of file catch.hpp.

#define REQUIRE_FALSE (   ...)    INTERNAL_CATCH_TEST( "REQUIRE_FALSE", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )

Definition at line 13850 of file catch.hpp.

#define REQUIRE_NOTHROW (   ...)    INTERNAL_CATCH_NO_THROW( "REQUIRE_NOTHROW", Catch::ResultDisposition::Normal, __VA_ARGS__ )

Definition at line 13858 of file catch.hpp.

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

Definition at line 13877 of file catch.hpp.

#define REQUIRE_THROWS (   ...)    INTERNAL_CATCH_THROWS( "REQUIRE_THROWS", Catch::ResultDisposition::Normal, __VA_ARGS__ )

Definition at line 13852 of file catch.hpp.

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

Definition at line 13853 of file catch.hpp.

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

Definition at line 13856 of file catch.hpp.

#define REQUIRE_THROWS_WITH (   expr,
  matcher 
)    INTERNAL_CATCH_THROWS_STR_MATCHES( "REQUIRE_THROWS_WITH", Catch::ResultDisposition::Normal, matcher, expr )

Definition at line 13854 of file catch.hpp.

#define SCENARIO (   ...)    TEST_CASE( "Scenario: " __VA_ARGS__ )

Definition at line 13908 of file catch.hpp.

#define SCENARIO_METHOD (   className,
  ... 
)    INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " __VA_ARGS__ )

Definition at line 13909 of file catch.hpp.

#define SECTION (   ...)    INTERNAL_CATCH_SECTION( __VA_ARGS__ )

Definition at line 13888 of file catch.hpp.

#define STATIC_REQUIRE (   ...)    static_assert( __VA_ARGS__, #__VA_ARGS__ ); SUCCEED( #__VA_ARGS__ )

Definition at line 13896 of file catch.hpp.

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

Definition at line 13897 of file catch.hpp.

#define SUCCEED (   ...)    INTERNAL_CATCH_MSG( "SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )

Definition at line 13892 of file catch.hpp.

#define TEST_CASE (   ...)    INTERNAL_CATCH_TESTCASE( __VA_ARGS__ )

Definition at line 13884 of file catch.hpp.

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

Definition at line 13885 of file catch.hpp.

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

Definition at line 13915 of file catch.hpp.

#define WARN (   msg)    INTERNAL_CATCH_MSG( "WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg )

Definition at line 13881 of file catch.hpp.

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

Definition at line 13913 of file catch.hpp.

Function Documentation

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

Definition at line 595 of file catch.hpp.

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


catch_ros
Author(s): Max Schwarz
autogenerated on Sat Jun 8 2019 17:59:58