Skip to content

catch


IResultCapture class (Catch::IResultCapture)

IResultCapture

IConfig class (Catch::IConfig)

IConfig

Context class (Catch::Context)

Context

SimplePcg32 class (Catch::SimplePcg32)

SimplePcg32

TestFailureException class (Catch::TestFailureException)

TestFailureException

//! Used to signal that an assertion macro failed


TestSkipException class (Catch::TestSkipException)

TestSkipException

//! Used to signal that the remainder of a test should be skipped


throw_test_failure_exception function (Catch::throw_test_failure_exception)

void throw_test_failure_exception()

Outlines throwing of TestFailureException into a single TU

Also handles CATCH_CONFIG_DISABLE_EXCEPTIONS for callers.


throw_test_skip_exception function (Catch::throw_test_skip_exception)

void throw_test_skip_exception()

Outlines throwing of TestSkipException into a single TU

Also handles CATCH_CONFIG_DISABLE_EXCEPTIONS for callers.


StringRef class (Catch::StringRef)

StringRef

A non-owning string class (similar to the forthcoming std::string_view) Note that, because a StringRef may be a substring of another string, it may not be null terminated.

compare function (Catch::StringRef::compare)

int compare(StringRef rhs) const

Provides a three-way comparison with rhs

Returns negative number if lhs < rhs, 0 if lhs == rhs, and a positive number if lhs > rhs


ResultWas class (Catch::ResultWas)

ResultWas

ResultDisposition class (Catch::ResultDisposition)

ResultDisposition

unique_ptr class (Catch::Detail::unique_ptr)

template <typename T> unique_ptr

A reimplementation of std::unique_ptr for improved compilation performance

Does not support arrays nor custom deleters.


template <typename T> unique_ptr

//! Specialization to cause compile-time error for arrays


BenchmarkStats class (Catch::BenchmarkStats)

template <typename Duration = Benchmark::FDuration>
BenchmarkStats

AssertionResult class (Catch::AssertionResult)

AssertionResult

AssertionInfo class (Catch::AssertionInfo)

AssertionInfo

SectionInfo class (Catch::SectionInfo)

SectionInfo

SectionEndInfo class (Catch::SectionEndInfo)

SectionEndInfo

MessageInfo class (Catch::MessageInfo)

MessageInfo

MessageBuilder class (Catch::MessageBuilder)

MessageBuilder

Counts class (Catch::Counts)

Counts

AssertionReaction class (Catch::AssertionReaction)

AssertionReaction

SourceLineInfo class (Catch::SourceLineInfo)

SourceLineInfo

ITransientExpression class (Catch::ITransientExpression)

ITransientExpression

IGeneratorTracker class (Catch::IGeneratorTracker)

IGeneratorTracker

BenchmarkInfo class (Catch::BenchmarkInfo)

BenchmarkInfo

GeneratorUntypedBase class (Catch::Generators::GeneratorUntypedBase)

GeneratorUntypedBase

IResultCapture class (Catch::IResultCapture)

IResultCapture

NonCopyable class (Catch::Detail::NonCopyable)

NonCopyable

//! Deriving classes become noncopyable and nonmovable


WarnAbout class (Catch::WarnAbout)

WarnAbout

NoAssertions enumerator (Catch::WarnAbout::What::NoAssertions)

//! A test case or leaf section did not run any assertions

UnmatchedTestSpec enumerator (Catch::WarnAbout::What::UnmatchedTestSpec)

//! A command line test spec matched no test cases


PlatformDefault enumerator (Catch::ColourMode::PlatformDefault)

//! Let Catch2 pick implementation based on platform detection


ANSI enumerator (Catch::ColourMode::ANSI)

//! Use ANSI colour code escapes


Win32 enumerator (Catch::ColourMode::Win32)

//! Use Win32 console colour API


None enumerator (Catch::ColourMode::None)

//! Don't use any colour


WaitForKeypress class (Catch::WaitForKeypress)

WaitForKeypress

TestSpec class (Catch::TestSpec)

TestSpec

IStream class (Catch::IStream)

IStream

IConfig class (Catch::IConfig)

IConfig

TestCaseHandle class (Catch::TestCaseHandle)

TestCaseHandle

Wrapper over the test case information and the test case invoker

Does not own either, and is specifically made to be cheap to copy around.


TestCaseInfo class (Catch::TestCaseInfo)

TestCaseInfo

Various metadata about the test case.

A test case is uniquely identified by its (class)name and tags combination, with source location being ignored, and other properties being determined from tags.

Tags are kept sorted.


ITestCaseRegistry class (Catch::ITestCaseRegistry)

ITestCaseRegistry

IExceptionTranslatorRegistry class (Catch::IExceptionTranslatorRegistry)

IExceptionTranslatorRegistry

IExceptionTranslator class (Catch::IExceptionTranslator)

IExceptionTranslator

ReporterRegistry class (Catch::ReporterRegistry)

ReporterRegistry

IReporterFactory class (Catch::IReporterFactory)

IReporterFactory

ITagAliasRegistry class (Catch::ITagAliasRegistry)

ITagAliasRegistry

ITestInvoker class (Catch::ITestInvoker)

ITestInvoker

IMutableEnumValuesRegistry class (Catch::IMutableEnumValuesRegistry)

IMutableEnumValuesRegistry

SourceLineInfo class (Catch::SourceLineInfo)

SourceLineInfo

StartupExceptionRegistry class (Catch::StartupExceptionRegistry)

StartupExceptionRegistry

EventListenerFactory class (Catch::EventListenerFactory)

EventListenerFactory

IRegistryHub class (Catch::IRegistryHub)

IRegistryHub

IMutableRegistryHub class (Catch::IMutableRegistryHub)

IMutableRegistryHub

Estimate class (Catch::Benchmark::Estimate)

template <typename Type> Estimate

OutlierClassification class (Catch::Benchmark::OutlierClassification)

OutlierClassification

BenchmarkInfo class (Catch::BenchmarkInfo)

BenchmarkInfo

BenchmarkStats class (Catch::BenchmarkStats)

template <class Dummy> BenchmarkStats

EnvironmentEstimate class (Catch::Benchmark::EnvironmentEstimate)

EnvironmentEstimate

Environment class (Catch::Benchmark::Environment)

Environment

true_given class (Catch::true_given)

template <typename> true_given

is_callable_tester class (Catch::is_callable_tester)

is_callable_tester

is_callable class (Catch::is_callable)

template <typename T> is_callable

template <typename Fun, typename... Args> is_callable

na class (mpl_::na)

na

ChronometerConcept class (Catch::Benchmark::Detail::ChronometerConcept)

ChronometerConcept

ChronometerModel class (Catch::Benchmark::Detail::ChronometerModel)

template <typename Clock> ChronometerModel

Chronometer class (Catch::Benchmark::Chronometer)

Chronometer

BenchmarkFunction class (Catch::Benchmark::Detail::BenchmarkFunction)

BenchmarkFunction

We need to reinvent std::function because every piece of code that might add overhead in a measurement context needs to have consistent performance characteristics so that we can account for it in the measurement. Implementations of std::function with optimizations that aren't always applicable, like small buffer optimizations, are not uncommon. This is effectively an implementation of std::function without any such optimizations; it may be slow, but it is consistently slow.

callable class (Catch::Benchmark::Detail::BenchmarkFunction::callable)

callable

model class (Catch::Benchmark::Detail::BenchmarkFunction::model)

template <typename Fun> model

repeater class (Catch::Benchmark::Detail::repeater)

template <typename Fun> repeater

CompleteType class (Catch::Benchmark::Detail::CompleteType)

template <typename T> CompleteType

CompleteType

type class (Catch::Benchmark::Detail::CompleteType::type)

type

CompleteInvoker class (Catch::Benchmark::Detail::CompleteInvoker)

template <typename Result> CompleteInvoker

CompleteInvoker

Timing class (Catch::Benchmark::Timing)

template <typename Result> Timing

ExecutionPlan class (Catch::Benchmark::ExecutionPlan)

ExecutionPlan

bootstrap_analysis class (Catch::Benchmark::Detail::bootstrap_analysis)

bootstrap_analysis

SampleAnalysis class (Catch::Benchmark::SampleAnalysis)

SampleAnalysis

IConfig class (Catch::IConfig)

IConfig

Benchmark class (Catch::Benchmark::Benchmark)

Benchmark

ObjectStorage class (Catch::Benchmark::Detail::ObjectStorage)

template <typename T, bool Destruct> ObjectStorage

ReusableStringStream class (Catch::ReusableStringStream)

ReusableStringStream

str function (Catch::ReusableStringStream::str)

std::string str() const

//! Returns the serialized state

void str(std::string const &str)

//! Sets internal state to str


make_void class (Catch::Detail::make_void)

template <typename> make_void

EnumInfo class (Catch::Detail::EnumInfo)

EnumInfo

IMutableEnumValuesRegistry class (Catch::IMutableEnumValuesRegistry)

IMutableEnumValuesRegistry

Catch_global_namespace_dummy class

Catch_global_namespace_dummy

convertIntoString function (Catch::Detail::convertIntoString)

std::string convertIntoString(StringRef string,
                              bool escapeInvisibles)

//! Encases `string in quotes, and optionally escapes invisibles


std::string convertIntoString(StringRef string)

//! Encases string in quotes, and escapes invisibles if user requested //! it via CLI


StringMaker class (Catch::StringMaker)

template <typename T, typename = void> StringMaker

StringMaker

StringMaker

StringMaker

StringMaker

StringMaker

StringMaker

StringMaker

StringMaker

template <size_t SZ> StringMaker

template <size_t SZ> StringMaker

template <size_t SZ> StringMaker

StringMaker

StringMaker

StringMaker

StringMaker

StringMaker

StringMaker

StringMaker

StringMaker

StringMaker

StringMaker

StringMaker

StringMaker

StringMaker

StringMaker

template <typename T> StringMaker

template <typename R, typename C> StringMaker

is_range_impl class (Catch::Detail::is_range_impl)

template <typename T, typename = void> is_range_impl

template <typename T> is_range_impl

is_range class (Catch::is_range)

template <typename T> is_range

StringMaker class (Catch::StringMaker)

template <typename R> StringMaker

template <typename T, size_t SZ> StringMaker

ratio_string class (Catch::ratio_string)

template <class Ratio> ratio_string

ratio_string

ratio_string

ratio_string

ratio_string

ratio_string

ratio_string

StringMaker class (Catch::StringMaker)

template <typename Value, typename Ratio> StringMaker

/////////


template <typename Value> StringMaker

template <typename Value> StringMaker

template <typename Value> StringMaker

template <typename Clock, typename Duration> StringMaker

/////////


template <typename Duration> StringMaker

Approx class (Catch::Approx)

Approx

StringMaker class (Catch::StringMaker)

StringMaker

SourceLineInfo class (Catch::SourceLineInfo)

SourceLineInfo

AssertionInfo class (Catch::AssertionInfo)

AssertionInfo

ITransientExpression class (Catch::ITransientExpression)

ITransientExpression

LazyExpression class (Catch::LazyExpression)

LazyExpression

AssertionResultData class (Catch::AssertionResultData)

AssertionResultData

AssertionResult class (Catch::AssertionResult)

AssertionResult

WildcardPattern class (Catch::WildcardPattern)

WildcardPattern

IConfig class (Catch::IConfig)

IConfig

TestCaseInfo class (Catch::TestCaseInfo)

TestCaseInfo

Various metadata about the test case.

A test case is uniquely identified by its (class)name and tags combination, with source location being ignored, and other properties being determined from tags.

Tags are kept sorted.


TestCaseHandle class (Catch::TestCaseHandle)

TestCaseHandle

Wrapper over the test case information and the test case invoker

Does not own either, and is specifically made to be cheap to copy around.


TestSpec class (Catch::TestSpec)

TestSpec

Pattern class (Catch::TestSpec::Pattern)

Pattern

NamePattern class (Catch::TestSpec::NamePattern)

NamePattern

TagPattern class (Catch::TestSpec::TagPattern)

TagPattern

Filter class (Catch::TestSpec::Filter)

Filter

serializeTo function (Catch::TestSpec::Filter::serializeTo)

void serializeTo(std::ostream &out) const

//! Serializes this filter into a string that would be parsed into //! an equivalent filter

FilterMatch class (Catch::TestSpec::FilterMatch)

FilterMatch

serializeTo function (Catch::TestSpec::serializeTo)

void serializeTo(std::ostream &out) const

//! Serializes this test spec into a string that would be parsed into //! equivalent test spec


Optional class (Catch::Optional)

template <typename T> Optional

Default enumerator (Catch::GenerateFrom::Default)

//! Currently equivalent to RandomDevice, but can change at any point


splitReporterSpec function (Catch::Detail::splitReporterSpec)

std::vector<std::string>
splitReporterSpec(StringRef reporterSpec)

//! Splits the reporter spec into reporter name and kv-pair options


ReporterSpec class (Catch::ReporterSpec)

ReporterSpec

Structured reporter spec that a reporter can be created from

Parsing has been validated, but semantics have not. This means e.g. that the colour mode is known to Catch2, but it might not be compiled into the binary, and the output filename might not be openable.


parseReporterSpec function (Catch::parseReporterSpec)

Optional<ReporterSpec>
parseReporterSpec(StringRef reporterSpec)

Parses provided reporter spec string into

Returns empty optional on errors, e.g. * field that is not first and not a key+value pair * duplicated keys in kv pair * unknown catch reporter option * empty key/value in an custom kv pair * ...


IStream class (Catch::IStream)

IStream

ProcessedReporterSpec class (Catch::ProcessedReporterSpec)

ProcessedReporterSpec

ReporterSpec but with the defaults filled in.

Like ReporterSpec, the semantics are unchecked.


ConfigData class (Catch::ConfigData)

ConfigData

Config class (Catch::Config)

Config

getSeed function (Catch::getSeed)

std::uint32_t getSeed()

//! Returns Catch2's current RNG seed.


StreamEndStop class (Catch::StreamEndStop)

StreamEndStop

MessageInfo class (Catch::MessageInfo)

MessageInfo

SourceLineInfo class (Catch::SourceLineInfo)

SourceLineInfo

IResultCapture class (Catch::IResultCapture)

IResultCapture

MessageStream class (Catch::MessageStream)

MessageStream

MessageBuilder class (Catch::MessageBuilder)

MessageBuilder

ScopedMessage class (Catch::ScopedMessage)

ScopedMessage

Capturer class (Catch::Capturer)

Capturer

Counts class (Catch::Counts)

Counts

Totals class (Catch::Totals)

Totals

SectionInfo class (Catch::SectionInfo)

SectionInfo

SectionEndInfo class (Catch::SectionEndInfo)

SectionEndInfo

Args class (Catch::Clara::Args)

Args

Wrapper over argc + argv, assumes that the inputs outlive it


Parser class (Catch::Clara::Parser)

Parser

accept_many_t class (Catch::Clara::accept_many_t)

accept_many_t

fake_arg class (Catch::Clara::Detail::fake_arg)

fake_arg

UnaryLambdaTraits class (Catch::Clara::Detail::UnaryLambdaTraits)

template <typename L> UnaryLambdaTraits

template <typename ClassT, typename ReturnT,
          typename... Args>
UnaryLambdaTraits

template <typename ClassT, typename ReturnT, typename ArgT>
UnaryLambdaTraits

TokenStream class (Catch::Clara::Detail::TokenStream)

TokenStream

Token class (Catch::Clara::Detail::Token)

Token

TokenStream class (Catch::Clara::Detail::TokenStream)

TokenStream

ResultType enum (Catch::Clara::Detail::ResultType)

enum class ResultType

//! Denotes type of a parsing result

Ok enumerator (Catch::Clara::Detail::ResultType::Ok)

No errors

LogicError enumerator (Catch::Clara::Detail::ResultType::LogicError)

Error in user-specified arguments for ///< construction

RuntimeError enumerator (Catch::Clara::Detail::ResultType::RuntimeError)

Error in parsing inputs


ResultBase class (Catch::Clara::Detail::ResultBase)

ResultBase

ResultValueBase class (Catch::Clara::Detail::ResultValueBase)

template <typename T> ResultValueBase

ResultValueBase

BasicResult class (Catch::Clara::Detail::BasicResult)

template <typename T = void> BasicResult

ParseState class (Catch::Clara::Detail::ParseState)

ParseState

HelpColumns class (Catch::Clara::Detail::HelpColumns)

HelpColumns

BoundRef class (Catch::Clara::Detail::BoundRef)

BoundRef

BoundValueRefBase class (Catch::Clara::Detail::BoundValueRefBase)

BoundValueRefBase

BoundFlagRefBase class (Catch::Clara::Detail::BoundFlagRefBase)

BoundFlagRefBase

BoundValueRef class (Catch::Clara::Detail::BoundValueRef)

template <typename T> BoundValueRef

template <typename T> BoundValueRef

BoundFlagRef class (Catch::Clara::Detail::BoundFlagRef)

BoundFlagRef

LambdaInvoker class (Catch::Clara::Detail::LambdaInvoker)

template <typename ReturnType> LambdaInvoker

LambdaInvoker

BoundLambda class (Catch::Clara::Detail::BoundLambda)

template <typename L> BoundLambda

BoundManyLambda class (Catch::Clara::Detail::BoundManyLambda)

template <typename L> BoundManyLambda

BoundFlagLambda class (Catch::Clara::Detail::BoundFlagLambda)

template <typename L> BoundFlagLambda

ParserBase class (Catch::Clara::Detail::ParserBase)

ParserBase

ComposableParserImpl class (Catch::Clara::Detail::ComposableParserImpl)

template <typename DerivedT> ComposableParserImpl

ParserRefImpl class (Catch::Clara::Detail::ParserRefImpl)

template <typename DerivedT> ParserRefImpl

Arg class (Catch::Clara::Arg)

Arg

Opt class (Catch::Clara::Opt)

Opt

ExeName class (Catch::Clara::ExeName)

ExeName

Parser class (Catch::Clara::Parser)

Parser

Args class (Catch::Clara::Args)

Args

Wrapper over argc + argv, assumes that the inputs outlive it


Help class (Catch::Clara::Help)

Help

ConfigData class (Catch::ConfigData)

ConfigData

Session class (Catch::Session)

Session

TagAlias class (Catch::TagAlias)

TagAlias

RegistrarForTagAliases class (Catch::RegistrarForTagAliases)

RegistrarForTagAliases

is_lt_comparable class (Catch::Detail::is_lt_comparable)

template <CATCH_DEFINE_COMPARABLE_TRAIT(lt, <),
          CATCH_DEFINE_COMPARABLE_TRAIT(lt, <),
          CATCH_DEFINE_COMPARABLE_TRAIT(lt, <)>
is_lt_comparable

template <CATCH_DEFINE_COMPARABLE_TRAIT(lt, <),
          CATCH_DEFINE_COMPARABLE_TRAIT(lt, <)>
is_lt_comparable

is_lt_0_comparable class (Catch::Detail::is_lt_0_comparable)

template <CATCH_DEFINE_COMPARABLE_TRAIT(lt, <),
          CATCH_DEFINE_COMPARABLE_TRAIT(lt, <)>
is_lt_0_comparable

template <CATCH_DEFINE_COMPARABLE_TRAIT(lt, <)>
is_lt_0_comparable

is_le_comparable class (Catch::Detail::is_le_comparable)

template <CATCH_DEFINE_COMPARABLE_TRAIT(le, <=),
          CATCH_DEFINE_COMPARABLE_TRAIT(le, <=),
          CATCH_DEFINE_COMPARABLE_TRAIT(le, <=)>
is_le_comparable

template <CATCH_DEFINE_COMPARABLE_TRAIT(le, <=),
          CATCH_DEFINE_COMPARABLE_TRAIT(le, <=)>
is_le_comparable

is_le_0_comparable class (Catch::Detail::is_le_0_comparable)

template <CATCH_DEFINE_COMPARABLE_TRAIT(le, <=),
          CATCH_DEFINE_COMPARABLE_TRAIT(le, <=)>
is_le_0_comparable

template <CATCH_DEFINE_COMPARABLE_TRAIT(le, <=)>
is_le_0_comparable

is_gt_comparable class (Catch::Detail::is_gt_comparable)

template <CATCH_DEFINE_COMPARABLE_TRAIT(gt, >),
          CATCH_DEFINE_COMPARABLE_TRAIT(gt, >),
          CATCH_DEFINE_COMPARABLE_TRAIT(gt, >)>
is_gt_comparable

template <CATCH_DEFINE_COMPARABLE_TRAIT(gt, >),
          CATCH_DEFINE_COMPARABLE_TRAIT(gt, >)>
is_gt_comparable

is_gt_0_comparable class (Catch::Detail::is_gt_0_comparable)

template <CATCH_DEFINE_COMPARABLE_TRAIT(gt, >),
          CATCH_DEFINE_COMPARABLE_TRAIT(gt, >)>
is_gt_0_comparable

template <CATCH_DEFINE_COMPARABLE_TRAIT(gt, >)>
is_gt_0_comparable

is_ge_comparable class (Catch::Detail::is_ge_comparable)

template <CATCH_DEFINE_COMPARABLE_TRAIT(ge, >=),
          CATCH_DEFINE_COMPARABLE_TRAIT(ge, >=),
          CATCH_DEFINE_COMPARABLE_TRAIT(ge, >=)>
is_ge_comparable

template <CATCH_DEFINE_COMPARABLE_TRAIT(ge, >=),
          CATCH_DEFINE_COMPARABLE_TRAIT(ge, >=)>
is_ge_comparable

is_ge_0_comparable class (Catch::Detail::is_ge_0_comparable)

template <CATCH_DEFINE_COMPARABLE_TRAIT(ge, >=),
          CATCH_DEFINE_COMPARABLE_TRAIT(ge, >=)>
is_ge_0_comparable

template <CATCH_DEFINE_COMPARABLE_TRAIT(ge, >=)>
is_ge_0_comparable

is_eq_comparable class (Catch::Detail::is_eq_comparable)

template <CATCH_DEFINE_COMPARABLE_TRAIT(eq, ==),
          CATCH_DEFINE_COMPARABLE_TRAIT(eq, ==),
          CATCH_DEFINE_COMPARABLE_TRAIT(eq, ==)>
is_eq_comparable

template <CATCH_DEFINE_COMPARABLE_TRAIT(eq, ==),
          CATCH_DEFINE_COMPARABLE_TRAIT(eq, ==)>
is_eq_comparable

is_eq_0_comparable class (Catch::Detail::is_eq_0_comparable)

template <CATCH_DEFINE_COMPARABLE_TRAIT(eq, ==),
          CATCH_DEFINE_COMPARABLE_TRAIT(eq, ==)>
is_eq_0_comparable

template <CATCH_DEFINE_COMPARABLE_TRAIT(eq, ==)>
is_eq_0_comparable

is_ne_comparable class (Catch::Detail::is_ne_comparable)

template <CATCH_DEFINE_COMPARABLE_TRAIT(ne, !=),
          CATCH_DEFINE_COMPARABLE_TRAIT(ne, !=),
          CATCH_DEFINE_COMPARABLE_TRAIT(ne, !=)>
is_ne_comparable

template <CATCH_DEFINE_COMPARABLE_TRAIT(ne, !=),
          CATCH_DEFINE_COMPARABLE_TRAIT(ne, !=)>
is_ne_comparable

is_ne_0_comparable class (Catch::Detail::is_ne_0_comparable)

template <CATCH_DEFINE_COMPARABLE_TRAIT(ne, !=),
          CATCH_DEFINE_COMPARABLE_TRAIT(ne, !=)>
is_ne_0_comparable

template <CATCH_DEFINE_COMPARABLE_TRAIT(ne, !=)>
is_ne_0_comparable

capture_by_value class (Catch::capture_by_value)

template <typename T> capture_by_value

capture_by_value

capture_by_value

capture_by_value

always_false class (Catch::always_false)

template <typename T> always_false

ITransientExpression class (Catch::ITransientExpression)

ITransientExpression

streamReconstructedExpression function (Catch::ITransientExpression::streamReconstructedExpression)

virtual void
streamReconstructedExpression(std::ostream &os) const

//! This function has to be overridden by the derived class.


BinaryExpr class (Catch::BinaryExpr)

template <typename LhsT, typename RhsT> BinaryExpr

UnaryExpr class (Catch::UnaryExpr)

template <typename LhsT> UnaryExpr

ExprLhs class (Catch::ExprLhs)

template <typename LhsT> ExprLhs

Decomposer class (Catch::Decomposer)

Decomposer

AssertionReaction class (Catch::AssertionReaction)

AssertionReaction

AssertionHandler class (Catch::AssertionHandler)

AssertionHandler

Timer class (Catch::Timer)

Timer

Section class (Catch::Section)

Section

ITestInvoker class (Catch::ITestInvoker)

ITestInvoker

TestInvokerAsMethod class (Catch::TestInvokerAsMethod)

template <typename C> TestInvokerAsMethod

TestInvokerFixture class (Catch::TestInvokerFixture)

template <typename C> TestInvokerFixture

NameAndTags class (Catch::NameAndTags)

NameAndTags

AutoReg class (Catch::AutoReg)

AutoReg

priority_tag class (Catch::Detail::priority_tag)

template <int N> priority_tag

priority_tag

Tag class (Catch::Tag)

Tag

A view of a tag string that provides case insensitive comparisons

Note that in Catch2 internals, the square brackets around tags are not a part of tag's representation, so e.g. "[cool-tag]" is represented as "cool-tag" internally.


ITestInvoker class (Catch::ITestInvoker)

ITestInvoker

NameAndTags class (Catch::NameAndTags)

NameAndTags

TestCaseInfo class (Catch::TestCaseInfo)

TestCaseInfo

Various metadata about the test case.

A test case is uniquely identified by its (class)name and tags combination, with source location being ignored, and other properties being determined from tags.

Tags are kept sorted.


TestCaseHandle class (Catch::TestCaseHandle)

TestCaseHandle

Wrapper over the test case information and the test case invoker

Does not own either, and is specifically made to be cheap to copy around.


TestRunInfo class (Catch::TestRunInfo)

TestRunInfo

IExceptionTranslator class (Catch::IExceptionTranslator)

IExceptionTranslator

IExceptionTranslator

IExceptionTranslatorRegistry class (Catch::IExceptionTranslatorRegistry)

IExceptionTranslatorRegistry

ExceptionTranslatorRegistrar class (Catch::ExceptionTranslatorRegistrar)

ExceptionTranslatorRegistrar

ExceptionTranslator class (Catch::ExceptionTranslatorRegistrar::ExceptionTranslator)

template <typename T> ExceptionTranslator

Version class (Catch::Version)

Version

GeneratorException class (Catch::GeneratorException)

GeneratorException

GeneratorUntypedBase class (Catch::Generators::GeneratorUntypedBase)

GeneratorUntypedBase

next function (Catch::Generators::GeneratorUntypedBase::next)

virtual bool next() = 0

Attempts to move the generator to the next element

Returns true iff the move succeeded (and a valid element can be retrieved).

stringifyImpl function (Catch::Generators::GeneratorUntypedBase::stringifyImpl)

virtual std::string stringifyImpl() const = 0

//! Customization point for currentElementAsString

countedNext function (Catch::Generators::GeneratorUntypedBase::countedNext)

bool countedNext()

Attempts to move the generator to the next element

Serves as a non-virtual interface to next, so that the top level interface can provide sanity checking and shared features.

As with next, returns true iff the move succeeded and the generator has new valid element to provide.

currentElementAsString function (Catch::Generators::GeneratorUntypedBase::currentElementAsString)

StringRef currentElementAsString() const

Returns generator's current element as user-friendly string.

By default returns string equivalent to calling Catch::Detail::stringify on the current element, but generators can customize their implementation as needed.

Not thread-safe due to internal caching.

The returned ref is valid only until the generator instance is destructed, or it moves onto the next element, whichever comes first.


IGeneratorTracker class (Catch::IGeneratorTracker)

IGeneratorTracker

throw_generator_exception function (Catch::Generators::Detail::throw_generator_exception)

void throw_generator_exception(char const *msg)

//! Throws GeneratorException with the provided message


IGenerator class (Catch::Generators::IGenerator)

template <typename T> IGenerator

GeneratorWrapper class (Catch::Generators::GeneratorWrapper)

template <typename T> GeneratorWrapper

GeneratorWrapper<T> function (Catch::Generators::GeneratorWrapper::GeneratorWrapper<T>)

GeneratorWrapper(IGenerator<T> *generator)
    : m_generator(generator)

//! Takes ownership of the passed pointer.


SingleValueGenerator class (Catch::Generators::SingleValueGenerator)

template <typename T> SingleValueGenerator

FixedValuesGenerator class (Catch::Generators::FixedValuesGenerator)

template <typename T> FixedValuesGenerator

Generators class (Catch::Generators::Generators)

template <typename T> Generators

as class (Catch::Generators::as)

template <typename T> as

TakeGenerator class (Catch::Generators::TakeGenerator)

template <typename T> TakeGenerator

FilterGenerator class (Catch::Generators::FilterGenerator)

template <typename T, typename Predicate> FilterGenerator

RepeatGenerator class (Catch::Generators::RepeatGenerator)

template <typename T> RepeatGenerator

MapGenerator class (Catch::Generators::MapGenerator)

template <typename T, typename U, typename Func>
MapGenerator

ChunkGenerator class (Catch::Generators::ChunkGenerator)

template <typename T> ChunkGenerator

SimplePcg32 class (Catch::SimplePcg32)

SimplePcg32

SizedUnsignedType class (Catch::Detail::SizedUnsignedType)

template <std::size_t> SizedUnsignedType

SizedUnsignedType

SizedUnsignedType

SizedUnsignedType

SizedUnsignedType

ExtendedMultResult class (Catch::Detail::ExtendedMultResult)

template <typename T> ExtendedMultResult

extendedMultPortable function (Catch::Detail::extendedMultPortable)

constexpr ExtendedMultResult<std::uint64_t>
extendedMultPortable(std::uint64_t lhs, std::uint64_t rhs)

Returns 128 bit result of lhs * rhs using portable C++ code

This implementation is almost twice as fast as naive long multiplication, and unlike intrinsic-based approach, it supports constexpr evaluation.


extendedMult function (Catch::Detail::extendedMult)

inline ExtendedMultResult<std::uint64_t>
extendedMult(std::uint64_t lhs, std::uint64_t rhs)

//! Returns 128 bit result of lhs * rhs


uniform_integer_distribution class (Catch::uniform_integer_distribution)

template <typename IntegerType> uniform_integer_distribution

Implementation of uniform distribution on integers.

Unlike std::uniform_int_distribution, this implementation supports various 1 byte integral types, including bool (but you should not actually use it for bools).

The underlying algorithm is based on the one described in "Fast Random Integer Generation in an Interval" by Daniel Lemire, but has been optimized under the assumption of reuse of the same distribution object.


gamma function (Catch::Detail::gamma)

template <typename FloatType>
FloatType gamma(FloatType a, FloatType b)

Returns the largest magnitude of 1-ULP distance inside the [a, b] range.

Assumes a < b.


DistanceTypePicker class (Catch::Detail::DistanceTypePicker)

template <typename FloatingPoint> DistanceTypePicker

DistanceTypePicker

DistanceTypePicker

count_equidistant_floats function (Catch::Detail::count_equidistant_floats)

template <typename FloatType>
DistanceType<FloatType>
count_equidistant_floats(FloatType a, FloatType b,
                         FloatType distance)

Computes the number of equi-distant floats in [a, b]

Since not every range can be split into equidistant floats exactly, we actually compute ceil(b/distance - a/distance), because in those cases we want to overcount.

Uses modified Dekker's FastTwoSum algorithm to handle rounding.


uniform_floating_point_distribution class (Catch::uniform_floating_point_distribution)

template <typename FloatType>
uniform_floating_point_distribution

Implementation of uniform distribution on floating point numbers.

Note that we support only float and double types, because these usually mean the same thing across different platform. long double varies wildly by platform and thus we cannot provide reproducible implementation. Also note that we don't implement all parts of distribution per standard: this distribution is not serializable, nor can the range be arbitrarily reset.

The implementation also uses different approach than the one taken by std::uniform_real_distribution, where instead of generating a number between [0, 1) and then multiplying the range bounds with it, we first split the [a, b] range into a set of equidistributed floating point numbers, and then use uniform int distribution to pick which one to return.

This has the advantage of guaranteeing uniformity (the multiplication method loses uniformity due to rounding when multiplying floats), except for small non-uniformity at one side of the interval, where we have to deal with the fact that not every interval is splittable into equidistributed floats.

Based on "Drawing random floating-point numbers from an interval" by Frederic Goualard.


RandomFloatingGenerator class (Catch::Generators::RandomFloatingGenerator)

template <typename Float> RandomFloatingGenerator

RandomFloatingGenerator

PImpl class (Catch::Generators::RandomFloatingGenerator::PImpl)

PImpl

RandomIntegerGenerator class (Catch::Generators::RandomIntegerGenerator)

template <typename Integer> RandomIntegerGenerator

RangeGenerator class (Catch::Generators::RangeGenerator)

template <typename T> RangeGenerator

IteratorGenerator class (Catch::Generators::IteratorGenerator)

template <typename T> IteratorGenerator

ReporterDescription class (Catch::ReporterDescription)

ReporterDescription

ListenerDescription class (Catch::ListenerDescription)

ListenerDescription

TagInfo class (Catch::TagInfo)

TagInfo

TestCaseInfo class (Catch::TestCaseInfo)

TestCaseInfo

Various metadata about the test case.

A test case is uniquely identified by its (class)name and tags combination, with source location being ignored, and other properties being determined from tags.

Tags are kept sorted.


TestCaseHandle class (Catch::TestCaseHandle)

TestCaseHandle

Wrapper over the test case information and the test case invoker

Does not own either, and is specifically made to be cheap to copy around.


IConfig class (Catch::IConfig)

IConfig

IStream class (Catch::IStream)

IStream

ReporterConfig class (Catch::ReporterConfig)

ReporterConfig

AssertionStats class (Catch::AssertionStats)

AssertionStats

SectionStats class (Catch::SectionStats)

SectionStats

TestCaseStats class (Catch::TestCaseStats)

TestCaseStats

TestRunStats class (Catch::TestRunStats)

TestRunStats

ReporterPreferences class (Catch::ReporterPreferences)

ReporterPreferences

//! By setting up its preferences, a reporter can modify Catch2's behaviour //! in some regards, e.g. it can request Catch2 to capture writes to //! stdout/stderr during test execution, and pass them to the reporter.

shouldRedirectStdOut variable (Catch::ReporterPreferences::shouldRedirectStdOut)

bool shouldRedirectStdOut = false

//! Catch2 should redirect writes to stdout and pass them to the //! reporter

shouldReportAllAssertions variable (Catch::ReporterPreferences::shouldReportAllAssertions)

bool shouldReportAllAssertions = false

//! Catch2 should call Reporter::assertionEnded even for passing //! assertions

shouldReportAllAssertionStarts variable (Catch::ReporterPreferences::shouldReportAllAssertionStarts)

bool shouldReportAllAssertionStarts = true

//! Catch2 should call Reporter::assertionStarting for all assertions


IEventListener class (Catch::IEventListener)

IEventListener

The common base for all reporters and event listeners

Implementing classes must also implement:

//! User-friendly description of the reporter/listener type
static std::string getDescription()

Generally shouldn't be derived from by users of Catch2 directly, instead they should derive from one of the utility bases that derive from this class.

m_preferences variable (Catch::IEventListener::m_preferences)

ReporterPreferences m_preferences

//! Derived classes can set up their preferences here

m_config variable (Catch::IEventListener::m_config)

IConfig const *m_config

//! The test run's config as filled in from CLI and defaults

noMatchingTestCases function (Catch::IEventListener::noMatchingTestCases)

virtual void
noMatchingTestCases(StringRef unmatchedSpec) = 0

//! Called when no test cases match provided test spec

reportInvalidTestSpec function (Catch::IEventListener::reportInvalidTestSpec)

virtual void
reportInvalidTestSpec(StringRef invalidArgument) = 0

//! Called for all invalid test specs from the cli

testRunStarting function (Catch::IEventListener::testRunStarting)

virtual void
testRunStarting(TestRunInfo const &testRunInfo) = 0

Called once in a testing run before tests are started

Not called if tests won't be run (e.g. only listing will happen)

testCaseStarting function (Catch::IEventListener::testCaseStarting)

virtual void
testCaseStarting(TestCaseInfo const &testInfo) = 0

//! Called once for each TEST_CASE, no matter how many times it is entered

testCasePartialStarting function (Catch::IEventListener::testCasePartialStarting)

virtual void
testCasePartialStarting(TestCaseInfo const &testInfo,
                        uint64_t partNumber) = 0

//! Called every time a TEST_CASE is entered, including repeats (due to sections)

sectionStarting function (Catch::IEventListener::sectionStarting)

virtual void
sectionStarting(SectionInfo const &sectionInfo) = 0

//! Called when a SECTION is being entered. Not called for skipped sections

benchmarkPreparing function (Catch::IEventListener::benchmarkPreparing)

virtual void benchmarkPreparing(StringRef benchmarkName) = 0

//! Called when user-code is being probed before the actual benchmark runs

benchmarkStarting function (Catch::IEventListener::benchmarkStarting)

virtual void
benchmarkStarting(BenchmarkInfo const &benchmarkInfo) = 0

//! Called after probe but before the user-code is being benchmarked

benchmarkEnded function (Catch::IEventListener::benchmarkEnded)

virtual void
benchmarkEnded(BenchmarkStats<> const &benchmarkStats) = 0

//! Called with the benchmark results if benchmark successfully finishes

benchmarkFailed function (Catch::IEventListener::benchmarkFailed)

virtual void benchmarkFailed(StringRef benchmarkName) = 0

//! Called if running the benchmarks fails for any reason

assertionStarting function (Catch::IEventListener::assertionStarting)

virtual void
assertionStarting(AssertionInfo const &assertionInfo) = 0

//! Called before assertion success/failure is evaluated

assertionEnded function (Catch::IEventListener::assertionEnded)

virtual void
assertionEnded(AssertionStats const &assertionStats) = 0

//! Called after assertion was fully evaluated

sectionEnded function (Catch::IEventListener::sectionEnded)

virtual void
sectionEnded(SectionStats const &sectionStats) = 0

//! Called after a SECTION has finished running

testCasePartialEnded function (Catch::IEventListener::testCasePartialEnded)

virtual void
testCasePartialEnded(TestCaseStats const &testCaseStats,
                     uint64_t partNumber) = 0

//! Called every time a TEST_CASE is entered, including repeats (due to sections)

testCaseEnded function (Catch::IEventListener::testCaseEnded)

virtual void
testCaseEnded(TestCaseStats const &testCaseStats) = 0

//! Called once for each TEST_CASE, no matter how many times it is entered

testRunEnded function (Catch::IEventListener::testRunEnded)

virtual void
testRunEnded(TestRunStats const &testRunStats) = 0

Called once after all tests in a testing run are finished

Not called if tests weren't run (e.g. only listings happened)

skipTest function (Catch::IEventListener::skipTest)

virtual void skipTest(TestCaseInfo const &testInfo) = 0

Called with test cases that are skipped due to the test run aborting. NOT called for test cases that are explicitly skipped using the SKIP macro.

Deprecated - will be removed in the next major release.

fatalErrorEncountered function (Catch::IEventListener::fatalErrorEncountered)

virtual void fatalErrorEncountered(StringRef error) = 0

//! Called if a fatal error (signal/structured exception) occurred

listReporters function (Catch::IEventListener::listReporters)

virtual void
listReporters(std::vector<ReporterDescription> const
                  &descriptions) = 0

//! Writes out information about provided reporters using reporter-specific format

listListeners function (Catch::IEventListener::listListeners)

virtual void
listListeners(std::vector<ListenerDescription> const
                  &descriptions) = 0

//! Writes out the provided listeners descriptions using reporter-specific format

listTests function (Catch::IEventListener::listTests)

virtual void
listTests(std::vector<TestCaseHandle> const &tests) = 0

//! Writes out information about provided tests using reporter-specific format

listTags function (Catch::IEventListener::listTags)

virtual void listTags(std::vector<TagInfo> const &tags) = 0

//! Writes out information about the provided tags using reporter-specific format


ReporterConfig class (Catch::ReporterConfig)

ReporterConfig

IConfig class (Catch::IConfig)

IConfig

IEventListener class (Catch::IEventListener)

IEventListener

The common base for all reporters and event listeners

Implementing classes must also implement:

//! User-friendly description of the reporter/listener type
static std::string getDescription()

Generally shouldn't be derived from by users of Catch2 directly, instead they should derive from one of the utility bases that derive from this class.


IReporterFactory class (Catch::IReporterFactory)

IReporterFactory

EventListenerFactory class (Catch::EventListenerFactory)

EventListenerFactory

getName function (Catch::EventListenerFactory::getName)

virtual StringRef getName() const = 0

//! Return a meaningful name for the listener, e.g. its type name

getDescription function (Catch::EventListenerFactory::getDescription)

virtual std::string getDescription() const = 0

//! Return listener's description if available


TagAlias class (Catch::TagAlias)

TagAlias

ITagAliasRegistry class (Catch::ITagAliasRegistry)

ITagAliasRegistry

TestCaseInfo class (Catch::TestCaseInfo)

TestCaseInfo

Various metadata about the test case.

A test case is uniquely identified by its (class)name and tags combination, with source location being ignored, and other properties being determined from tags.

Tags are kept sorted.


TestCaseHandle class (Catch::TestCaseHandle)

TestCaseHandle

Wrapper over the test case information and the test case invoker

Does not own either, and is specifically made to be cheap to copy around.


IConfig class (Catch::IConfig)

IConfig

ITestCaseRegistry class (Catch::ITestCaseRegistry)

ITestCaseRegistry

CaseInsensitiveLess class (Catch::Detail::CaseInsensitiveLess)

CaseInsensitiveLess

//! Provides case-insensitive op< semantics when called


CaseInsensitiveEqualTo class (Catch::Detail::CaseInsensitiveEqualTo)

CaseInsensitiveEqualTo

//! Provides case-insensitive op== semantics when called


IStream class (Catch::IStream)

IStream

Colour class (Catch::Colour)

Colour

ColourImpl class (Catch::ColourImpl)

ColourImpl

m_stream variable (Catch::ColourImpl::m_stream)

IStream *m_stream

//! The associated stream of this ColourImpl instance

ColourGuard class (Catch::ColourImpl::ColourGuard)

ColourGuard

//! RAII wrapper around writing specific colour of text using specific //! colour impl into a stream.

ColourGuard function (Catch::ColourImpl::ColourGuard::ColourGuard)

ColourGuard(Colour::Code code, ColourImpl const *colour)

//! Does not engage the guard/start the colour

~ColourGuard function (Catch::ColourImpl::ColourGuard::~ColourGuard)

~ColourGuard()

//! Removes colour if the guard was engaged

engage function (Catch::ColourImpl::ColourGuard::engage)

ColourGuard &engage(std::ostream &stream) &

Explicitly engages colour for given stream.

The API based on operator<< should be preferred.

ColourGuard &&engage(std::ostream &stream) &&

Explicitly engages colour for given stream.

The API based on operator<< should be preferred.

guardColour function (Catch::ColourImpl::guardColour)

ColourGuard guardColour(Colour::Code colourCode)

Creates a guard object for given colour and this colour impl

Important: the guard starts disengaged, and has to be engaged explicitly.


makeColourImpl function (Catch::makeColourImpl)

Detail::unique_ptr<ColourImpl>
makeColourImpl(ColourMode colourSelection, IStream *stream)

//! Provides ColourImpl based on global config and target compilation platform


isColourImplAvailable function (Catch::isColourImplAvailable)

bool isColourImplAvailable(ColourMode colourSelection)

//! Checks if specific colour impl has been compiled into the binary


EnumValuesRegistry class (Catch::Detail::EnumValuesRegistry)

EnumValuesRegistry

ErrnoGuard class (Catch::ErrnoGuard)

ErrnoGuard

//! Simple RAII class that stores the value of errno //! at construction and restores it at destruction.


ExceptionTranslatorRegistry class (Catch::ExceptionTranslatorRegistry)

ExceptionTranslatorRegistry

FatalConditionHandler class (Catch::FatalConditionHandler)

FatalConditionHandler

Wrapper for platform-specific fatal error (signals/SEH) handlers

Tries to be cooperative with other handlers, and not step over other handlers. This means that unknown structured exceptions are passed on, previous signal handlers are called, and so on.

Can only be instantiated once, and assumes that once a signal is caught, the binary will end up terminating. Thus, there


FatalConditionHandlerGuard class (Catch::FatalConditionHandlerGuard)

FatalConditionHandlerGuard

//! Simple RAII guard for (dis)engaging the FatalConditionHandler


ulpDistance function (Catch::ulpDistance)

template <typename FP> uint64_t ulpDistance(FP lhs, FP rhs)

Calculates the ULP distance between two floating point numbers

The ULP distance of two floating point numbers is the count of valid floating point numbers representable between them.

There are some exceptions between how this function counts the distance, and the interpretation of the standard as implemented. by e.g. nextafter. For this function it always holds that: * (x == y) =\> ulpDistance(x, y) == 0 (so ulpDistance(-0, 0) == 0) * ulpDistance(maxFinite, INF) == 1 * ulpDistance(x, -x) == 2 * ulpDistance(x, 0)

\pre !isnan( lhs ) \pre !isnan( rhs ) \pre floating point numbers are represented in IEEE-754 format


getEnv function (Catch::Detail::getEnv)

char const *getEnv(char const *varName)

//! Wrapper over std::getenv that compiles on UWP (and always returns nullptr there)


IStream class (Catch::IStream)

IStream

isConsole function (Catch::IStream::isConsole)

virtual bool isConsole() const

Best guess on whether the instance is writing to a console (e.g. via stdout/stderr)

This is useful for e.g. Win32 colour support, because the Win32 API manipulates console directly, unlike POSIX escape codes, that can be written anywhere.

Due to variety of ways to change where the stdout/stderr is actually being written, users should always assume that the answer might be wrong.


makeStream function (Catch::makeStream)

auto makeStream(std::string const &filename)
    -> Detail::unique_ptr<IStream>

Creates a stream wrapper that writes to specific file.

Also recognizes 4 special filenames * - for stdout * %stdout for stdout * %stderr for stderr * %debug for platform specific debugging output
Exceptions passed an unrecognized %-prefixed stream


JsonObjectWriter class (Catch::JsonObjectWriter)

JsonObjectWriter

JsonArrayWriter class (Catch::JsonArrayWriter)

JsonArrayWriter

JsonUtils class (Catch::JsonUtils)

JsonUtils

JsonValueWriter class (Catch::JsonValueWriter)

JsonValueWriter

JsonObjectWriter class (Catch::JsonObjectWriter)

JsonObjectWriter

JsonArrayWriter class (Catch::JsonArrayWriter)

JsonArrayWriter

LeakDetector class (Catch::LeakDetector)

LeakDetector

IEventListener class (Catch::IEventListener)

IEventListener

The common base for all reporters and event listeners

Implementing classes must also implement:

//! User-friendly description of the reporter/listener type
static std::string getDescription()

Generally shouldn't be derived from by users of Catch2 directly, instead they should derive from one of the utility bases that derive from this class.


Config class (Catch::Config)

Config

ReporterDescription class (Catch::ReporterDescription)

ReporterDescription

ListenerDescription class (Catch::ListenerDescription)

ListenerDescription

TagInfo class (Catch::TagInfo)

TagInfo

OutputRedirect class (Catch::OutputRedirect)

OutputRedirect

None enumerator (Catch::OutputRedirect::Kind::None)

//! No redirect (noop implementation)

Streams enumerator (Catch::OutputRedirect::Kind::Streams)

//! Redirect std::cout/std::cerr/std::clog streams internally

FileDescriptors enumerator (Catch::OutputRedirect::Kind::FileDescriptors)

//! Redirect the stdout/stderr file descriptors into files


RedirectGuard class (Catch::RedirectGuard)

RedirectGuard

parseUInt function (Catch::parseUInt)

Optional<unsigned int> parseUInt(std::string const &input,
                                 int base = 10)

Parses unsigned int from the input, using provided base

Effectively a wrapper around std::stoul but with better error checking e.g. "-1" is rejected, instead of being parsed as UINT_MAX.


IEventListener class (Catch::IEventListener)

IEventListener

The common base for all reporters and event listeners

Implementing classes must also implement:

//! User-friendly description of the reporter/listener type
static std::string getDescription()

Generally shouldn't be derived from by users of Catch2 directly, instead they should derive from one of the utility bases that derive from this class.


IReporterFactory class (Catch::IReporterFactory)

IReporterFactory

ReporterConfig class (Catch::ReporterConfig)

ReporterConfig

EventListenerFactory class (Catch::EventListenerFactory)

EventListenerFactory

ReporterRegistry class (Catch::ReporterRegistry)

ReporterRegistry

ReporterRegistryImpl class (Catch::ReporterRegistry::ReporterRegistryImpl)

ReporterRegistryImpl

NameAndLocation class (Catch::TestCaseTracking::NameAndLocation)

NameAndLocation

NameAndLocationRef class (Catch::TestCaseTracking::NameAndLocationRef)

NameAndLocationRef

This is a variant of NameAndLocation that does not own the name string

This avoids extra allocations when trying to locate a tracker by its name and location, as long as we make sure that trackers only keep around the owning variant.


ITracker class (Catch::TestCaseTracking::ITracker)

ITracker

ITracker

isComplete function (Catch::TestCaseTracking::ITracker::isComplete)

virtual bool isComplete() const = 0

//! Returns true if tracker run to completion (successfully or not)

isSuccessfullyCompleted function (Catch::TestCaseTracking::ITracker::isSuccessfullyCompleted)

bool isSuccessfullyCompleted() const

//! Returns true if tracker run to completion successfully

isOpen function (Catch::TestCaseTracking::ITracker::isOpen)

bool isOpen() const

//! Returns true if tracker has started but hasn't been completed

hasStarted function (Catch::TestCaseTracking::ITracker::hasStarted)

bool hasStarted() const

//! Returns true iff tracker has started

addChild function (Catch::TestCaseTracking::ITracker::addChild)

void addChild(ITrackerPtr &&child)

//! Register a nested ITracker

findChild function (Catch::TestCaseTracking::ITracker::findChild)

ITracker *
findChild(NameAndLocationRef const &nameAndLocation)

Returns ptr to specific child if register with this tracker.

Returns nullptr if not found.

hasChildren function (Catch::TestCaseTracking::ITracker::hasChildren)

bool hasChildren() const

//! Have any children been added?

openChild function (Catch::TestCaseTracking::ITracker::openChild)

void openChild()

//! Marks tracker as executing a child, doing se recursively up the tree

isSectionTracker function (Catch::TestCaseTracking::ITracker::isSectionTracker)

virtual bool isSectionTracker() const

Returns true if the instance is a section tracker

Subclasses should override to true if they are, replaces RTTI for internal debug checks.

isGeneratorTracker function (Catch::TestCaseTracking::ITracker::isGeneratorTracker)

virtual bool isGeneratorTracker() const

Returns true if the instance is a generator tracker

Subclasses should override to true if they are, replaces RTTI for internal debug checks.


TrackerContext class (Catch::TestCaseTracking::TrackerContext)

TrackerContext

TrackerBase class (Catch::TestCaseTracking::TrackerBase)

TrackerBase

SectionTracker class (Catch::TestCaseTracking::SectionTracker)

SectionTracker

getFilters function (Catch::TestCaseTracking::SectionTracker::getFilters)

std::vector<StringRef> const &getFilters() const

//! Returns filters active in this tracker

trimmedName function (Catch::TestCaseTracking::SectionTracker::trimmedName)

StringRef trimmedName() const

//! Returns whitespace-trimmed name of the tracked section


Mutex class (Catch::Detail::Mutex)

Mutex

LockGuard class (Catch::Detail::LockGuard)

LockGuard

IGeneratorTracker class (Catch::IGeneratorTracker)

IGeneratorTracker

IConfig class (Catch::IConfig)

IConfig

IEventListener class (Catch::IEventListener)

IEventListener

The common base for all reporters and event listeners

Implementing classes must also implement:

//! User-friendly description of the reporter/listener type
static std::string getDescription()

Generally shouldn't be derived from by users of Catch2 directly, instead they should derive from one of the utility bases that derive from this class.


OutputRedirect class (Catch::OutputRedirect)

OutputRedirect

RunContext class (Catch::RunContext)

RunContext

////////////////////////////////////////////////////////////////////////


ISingleton class (Catch::ISingleton)

ISingleton

Singleton class (Catch::Singleton)

template <typename SingletonImplT,
          typename InterfaceT = SingletonImplT,
          typename MutableInterfaceT = InterfaceT>
Singleton

StartupExceptionRegistry class (Catch::StartupExceptionRegistry)

StartupExceptionRegistry

trim function (Catch::trim)

std::string trim(std::string const &str)

//! Returns a new string without whitespace at the start/end


StringRef trim(StringRef ref)

//! Returns a substring of the original ref without whitespace. Beware lifetimes!


pluralise class (Catch::pluralise)

pluralise

Helper for streaming a "count [maybe-plural-of-label]" human-friendly string

Usage example:

std::cout << "Found " << pluralise(count, "error") << '\n';

Important: The provided string must outlive the instance


SourceLineInfo class (Catch::SourceLineInfo)

SourceLineInfo

TagAliasRegistry class (Catch::TagAliasRegistry)

TagAliasRegistry

TestCaseInfo class (Catch::TestCaseInfo)

TestCaseInfo

Various metadata about the test case.

A test case is uniquely identified by its (class)name and tags combination, with source location being ignored, and other properties being determined from tags.

Tags are kept sorted.


TestCaseInfoHasher class (Catch::TestCaseInfoHasher)

TestCaseInfoHasher

IConfig class (Catch::IConfig)

IConfig

ITestInvoker class (Catch::ITestInvoker)

ITestInvoker

TestCaseHandle class (Catch::TestCaseHandle)

TestCaseHandle

Wrapper over the test case information and the test case invoker

Does not own either, and is specifically made to be cheap to copy around.


TestSpec class (Catch::TestSpec)

TestSpec

TestRegistry class (Catch::TestRegistry)

TestRegistry

ITagAliasRegistry class (Catch::ITagAliasRegistry)

ITagAliasRegistry

TestSpecParser class (Catch::TestSpecParser)

TestSpecParser

Columns class (Catch::TextFlow::Columns)

Columns

AnsiSkippingString class (Catch::TextFlow::AnsiSkippingString)

AnsiSkippingString

Abstraction for a string with ansi escape sequences that automatically skips over escapes when iterating. Only graphical escape sequences are considered.

Internal representation: An escape sequence looks like \033[39;49m We need bidirectional iteration and the unbound length of escape sequences poses a problem for operator-- To make this work we'll replace the last m with a 0xff (this is a codepoint that won't have any utf-8 meaning).

const_iterator class (Catch::TextFlow::AnsiSkippingString::const_iterator)

const_iterator

const_iterator class (Catch::TextFlow::const_iterator)

const_iterator

EndTag class (Catch::TextFlow::const_iterator::EndTag)

EndTag

Column class (Catch::TextFlow::Column)

Column

Represents a column of text with specific width and indentation

When written out to a stream, it will perform linebreaking of the provided text so that the written lines fit within target width.

const_iterator class (Catch::TextFlow::Column::const_iterator)

const_iterator

Iterates "lines" in Column and returns them

EndTag class (Catch::TextFlow::Column::const_iterator::EndTag)

EndTag

Spacer function (Catch::TextFlow::Spacer)

Column Spacer(size_t spaceWidth)

//! Creates a column that serves as an empty space of specific width


Columns class (Catch::TextFlow::Columns)

Columns

iterator class (Catch::TextFlow::Columns::iterator)

iterator

EndTag class (Catch::TextFlow::Columns::iterator::EndTag)

EndTag

XmlEncode class (Catch::XmlEncode)

XmlEncode

Helper for XML-encoding text (escaping angle brackets, quotes, etc)

Note: doesn't take ownership of passed strings, and thus the encoded string must outlive the encoding instance.


XmlWriter class (Catch::XmlWriter)

XmlWriter

ScopedElement class (Catch::XmlWriter::ScopedElement)

ScopedElement

writeAttribute function (Catch::XmlWriter::writeAttribute)

XmlWriter &writeAttribute(StringRef name,
                          StringRef attribute)

//! The attribute content is XML-encoded

XmlWriter &writeAttribute(StringRef name, bool attribute)

//! Writes the attribute as "true/false"

XmlWriter &writeAttribute(StringRef name,
                          char const *attribute)

//! The attribute content is XML-encoded

template <typename T,
          // Without this SFINAE, this overload is a better
          // match for `std::string`, `char const*`, `char
          // const[N]` args. While it would still work, it
          // would cause code bloat and multiple iteration
          // over the strings
          typename = typename std::enable_if_t<
              !std::is_convertible<T, StringRef>::value>>
XmlWriter &writeAttribute(StringRef name,
                          T const &attribute)

//! The attribute value must provide op<<(ostream&, T). The resulting //! serialization is XML-encoded

writeText function (Catch::XmlWriter::writeText)

XmlWriter &
writeText(StringRef text,
          XmlFormatting fmt = XmlFormatting::Newline |
                              XmlFormatting::Indent)

//! Writes escaped text in a element

writeComment function (Catch::XmlWriter::writeComment)

XmlWriter &
writeComment(StringRef text,
             XmlFormatting fmt = XmlFormatting::Newline |
                                 XmlFormatting::Indent)

//! Writes XML comment as "<!-- text -->"


MatchExpr class (Catch::MatchExpr)

template <typename ArgT, typename MatcherT> MatchExpr

MatcherBase class (Catch::Matchers::MatcherBase)

template <typename ArgT> MatcherBase

MatcherUntypedBase class (Catch::Matchers::MatcherUntypedBase)

MatcherUntypedBase

MatcherBase class (Catch::Matchers::MatcherBase)

template <typename T> MatcherBase

MatchAllOf class (Catch::Matchers::Detail::MatchAllOf)

template <typename ArgT> MatchAllOf

operator&& function (Catch::Matchers::Detail::operator&&)

template <typename ArgT>
MatchAllOf<ArgT> operator&&(MatchAllOf<ArgT> const &lhs,
                            MatcherBase<ArgT> const &rhs)

//! lvalue overload is intentionally deleted, users should //! not be trying to compose stored composition matchers


template <typename ArgT>
MatchAllOf<ArgT> operator&&(MatcherBase<ArgT> const &lhs,
                            MatchAllOf<ArgT> const &rhs)

//! lvalue overload is intentionally deleted, users should //! not be trying to compose stored composition matchers


MatchAnyOf class (Catch::Matchers::Detail::MatchAnyOf)

template <typename ArgT> MatchAnyOf

operator|| function (Catch::Matchers::Detail::operator||)

template <typename ArgT>
MatchAnyOf<ArgT> operator||(MatchAnyOf<ArgT> const &lhs,
                            MatcherBase<ArgT> const &rhs)

//! lvalue overload is intentionally deleted, users should //! not be trying to compose stored composition matchers


template <typename ArgT>
MatchAnyOf<ArgT> operator||(MatcherBase<ArgT> const &lhs,
                            MatchAnyOf<ArgT> const &rhs)

//! lvalue overload is intentionally deleted, users should //! not be trying to compose stored composition matchers


MatchNotOf class (Catch::Matchers::Detail::MatchNotOf)

template <typename ArgT> MatchNotOf

MatcherGenericBase class (Catch::Matchers::MatcherGenericBase)

MatcherGenericBase

MatchAllOfGeneric class (Catch::Matchers::Detail::MatchAllOfGeneric)

template <typename... MatcherTs> MatchAllOfGeneric

MatchAnyOfGeneric class (Catch::Matchers::Detail::MatchAnyOfGeneric)

template <typename... MatcherTs> MatchAnyOfGeneric

MatchNotOfGeneric class (Catch::Matchers::Detail::MatchNotOfGeneric)

template <typename MatcherT> MatchNotOfGeneric

operator! function (Catch::Matchers::operator!)

template <typename MatcherT>
std::enable_if_t<Detail::is_generic_matcher_v<MatcherT>,
                 Detail::MatchNotOfGeneric<MatcherT>>
operator!(MatcherT const &matcher)

//! Wrap provided generic matcher in generic negator


IsEmptyMatcher class (Catch::Matchers::IsEmptyMatcher)

IsEmptyMatcher

HasSizeMatcher class (Catch::Matchers::HasSizeMatcher)

HasSizeMatcher

SizeMatchesMatcher class (Catch::Matchers::SizeMatchesMatcher)

template <typename Matcher> SizeMatchesMatcher

IsEmpty function (Catch::Matchers::IsEmpty)

IsEmptyMatcher IsEmpty()

//! Creates a matcher that accepts empty ranges/containers


SizeIs function (Catch::Matchers::SizeIs)

HasSizeMatcher SizeIs(std::size_t sz)

//! Creates a matcher that accepts ranges/containers with specific size


ContainsElementMatcher class (Catch::Matchers::ContainsElementMatcher)

template <typename T, typename Equality>
ContainsElementMatcher

//! Matcher for checking that an element in range is equal to specific element


ContainsMatcherMatcher class (Catch::Matchers::ContainsMatcherMatcher)

template <typename Matcher> ContainsMatcherMatcher

//! Meta-matcher for checking that an element in a range matches a specific matcher


Contains function (Catch::Matchers::Contains)

template <typename T>
std::enable_if_t<!Detail::is_matcher_v<T>,
                 ContainsElementMatcher<T, std::equal_to<>>>
Contains(T &&elem)

Creates a matcher that checks whether a range contains a specific element.

Uses std::equal_to to do the comparison


template <typename Matcher>
std::enable_if_t<Detail::is_matcher_v<Matcher>,
                 ContainsMatcherMatcher<Matcher>>
Contains(Matcher &&matcher)

//! Creates a matcher that checks whether a range contains element matching a matcher


template <typename T, typename Equality>
ContainsElementMatcher<T, Equality> Contains(T &&elem,
                                             Equality &&eq)

Creates a matcher that checks whether a range contains a specific element.

Uses eq to do the comparisons, the element is provided on the rhs


ExceptionMessageMatcher class (Catch::Matchers::ExceptionMessageMatcher)

ExceptionMessageMatcher

Message function (Catch::Matchers::Message)

ExceptionMessageMatcher Message(std::string const &message)

//! Creates a matcher that checks whether a std derived exception has the provided message


ExceptionMessageMatchesMatcher class (Catch::Matchers::ExceptionMessageMatchesMatcher)

template <typename StringMatcherType>
ExceptionMessageMatchesMatcher

MessageMatches function (Catch::Matchers::MessageMatches)

template <typename StringMatcherType>
ExceptionMessageMatchesMatcher<StringMatcherType>
MessageMatches(StringMatcherType &&matcher)

//! Creates a matcher that checks whether a message from an std derived //! exception matches a provided matcher


WithinAbsMatcher class (Catch::Matchers::WithinAbsMatcher)

WithinAbsMatcher

WithinAbs function (Catch::Matchers::WithinAbs)

WithinAbsMatcher WithinAbs(double target, double margin)

//! Creates a matcher that accepts numbers within certain range of target


WithinUlpsMatcher class (Catch::Matchers::WithinUlpsMatcher)

WithinUlpsMatcher

WithinULP function (Catch::Matchers::WithinULP)

WithinUlpsMatcher WithinULP(double target,
                            uint64_t maxUlpDiff)

//! Creates a matcher that accepts doubles within certain ULP range of target


WithinUlpsMatcher WithinULP(float target,
                            uint64_t maxUlpDiff)

//! Creates a matcher that accepts floats within certain ULP range of target


WithinRelMatcher class (Catch::Matchers::WithinRelMatcher)

WithinRelMatcher

WithinRel function (Catch::Matchers::WithinRel)

WithinRelMatcher WithinRel(double target, double eps)

//! Creates a matcher that accepts doubles within certain relative range of target


WithinRelMatcher WithinRel(double target)

//! Creates a matcher that accepts doubles within 100*DBL_EPS relative range of target


WithinRelMatcher WithinRel(float target, float eps)

//! Creates a matcher that accepts doubles within certain relative range of target


WithinRelMatcher WithinRel(float target)

//! Creates a matcher that accepts floats within 100*FLT_EPS relative range of target


IsNaNMatcher class (Catch::Matchers::IsNaNMatcher)

IsNaNMatcher

PredicateMatcher class (Catch::Matchers::PredicateMatcher)

template <typename T, typename Predicate> PredicateMatcher

Predicate function (Catch::Matchers::Predicate)

template <typename T, typename Pred>
PredicateMatcher<T, Pred>
Predicate(Pred &&predicate,
          std::string const &description = "")

Creates a matcher that calls delegates match to the provided predicate.

The user has to explicitly specify the argument type to the matcher


AllMatchMatcher class (Catch::Matchers::AllMatchMatcher)

template <typename Matcher> AllMatchMatcher

NoneMatchMatcher class (Catch::Matchers::NoneMatchMatcher)

template <typename Matcher> NoneMatchMatcher

AnyMatchMatcher class (Catch::Matchers::AnyMatchMatcher)

template <typename Matcher> AnyMatchMatcher

AllTrueMatcher class (Catch::Matchers::AllTrueMatcher)

AllTrueMatcher

NoneTrueMatcher class (Catch::Matchers::NoneTrueMatcher)

NoneTrueMatcher

AnyTrueMatcher class (Catch::Matchers::AnyTrueMatcher)

AnyTrueMatcher

RangeEqualsMatcher class (Catch::Matchers::RangeEqualsMatcher)

template <typename TargetRangeLike, typename Equality>
RangeEqualsMatcher

Matcher for checking that an element contains the same elements in the same order


UnorderedRangeEqualsMatcher class (Catch::Matchers::UnorderedRangeEqualsMatcher)

template <typename TargetRangeLike, typename Equality>
UnorderedRangeEqualsMatcher

Matcher for checking that an element contains the same elements (but not necessarily in the same order)


RangeEquals function (Catch::Matchers::RangeEquals)

template <typename RangeLike,
          typename Equality = decltype(std::equal_to<>

Creates a matcher that checks if all elements in a range are equal to all elements in another range.

Uses the provided predicate predicate to do the comparisons (defaulting to std::equal_to)


template <typename T,
          typename Equality = decltype(std::equal_to<>

Creates a matcher that checks if all elements in a range are equal to all elements in an initializer list.

Uses the provided predicate predicate to do the comparisons (defaulting to std::equal_to)


UnorderedRangeEquals function (Catch::Matchers::UnorderedRangeEquals)

template <typename RangeLike,
          typename Equality = decltype(std::equal_to<>

Creates a matcher that checks if all elements in a range are equal to all elements in another range, in some permutation.

Uses the provided predicate predicate to do the comparisons (defaulting to std::equal_to)


template <typename T,
          typename Equality = decltype(std::equal_to<>

Creates a matcher that checks if all elements in a range are equal to all elements in an initializer list, in some permutation.

Uses the provided predicate predicate to do the comparisons (defaulting to std::equal_to)


CasedString class (Catch::Matchers::CasedString)

CasedString

StringMatcherBase class (Catch::Matchers::StringMatcherBase)

StringMatcherBase

StringEqualsMatcher class (Catch::Matchers::StringEqualsMatcher)

StringEqualsMatcher

StringContainsMatcher class (Catch::Matchers::StringContainsMatcher)

StringContainsMatcher

StartsWithMatcher class (Catch::Matchers::StartsWithMatcher)

StartsWithMatcher

EndsWithMatcher class (Catch::Matchers::EndsWithMatcher)

EndsWithMatcher

RegexMatcher class (Catch::Matchers::RegexMatcher)

RegexMatcher

Equals function (Catch::Matchers::Equals)

StringEqualsMatcher
Equals(std::string const &str,
       CaseSensitive caseSensitivity = CaseSensitive::Yes)

//! Creates matcher that accepts strings that are exactly equal to str


ContainsSubstring function (Catch::Matchers::ContainsSubstring)

StringContainsMatcher ContainsSubstring(
    std::string const &str,
    CaseSensitive caseSensitivity = CaseSensitive::Yes)

//! Creates matcher that accepts strings that contain str


EndsWith function (Catch::Matchers::EndsWith)

EndsWithMatcher
EndsWith(std::string const &str,
         CaseSensitive caseSensitivity = CaseSensitive::Yes)

//! Creates matcher that accepts strings that end with str


StartsWith function (Catch::Matchers::StartsWith)

StartsWithMatcher StartsWith(
    std::string const &str,
    CaseSensitive caseSensitivity = CaseSensitive::Yes)

//! Creates matcher that accepts strings that start with str


Matches function (Catch::Matchers::Matches)

RegexMatcher
Matches(std::string const &regex,
        CaseSensitive caseSensitivity = CaseSensitive::Yes)

//! Creates matcher that accepts strings matching regex


VectorContainsElementMatcher class (Catch::Matchers::VectorContainsElementMatcher)

template <typename T, typename Alloc>
VectorContainsElementMatcher

ContainsMatcher class (Catch::Matchers::ContainsMatcher)

template <typename T, typename AllocComp,
          typename AllocMatch>
ContainsMatcher

EqualsMatcher class (Catch::Matchers::EqualsMatcher)

template <typename T, typename AllocComp,
          typename AllocMatch>
EqualsMatcher

ApproxMatcher class (Catch::Matchers::ApproxMatcher)

template <typename T, typename AllocComp,
          typename AllocMatch>
ApproxMatcher

UnorderedEqualsMatcher class (Catch::Matchers::UnorderedEqualsMatcher)

template <typename T, typename AllocComp,
          typename AllocMatch>
UnorderedEqualsMatcher

Contains function (Catch::Matchers::Contains)

template <typename T,
          typename AllocComp = std::allocator<T>,
          typename AllocMatch = AllocComp>
ContainsMatcher<T, AllocComp, AllocMatch>
Contains(std::vector<T, AllocComp> const &comparator)

//! Creates a matcher that matches vectors that contain all elements in comparator


VectorContains function (Catch::Matchers::VectorContains)

template <typename T, typename Alloc = std::allocator<T>>
VectorContainsElementMatcher<T, Alloc>
VectorContains(T const &comparator)

//! Creates a matcher that matches vectors that contain comparator as an element


Equals function (Catch::Matchers::Equals)

template <typename T,
          typename AllocComp = std::allocator<T>,
          typename AllocMatch = AllocComp>
EqualsMatcher<T, AllocComp, AllocMatch>
Equals(std::vector<T, AllocComp> const &comparator)

//! Creates a matcher that matches vectors that are exactly equal to comparator


Approx function (Catch::Matchers::Approx)

template <typename T,
          typename AllocComp = std::allocator<T>,
          typename AllocMatch = AllocComp>
ApproxMatcher<T, AllocComp, AllocMatch>
Approx(std::vector<T, AllocComp> const &comparator)

//! Creates a matcher that matches vectors that comparator as an element


UnorderedEquals function (Catch::Matchers::UnorderedEquals)

template <typename T,
          typename AllocComp = std::allocator<T>,
          typename AllocMatch = AllocComp>
UnorderedEqualsMatcher<T, AllocComp, AllocMatch>
UnorderedEquals(std::vector<T, AllocComp> const &target)

//! Creates a matcher that matches vectors that is equal to target modulo permutation


ColourImpl class (Catch::ColourImpl)

ColourImpl

ReporterBase class (Catch::ReporterBase)

ReporterBase

This is the base class for all reporters.

If are writing a reporter, you must derive from this type, or one of the helper reporter bases that are derived from this type.

ReporterBase centralizes handling of various common tasks in reporters, like storing the right stream for the reporters to write to, and providing the default implementation of the different listing events.

m_wrapped_stream variable (Catch::ReporterBase::m_wrapped_stream)

Detail::unique_ptr<IStream> m_wrapped_stream

//! The stream wrapper as passed to us by outside code

m_stream variable (Catch::ReporterBase::m_stream)

std::ostream &m_stream

//! Cached output stream from m_wrapped_stream to reduce //! number of indirect calls needed to write output.

m_colour variable (Catch::ReporterBase::m_colour)

Detail::unique_ptr<ColourImpl> m_colour

//! Colour implementation this reporter was configured for

m_customOptions variable (Catch::ReporterBase::m_customOptions)

std::map<std::string, std::string> m_customOptions

//! The custom reporter options user passed down to the reporter

listReporters function (Catch::ReporterBase::listReporters)

void listReporters(std::vector<ReporterDescription> const
                       &descriptions) override

Provides a simple default listing of reporters.

Should look roughly like the reporter listing in v2 and earlier versions of Catch2.

listListeners function (Catch::ReporterBase::listListeners)

void listListeners(std::vector<ListenerDescription> const
                       &descriptions) override

Provides a simple default listing of listeners

Looks similarly to listing of reporters, but with listener type instead of reporter name.

listTests function (Catch::ReporterBase::listTests)

void listTests(
    std::vector<TestCaseHandle> const &tests) override

Provides a simple default listing of tests.

Should look roughly like the test listing in v2 and earlier versions of Catch2. Especially supports low-verbosity listing that mimics the old --list-test-names-only output.

listTags function (Catch::ReporterBase::listTags)

void listTags(std::vector<TagInfo> const &tags) override

Provides a simple default listing of tags.

Should look roughly like the tag listing in v2 and earlier versions of Catch2.


StreamingReporterBase class (Catch::StreamingReporterBase)

StreamingReporterBase

m_sectionStack variable (Catch::StreamingReporterBase::m_sectionStack)

std::vector<SectionInfo> m_sectionStack

//! Stack of all active sections in the current test case


AutomakeReporter class (Catch::AutomakeReporter)

AutomakeReporter

CompactReporter class (Catch::CompactReporter)

CompactReporter

TablePrinter class (Catch::TablePrinter)

TablePrinter

ConsoleReporter class (Catch::ConsoleReporter)

ConsoleReporter

AssertionOrBenchmarkResult class (Catch::Detail::AssertionOrBenchmarkResult)

AssertionOrBenchmarkResult

//! Represents either an assertion or a benchmark result to be handled by cumulative reporter later


CumulativeReporterBase class (Catch::CumulativeReporterBase)

CumulativeReporterBase

Utility base for reporters that need to handle all results at once

It stores tree of all test cases, sections and assertions, and after the test run is finished, calls into testRunEndedCumulative to pass the control to the deriving class.

If you are deriving from this class and override any testing related member functions, you should first call into the base's implementation to avoid breaking the tree construction.

Due to the way this base functions, it has to expand assertions up-front, even if they are later unused (e.g. because the deriving reporter does not report successful assertions, or because the deriving reporter does not use assertion expansion at all). Derived classes can use two customization points, m_shouldStoreSuccesfulAssertions and m_shouldStoreFailedAssertions, to disable the expansion and gain extra performance. Accessing the assertion expansions if it wasn't stored is UB.

Node class (Catch::CumulativeReporterBase::Node)

template <typename T, typename ChildNodeT> Node

SectionNode class (Catch::CumulativeReporterBase::SectionNode)

SectionNode

testRunEndedCumulative function (Catch::CumulativeReporterBase::testRunEndedCumulative)

virtual void testRunEndedCumulative() = 0

//! Customization point: called after last test finishes (testRunEnded has been handled)

m_shouldStoreSuccesfulAssertions variable (Catch::CumulativeReporterBase::m_shouldStoreSuccesfulAssertions)

bool m_shouldStoreSuccesfulAssertions = true

//! Should the cumulative base store the assertion expansion for successful assertions?

m_shouldStoreFailedAssertions variable (Catch::CumulativeReporterBase::m_shouldStoreFailedAssertions)

bool m_shouldStoreFailedAssertions = true

//! Should the cumulative base store the assertion expansion for failed assertions?

m_testRun variable (Catch::CumulativeReporterBase::m_testRun)

Detail::unique_ptr<TestRunNode> m_testRun

//! The root node of the test run tree.


EventListenerBase class (Catch::EventListenerBase)

EventListenerBase

Base class to simplify implementing listeners.

Provides empty default implementation for all IEventListener member functions, so that a listener implementation can pick which member functions it actually cares about.


IConfig class (Catch::IConfig)

IConfig

TestCaseHandle class (Catch::TestCaseHandle)

TestCaseHandle

Wrapper over the test case information and the test case invoker

Does not own either, and is specifically made to be cheap to copy around.


ColourImpl class (Catch::ColourImpl)

ColourImpl

shouldShowDuration function (Catch::shouldShowDuration)

bool shouldShowDuration(IConfig const &config,
                        double duration)

//! Should the reporter show duration of test given current configuration?


lineOfChars class (Catch::lineOfChars)

lineOfChars

defaultListReporters function (Catch::defaultListReporters)

void defaultListReporters(
    std::ostream &out,
    std::vector<ReporterDescription> const &descriptions,
    Verbosity verbosity)

Lists reporter descriptions to the provided stream in user-friendly format

Used as the default listing implementation by the first party reporter bases. The output should be backwards compatible with the output of Catch2 v2 binaries.


defaultListListeners function (Catch::defaultListListeners)

void defaultListListeners(
    std::ostream &out,
    std::vector<ListenerDescription> const &descriptions)

Lists listeners descriptions to the provided stream in user-friendly format


defaultListTags function (Catch::defaultListTags)

void defaultListTags(std::ostream &out,
                     std::vector<TagInfo> const &tags,
                     bool isFiltered)

Lists tag information to the provided stream in user-friendly format

Used as the default listing implementation by the first party reporter bases. The output should be backwards compatible with the output of Catch2 v2 binaries.


defaultListTests function (Catch::defaultListTests)

void defaultListTests(
    std::ostream &out, ColourImpl *streamColour,
    std::vector<TestCaseHandle> const &tests,
    bool isFiltered, Verbosity verbosity)

Lists test case information to the provided stream in user-friendly format

Used as the default listing implementation by the first party reporter bases. The output is backwards compatible with the output of Catch2 v2 binaries, and also supports the format specific to the old --list-test-names-only option, for people who used it in integrations.


printTestRunTotals function (Catch::printTestRunTotals)

void printTestRunTotals(std::ostream &stream,
                        ColourImpl &streamColour,
                        Totals const &totals)

Prints test run totals to the provided stream in user-friendly format

Used by the console and compact reporters.


JsonReporter class (Catch::JsonReporter)

JsonReporter

JunitReporter class (Catch::JunitReporter)

JunitReporter

MultiReporter class (Catch::MultiReporter)

MultiReporter

has_description class (Catch::Detail::has_description)

template <typename T, typename = void> has_description

template <typename T> has_description

registerReporterImpl function (Catch::Detail::registerReporterImpl)

void registerReporterImpl(std::string const &name,
                          IReporterFactoryPtr reporterPtr)

//! Indirection for reporter registration, so that the error handling is //! independent on the reporter's concrete type


registerListenerImpl function (Catch::Detail::registerListenerImpl)

void registerListenerImpl(
    Detail::unique_ptr<EventListenerFactory>
        listenerFactory)

//! Actually registers the factory, independent on listener's concrete type


IEventListener class (Catch::IEventListener)

IEventListener

The common base for all reporters and event listeners

Implementing classes must also implement:

//! User-friendly description of the reporter/listener type
static std::string getDescription()

Generally shouldn't be derived from by users of Catch2 directly, instead they should derive from one of the utility bases that derive from this class.


ReporterFactory class (Catch::ReporterFactory)

template <typename T> ReporterFactory

ReporterRegistrar class (Catch::ReporterRegistrar)

template <typename T> ReporterRegistrar

ListenerRegistrar class (Catch::ListenerRegistrar)

template <typename T> ListenerRegistrar

TypedListenerFactory class (Catch::ListenerRegistrar::TypedListenerFactory)

TypedListenerFactory

SonarQubeReporter class (Catch::SonarQubeReporter)

SonarQubeReporter

TAPReporter class (Catch::TAPReporter)

TAPReporter

TeamCityReporter class (Catch::TeamCityReporter)

TeamCityReporter

XmlReporter class (Catch::XmlReporter)

XmlReporter

Auto-generated from sources, Revision , https://github.com/kfrlib/kfr/blob//include/kfr/