Developer’s API#
This is a placeholder for all generated APIs.
These should be organized using doxygen groups.
All APIs#
-
struct accept_many_t#
- #include <catch_clara.hpp>
-
template<typename Matcher>
class AllMatchMatcher : public Catch::Matchers::MatcherGenericBase# - #include <catch_matchers_quantifiers.hpp>
Public Functions
-
class AllTrueMatcher : public Catch::Matchers::MatcherGenericBase#
- #include <catch_matchers_quantifiers.hpp>
-
template<typename T>
struct always_false : public std::false_type# - #include <catch_decomposer.hpp>
-
template<typename Matcher>
class AnyMatchMatcher : public Catch::Matchers::MatcherGenericBase# - #include <catch_matchers_quantifiers.hpp>
Public Functions
-
class AnyTrueMatcher : public Catch::Matchers::MatcherGenericBase#
- #include <catch_matchers_quantifiers.hpp>
-
class Approx#
- #include <catch_approx.hpp>
Public Functions
-
explicit Approx(double value)#
-
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
inline explicit Approx(T const &value)#
-
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
inline Approx &epsilon(T const &newEpsilon)#
-
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
inline Approx &margin(T const &newMargin)#
-
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
inline Approx operator()(T const &value) const#
Private Functions
-
bool equalityComparisonImpl(double other) const#
-
void setEpsilon(double epsilon)#
-
void setMargin(double margin)#
Friends
-
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
inline friend bool operator!=(Approx const &lhs, T const &rhs)#
-
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
inline friend bool operator!=(T const &lhs, Approx const &rhs)#
-
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
inline friend bool operator<=(Approx const &lhs, T const &rhs)#
-
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
inline friend bool operator<=(T const &lhs, Approx const &rhs)#
-
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
inline friend bool operator==(Approx const &lhs, const T &rhs)#
-
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
inline friend bool operator==(const T &lhs, Approx const &rhs)#
-
explicit Approx(double value)#
-
template<typename T, typename AllocComp, typename AllocMatch>
class ApproxMatcher : public Catch::Matchers::MatcherBase<std::vector<T, AllocMatch>># - #include <catch_matchers_vector.hpp>
Public Functions
-
template<typename = std::enable_if_t<std::is_constructible<double, T>::value>>
inline ApproxMatcher &epsilon(T const &newEpsilon)#
-
template<typename = std::enable_if_t<std::is_constructible<double, T>::value>>
inline ApproxMatcher &margin(T const &newMargin)#
-
inline virtual bool match(std::vector<T, AllocMatch> const &v) const override#
-
template<typename = std::enable_if_t<std::is_constructible<double, T>::value>>
-
class Arg : public Catch::Clara::Detail::ParserRefImpl<Arg>#
- #include <catch_clara.hpp>
Public Functions
-
virtual Detail::InternalParseResult parse(std::string const&, Detail::TokenStream const &tokens) const override#
-
virtual Detail::InternalParseResult parse(std::string const&, Detail::TokenStream const &tokens) const override#
-
class Args#
- #include <catch_clara.hpp>
Public Functions
-
Args(int argc, char const *const *argv)#
-
Args(int argc, char const *const *argv)#
-
template<typename T>
struct as# - #include <catch_generators.hpp>
-
class AssertionHandler#
- #include <catch_assertion_handler.hpp>
Public Functions
-
AssertionHandler(StringRef macroName, SourceLineInfo const &lineInfo, StringRef capturedExpression, ResultDisposition::Flags resultDisposition)#
-
inline ~AssertionHandler()#
-
auto allowThrows() const -> bool#
-
void complete()#
-
void handleExceptionNotThrownAsExpected()#
-
void handleExceptionThrownAsExpected()#
-
void handleExpr(ITransientExpression const &expr)#
-
void handleThrowingCallSkipped()#
-
void handleUnexpectedExceptionNotThrown()#
-
void handleUnexpectedInflightException()#
Private Members
-
AssertionInfo m_assertionInfo#
-
bool m_completed = false#
-
AssertionReaction m_reaction#
-
IResultCapture &m_resultCapture#
-
AssertionHandler(StringRef macroName, SourceLineInfo const &lineInfo, StringRef capturedExpression, ResultDisposition::Flags resultDisposition)#
-
struct AssertionInfo#
- #include <catch_assertion_info.hpp>
-
class AssertionOrBenchmarkResult#
- #include <catch_reporter_cumulative_base.hpp>
Represents either an assertion or a benchmark result to be handled by cumulative reporter later.
Public Functions
-
AssertionOrBenchmarkResult(AssertionStats const &assertion)#
-
AssertionOrBenchmarkResult(BenchmarkStats<> const &benchmark)#
-
AssertionStats const &asAssertion() const#
-
BenchmarkStats const &asBenchmark() const#
-
bool isAssertion() const#
-
bool isBenchmark() const#
-
AssertionOrBenchmarkResult(AssertionStats const &assertion)#
-
struct AssertionReaction#
- #include <catch_assertion_handler.hpp>
-
class AssertionResult#
- #include <catch_assertion_result.hpp>
Public Functions
-
AssertionResult() = delete#
-
AssertionResult(AssertionInfo const &info, AssertionResultData &&data)#
-
SourceLineInfo getSourceInfo() const#
-
bool hasExpandedExpression() const#
-
bool hasExpression() const#
-
bool hasMessage() const#
-
bool isOk() const#
-
bool succeeded() const#
-
AssertionResult() = delete#
-
struct AssertionResultData#
- #include <catch_assertion_result.hpp>
Public Functions
-
AssertionResultData() = delete#
-
AssertionResultData(ResultWas::OfType _resultType, LazyExpression const &_lazyExpression)#
-
AssertionResultData() = delete#
-
struct AssertionStats#
- #include <catch_interfaces_reporter.hpp>
Public Functions
-
AssertionStats(AssertionResult const &_assertionResult, std::vector<MessageInfo> const &_infoMessages, Totals const &_totals)#
-
AssertionStats(AssertionStats&&) = default#
-
AssertionStats(AssertionStats const&) = default#
-
AssertionStats &operator=(AssertionStats&&) = delete#
-
AssertionStats &operator=(AssertionStats const&) = delete#
-
AssertionStats(AssertionResult const &_assertionResult, std::vector<MessageInfo> const &_infoMessages, Totals const &_totals)#
-
class AutomakeReporter : public Catch::StreamingReporterBase#
- #include <catch_reporter_automake.hpp>
Public Functions
-
inline AutomakeReporter(ReporterConfig &&_config)#
-
~AutomakeReporter() override#
-
virtual void skipTest(TestCaseInfo const &testInfo) override#
Called with test cases that are skipped due to the test run aborting.
NOT called for test cases that are explicitly skipped using the
SKIPmacro.Deprecated - will be removed in the next major release.
-
virtual void testCaseEnded(TestCaseStats const &_testCaseStats) override#
Called once for each TEST_CASE, no matter how many times it is entered.
-
inline AutomakeReporter(ReporterConfig &&_config)#
-
struct AutoReg : public Catch::Detail::NonCopyable#
- #include <catch_test_registry.hpp>
Public Functions
-
AutoReg(Detail::unique_ptr<ITestInvoker> invoker, SourceLineInfo const &lineInfo, StringRef classOrMethod, NameAndTags const &nameAndTags) noexcept#
-
AutoReg(Detail::unique_ptr<ITestInvoker> invoker, SourceLineInfo const &lineInfo, StringRef classOrMethod, NameAndTags const &nameAndTags) noexcept#
-
template<typename T = void>
class BasicResult : public Catch::Clara::Detail::ResultValueBase<void># - #include <catch_clara.hpp>
Public Functions
-
template<typename U>
inline explicit BasicResult(BasicResult<U> const &other)#
-
inline explicit operator bool() const#
-
inline auto type() const -> ResultType#
Public Static Functions
-
static inline auto logicError(std::string &&message) -> BasicResult#
-
static inline auto ok() -> BasicResult#
-
template<typename U>
static inline auto ok(U const &value) -> BasicResult#
-
static inline auto runtimeError(std::string &&message) -> BasicResult#
Protected Functions
-
inline BasicResult(ResultType type, std::string &&message)#
-
inline virtual void enforceOk() const override#
-
template<typename U>
-
struct Benchmark#
- #include <catch_benchmark.hpp>
Public Functions
-
inline explicit operator bool()#
-
template<typename Clock>
inline ExecutionPlan<FloatDuration<Clock>> prepare(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const#
-
template<typename Clock = default_clock>
inline void run()#
-
inline explicit operator bool()#
-
struct BenchmarkFunction#
- #include <catch_benchmark_function.hpp>
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.
Public Functions
-
inline BenchmarkFunction()#
-
inline BenchmarkFunction(BenchmarkFunction &&that) noexcept#
-
inline BenchmarkFunction(BenchmarkFunction const &that)#
-
inline void operator()(Chronometer meter) const#
-
inline BenchmarkFunction &operator=(BenchmarkFunction &&that) noexcept#
-
inline BenchmarkFunction &operator=(BenchmarkFunction const &that)#
Private Members
-
Catch::Detail::unique_ptr<callable> f#
-
inline BenchmarkFunction()#
-
struct BenchmarkInfo#
- #include <catch_benchmark_stats.hpp>
-
template<class Duration>
struct BenchmarkStats# - #include <catch_benchmark_stats.hpp>
Public Functions
-
template<typename Duration2>
inline operator BenchmarkStats<Duration2>() const#
-
template<typename Duration2>
-
template<typename LhsT, typename RhsT>
class BinaryExpr : public Catch::ITransientExpression# - #include <catch_decomposer.hpp>
Public Functions
-
template<typename T>
inline auto operator!=(T) const -> BinaryExpr<LhsT, RhsT const&> const#
-
template<typename T>
inline auto operator&&(T) const -> BinaryExpr<LhsT, RhsT const&> const#
-
template<typename T>
inline auto operator<(T) const -> BinaryExpr<LhsT, RhsT const&> const#
-
template<typename T>
inline auto operator<=(T) const -> BinaryExpr<LhsT, RhsT const&> const#
-
template<typename T>
inline auto operator==(T) const -> BinaryExpr<LhsT, RhsT const&> const#
-
template<typename T>
inline auto operator>(T) const -> BinaryExpr<LhsT, RhsT const&> const#
-
template<typename T>
inline auto operator>=(T) const -> BinaryExpr<LhsT, RhsT const&> const#
-
template<typename T>
inline auto operator||(T) const -> BinaryExpr<LhsT, RhsT const&> const#
Private Functions
-
template<typename T>
-
struct bootstrap_analysis#
- #include <catch_stats.hpp>
-
template<typename L>
struct BoundFlagLambda : public Catch::Clara::Detail::BoundFlagRefBase# - #include <catch_clara.hpp>
Public Functions
-
inline virtual auto setFlag(bool flag) -> ParserResult override#
-
inline virtual auto setFlag(bool flag) -> ParserResult override#
-
struct BoundFlagRef : public Catch::Clara::Detail::BoundFlagRefBase#
- #include <catch_clara.hpp>
Public Functions
-
inline explicit BoundFlagRef(bool &ref)#
-
virtual ParserResult setFlag(bool flag) override#
Public Members
-
bool &m_ref#
-
inline explicit BoundFlagRef(bool &ref)#
-
struct BoundFlagRefBase : public Catch::Clara::Detail::BoundRef#
- #include <catch_clara.hpp>
Subclassed by Catch::Clara::Detail::BoundFlagLambda< L >, Catch::Clara::Detail::BoundFlagRef
Public Functions
-
virtual bool isFlag() const override#
-
virtual auto setFlag(bool flag) -> ParserResult = 0#
-
virtual bool isFlag() const override#
-
template<typename L>
struct BoundLambda : public Catch::Clara::Detail::BoundValueRefBase# - #include <catch_clara.hpp>
Subclassed by Catch::Clara::Detail::BoundManyLambda< L >
Public Functions
-
inline virtual auto setValue(std::string const &arg) -> ParserResult override#
-
inline virtual auto setValue(std::string const &arg) -> ParserResult override#
-
template<typename L>
struct BoundManyLambda : public Catch::Clara::Detail::BoundLambda<L># - #include <catch_clara.hpp>
-
struct BoundRef : public Catch::Detail::NonCopyable#
- #include <catch_clara.hpp>
Subclassed by Catch::Clara::Detail::BoundFlagRefBase, Catch::Clara::Detail::BoundValueRefBase
-
template<typename T>
struct BoundValueRef : public Catch::Clara::Detail::BoundValueRefBase# - #include <catch_clara.hpp>
Public Functions
-
inline virtual ParserResult setValue(std::string const &arg) override#
-
inline virtual ParserResult setValue(std::string const &arg) override#
-
template<typename T>
struct BoundValueRef<std::vector<T>> : public Catch::Clara::Detail::BoundValueRefBase# - #include <catch_clara.hpp>
Public Functions
-
inline virtual auto isContainer() const -> bool override#
-
inline virtual auto setValue(std::string const &arg) -> ParserResult override#
-
inline virtual auto isContainer() const -> bool override#
-
struct BoundValueRefBase : public Catch::Clara::Detail::BoundRef#
- #include <catch_clara.hpp>
Subclassed by Catch::Clara::Detail::BoundLambda< L >, Catch::Clara::Detail::BoundValueRef< T >, Catch::Clara::Detail::BoundValueRef< std::vector< T > >
Public Functions
-
virtual auto setValue(std::string const &arg) -> ParserResult = 0#
-
virtual auto setValue(std::string const &arg) -> ParserResult = 0#
-
struct callable#
-
class Capturer#
- #include <catch_message.hpp>
Public Functions
-
Capturer(StringRef macroName, SourceLineInfo const &lineInfo, ResultWas::OfType resultType, StringRef names)#
-
~Capturer()#
Private Members
-
size_t m_captured = 0#
-
std::vector<MessageInfo> m_messages#
-
IResultCapture &m_resultCapture#
-
Capturer(StringRef macroName, SourceLineInfo const &lineInfo, ResultWas::OfType resultType, StringRef names)#
-
struct CasedString#
- #include <catch_matchers_string.hpp>
Public Functions
-
CasedString(std::string const &str, CaseSensitive caseSensitivity)#
-
CasedString(std::string const &str, CaseSensitive caseSensitivity)#
-
struct CaseInsensitiveEqualTo#
- #include <catch_case_insensitive_comparisons.hpp>
Provides case-insensitive
op==semantics when called.
-
struct CaseInsensitiveLess#
- #include <catch_case_insensitive_comparisons.hpp>
Provides case-insensitive
op<semantics when called.
-
struct Catch_global_namespace_dummy#
- #include <catch_tostring.hpp>
-
struct Chronometer#
- #include <catch_chronometer.hpp>
Public Functions
-
inline Chronometer(Detail::ChronometerConcept &meter, int repeats_)#
-
inline int runs() const#
Private Functions
-
inline Chronometer(Detail::ChronometerConcept &meter, int repeats_)#
-
struct ChronometerConcept#
- #include <catch_chronometer.hpp>
Subclassed by Catch::Benchmark::Detail::ChronometerModel< Clock >
Public Functions
-
ChronometerConcept() = default#
-
ChronometerConcept(ChronometerConcept const&) = default#
-
virtual ~ChronometerConcept()#
-
virtual void finish() = 0#
-
ChronometerConcept &operator=(ChronometerConcept const&) = default#
-
virtual void start() = 0#
-
ChronometerConcept() = default#
-
template<typename Clock>
struct ChronometerModel : public Catch::Benchmark::Detail::ChronometerConcept# - #include <catch_chronometer.hpp>
Public Functions
-
inline ClockDuration<Clock> elapsed() const#
-
inline virtual void finish() override#
-
inline virtual void start() override#
-
inline ClockDuration<Clock> elapsed() const#
-
template<typename T>
class ChunkGenerator : public Catch::Generators::IGenerator<std::vector<T>># - #include <catch_generators_adapters.hpp>
Public Functions
-
inline ChunkGenerator(size_t size, GeneratorWrapper<T> generator)#
-
inline virtual bool next() override#
Attempts to move the generator to the next element.
Returns true iff the move succeeded (and a valid element can be retrieved).
-
inline ChunkGenerator(size_t size, GeneratorWrapper<T> generator)#
-
struct Colour#
- #include <catch_console_colour.hpp>
Public Types
-
enum Code#
Values:
-
enumerator None#
-
enumerator White#
-
enumerator Red#
-
enumerator Green#
-
enumerator Blue#
-
enumerator Cyan#
-
enumerator Yellow#
-
enumerator Grey#
-
enumerator Bright#
-
enumerator BrightRed#
-
enumerator BrightGreen#
-
enumerator LightGrey#
-
enumerator BrightWhite#
-
enumerator BrightYellow#
-
enumerator FileName#
-
enumerator Warning#
-
enumerator ResultError#
-
enumerator ResultSuccess#
-
enumerator ResultExpectedFailure#
-
enumerator Error#
-
enumerator Success#
-
enumerator Skip#
-
enumerator OriginalExpression#
-
enumerator ReconstructedExpression#
-
enumerator SecondaryText#
-
enumerator Headers#
-
enumerator None#
-
enum Code#
-
class ColourGuard#
- #include <catch_console_colour.hpp>
RAII wrapper around writing specific colour of text using specific colour impl into a stream.
Public Functions
-
ColourGuard(Colour::Code code, ColourImpl const *colour)#
Does not engage the guard/start the colour.
-
ColourGuard(ColourGuard &&rhs) noexcept#
-
ColourGuard(ColourGuard const &rhs) = delete#
-
~ColourGuard()#
Removes colour if the guard was engaged.
-
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.
-
ColourGuard &operator=(ColourGuard &&rhs) noexcept#
-
ColourGuard &operator=(ColourGuard const &rhs) = delete#
Friends
-
inline friend std::ostream &operator<<(std::ostream &lhs, ColourGuard &&guard)#
Engages the guard and starts using colour.
-
inline friend std::ostream &operator<<(std::ostream &lhs, ColourGuard &guard)#
Engages the guard and starts using colour.
-
ColourGuard(Colour::Code code, ColourImpl const *colour)#
-
class ColourImpl#
- #include <catch_console_colour.hpp>
Public Functions
-
virtual ~ColourImpl()#
-
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.
Protected Attributes
-
IStream *m_stream#
The associated stream of this ColourImpl instance.
-
virtual ~ColourImpl()#
-
class Column#
- #include <catch_textflow.hpp>
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.
Public Types
-
using iterator = const_iterator#
Public Functions
-
inline const_iterator begin() const#
-
inline const_iterator end() const#
-
inline size_t width() const#
-
using iterator = const_iterator#
-
class Columns#
- #include <catch_textflow.hpp>
Public Functions
-
class CompactReporter : public Catch::StreamingReporterBase#
- #include <catch_reporter_compact.hpp>
Public Functions
-
~CompactReporter() override#
-
virtual void assertionEnded(AssertionStats const &_assertionStats) override#
Called after assertion was fully evaluated.
-
virtual void noMatchingTestCases(StringRef unmatchedSpec) override#
Called when no test cases match provided test spec.
-
virtual void sectionEnded(SectionStats const &_sectionStats) override#
Called after a
SECTIONhas finished running.
-
inline StreamingReporterBase(ReporterConfig &&_config)#
-
virtual void testRunEnded(TestRunStats const &_testRunStats) override#
Called once after all tests in a testing run are finished.
Not called if tests weren’t run (e.g. only listings happened)
-
virtual void testRunStarting(TestRunInfo const &_testInfo) override#
Called once in a testing run before tests are started.
Not called if tests won’t be run (e.g. only listing will happen)
-
~CompactReporter() override#
-
template<typename Result>
struct CompleteInvoker# - #include <catch_complete_invoke.hpp>
-
template<>
struct CompleteInvoker<void># - #include <catch_complete_invoke.hpp>
Public Static Functions
-
template<typename Fun, typename ...Args>
static inline CompleteType_t<void> invoke(Fun &&fun, Args&&... args)#
-
template<typename Fun, typename ...Args>
-
template<typename T>
struct CompleteType# - #include <catch_complete_invoke.hpp>
-
template<>
struct CompleteType<void># - #include <catch_complete_invoke.hpp>
-
template<typename DerivedT>
class ComposableParserImpl : public Catch::Clara::Detail::ParserBase# - #include <catch_clara.hpp>
Subclassed by Catch::Clara::Detail::ParserRefImpl< Opt >, Catch::Clara::Detail::ParserRefImpl< Arg >, Catch::Clara::Detail::ParserRefImpl< DerivedT >
-
class Config : public Catch::IConfig#
- #include <catch_config.hpp>
Public Functions
-
Config() = default#
-
Config(ConfigData const &data)#
-
~Config() override#
-
virtual int abortAfter() const override#
-
virtual bool allowThrows() const override#
-
virtual double benchmarkConfidenceInterval() const override#
-
virtual bool benchmarkNoAnalysis() const override#
-
virtual unsigned int benchmarkResamples() const override#
-
virtual unsigned int benchmarkSamples() const override#
-
virtual ColourMode defaultColourMode() const override#
-
std::vector<ProcessedReporterSpec> const &getProcessedReporterSpecs() const#
-
std::vector<ReporterSpec> const &getReporterSpecs() const#
-
virtual bool hasTestFilters() const override#
-
virtual bool includeSuccessfulResults() const override#
-
bool listListeners() const#
-
bool listReporters() const#
-
bool listTags() const#
-
bool listTests() const#
-
virtual double minDuration() const override#
-
virtual uint32_t rngSeed() const override#
-
virtual TestRunOrder runOrder() const override#
-
virtual unsigned int shardCount() const override#
-
virtual unsigned int shardIndex() const override#
-
virtual bool shouldDebugBreak() const override#
-
virtual ShowDurations showDurations() const override#
-
bool showHelp() const#
-
virtual bool showInvisibles() const override#
-
virtual bool skipBenchmarks() const override#
-
virtual bool warnAboutMissingAssertions() const override#
-
virtual bool warnAboutUnmatchedTestSpecs() const override#
-
virtual bool zeroTestsCountAsSuccess() const override#
Private Functions
-
void readBazelEnvVars()#
Private Members
-
ConfigData m_data#
-
bool m_hasTestFilters = false#
-
std::vector<ProcessedReporterSpec> m_processedReporterSpecs#
-
Config() = default#
-
struct ConfigData#
- #include <catch_config.hpp>
Public Members
-
int abortAfter = -1#
-
bool allowZeroTests = false#
-
double benchmarkConfidenceInterval = 0.95#
-
bool benchmarkNoAnalysis = false#
-
unsigned int benchmarkResamples = 100000#
-
unsigned int benchmarkSamples = 100#
-
ColourMode defaultColourMode = ColourMode::PlatformDefault#
-
bool filenamesAsTags = false#
-
bool libIdentify = false#
-
bool listListeners = false#
-
bool listReporters = false#
-
bool listTags = false#
-
bool listTests = false#
-
double minDuration = -1#
-
bool noThrow = false#
-
std::vector<ReporterSpec> reporterSpecifications#
-
uint32_t rngSeed = generateRandomSeed(GenerateFrom::Default)#
-
TestRunOrder runOrder = TestRunOrder::Declared#
-
unsigned int shardCount = 1#
-
unsigned int shardIndex = 0#
-
bool shouldDebugBreak = false#
-
ShowDurations showDurations = ShowDurations::DefaultForReporter#
-
bool showHelp = false#
-
bool showInvisibles = false#
-
bool showSuccessfulTests = false#
-
bool skipBenchmarks = false#
-
WaitForKeypress::When waitForKeypress = WaitForKeypress::Never#
-
int abortAfter = -1#
-
template<class...>
struct conjunction : public std::true_type# - #include <catch_logical_traits.hpp>
-
template<class B1>
struct conjunction<B1> : public B1# - #include <catch_logical_traits.hpp>
-
template<class B1, class ...Bn>
struct conjunction<B1, Bn...> : public std::conditional_t<bool(B1::value), conjunction<Bn...>, B1># - #include <catch_logical_traits.hpp>
-
class ConsoleReporter : public Catch::StreamingReporterBase#
- #include <catch_reporter_console.hpp>
Public Functions
-
ConsoleReporter(ReporterConfig &&config)#
-
~ConsoleReporter() override#
-
virtual void assertionEnded(AssertionStats const &_assertionStats) override#
Called after assertion was fully evaluated.
-
virtual void assertionStarting(AssertionInfo const&) override#
Called before assertion success/failure is evaluated.
-
virtual void benchmarkEnded(BenchmarkStats<> const &stats) override#
Called with the benchmark results if benchmark successfully finishes.
-
virtual void benchmarkFailed(StringRef error) override#
Called if running the benchmarks fails for any reason.
-
virtual void benchmarkPreparing(StringRef name) override#
Called when user-code is being probed before the actual benchmark runs.
-
virtual void benchmarkStarting(BenchmarkInfo const &info) override#
Called after probe but before the user-code is being benchmarked.
-
virtual void noMatchingTestCases(StringRef unmatchedSpec) override#
Called when no test cases match provided test spec.
-
virtual void reportInvalidTestSpec(StringRef arg) override#
Called for all invalid test specs from the cli.
-
virtual void sectionEnded(SectionStats const &_sectionStats) override#
Called after a
SECTIONhas finished running.
-
virtual void sectionStarting(SectionInfo const &_sectionInfo) override#
Called when a
SECTIONis being entered. Not called for skipped sections.
-
virtual void testCaseEnded(TestCaseStats const &_testCaseStats) override#
Called once for each TEST_CASE, no matter how many times it is entered.
-
virtual void testRunEnded(TestRunStats const &_testRunStats) override#
Called once after all tests in a testing run are finished.
Not called if tests weren’t run (e.g. only listings happened)
-
virtual void testRunStarting(TestRunInfo const &_testRunInfo) override#
Called once in a testing run before tests are started.
Not called if tests won’t be run (e.g. only listing will happen)
Private Functions
-
void lazyPrint()#
-
void lazyPrintRunInfo()#
-
void lazyPrintWithoutClosingBenchmarkTable()#
-
void printTestCaseAndSectionHeader()#
Private Members
-
bool m_headerPrinted = false#
-
Detail::unique_ptr<TablePrinter> m_tablePrinter#
-
bool m_testRunInfoPrinted = false#
-
ConsoleReporter(ReporterConfig &&config)#
-
class const_iterator#
- #include <catch_textflow.hpp>
Iterates “lines” in
Columnand return sthem.Public Functions
-
inline bool operator!=(const_iterator const &other) const#
-
const_iterator &operator++()#
-
const_iterator operator++(int)#
-
inline bool operator==(const_iterator const &other) const#
-
inline bool operator!=(const_iterator const &other) const#
-
template<typename T, typename Equality>
class ContainsElementMatcher : public Catch::Matchers::MatcherGenericBase# - #include <catch_matchers_contains.hpp>
Matcher for checking that an element in range is equal to specific element.
-
template<typename T, typename AllocComp, typename AllocMatch>
class ContainsMatcher : public Catch::Matchers::MatcherBase<std::vector<T, AllocMatch>># - #include <catch_matchers_vector.hpp>
Public Functions
-
inline virtual bool match(std::vector<T, AllocMatch> const &v) const override#
-
inline virtual bool match(std::vector<T, AllocMatch> const &v) const override#
-
template<typename Matcher>
class ContainsMatcherMatcher : public Catch::Matchers::MatcherGenericBase# - #include <catch_matchers_contains.hpp>
Meta-matcher for checking that an element in a range matches a specific matcher.
Public Functions
-
class Context#
- #include <catch_context.hpp>
Public Functions
-
inline IResultCapture *getResultCapture() const#
-
void setResultCapture(IResultCapture *resultCapture)#
Private Static Functions
-
static void createContext()#
Private Static Attributes
- static CATCH_EXPORT Context * currentContext = nullptr
-
inline IResultCapture *getResultCapture() const#
-
struct Counts#
- #include <catch_totals.hpp>
-
class CumulativeReporterBase : public Catch::ReporterBase#
- #include <catch_reporter_cumulative_base.hpp>
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
testRunEndedCumulativeto 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_shouldStoreSuccesfulAssertionsandm_shouldStoreFailedAssertions, to disable the expansion and gain extra performance. Accessing the assertion expansions if it wasn’t stored is UB.Subclassed by Catch::JunitReporter, Catch::SonarQubeReporter
Public Types
-
using TestCaseNode = Node<TestCaseStats, SectionNode>#
-
using TestRunNode = Node<TestRunStats, TestCaseNode>#
Public Functions
-
inline CumulativeReporterBase(ReporterConfig &&_config)#
-
~CumulativeReporterBase() override#
-
virtual void assertionEnded(AssertionStats const &assertionStats) override#
Called after assertion was fully evaluated.
-
inline virtual void assertionStarting(AssertionInfo const&) override#
Called before assertion success/failure is evaluated.
-
virtual void benchmarkEnded(BenchmarkStats<> const &benchmarkStats) override#
Called with the benchmark results if benchmark successfully finishes.
-
inline virtual void benchmarkFailed(StringRef) override#
Called if running the benchmarks fails for any reason.
-
inline virtual void benchmarkPreparing(StringRef) override#
Called when user-code is being probed before the actual benchmark runs.
-
inline virtual void benchmarkStarting(BenchmarkInfo const&) override#
Called after probe but before the user-code is being benchmarked.
-
inline virtual void fatalErrorEncountered(StringRef) override#
Called if a fatal error (signal/structured exception) occurred.
-
inline virtual void noMatchingTestCases(StringRef) override#
Called when no test cases match provided test spec.
-
inline virtual void reportInvalidTestSpec(StringRef) override#
Called for all invalid test specs from the cli.
-
virtual void sectionEnded(SectionStats const §ionStats) override#
Called after a
SECTIONhas finished running.
-
virtual void sectionStarting(SectionInfo const §ionInfo) override#
Called when a
SECTIONis being entered. Not called for skipped sections.
-
inline virtual void skipTest(TestCaseInfo const&) override#
Called with test cases that are skipped due to the test run aborting.
NOT called for test cases that are explicitly skipped using the
SKIPmacro.Deprecated - will be removed in the next major release.
-
virtual void testCaseEnded(TestCaseStats const &testCaseStats) override#
Called once for each TEST_CASE, no matter how many times it is entered.
-
inline virtual void testCasePartialEnded(TestCaseStats const&, uint64_t) override#
Called every time a TEST_CASE is entered, including repeats (due to sections)
-
inline virtual void testCasePartialStarting(TestCaseInfo const&, uint64_t) override#
Called every time a TEST_CASE is entered, including repeats (due to sections)
-
inline virtual void testCaseStarting(TestCaseInfo const&) override#
Called once for each TEST_CASE, no matter how many times it is entered.
-
virtual void testRunEnded(TestRunStats const &testRunStats) override#
Called once after all tests in a testing run are finished.
Not called if tests weren’t run (e.g. only listings happened)
-
virtual void testRunEndedCumulative() = 0#
Customization point: called after last test finishes (testRunEnded has been handled)
-
inline virtual void testRunStarting(TestRunInfo const&) override#
Called once in a testing run before tests are started.
Not called if tests won’t be run (e.g. only listing will happen)
Protected Attributes
-
bool m_shouldStoreFailedAssertions = true#
Should the cumulative base store the assertion expansion for failed assertions?
-
bool m_shouldStoreSuccesfulAssertions = true#
Should the cumulative base store the assertion expansion for successful assertions?
-
Detail::unique_ptr<TestRunNode> m_testRun#
The root node of the test run tree.
Private Members
-
SectionNode *m_deepestSection = nullptr#
-
Detail::unique_ptr<SectionNode> m_rootSection#
-
std::vector<SectionNode*> m_sectionStack#
-
std::vector<Detail::unique_ptr<TestCaseNode>> m_testCases#
-
using TestCaseNode = Node<TestCaseStats, SectionNode>#
-
struct Decomposer#
- #include <catch_decomposer.hpp>
-
template<class...>
struct disjunction : public std::false_type# - #include <catch_logical_traits.hpp>
-
template<class B1>
struct disjunction<B1> : public B1# - #include <catch_logical_traits.hpp>
-
template<class B1, class ...Bn>
struct disjunction<B1, Bn...> : public std::conditional_t<bool(B1::value), B1, disjunction<Bn...>># - #include <catch_logical_traits.hpp>
-
class EndsWithMatcher : public Catch::Matchers::StringMatcherBase#
- #include <catch_matchers_string.hpp>
Public Functions
-
EndsWithMatcher(CasedString const &comparator)#
-
EndsWithMatcher(CasedString const &comparator)#
-
struct EndTag#
-
struct EndTag#
-
struct EnumInfo#
- #include <catch_interfaces_enum_values_registry.hpp>
-
class EnumValuesRegistry : public Catch::IMutableEnumValuesRegistry#
- #include <catch_enum_values_registry.hpp>
Private Functions
-
template<typename Clock>
struct Environment# - #include <catch_environment.hpp>
Public Members
-
EnvironmentEstimate<FloatDuration<Clock>> clock_cost#
-
EnvironmentEstimate<FloatDuration<Clock>> clock_resolution#
-
EnvironmentEstimate<FloatDuration<Clock>> clock_cost#
-
template<typename Duration>
struct EnvironmentEstimate# - #include <catch_environment.hpp>
Public Functions
-
template<typename Duration2>
inline operator EnvironmentEstimate<Duration2>() const#
-
template<typename Duration2>
-
template<typename T, typename AllocComp, typename AllocMatch>
class EqualsMatcher : public Catch::Matchers::MatcherBase<std::vector<T, AllocMatch>># - #include <catch_matchers_vector.hpp>
Public Functions
-
inline virtual bool match(std::vector<T, AllocMatch> const &v) const override#
-
inline virtual bool match(std::vector<T, AllocMatch> const &v) const override#
-
class ErrnoGuard#
- #include <catch_errno_guard.hpp>
Simple RAII class that stores the value of
errnoat construction and restores it at destruction.Private Members
-
int m_oldErrno#
-
int m_oldErrno#
-
template<typename Duration>
struct Estimate# - #include <catch_estimate.hpp>
-
class EventListenerBase : public Catch::IEventListener#
- #include <catch_reporter_event_listener.hpp>
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.
Public Functions
-
virtual void assertionEnded(AssertionStats const &assertionStats) override#
Called after assertion was fully evaluated.
-
virtual void assertionStarting(AssertionInfo const &assertionInfo) override#
Called before assertion success/failure is evaluated.
-
virtual void benchmarkEnded(BenchmarkStats<> const &benchmarkStats) override#
Called with the benchmark results if benchmark successfully finishes.
-
virtual void benchmarkFailed(StringRef error) override#
Called if running the benchmarks fails for any reason.
-
virtual void benchmarkPreparing(StringRef name) override#
Called when user-code is being probed before the actual benchmark runs.
-
virtual void benchmarkStarting(BenchmarkInfo const &benchmarkInfo) override#
Called after probe but before the user-code is being benchmarked.
-
virtual void fatalErrorEncountered(StringRef error) override#
Called if a fatal error (signal/structured exception) occurred.
-
virtual void listListeners(std::vector<ListenerDescription> const &descriptions) override#
Writes out the provided listeners descriptions using reporter-specific format.
-
virtual void listReporters(std::vector<ReporterDescription> const &descriptions) override#
Writes out information about provided reporters using reporter-specific format.
-
virtual void listTags(std::vector<TagInfo> const &tagInfos) override#
Writes out information about the provided tags using reporter-specific format.
-
virtual void listTests(std::vector<TestCaseHandle> const &tests) override#
Writes out information about provided tests using reporter-specific format.
-
virtual void noMatchingTestCases(StringRef unmatchedSpec) override#
Called when no test cases match provided test spec.
-
virtual void reportInvalidTestSpec(StringRef unmatchedSpec) override#
Called for all invalid test specs from the cli.
-
virtual void sectionEnded(SectionStats const §ionStats) override#
Called after a
SECTIONhas finished running.
-
virtual void sectionStarting(SectionInfo const §ionInfo) override#
Called when a
SECTIONis being entered. Not called for skipped sections.
-
virtual void skipTest(TestCaseInfo const &testInfo) override#
Called with test cases that are skipped due to the test run aborting.
NOT called for test cases that are explicitly skipped using the
SKIPmacro.Deprecated - will be removed in the next major release.
-
virtual void testCaseEnded(TestCaseStats const &testCaseStats) override#
Called once for each TEST_CASE, no matter how many times it is entered.
-
virtual void testCasePartialEnded(TestCaseStats const &testCaseStats, uint64_t partNumber) override#
Called every time a TEST_CASE is entered, including repeats (due to sections)
-
virtual void testCasePartialStarting(TestCaseInfo const &testInfo, uint64_t partNumber) override#
Called every time a TEST_CASE is entered, including repeats (due to sections)
-
virtual void testCaseStarting(TestCaseInfo const &testInfo) override#
Called once for each TEST_CASE, no matter how many times it is entered.
-
virtual void testRunEnded(TestRunStats const &testRunStats) override#
Called once after all tests in a testing run are finished.
Not called if tests weren’t run (e.g. only listings happened)
-
virtual void testRunStarting(TestRunInfo const &testRunInfo) override#
Called once in a testing run before tests are started.
Not called if tests won’t be run (e.g. only listing will happen)
-
virtual void assertionEnded(AssertionStats const &assertionStats) override#
-
class EventListenerFactory#
- #include <catch_interfaces_reporter_factory.hpp>
Public Functions
-
virtual ~EventListenerFactory()#
-
virtual IEventListenerPtr create(IConfig const *config) const = 0#
-
virtual ~EventListenerFactory()#
-
class ExceptionMessageMatcher : public Catch::Matchers::MatcherBase<std::exception>#
- #include <catch_matchers_exception.hpp>
Public Functions
-
template<typename StringMatcherType>
class ExceptionMessageMatchesMatcher : public Catch::Matchers::MatcherBase<std::exception># - #include <catch_matchers_exception.hpp>
Public Functions
-
inline ExceptionMessageMatchesMatcher(StringMatcherType matcher)#
Private Members
-
StringMatcherType m_matcher#
-
inline ExceptionMessageMatchesMatcher(StringMatcherType matcher)#
-
template<typename T>
class ExceptionTranslator : public Catch::IExceptionTranslator# Public Functions
-
inline std::string translate(ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd) const override#
-
inline std::string translate(ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd) const override#
-
class ExceptionTranslatorRegistrar#
- #include <catch_translate_exception.hpp>
-
class ExceptionTranslatorRegistry : public Catch::IExceptionTranslatorRegistry#
- #include <catch_exception_translator_registry.hpp>
Public Functions
-
~ExceptionTranslatorRegistry() override#
-
void registerTranslator(Detail::unique_ptr<IExceptionTranslator> &&translator)#
Private Members
-
ExceptionTranslators m_translators#
-
~ExceptionTranslatorRegistry() override#
-
template<typename Duration>
struct ExecutionPlan# - #include <catch_execution_plan.hpp>
Public Functions
-
template<typename Duration2>
inline operator ExecutionPlan<Duration2>() const#
-
template<typename Clock>
inline std::vector<FloatDuration<Clock>> run(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const#
-
template<typename Duration2>
-
class ExeName : public Catch::Clara::Detail::ComposableParserImpl<ExeName>#
- #include <catch_clara.hpp>
Public Functions
-
ExeName()#
-
virtual Detail::InternalParseResult parse(std::string const&, Detail::TokenStream const &tokens) const override#
-
Detail::ParserResult set(std::string const &newName)#
-
ExeName()#
-
template<typename LhsT>
class ExprLhs# - #include <catch_decomposer.hpp>
Public Functions
-
struct fake_arg#
- #include <catch_clara.hpp>
-
class FatalConditionHandler#
- #include <catch_fatal_condition_handler.hpp>
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
Public Functions
-
FatalConditionHandler()#
-
~FatalConditionHandler()#
-
inline void disengage() noexcept#
-
inline void engage()#
Private Members
-
bool m_started = false#
-
FatalConditionHandler()#
-
class FatalConditionHandlerGuard#
- #include <catch_fatal_condition_handler.hpp>
Simple RAII guard for (dis)engaging the FatalConditionHandler.
Public Functions
-
inline FatalConditionHandlerGuard(FatalConditionHandler *handler)#
-
inline ~FatalConditionHandlerGuard()#
Private Members
-
FatalConditionHandler *m_handler#
-
inline FatalConditionHandlerGuard(FatalConditionHandler *handler)#
-
struct Filter#
Public Functions
-
bool matches(TestCaseInfo const &testCase) const#
Public Members
-
std::vector<Detail::unique_ptr<Pattern>> m_forbidden#
-
std::vector<Detail::unique_ptr<Pattern>> m_required#
-
bool matches(TestCaseInfo const &testCase) const#
-
template<typename T, typename Predicate>
class FilterGenerator : public Catch::Generators::IGenerator<T># - #include <catch_generators_adapters.hpp>
-
struct FilterMatch#
- #include <catch_test_spec.hpp>
-
template<typename T>
class FixedValuesGenerator : public Catch::Generators::IGenerator<T># - #include <catch_generators.hpp>
Public Functions
-
inline virtual bool next() override#
Attempts to move the generator to the next element.
Returns true iff the move succeeded (and a valid element can be retrieved).
-
inline virtual bool next() override#
-
class GeneratorException : public std::exception#
- #include <catch_generator_exception.hpp>
Public Functions
-
inline GeneratorException(const char *msg)#
-
const char *what() const noexcept final override#
Private Members
-
const char *const m_msg = ""#
-
inline GeneratorException(const char *msg)#
-
template<typename T>
class Generators : public Catch::Generators::IGenerator<T># - #include <catch_generators.hpp>
Public Functions
-
inline virtual bool next() override#
Attempts to move the generator to the next element.
Returns true iff the move succeeded (and a valid element can be retrieved).
-
inline virtual bool next() override#
-
class GeneratorUntypedBase#
- #include <catch_interfaces_generatortracker.hpp>
Subclassed by Catch::Generators::IGenerator< Float >, Catch::Generators::IGenerator< std::vector< T > >, Catch::Generators::IGenerator< Integer >, Catch::Generators::IGenerator< T >
Public Functions
-
GeneratorUntypedBase() = default#
-
GeneratorUntypedBase(GeneratorUntypedBase const&) = default#
-
virtual ~GeneratorUntypedBase()#
-
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.
-
StringRef currentElementAsString() const#
Returns generator’s current element as user-friendly string.
By default returns string equivalent to calling
Catch::Detail::stringifyon 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.
-
GeneratorUntypedBase &operator=(GeneratorUntypedBase const&) = default#
Private Functions
-
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).
-
GeneratorUntypedBase() = default#
-
template<typename T>
class GeneratorWrapper# - #include <catch_generators.hpp>
Public Functions
-
inline GeneratorWrapper(GeneratorPtr<T> generator)#
-
inline GeneratorWrapper(IGenerator<T> *generator)#
Takes ownership of the passed pointer.
-
inline bool next()#
Private Members
-
GeneratorPtr<T> m_generator#
-
inline GeneratorWrapper(GeneratorPtr<T> generator)#
-
template<typename T, typename = void>
struct has_description : public std::false_type# - #include <catch_reporter_registrars.hpp>
-
template<typename T>
struct has_description<T, void_t<decltype(T::getDescription())>> : public std::true_type# - #include <catch_reporter_registrars.hpp>
-
class HasSizeMatcher : public Catch::Matchers::MatcherGenericBase#
- #include <catch_matchers_container_properties.hpp>
Public Functions
-
struct Help : public Catch::Clara::Opt#
- #include <catch_clara.hpp>
Public Functions
-
Help(bool &showHelpFlag)#
-
Help(bool &showHelpFlag)#
-
struct HelpColumns#
- #include <catch_clara.hpp>
-
class IConfig : public Catch::Detail::NonCopyable#
- #include <catch_interfaces_config.hpp>
Subclassed by Catch::Config
Public Functions
-
virtual ~IConfig()#
-
virtual int abortAfter() const = 0#
-
virtual bool allowThrows() const = 0#
-
virtual double benchmarkConfidenceInterval() const = 0#
-
virtual bool benchmarkNoAnalysis() const = 0#
-
virtual unsigned int benchmarkResamples() const = 0#
-
virtual unsigned int benchmarkSamples() const = 0#
-
virtual ColourMode defaultColourMode() const = 0#
-
virtual bool hasTestFilters() const = 0#
-
virtual bool includeSuccessfulResults() const = 0#
-
virtual double minDuration() const = 0#
-
virtual uint32_t rngSeed() const = 0#
-
virtual TestRunOrder runOrder() const = 0#
-
virtual unsigned int shardCount() const = 0#
-
virtual unsigned int shardIndex() const = 0#
-
virtual bool shouldDebugBreak() const = 0#
-
virtual ShowDurations showDurations() const = 0#
-
virtual bool showInvisibles() const = 0#
-
virtual bool skipBenchmarks() const = 0#
-
virtual bool warnAboutMissingAssertions() const = 0#
-
virtual bool warnAboutUnmatchedTestSpecs() const = 0#
-
virtual bool zeroTestsCountAsSuccess() const = 0#
-
virtual ~IConfig()#
-
class IEventListener#
- #include <catch_interfaces_reporter.hpp>
The common base for all reporters and event listeners.
Implementing classes must also implement:
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.//! User-friendly description of the reporter/listener type static std::string getDescription()
Subclassed by Catch::EventListenerBase, Catch::MultiReporter, Catch::ReporterBase
Public Functions
-
virtual ~IEventListener()#
-
virtual void assertionEnded(AssertionStats const &assertionStats) = 0#
Called after assertion was fully evaluated.
-
virtual void assertionStarting(AssertionInfo const &assertionInfo) = 0#
Called before assertion success/failure is evaluated.
-
virtual void benchmarkEnded(BenchmarkStats<> const &benchmarkStats) = 0#
Called with the benchmark results if benchmark successfully finishes.
-
virtual void benchmarkFailed(StringRef benchmarkName) = 0#
Called if running the benchmarks fails for any reason.
-
virtual void benchmarkPreparing(StringRef benchmarkName) = 0#
Called when user-code is being probed before the actual benchmark runs.
-
virtual void benchmarkStarting(BenchmarkInfo const &benchmarkInfo) = 0#
Called after probe but before the user-code is being benchmarked.
-
virtual void fatalErrorEncountered(StringRef error) = 0#
Called if a fatal error (signal/structured exception) occurred.
-
inline ReporterPreferences const &getPreferences() const#
-
virtual void listListeners(std::vector<ListenerDescription> const &descriptions) = 0#
Writes out the provided listeners descriptions using reporter-specific format.
-
virtual void listReporters(std::vector<ReporterDescription> const &descriptions) = 0#
Writes out information about provided reporters using reporter-specific format.
-
virtual void listTags(std::vector<TagInfo> const &tags) = 0#
Writes out information about the provided tags using reporter-specific format.
-
virtual void listTests(std::vector<TestCaseHandle> const &tests) = 0#
Writes out information about provided tests using reporter-specific format.
-
virtual void noMatchingTestCases(StringRef unmatchedSpec) = 0#
Called when no test cases match provided test spec.
-
virtual void reportInvalidTestSpec(StringRef invalidArgument) = 0#
Called for all invalid test specs from the cli.
-
virtual void sectionEnded(SectionStats const §ionStats) = 0#
Called after a
SECTIONhas finished running.
-
virtual void sectionStarting(SectionInfo const §ionInfo) = 0#
Called when a
SECTIONis being entered. Not called for skipped sections.
-
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
SKIPmacro.Deprecated - will be removed in the next major release.
-
virtual void testCaseEnded(TestCaseStats const &testCaseStats) = 0#
Called once for each TEST_CASE, no matter how many times it is entered.
-
virtual void testCasePartialEnded(TestCaseStats const &testCaseStats, uint64_t partNumber) = 0#
Called every time a TEST_CASE is entered, including repeats (due to sections)
-
virtual void testCasePartialStarting(TestCaseInfo const &testInfo, uint64_t partNumber) = 0#
Called every time a TEST_CASE is entered, including repeats (due to sections)
-
virtual void testCaseStarting(TestCaseInfo const &testInfo) = 0#
Called once for each TEST_CASE, no matter how many times it is entered.
-
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)
-
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)
Protected Attributes
-
ReporterPreferences m_preferences#
Derived classes can set up their preferences here.
-
virtual ~IEventListener()#
-
class IExceptionTranslator#
- #include <catch_interfaces_exception.hpp>
Public Functions
-
virtual ~IExceptionTranslator()#
-
virtual std::string translate(ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd) const = 0#
-
virtual ~IExceptionTranslator()#
-
class IExceptionTranslatorRegistry#
- #include <catch_interfaces_exception.hpp>
Subclassed by Catch::ExceptionTranslatorRegistry
-
template<typename T>
class IGenerator : public Catch::Generators::GeneratorUntypedBase# - #include <catch_generators.hpp>
Subclassed by Catch::Generators::FilterGenerator< T, Predicate >, Catch::Generators::FixedValuesGenerator< T >, Catch::Generators::Generators< T >, Catch::Generators::IteratorGenerator< T >, Catch::Generators::MapGenerator< T, U, Func >, Catch::Generators::RangeGenerator< T >, Catch::Generators::RepeatGenerator< T >, Catch::Generators::SingleValueGenerator< T >, Catch::Generators::TakeGenerator< T >
Public Functions
-
IGenerator() = default#
-
IGenerator(IGenerator const&) = default#
-
~IGenerator() override = default#
-
IGenerator &operator=(IGenerator const&) = default#
-
IGenerator() = default#
-
class IGeneratorTracker#
- #include <catch_interfaces_generatortracker.hpp>
Public Functions
-
virtual ~IGeneratorTracker()#
-
virtual auto getGenerator() const -> Generators::GeneratorBasePtr const& = 0#
-
virtual auto hasGenerator() const -> bool = 0#
-
virtual void setGenerator(Generators::GeneratorBasePtr &&generator) = 0#
-
virtual ~IGeneratorTracker()#
-
class IMutableEnumValuesRegistry#
- #include <catch_interfaces_enum_values_registry.hpp>
Subclassed by Catch::Detail::EnumValuesRegistry
-
class IMutableRegistryHub#
- #include <catch_interfaces_registry_hub.hpp>
Public Functions
-
virtual ~IMutableRegistryHub()#
-
virtual IMutableEnumValuesRegistry &getMutableEnumValuesRegistry() = 0#
-
virtual void registerListener(Detail::unique_ptr<EventListenerFactory> factory) = 0#
-
virtual void registerReporter(std::string const &name, IReporterFactoryPtr factory) = 0#
-
virtual void registerStartupException() noexcept = 0#
-
virtual void registerTagAlias(std::string const &alias, std::string const &tag, SourceLineInfo const &lineInfo) = 0#
-
virtual void registerTest(Detail::unique_ptr<TestCaseInfo> &&testInfo, Detail::unique_ptr<ITestInvoker> &&invoker) = 0#
-
virtual void registerTranslator(Detail::unique_ptr<IExceptionTranslator> &&translator) = 0#
-
virtual ~IMutableRegistryHub()#
-
class IRegistryHub#
- #include <catch_interfaces_registry_hub.hpp>
Public Functions
-
virtual ~IRegistryHub()#
-
virtual IExceptionTranslatorRegistry const &getExceptionTranslatorRegistry() const = 0#
-
virtual ReporterRegistry const &getReporterRegistry() const = 0#
-
virtual StartupExceptionRegistry const &getStartupExceptionRegistry() const = 0#
-
virtual ITagAliasRegistry const &getTagAliasRegistry() const = 0#
-
virtual ITestCaseRegistry const &getTestCaseRegistry() const = 0#
-
virtual ~IRegistryHub()#
-
class IReporterFactory#
- #include <catch_interfaces_reporter_factory.hpp>
Subclassed by Catch::ReporterFactory< T >
Public Functions
-
virtual ~IReporterFactory()#
-
virtual IEventListenerPtr create(ReporterConfig &&config) const = 0#
-
virtual ~IReporterFactory()#
-
class IResultCapture#
- #include <catch_interfaces_capture.hpp>
Subclassed by Catch::RunContext
Public Functions
-
virtual ~IResultCapture()#
-
virtual IGeneratorTracker *acquireGeneratorTracker(StringRef generatorName, SourceLineInfo const &lineInfo) = 0#
-
virtual void assertionPassed() = 0#
-
virtual void benchmarkEnded(BenchmarkStats<> const &stats) = 0#
-
virtual void benchmarkStarting(BenchmarkInfo const &info) = 0#
-
virtual IGeneratorTracker *createGeneratorTracker(StringRef generatorName, SourceLineInfo lineInfo, Generators::GeneratorBasePtr &&generator) = 0#
-
virtual void emplaceUnscopedMessage(MessageBuilder &&builder) = 0#
-
virtual void exceptionEarlyReported() = 0#
-
virtual const AssertionResult *getLastResult() const = 0#
-
virtual void handleExpr(AssertionInfo const &info, ITransientExpression const &expr, AssertionReaction &reaction) = 0#
-
virtual void handleIncomplete(AssertionInfo const &info) = 0#
-
virtual void handleMessage(AssertionInfo const &info, ResultWas::OfType resultType, StringRef message, AssertionReaction &reaction) = 0#
-
virtual void handleNonExpr(AssertionInfo const &info, ResultWas::OfType resultType, AssertionReaction &reaction) = 0#
-
virtual void handleUnexpectedExceptionNotThrown(AssertionInfo const &info, AssertionReaction &reaction) = 0#
-
virtual void handleUnexpectedInflightException(AssertionInfo const &info, std::string &&message, AssertionReaction &reaction) = 0#
-
virtual bool lastAssertionPassed() = 0#
-
virtual void notifyAssertionStarted(AssertionInfo const &info) = 0#
-
virtual void popScopedMessage(MessageInfo const &message) = 0#
-
virtual void pushScopedMessage(MessageInfo const &message) = 0#
-
virtual void sectionEnded(SectionEndInfo &&endInfo) = 0#
-
virtual void sectionEndedEarly(SectionEndInfo &&endInfo) = 0#
-
virtual bool sectionStarted(StringRef sectionName, SourceLineInfo const §ionLineInfo, Counts &assertions) = 0#
-
virtual ~IResultCapture()#
-
template<typename T>
struct is_callable#
-
template<typename Fun, typename ...Args>
struct is_callable<Fun(Args...)> : public decltypeis_callable_tester::test<Fun, Args...># - #include <catch_meta.hpp>
-
struct is_callable_tester#
- #include <catch_meta.hpp>
-
template<typename T>
struct is_range : public Catch::Detail::is_range_impl<T># - #include <catch_tostring.hpp>
-
template<typename T, typename = void>
struct is_range_impl : public std::false_type# - #include <catch_tostring.hpp>
Subclassed by Catch::is_range< T >
-
template<typename T>
struct is_range_impl<T, void_t<decltype(begin(std::declval<T>()))>> : public std::true_type# - #include <catch_tostring.hpp>
- #include <catch_benchmark_function.hpp>
-
template<typename F, typename = void>
struct is_unary_function : public std::false_type# - #include <catch_clara.hpp>
-
template<typename F>
struct is_unary_function<F, Catch::Detail::void_t<decltype(std::declval<F>()(fake_arg()))>> : public std::true_type# - #include <catch_clara.hpp>
-
class IsEmptyMatcher : public Catch::Matchers::MatcherGenericBase#
- #include <catch_matchers_container_properties.hpp>
-
struct ISingleton#
- #include <catch_singletons.hpp>
Subclassed by Catch::Singleton< SingletonImplT, InterfaceT, MutableInterfaceT >
Public Functions
-
virtual ~ISingleton()#
-
virtual ~ISingleton()#
-
class IsNaNMatcher : public Catch::Matchers::MatcherBase<double>#
- #include <catch_matchers_floating_point.hpp>
-
template<typename T>
class IsStreamInsertable# - #include <catch_tostring.hpp>
Public Static Attributes
-
static const bool value =
decltype(test<std::ostream, const T&>(0))::value#
-
static const bool value =
-
class IStream#
- #include <catch_istream.hpp>
Public Functions
-
virtual ~IStream()#
-
inline 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.
-
virtual ~IStream()#
-
class ITagAliasRegistry#
- #include <catch_interfaces_tag_alias_registry.hpp>
Subclassed by Catch::TagAliasRegistry
Public Functions
-
virtual ~ITagAliasRegistry()#
Public Static Functions
-
static ITagAliasRegistry const &get()#
-
virtual ~ITagAliasRegistry()#
-
class iterator#
- #include <catch_textflow.hpp>
Public Functions
-
template<typename T>
class IteratorGenerator : public Catch::Generators::IGenerator<T># - #include <catch_generators_range.hpp>
Public Functions
-
template<typename InputIterator, typename InputSentinel>
inline IteratorGenerator(InputIterator first, InputSentinel last)#
-
inline virtual bool next() override#
Attempts to move the generator to the next element.
Returns true iff the move succeeded (and a valid element can be retrieved).
-
template<typename InputIterator, typename InputSentinel>
-
class ITestCaseRegistry#
- #include <catch_interfaces_testcase.hpp>
Subclassed by Catch::TestRegistry
Public Functions
-
virtual ~ITestCaseRegistry()#
-
virtual std::vector<TestCaseInfo*> const &getAllInfos() const = 0#
-
virtual std::vector<TestCaseHandle> const &getAllTests() const = 0#
-
virtual std::vector<TestCaseHandle> const &getAllTestsSorted(IConfig const &config) const = 0#
-
virtual ~ITestCaseRegistry()#
-
class ITestInvoker#
- #include <catch_interfaces_test_invoker.hpp>
Subclassed by Catch::TestInvokerAsMethod< C >
-
class ITracker#
- #include <catch_test_case_tracker.hpp>
Subclassed by Catch::TestCaseTracking::TrackerBase
Public Functions
-
inline ITracker(NameAndLocation &&nameAndLoc, ITracker *parent)#
-
virtual ~ITracker()#
-
void addChild(ITrackerPtr &&child)#
Register a nested ITracker.
-
virtual void close() = 0#
-
virtual void fail() = 0#
-
ITracker *findChild(NameAndLocationRef const &nameAndLocation)#
Returns ptr to specific child if register with this tracker.
Returns nullptr if not found.
-
inline bool hasChildren() const#
Have any children been added?
-
bool hasStarted() const#
Returns true iff tracker has started.
-
virtual bool isComplete() const = 0#
Returns true if tracker run to completion (successfully or not)
-
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.
-
bool isOpen() const#
Returns true if tracker has started but hasn’t been completed.
-
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.
-
inline bool isSuccessfullyCompleted() const#
Returns true if tracker run to completion successfully.
-
void markAsNeedingAnotherRun()#
-
inline NameAndLocation const &nameAndLocation() const#
-
void openChild()#
Marks tracker as executing a child, doing se recursively up the tree.
Protected Types
Protected Attributes
-
CycleState m_runState = NotStarted#
Private Types
-
using Children = std::vector<ITrackerPtr>#
Private Members
-
NameAndLocation m_nameAndLocation#
-
inline ITracker(NameAndLocation &&nameAndLoc, ITracker *parent)#
-
class ITransientExpression#
- #include <catch_decomposer.hpp>
Subclassed by Catch::BinaryExpr< LhsT, RhsT >, Catch::MatchExpr< ArgT, MatcherT >, Catch::UnaryExpr< LhsT >
Public Functions
-
ITransientExpression() = default#
-
inline ITransientExpression(bool isBinaryExpression, bool result)#
-
ITransientExpression(ITransientExpression const&) = default#
-
virtual ~ITransientExpression()#
-
inline auto getResult() const -> bool#
-
inline auto isBinaryExpression() const -> bool#
-
ITransientExpression &operator=(ITransientExpression const&) = default#
Friends
-
inline friend std::ostream &operator<<(std::ostream &out, ITransientExpression const &expr)#
-
ITransientExpression() = default#
-
class JunitReporter : public Catch::CumulativeReporterBase#
- #include <catch_reporter_junit.hpp>
Public Functions
-
JunitReporter(ReporterConfig &&_config)#
-
~JunitReporter() override = default#
-
virtual void assertionEnded(AssertionStats const &assertionStats) override#
Called after assertion was fully evaluated.
-
virtual void testCaseEnded(TestCaseStats const &testCaseStats) override#
Called once for each TEST_CASE, no matter how many times it is entered.
-
virtual void testCaseStarting(TestCaseInfo const &testCaseInfo) override#
Called once for each TEST_CASE, no matter how many times it is entered.
-
virtual void testRunEndedCumulative() override#
Customization point: called after last test finishes (testRunEnded has been handled)
-
virtual void testRunStarting(TestRunInfo const &runInfo) override#
Called once in a testing run before tests are started.
Not called if tests won’t be run (e.g. only listing will happen)
Private Functions
-
void writeAssertion(AssertionStats const &stats)#
-
void writeAssertions(SectionNode const §ionNode)#
-
void writeRun(TestRunNode const &testRunNode, double suiteTime)#
-
void writeSection(std::string const &className, std::string const &rootName, SectionNode const §ionNode, bool testOkToFail)#
-
void writeTestCase(TestCaseNode const &testCaseNode)#
-
JunitReporter(ReporterConfig &&_config)#
-
template<typename ReturnType>
struct LambdaInvoker# - #include <catch_clara.hpp>
Public Static Functions
-
template<typename L, typename ArgType>
static inline auto invoke(L const &lambda, ArgType const &arg) -> ParserResult#
-
template<typename L, typename ArgType>
-
template<>
struct LambdaInvoker<void># - #include <catch_clara.hpp>
Public Static Functions
-
template<typename L, typename ArgType>
static inline auto invoke(L const &lambda, ArgType const &arg) -> ParserResult#
-
template<typename L, typename ArgType>
-
class LazyExpression#
- #include <catch_lazy_expr.hpp>
Public Functions
-
inline LazyExpression(bool isNegated)#
-
LazyExpression(LazyExpression const &other) = default#
-
inline explicit operator bool() const#
-
LazyExpression &operator=(LazyExpression const&) = delete#
Friends
- friend class AssertionHandler
- friend struct AssertionStats
-
friend auto operator<<(std::ostream &os, LazyExpression const &lazyExpr) -> std::ostream&#
- friend class RunContext
-
inline LazyExpression(bool isNegated)#
-
struct LeakDetector#
- #include <catch_leak_detector.hpp>
-
struct lineOfChars#
- #include <catch_reporter_helpers.hpp>
Public Functions
-
inline constexpr lineOfChars(char c_)#
Public Members
-
char c#
Friends
-
friend std::ostream &operator<<(std::ostream &out, lineOfChars value)#
-
inline constexpr lineOfChars(char c_)#
-
struct ListenerDescription#
- #include <catch_list.hpp>
-
template<typename T>
class ListenerRegistrar# - #include <catch_reporter_registrars.hpp>
-
template<typename...>
struct make_void# - #include <catch_void_type.hpp>
Public Types
-
using type = void#
-
using type = void#
-
template<typename T, typename U, typename Func>
class MapGenerator : public Catch::Generators::IGenerator<T># - #include <catch_generators_adapters.hpp>
-
template<typename ArgT>
class MatchAllOf : public Catch::Matchers::MatcherBase<ArgT># - #include <catch_matchers.hpp>
Public Functions
-
MatchAllOf() = default#
-
MatchAllOf(MatchAllOf&&) = default#
-
MatchAllOf(MatchAllOf const&) = delete#
-
MatchAllOf &operator=(MatchAllOf&&) = default#
-
MatchAllOf &operator=(MatchAllOf const&) = delete#
Private Members
-
std::vector<MatcherBase<ArgT> const*> m_matchers#
Friends
-
inline friend MatchAllOf operator&&(MatchAllOf &&lhs, MatcherBase<ArgT> const &rhs)#
-
inline friend MatchAllOf operator&&(MatcherBase<ArgT> const &lhs, MatchAllOf &&rhs)#
-
MatchAllOf() = default#
-
template<typename ...MatcherTs>
class MatchAllOfGeneric : public Catch::Matchers::MatcherGenericBase# - #include <catch_matchers_templated.hpp>
Public Functions
-
MatchAllOfGeneric(MatchAllOfGeneric&&) = default#
-
MatchAllOfGeneric(MatchAllOfGeneric const&) = delete#
-
MatchAllOfGeneric &operator=(MatchAllOfGeneric&&) = default#
-
MatchAllOfGeneric &operator=(MatchAllOfGeneric const&) = delete#
Friends
-
template<typename ...MatchersRHS>
inline friend MatchAllOfGeneric<MatcherTs..., MatchersRHS...> operator&&(MatchAllOfGeneric<MatcherTs...> &&lhs, MatchAllOfGeneric<MatchersRHS...> &&rhs)# Avoids type nesting for
GenericAllOf && GenericAllOfcase.
-
template<typename MatcherRHS>
inline friend std::enable_if_t<is_matcher<MatcherRHS>::value, MatchAllOfGeneric<MatcherTs..., MatcherRHS>> operator&&(MatchAllOfGeneric<MatcherTs...> &&lhs, MatcherRHS const &rhs)# Avoids type nesting for
GenericAllOf && some matchercase.
-
template<typename MatcherLHS>
inline friend std::enable_if_t<is_matcher<MatcherLHS>::value, MatchAllOfGeneric<MatcherLHS, MatcherTs...>> operator&&(MatcherLHS const &lhs, MatchAllOfGeneric<MatcherTs...> &&rhs)# Avoids type nesting for
some matcher && GenericAllOfcase.
-
MatchAllOfGeneric(MatchAllOfGeneric&&) = default#
-
template<typename ArgT>
class MatchAnyOf : public Catch::Matchers::MatcherBase<ArgT># - #include <catch_matchers.hpp>
Public Functions
-
MatchAnyOf() = default#
-
MatchAnyOf(MatchAnyOf&&) = default#
-
MatchAnyOf(MatchAnyOf const&) = delete#
-
MatchAnyOf &operator=(MatchAnyOf&&) = default#
-
MatchAnyOf &operator=(MatchAnyOf const&) = delete#
Private Members
-
std::vector<MatcherBase<ArgT> const*> m_matchers#
Friends
-
inline friend MatchAnyOf operator||(MatchAnyOf &&lhs, MatcherBase<ArgT> const &rhs)#
-
inline friend MatchAnyOf operator||(MatcherBase<ArgT> const &lhs, MatchAnyOf &&rhs)#
-
MatchAnyOf() = default#
-
template<typename ...MatcherTs>
class MatchAnyOfGeneric : public Catch::Matchers::MatcherGenericBase# - #include <catch_matchers_templated.hpp>
Public Functions
-
MatchAnyOfGeneric(MatchAnyOfGeneric&&) = default#
-
MatchAnyOfGeneric(MatchAnyOfGeneric const&) = delete#
-
MatchAnyOfGeneric &operator=(MatchAnyOfGeneric&&) = default#
-
MatchAnyOfGeneric &operator=(MatchAnyOfGeneric const&) = delete#
Friends
-
template<typename ...MatchersRHS>
inline friend MatchAnyOfGeneric<MatcherTs..., MatchersRHS...> operator||(MatchAnyOfGeneric<MatcherTs...> &&lhs, MatchAnyOfGeneric<MatchersRHS...> &&rhs)# Avoids type nesting for
GenericAnyOf || GenericAnyOfcase.
-
template<typename MatcherRHS>
inline friend std::enable_if_t<is_matcher<MatcherRHS>::value, MatchAnyOfGeneric<MatcherTs..., MatcherRHS>> operator||(MatchAnyOfGeneric<MatcherTs...> &&lhs, MatcherRHS const &rhs)# Avoids type nesting for
GenericAnyOf || some matchercase.
-
template<typename MatcherLHS>
inline friend std::enable_if_t<is_matcher<MatcherLHS>::value, MatchAnyOfGeneric<MatcherLHS, MatcherTs...>> operator||(MatcherLHS const &lhs, MatchAnyOfGeneric<MatcherTs...> &&rhs)# Avoids type nesting for
some matcher || GenericAnyOfcase.
-
MatchAnyOfGeneric(MatchAnyOfGeneric&&) = default#
-
template<typename T>
class MatcherBase : public Catch::Matchers::MatcherUntypedBase# - #include <catch_matchers.hpp>
Subclassed by Catch::Matchers::PredicateMatcher< T, Predicate >
-
class MatcherGenericBase : public Catch::Matchers::MatcherUntypedBase#
- #include <catch_matchers_templated.hpp>
Subclassed by Catch::Matchers::AllMatchMatcher< Matcher >, Catch::Matchers::AllTrueMatcher, Catch::Matchers::AnyMatchMatcher< Matcher >, Catch::Matchers::AnyTrueMatcher, Catch::Matchers::ContainsElementMatcher< T, Equality >, Catch::Matchers::ContainsMatcherMatcher< Matcher >, Catch::Matchers::Detail::MatchAllOfGeneric< MatcherTs >, Catch::Matchers::Detail::MatchAnyOfGeneric< MatcherTs >, Catch::Matchers::Detail::MatchNotOfGeneric< MatcherT >, Catch::Matchers::HasSizeMatcher, Catch::Matchers::IsEmptyMatcher, Catch::Matchers::NoneMatchMatcher< Matcher >, Catch::Matchers::NoneTrueMatcher, Catch::Matchers::RangeEqualsMatcher< TargetRangeLike, Equality >, Catch::Matchers::SizeMatchesMatcher< Matcher >, Catch::Matchers::UnorderedRangeEqualsMatcher< TargetRangeLike, Equality >
Public Functions
-
MatcherGenericBase() = default#
-
MatcherGenericBase(MatcherGenericBase&&) = default#
-
MatcherGenericBase(MatcherGenericBase const&) = default#
-
~MatcherGenericBase() override#
-
MatcherGenericBase &operator=(MatcherGenericBase&&) = delete#
-
MatcherGenericBase &operator=(MatcherGenericBase const&) = delete#
-
MatcherGenericBase() = default#
-
class MatcherUntypedBase#
- #include <catch_matchers.hpp>
Subclassed by Catch::Matchers::MatcherBase< double >, Catch::Matchers::MatcherBase< std::string >, Catch::Matchers::MatcherBase< std::vector< T, AllocMatch > >, Catch::Matchers::MatcherBase< std::vector< T, Alloc > >, Catch::Matchers::MatcherBase< ArgT >, Catch::Matchers::MatcherBase< std::exception >, Catch::Matchers::MatcherBase< T >, Catch::Matchers::MatcherGenericBase
Public Functions
-
MatcherUntypedBase() = default#
-
MatcherUntypedBase(MatcherUntypedBase&&) = default#
-
MatcherUntypedBase(MatcherUntypedBase const&) = default#
-
MatcherUntypedBase &operator=(MatcherUntypedBase&&) = delete#
-
MatcherUntypedBase &operator=(MatcherUntypedBase const&) = delete#
-
MatcherUntypedBase() = default#
-
template<typename ArgT, typename MatcherT>
class MatchExpr : public Catch::ITransientExpression# - #include <catch_matchers_impl.hpp>
Public Functions
-
template<typename ArgT>
class MatchNotOf : public Catch::Matchers::MatcherBase<ArgT># - #include <catch_matchers.hpp>
Public Functions
-
inline explicit MatchNotOf(MatcherBase<ArgT> const &underlyingMatcher)#
Private Members
-
MatcherBase<ArgT> const &m_underlyingMatcher#
-
inline explicit MatchNotOf(MatcherBase<ArgT> const &underlyingMatcher)#
-
template<typename MatcherT>
class MatchNotOfGeneric : public Catch::Matchers::MatcherGenericBase# - #include <catch_matchers_templated.hpp>
Public Functions
-
MatchNotOfGeneric(MatchNotOfGeneric&&) = default#
-
MatchNotOfGeneric(MatchNotOfGeneric const&) = delete#
-
MatchNotOfGeneric &operator=(MatchNotOfGeneric&&) = default#
-
MatchNotOfGeneric &operator=(MatchNotOfGeneric const&) = delete#
Friends
-
inline friend MatcherT const &operator!(MatchNotOfGeneric<MatcherT> const &matcher)#
Negating negation can just unwrap and return underlying matcher.
-
MatchNotOfGeneric(MatchNotOfGeneric&&) = default#
-
struct MessageBuilder : public Catch::MessageStream#
- #include <catch_message.hpp>
Public Functions
-
inline MessageBuilder(StringRef macroName, SourceLineInfo const &lineInfo, ResultWas::OfType type)#
-
template<typename T>
inline MessageBuilder &&operator<<(T const &value) &&#
Public Members
-
MessageInfo m_info#
-
inline MessageBuilder(StringRef macroName, SourceLineInfo const &lineInfo, ResultWas::OfType type)#
-
struct MessageInfo#
- #include <catch_message_info.hpp>
Public Functions
-
MessageInfo(StringRef _macroName, SourceLineInfo const &_lineInfo, ResultWas::OfType _type)#
-
inline bool operator<(MessageInfo const &other) const#
-
inline bool operator==(MessageInfo const &other) const#
Private Static Attributes
-
static unsigned int globalCount = 0#
-
MessageInfo(StringRef _macroName, SourceLineInfo const &_lineInfo, ResultWas::OfType _type)#
-
struct MessageStream#
- #include <catch_message.hpp>
Subclassed by Catch::MessageBuilder
Public Functions
-
template<typename T>
inline MessageStream &operator<<(T const &value)#
Public Members
-
ReusableStringStream m_stream#
-
template<typename T>
-
template<typename Fun>
struct model : public Catch::Benchmark::Detail::BenchmarkFunction::callable# Public Functions
-
inline void call(Chronometer meter) const override#
-
inline void call(Chronometer meter, std::false_type) const#
-
inline void call(Chronometer meter, std::true_type) const#
-
inline Catch::Detail::unique_ptr<callable> clone() const override#
-
inline void call(Chronometer meter) const override#
-
class MultiReporter : public Catch::IEventListener#
- #include <catch_reporter_multi.hpp>
Public Functions
-
void addListener(IEventListenerPtr &&listener)#
-
void addReporter(IEventListenerPtr &&reporter)#
-
virtual void assertionEnded(AssertionStats const &assertionStats) override#
Called after assertion was fully evaluated.
-
virtual void assertionStarting(AssertionInfo const &assertionInfo) override#
Called before assertion success/failure is evaluated.
-
virtual void benchmarkEnded(BenchmarkStats<> const &benchmarkStats) override#
Called with the benchmark results if benchmark successfully finishes.
-
virtual void benchmarkFailed(StringRef error) override#
Called if running the benchmarks fails for any reason.
-
virtual void benchmarkPreparing(StringRef name) override#
Called when user-code is being probed before the actual benchmark runs.
-
virtual void benchmarkStarting(BenchmarkInfo const &benchmarkInfo) override#
Called after probe but before the user-code is being benchmarked.
-
virtual void fatalErrorEncountered(StringRef error) override#
Called if a fatal error (signal/structured exception) occurred.
-
virtual void listListeners(std::vector<ListenerDescription> const &descriptions) override#
Writes out the provided listeners descriptions using reporter-specific format.
-
virtual void listReporters(std::vector<ReporterDescription> const &descriptions) override#
Writes out information about provided reporters using reporter-specific format.
-
virtual void listTags(std::vector<TagInfo> const &tags) override#
Writes out information about the provided tags using reporter-specific format.
-
virtual void listTests(std::vector<TestCaseHandle> const &tests) override#
Writes out information about provided tests using reporter-specific format.
-
virtual void noMatchingTestCases(StringRef unmatchedSpec) override#
Called when no test cases match provided test spec.
-
virtual void reportInvalidTestSpec(StringRef arg) override#
Called for all invalid test specs from the cli.
-
virtual void sectionEnded(SectionStats const §ionStats) override#
Called after a
SECTIONhas finished running.
-
virtual void sectionStarting(SectionInfo const §ionInfo) override#
Called when a
SECTIONis being entered. Not called for skipped sections.
-
virtual void skipTest(TestCaseInfo const &testInfo) override#
Called with test cases that are skipped due to the test run aborting.
NOT called for test cases that are explicitly skipped using the
SKIPmacro.Deprecated - will be removed in the next major release.
-
virtual void testCaseEnded(TestCaseStats const &testCaseStats) override#
Called once for each TEST_CASE, no matter how many times it is entered.
-
virtual void testCasePartialEnded(TestCaseStats const &testInfo, uint64_t partNumber) override#
Called every time a TEST_CASE is entered, including repeats (due to sections)
-
virtual void testCasePartialStarting(TestCaseInfo const &testInfo, uint64_t partNumber) override#
Called every time a TEST_CASE is entered, including repeats (due to sections)
-
virtual void testCaseStarting(TestCaseInfo const &testInfo) override#
Called once for each TEST_CASE, no matter how many times it is entered.
-
virtual void testRunEnded(TestRunStats const &testRunStats) override#
Called once after all tests in a testing run are finished.
Not called if tests weren’t run (e.g. only listings happened)
-
virtual void testRunStarting(TestRunInfo const &testRunInfo) override#
Called once in a testing run before tests are started.
Not called if tests won’t be run (e.g. only listing will happen)
Private Functions
-
void updatePreferences(IEventListener const &reporterish)#
Private Members
-
bool m_haveNoncapturingReporters = false#
-
size_t m_insertedListeners = 0#
-
std::vector<IEventListenerPtr> m_reporterLikes#
-
void addListener(IEventListenerPtr &&listener)#
-
struct NameAndLocation#
- #include <catch_test_case_tracker.hpp>
Public Functions
-
NameAndLocation(std::string &&_name, SourceLineInfo const &_location)#
Friends
-
inline friend bool operator!=(NameAndLocation const &lhs, NameAndLocation const &rhs)#
-
inline friend bool operator==(NameAndLocation const &lhs, NameAndLocation const &rhs)#
-
NameAndLocation(std::string &&_name, SourceLineInfo const &_location)#
-
struct NameAndLocationRef#
- #include <catch_test_case_tracker.hpp>
This is a variant of
NameAndLocationthat 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.
Public Functions
-
inline constexpr NameAndLocationRef(StringRef name_, SourceLineInfo location_)#
Friends
-
inline friend bool operator==(NameAndLocation const &lhs, NameAndLocationRef const &rhs)#
-
inline friend bool operator==(NameAndLocationRef const &lhs, NameAndLocation const &rhs)#
-
inline constexpr NameAndLocationRef(StringRef name_, SourceLineInfo location_)#
-
struct NameAndTags#
- #include <catch_test_registry.hpp>
Public Functions
-
class NamePattern : public Catch::TestSpec::Pattern#
Public Functions
-
bool matches(TestCaseInfo const &testCase) const override#
Private Members
-
WildcardPattern m_wildcardPattern#
-
bool matches(TestCaseInfo const &testCase) const override#
-
template<class B>
struct negation : public std::integral_constant<bool, !bool(B::value)># - #include <catch_logical_traits.hpp>
-
template<typename T, typename ChildNodeT>
struct Node# - #include <catch_reporter_cumulative_base.hpp>
Public Types
-
using ChildNodes = std::vector<Detail::unique_ptr<ChildNodeT>>#
-
using ChildNodes = std::vector<Detail::unique_ptr<ChildNodeT>>#
-
class NonCopyable#
- #include <catch_noncopyable.hpp>
Deriving classes become noncopyable and nonmovable.
Subclassed by Catch::AutoReg, Catch::Clara::Detail::BoundRef, Catch::IConfig, Catch::ReusableStringStream, Catch::Section, Catch::Session, Catch::TestCaseInfo
Protected Functions
-
NonCopyable() noexcept = default#
Private Functions
-
NonCopyable(NonCopyable&&) = delete#
-
NonCopyable(NonCopyable const&) = delete#
-
NonCopyable &operator=(NonCopyable&&) = delete#
-
NonCopyable &operator=(NonCopyable const&) = delete#
-
NonCopyable() noexcept = default#
-
template<typename Matcher>
class NoneMatchMatcher : public Catch::Matchers::MatcherGenericBase# - #include <catch_matchers_quantifiers.hpp>
Public Functions
-
class NoneTrueMatcher : public Catch::Matchers::MatcherGenericBase#
- #include <catch_matchers_quantifiers.hpp>
-
template<typename Clock>
struct now# - #include <catch_clock.hpp>
-
template<typename T, bool Destruct>
struct ObjectStorage# - #include <catch_constructor.hpp>
Public Functions
-
ObjectStorage() = default#
-
inline ObjectStorage(const ObjectStorage &other)#
-
inline ObjectStorage(ObjectStorage &&other)#
-
inline ~ObjectStorage()#
-
template<bool AllowManualDestruction = !Destruct>
inline std::enable_if_t<AllowManualDestruction> destruct()#
Private Functions
-
ObjectStorage() = default#
-
class Opt : public Catch::Clara::Detail::ParserRefImpl<Opt>#
- #include <catch_clara.hpp>
Subclassed by Catch::Clara::Help
Public Functions
-
template<typename LambdaT>
inline Opt(accept_many_t, LambdaT const &ref, std::string const &hint)#
-
explicit Opt(bool &ref)#
-
template<typename LambdaT, typename = typename std::enable_if_t<Detail::is_unary_function<LambdaT>::value>>
inline Opt(LambdaT const &ref, std::string const &hint)#
-
template<typename T, typename = typename std::enable_if_t<!Detail::is_unary_function<T>::value>>
inline Opt(T &ref, std::string const &hint)#
-
std::vector<Detail::HelpColumns> getHelpColumns() const#
-
virtual Detail::InternalParseResult parse(std::string const&, Detail::TokenStream const &tokens) const override#
-
template<typename LambdaT>
-
struct optimized_away_error : public std::exception#
Public Functions
-
const char *what() const noexcept override#
-
const char *what() const noexcept override#
-
template<typename T>
class Optional# - #include <catch_optional.hpp>
-
struct OutlierClassification#
- #include <catch_outlier_classification.hpp>
Public Functions
-
inline int total() const#
-
inline int total() const#
-
class Parser : private Catch::Clara::Detail::ParserBase#
- #include <catch_clara.hpp>
Public Functions
-
std::vector<Detail::HelpColumns> getHelpColumns() const#
-
virtual Detail::InternalParseResult parse(std::string const &exeName, Detail::TokenStream const &tokens) const override#
-
std::vector<Detail::HelpColumns> getHelpColumns() const#
-
class ParserBase#
- #include <catch_clara.hpp>
Subclassed by Catch::Clara::Detail::ComposableParserImpl< ExeName >, Catch::Clara::Detail::ComposableParserImpl< DerivedT >, Catch::Clara::Parser
Public Functions
-
virtual ~ParserBase() = default#
-
virtual size_t cardinality() const#
-
InternalParseResult parse(Args const &args) const#
-
virtual auto parse(std::string const &exeName, TokenStream const &tokens) const -> InternalParseResult = 0#
-
virtual ~ParserBase() = default#
-
template<typename DerivedT>
class ParserRefImpl : public Catch::Clara::Detail::ComposableParserImpl<DerivedT># - #include <catch_clara.hpp>
Public Functions
-
template<typename LambdaT>
inline ParserRefImpl(accept_many_t, LambdaT const &ref, std::string const &hint)#
-
template<typename LambdaT, typename = typename std::enable_if_t<Detail::is_unary_function<LambdaT>::value>>
inline ParserRefImpl(LambdaT const &ref, std::string const &hint)#
-
template<typename T, typename = typename std::enable_if_t<!Detail::is_unary_function<T>::value>>
inline ParserRefImpl(T &ref, std::string const &hint)#
-
inline virtual auto cardinality() const -> size_t override#
-
inline auto isOptional() const -> bool#
Protected Functions
-
template<typename LambdaT>
-
class ParseState#
- #include <catch_clara.hpp>
Public Functions
-
ParseState(ParseResultType type, TokenStream const &remainingTokens)#
-
inline TokenStream const &remainingTokens() const#
-
inline ParseResultType type() const#
-
ParseState(ParseResultType type, TokenStream const &remainingTokens)#
-
class Pattern#
-
class pluralise#
- #include <catch_string_manip.hpp>
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
-
template<typename T, typename Predicate>
class PredicateMatcher : public Catch::Matchers::MatcherBase<T># - #include <catch_matchers_predicate.hpp>
Public Functions
-
struct ProcessedReporterSpec#
- #include <catch_config.hpp>
ReporterSpecbut with the defaults filled in.Like
ReporterSpec, the semantics are unchecked.Public Members
-
ColourMode colourMode#
Friends
-
inline friend bool operator!=(ProcessedReporterSpec const &lhs, ProcessedReporterSpec const &rhs)#
-
friend bool operator==(ProcessedReporterSpec const &lhs, ProcessedReporterSpec const &rhs)#
-
ColourMode colourMode#
-
template<typename Float>
class RandomFloatingGenerator : public Catch::Generators::IGenerator<Float># - #include <catch_generators_random.hpp>
Public Functions
-
inline virtual bool next() override#
Attempts to move the generator to the next element.
Returns true iff the move succeeded (and a valid element can be retrieved).
-
inline virtual bool next() override#
-
template<typename Integer>
class RandomIntegerGenerator : public Catch::Generators::IGenerator<Integer># - #include <catch_generators_random.hpp>
Public Functions
-
inline virtual bool next() override#
Attempts to move the generator to the next element.
Returns true iff the move succeeded (and a valid element can be retrieved).
-
inline virtual bool next() override#
-
template<typename TargetRangeLike, typename Equality>
class RangeEqualsMatcher : public Catch::Matchers::MatcherGenericBase# - #include <catch_matchers_range_equals.hpp>
Matcher for checking that an element contains the same elements in the same order.
Public Functions
-
template<typename TargetRangeLike2, typename Equality2>
inline RangeEqualsMatcher(TargetRangeLike2 &&range, Equality2 &&predicate)#
-
template<typename TargetRangeLike2, typename Equality2>
-
template<typename T>
class RangeGenerator : public Catch::Generators::IGenerator<T># - #include <catch_generators_range.hpp>
Public Functions
-
inline virtual bool next() override#
Attempts to move the generator to the next element.
Returns true iff the move succeeded (and a valid element can be retrieved).
-
inline virtual bool next() override#
-
template<class Ratio>
struct ratio_string# - #include <catch_tostring.hpp>
-
template<>
struct ratio_string<std::atto># - #include <catch_tostring.hpp>
Public Static Functions
-
static inline char symbol()#
-
static inline char symbol()#
-
template<>
struct ratio_string<std::femto># - #include <catch_tostring.hpp>
Public Static Functions
-
static inline char symbol()#
-
static inline char symbol()#
-
template<>
struct ratio_string<std::micro># - #include <catch_tostring.hpp>
Public Static Functions
-
static inline char symbol()#
-
static inline char symbol()#
-
template<>
struct ratio_string<std::milli># - #include <catch_tostring.hpp>
Public Static Functions
-
static inline char symbol()#
-
static inline char symbol()#
-
template<>
struct ratio_string<std::nano># - #include <catch_tostring.hpp>
Public Static Functions
-
static inline char symbol()#
-
static inline char symbol()#
-
template<>
struct ratio_string<std::pico># - #include <catch_tostring.hpp>
Public Static Functions
-
static inline char symbol()#
-
static inline char symbol()#
-
class RedirectedStdErr#
- #include <catch_output_redirect.hpp>
-
class RedirectedStdOut#
- #include <catch_output_redirect.hpp>
-
class RedirectedStream#
- #include <catch_output_redirect.hpp>
Public Functions
-
~RedirectedStream()#
-
~RedirectedStream()#
-
class RedirectedStreams#
- #include <catch_output_redirect.hpp>
Public Functions
-
RedirectedStreams(RedirectedStreams&&) = delete#
-
RedirectedStreams(RedirectedStreams const&) = delete#
-
~RedirectedStreams()#
-
RedirectedStreams &operator=(RedirectedStreams&&) = delete#
-
RedirectedStreams &operator=(RedirectedStreams const&) = delete#
-
RedirectedStreams(RedirectedStreams&&) = delete#
-
class RegexMatcher : public Catch::Matchers::MatcherBase<std::string>#
- #include <catch_matchers_string.hpp>
Public Functions
-
RegexMatcher(std::string regex, CaseSensitive caseSensitivity)#
-
RegexMatcher(std::string regex, CaseSensitive caseSensitivity)#
-
struct RegistrarForTagAliases#
- #include <catch_tag_alias_autoregistrar.hpp>
Public Functions
-
RegistrarForTagAliases(char const *alias, char const *tag, SourceLineInfo const &lineInfo)#
-
RegistrarForTagAliases(char const *alias, char const *tag, SourceLineInfo const &lineInfo)#
-
template<typename Fun>
struct repeater# - #include <catch_repeat.hpp>
Public Functions
-
inline void operator()(int k) const#
-
inline void operator()(int k) const#
-
template<typename T>
class RepeatGenerator : public Catch::Generators::IGenerator<T># - #include <catch_generators_adapters.hpp>
Public Functions
-
inline RepeatGenerator(size_t repeats, GeneratorWrapper<T> &&generator)#
-
inline virtual bool next() override#
Attempts to move the generator to the next element.
Returns true iff the move succeeded (and a valid element can be retrieved).
-
inline RepeatGenerator(size_t repeats, GeneratorWrapper<T> &&generator)#
-
class ReporterBase : public Catch::IEventListener#
- #include <catch_reporter_common_base.hpp>
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.
Subclassed by Catch::CumulativeReporterBase, Catch::StreamingReporterBase
Public Functions
-
ReporterBase(ReporterConfig &&config)#
-
~ReporterBase() override#
-
virtual 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.
-
virtual 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.
-
virtual 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.
-
virtual 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-onlyoutput.
Protected Attributes
-
Detail::unique_ptr<ColourImpl> m_colour#
Colour implementation this reporter was configured for.
-
std::map<std::string, std::string> m_customOptions#
The custom reporter options user passed down to the reporter.
-
std::ostream &m_stream#
Cached output stream from
m_wrapped_streamto reduce number of indirect calls needed to write output.
-
Detail::unique_ptr<IStream> m_wrapped_stream#
The stream wrapper as passed to us by outside code.
-
ReporterBase(ReporterConfig &&config)#
-
struct ReporterConfig#
- #include <catch_interfaces_reporter.hpp>
Public Functions
-
ReporterConfig(IConfig const *_fullConfig, Detail::unique_ptr<IStream> _stream, ColourMode colourMode, std::map<std::string, std::string> customOptions)#
-
ReporterConfig(ReporterConfig&&) = default#
-
~ReporterConfig()#
-
ColourMode colourMode() const#
-
ReporterConfig &operator=(ReporterConfig&&) = default#
-
Detail::unique_ptr<IStream> takeStream() &&#
-
ReporterConfig(IConfig const *_fullConfig, Detail::unique_ptr<IStream> _stream, ColourMode colourMode, std::map<std::string, std::string> customOptions)#
-
struct ReporterDescription#
- #include <catch_list.hpp>
-
template<typename T>
class ReporterFactory : public Catch::IReporterFactory# - #include <catch_reporter_registrars.hpp>
Private Functions
-
inline virtual IEventListenerPtr create(ReporterConfig &&config) const override#
-
inline virtual IEventListenerPtr create(ReporterConfig &&config) const override#
-
struct ReporterPreferences#
- #include <catch_interfaces_reporter.hpp>
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.
-
template<typename T>
class ReporterRegistrar# - #include <catch_reporter_registrars.hpp>
-
class ReporterRegistry#
- #include <catch_reporter_registry.hpp>
Public Functions
-
ReporterRegistry()#
-
~ReporterRegistry()#
-
IEventListenerPtr create(std::string const &name, ReporterConfig &&config) const#
-
std::map<std::string, IReporterFactoryPtr, Detail::CaseInsensitiveLess> const &getFactories() const#
-
std::vector<Detail::unique_ptr<EventListenerFactory>> const &getListeners() const#
-
void registerListener(Detail::unique_ptr<EventListenerFactory> factory)#
-
void registerReporter(std::string const &name, IReporterFactoryPtr factory)#
Private Members
-
Detail::unique_ptr<ReporterRegistryImpl> m_impl#
-
ReporterRegistry()#
-
struct ReporterRegistryImpl#
Public Members
-
std::map<std::string, IReporterFactoryPtr, Detail::CaseInsensitiveLess> factories#
-
std::vector<Detail::unique_ptr<EventListenerFactory>> listeners#
-
std::map<std::string, IReporterFactoryPtr, Detail::CaseInsensitiveLess> factories#
-
class ReporterSpec#
- #include <catch_reporter_spec_parser.hpp>
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.
Public Functions
-
ReporterSpec(std::string name, Optional<std::string> outputFileName, Optional<ColourMode> colourMode, std::map<std::string, std::string> customOptions)#
-
inline Optional<ColourMode> const &colourMode() const#
Private Members
-
Optional<ColourMode> m_colourMode#
Friends
-
inline friend bool operator!=(ReporterSpec const &lhs, ReporterSpec const &rhs)#
-
friend bool operator==(ReporterSpec const &lhs, ReporterSpec const &rhs)#
-
ReporterSpec(std::string name, Optional<std::string> outputFileName, Optional<ColourMode> colourMode, std::map<std::string, std::string> customOptions)#
-
class ResultBase#
- #include <catch_clara.hpp>
Subclassed by Catch::Clara::Detail::ResultValueBase< T >, Catch::Clara::Detail::ResultValueBase< void >
Protected Functions
-
ResultBase(ResultBase&&) = default#
-
ResultBase(ResultBase const&) = default#
-
inline ResultBase(ResultType type)#
-
virtual ~ResultBase()#
-
virtual void enforceOk() const = 0#
-
ResultBase &operator=(ResultBase&&) = default#
-
ResultBase &operator=(ResultBase const&) = default#
Protected Attributes
-
ResultType m_type#
-
ResultBase(ResultBase&&) = default#
-
struct ResultDisposition#
- #include <catch_result_type.hpp>
-
template<typename T>
class ResultValueBase : public Catch::Clara::Detail::ResultBase# - #include <catch_clara.hpp>
Protected Functions
-
inline ResultValueBase(ResultType type)#
-
inline ResultValueBase(ResultType, T const &value)#
-
inline ResultValueBase(ResultValueBase const &other)#
-
inline ~ResultValueBase() override#
-
inline auto operator=(ResultValueBase const &other) -> ResultValueBase&#
Protected Attributes
-
union Catch::Clara::Detail::ResultValueBase::[anonymous] [anonymous]#
-
inline ResultValueBase(ResultType type)#
-
template<>
class ResultValueBase<void> : public Catch::Clara::Detail::ResultBase# - #include <catch_clara.hpp>
Subclassed by Catch::Clara::Detail::BasicResult< T >
Protected Functions
-
ResultBase(ResultBase&&) = default#
-
ResultBase(ResultBase const&) = default#
-
inline ResultBase(ResultType type)#
-
ResultBase(ResultBase&&) = default#
-
struct ResultWas#
- #include <catch_result_type.hpp>
Public Types
-
enum OfType#
Values:
-
enumerator Unknown#
-
enumerator Ok#
-
enumerator Info#
-
enumerator Warning#
-
enumerator ExplicitSkip#
-
enumerator FailureBit#
-
enumerator ExpressionFailed#
-
enumerator ExplicitFailure#
-
enumerator Exception#
-
enumerator ThrewException#
-
enumerator DidntThrowException#
-
enumerator FatalErrorCondition#
-
enumerator Unknown#
-
enum OfType#
-
class ReusableStringStream : private Catch::Detail::NonCopyable#
- #include <catch_reusable_string_stream.hpp>
Public Functions
-
ReusableStringStream()#
-
~ReusableStringStream()#
-
template<typename T>
inline auto operator<<(T const &value) -> ReusableStringStream&#
-
ReusableStringStream()#
-
class RunContext : public Catch::IResultCapture#
- #include <catch_run_context.hpp>
Public Functions
-
explicit RunContext(IConfig const *_config, IEventListenerPtr &&reporter)#
-
RunContext(RunContext const&) = delete#
-
~RunContext() override#
-
bool aborting() const#
-
virtual IGeneratorTracker *acquireGeneratorTracker(StringRef generatorName, SourceLineInfo const &lineInfo) override#
-
virtual void assertionPassed() override#
-
virtual void benchmarkEnded(BenchmarkStats<> const &stats) override#
-
virtual void benchmarkStarting(BenchmarkInfo const &info) override#
-
virtual IGeneratorTracker *createGeneratorTracker(StringRef generatorName, SourceLineInfo lineInfo, Generators::GeneratorBasePtr &&generator) override#
-
virtual void emplaceUnscopedMessage(MessageBuilder &&builder) override#
-
virtual void exceptionEarlyReported() override#
-
virtual const AssertionResult *getLastResult() const override#
-
virtual void handleExpr(AssertionInfo const &info, ITransientExpression const &expr, AssertionReaction &reaction) override#
-
virtual void handleIncomplete(AssertionInfo const &info) override#
-
virtual void handleMessage(AssertionInfo const &info, ResultWas::OfType resultType, StringRef message, AssertionReaction &reaction) override#
-
virtual void handleNonExpr(AssertionInfo const &info, ResultWas::OfType resultType, AssertionReaction &reaction) override#
-
virtual void handleUnexpectedExceptionNotThrown(AssertionInfo const &info, AssertionReaction &reaction) override#
-
virtual void handleUnexpectedInflightException(AssertionInfo const &info, std::string &&message, AssertionReaction &reaction) override#
-
virtual bool lastAssertionPassed() override#
-
virtual void notifyAssertionStarted(AssertionInfo const &info) override#
-
RunContext &operator=(RunContext const&) = delete#
-
virtual void popScopedMessage(MessageInfo const &message) override#
-
virtual void pushScopedMessage(MessageInfo const &message) override#
-
Totals runTest(TestCaseHandle const &testCase)#
-
virtual void sectionEnded(SectionEndInfo &&endInfo) override#
-
virtual void sectionEndedEarly(SectionEndInfo &&endInfo) override#
-
virtual bool sectionStarted(StringRef sectionName, SourceLineInfo const §ionLineInfo, Counts &assertions) override#
Private Functions
-
void assertionEnded(AssertionResult &&result)#
-
void handleUnfinishedSections()#
-
void invokeActiveTestCase()#
-
void populateReaction(AssertionReaction &reaction)#
-
void reportExpr(AssertionInfo const &info, ResultWas::OfType resultType, ITransientExpression const *expr, bool negated)#
-
void resetAssertionInfo()#
Private Members
-
TestCaseHandle const *m_activeTestCase = nullptr#
-
FatalConditionHandler m_fatalConditionhandler#
-
bool m_includeSuccessfulResults#
-
AssertionInfo m_lastAssertionInfo#
-
bool m_lastAssertionPassed = false#
-
Optional<AssertionResult> m_lastResult#
-
std::vector<MessageInfo> m_messages#
-
std::vector<ScopedMessage> m_messageScopes#
-
IEventListenerPtr m_reporter#
-
TestRunInfo m_runInfo#
-
bool m_shouldReportUnexpected = true#
-
ITracker *m_testCaseTracker = nullptr#
-
TrackerContext m_trackerContext#
-
std::vector<SectionEndInfo> m_unfinishedSections#
-
explicit RunContext(IConfig const *_config, IEventListenerPtr &&reporter)#
-
template<typename Duration>
struct SampleAnalysis# - #include <catch_sample_analysis.hpp>
Public Functions
-
template<typename Duration2>
inline operator SampleAnalysis<Duration2>() const#
-
template<typename Duration2>
-
class ScopedElement#
- #include <catch_xmlwriter.hpp>
Public Functions
-
ScopedElement(ScopedElement &&other) noexcept#
-
ScopedElement(XmlWriter *writer, XmlFormatting fmt)#
-
~ScopedElement()#
-
ScopedElement &operator=(ScopedElement &&other) noexcept#
-
ScopedElement &writeAttribute(StringRef name, StringRef attribute)#
-
template<typename T, typename = typename std::enable_if_t<!std::is_convertible<T, StringRef>::value>>
inline ScopedElement &writeAttribute(StringRef name, T const &attribute)#
-
ScopedElement &writeText(StringRef text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent)#
-
ScopedElement(ScopedElement &&other) noexcept#
-
class ScopedMessage#
- #include <catch_message.hpp>
Public Functions
-
explicit ScopedMessage(MessageBuilder &&builder)#
-
ScopedMessage(ScopedMessage &&old) noexcept#
-
ScopedMessage(ScopedMessage &duplicate) = delete#
-
~ScopedMessage()#
-
explicit ScopedMessage(MessageBuilder &&builder)#
-
class Section : private Catch::Detail::NonCopyable#
- #include <catch_section.hpp>
Public Functions
-
Section(SectionInfo &&info)#
-
Section(SourceLineInfo const &_lineInfo, StringRef _name, const char*const = nullptr)#
-
~Section()#
-
explicit operator bool() const#
-
Section(SectionInfo &&info)#
-
struct SectionEndInfo#
- #include <catch_section_info.hpp>
-
struct SectionInfo#
- #include <catch_section_info.hpp>
Public Functions
-
inline SectionInfo(SourceLineInfo const &_lineInfo, std::string _name, const char*const = nullptr)#
-
inline SectionInfo(SourceLineInfo const &_lineInfo, std::string _name, const char*const = nullptr)#
-
struct SectionNode#
- #include <catch_reporter_cumulative_base.hpp>
Public Functions
-
inline explicit SectionNode(SectionStats const &_stats)#
-
bool hasAnyAssertions() const#
-
inline bool operator==(SectionNode const &other) const#
Public Members
-
std::vector<Detail::AssertionOrBenchmarkResult> assertionsAndBenchmarks#
-
std::vector<Detail::unique_ptr<SectionNode>> childSections#
-
SectionStats stats#
-
inline explicit SectionNode(SectionStats const &_stats)#
-
struct SectionStats#
- #include <catch_interfaces_reporter.hpp>
Public Functions
-
SectionStats(SectionInfo &&_sectionInfo, Counts const &_assertions, double _durationInSeconds, bool _missingAssertions)#
-
SectionStats(SectionInfo &&_sectionInfo, Counts const &_assertions, double _durationInSeconds, bool _missingAssertions)#
-
class SectionTracker : public Catch::TestCaseTracking::TrackerBase#
- #include <catch_test_case_tracker.hpp>
Public Functions
-
SectionTracker(NameAndLocation &&nameAndLocation, TrackerContext &ctx, ITracker *parent)#
-
virtual bool isComplete() const override#
Returns true if tracker run to completion (successfully or not)
-
virtual bool isSectionTracker() const override#
Returns true if the instance is a section tracker.
Subclasses should override to true if they are, replaces RTTI for internal debug checks.
-
void tryOpen()#
Public Static Functions
-
static SectionTracker &acquire(TrackerContext &ctx, NameAndLocationRef const &nameAndLocation)#
-
SectionTracker(NameAndLocation &&nameAndLocation, TrackerContext &ctx, ITracker *parent)#
-
class Session : private Catch::Detail::NonCopyable#
- #include <catch_session.hpp>
Public Functions
-
Session()#
-
~Session()#
-
int applyCommandLine(int argc, char const *const *argv)#
-
ConfigData &configData()#
-
void libIdentify()#
-
int run()#
-
void showHelp() const#
-
void useConfigData(ConfigData const &configData)#
Private Functions
-
int runInternal()#
Private Members
-
Detail::unique_ptr<Config> m_config#
-
ConfigData m_configData#
-
bool m_startupExceptions = false#
-
Session()#
-
class SimplePcg32#
- #include <catch_random_number_generator.hpp>
Public Functions
-
inline SimplePcg32()#
-
explicit SimplePcg32(result_type seed_)#
-
void discard(uint64_t skip)#
-
result_type operator()()#
-
void seed(result_type seed_)#
Public Static Functions
- static inline constexpr result_type() max ()
- static inline constexpr result_type() min ()
Private Static Attributes
Friends
-
friend bool operator!=(SimplePcg32 const &lhs, SimplePcg32 const &rhs)#
-
friend bool operator==(SimplePcg32 const &lhs, SimplePcg32 const &rhs)#
-
inline SimplePcg32()#
-
template<typename SingletonImplT, typename InterfaceT = SingletonImplT, typename MutableInterfaceT = InterfaceT>
class Singleton : private SingletonImplT, public Catch::ISingleton# - #include <catch_singletons.hpp>
Public Static Functions
-
static inline auto get() -> InterfaceT const&#
-
static inline auto getMutable() -> MutableInterfaceT&#
-
static inline auto get() -> InterfaceT const&#
-
template<typename T>
class SingleValueGenerator : public Catch::Generators::IGenerator<T># - #include <catch_generators.hpp>
Public Functions
-
inline virtual bool next() override#
Attempts to move the generator to the next element.
Returns true iff the move succeeded (and a valid element can be retrieved).
-
inline virtual bool next() override#
-
template<typename Matcher>
class SizeMatchesMatcher : public Catch::Matchers::MatcherGenericBase# - #include <catch_matchers_container_properties.hpp>
Public Functions
-
class SonarQubeReporter : public Catch::CumulativeReporterBase#
- #include <catch_reporter_sonarqube.hpp>
Public Functions
-
inline SonarQubeReporter(ReporterConfig &&config)#
-
~SonarQubeReporter() override = default#
-
inline virtual void testRunEndedCumulative() override#
Customization point: called after last test finishes (testRunEnded has been handled)
-
virtual void testRunStarting(TestRunInfo const &testRunInfo) override#
Called once in a testing run before tests are started.
Not called if tests won’t be run (e.g. only listing will happen)
-
void writeAssertion(AssertionStats const &stats, bool okToFail)#
-
void writeAssertions(SectionNode const §ionNode, bool okToFail)#
-
void writeRun(TestRunNode const &groupNode)#
-
void writeTestCase(TestCaseNode const &testCaseNode)#
-
inline SonarQubeReporter(ReporterConfig &&config)#
-
struct SourceLineInfo#
- #include <catch_source_line_info.hpp>
Public Functions
-
SourceLineInfo() = delete#
-
bool operator<(SourceLineInfo const &other) const noexcept#
-
bool operator==(SourceLineInfo const &other) const noexcept#
Friends
-
friend std::ostream &operator<<(std::ostream &os, SourceLineInfo const &info)#
-
SourceLineInfo() = delete#
-
class StartsWithMatcher : public Catch::Matchers::StringMatcherBase#
- #include <catch_matchers_string.hpp>
Public Functions
-
StartsWithMatcher(CasedString const &comparator)#
-
StartsWithMatcher(CasedString const &comparator)#
-
class StartupExceptionRegistry#
- #include <catch_startup_exception_registry.hpp>
Public Functions
-
struct StreamEndStop#
- #include <catch_stream_end_stop.hpp>
Friends
- template<typename T> inline friend constexpr friend T const & operator+ (T const &value, StreamEndStop)
-
class StreamingReporterBase : public Catch::ReporterBase#
- #include <catch_reporter_streaming_base.hpp>
Subclassed by Catch::AutomakeReporter, Catch::CompactReporter, Catch::ConsoleReporter, Catch::TAPReporter, Catch::TeamCityReporter, Catch::XmlReporter
Public Functions
-
inline StreamingReporterBase(ReporterConfig &&_config)#
-
~StreamingReporterBase() override#
-
inline virtual void assertionEnded(AssertionStats const&) override#
Called after assertion was fully evaluated.
-
inline virtual void assertionStarting(AssertionInfo const&) override#
Called before assertion success/failure is evaluated.
-
inline virtual void benchmarkEnded(BenchmarkStats<> const&) override#
Called with the benchmark results if benchmark successfully finishes.
-
inline virtual void benchmarkFailed(StringRef) override#
Called if running the benchmarks fails for any reason.
-
inline virtual void benchmarkPreparing(StringRef) override#
Called when user-code is being probed before the actual benchmark runs.
-
inline virtual void benchmarkStarting(BenchmarkInfo const&) override#
Called after probe but before the user-code is being benchmarked.
-
inline virtual void fatalErrorEncountered(StringRef) override#
Called if a fatal error (signal/structured exception) occurred.
-
inline virtual void noMatchingTestCases(StringRef) override#
Called when no test cases match provided test spec.
-
inline virtual void reportInvalidTestSpec(StringRef) override#
Called for all invalid test specs from the cli.
-
inline virtual void sectionEnded(SectionStats const&) override#
Called after a
SECTIONhas finished running.
-
inline virtual void sectionStarting(SectionInfo const &_sectionInfo) override#
Called when a
SECTIONis being entered. Not called for skipped sections.
-
inline virtual void skipTest(TestCaseInfo const&) override#
Called with test cases that are skipped due to the test run aborting.
NOT called for test cases that are explicitly skipped using the
SKIPmacro.Deprecated - will be removed in the next major release.
-
inline virtual void testCaseEnded(TestCaseStats const&) override#
Called once for each TEST_CASE, no matter how many times it is entered.
-
inline virtual void testCasePartialEnded(TestCaseStats const&, uint64_t) override#
Called every time a TEST_CASE is entered, including repeats (due to sections)
-
inline virtual void testCasePartialStarting(TestCaseInfo const&, uint64_t) override#
Called every time a TEST_CASE is entered, including repeats (due to sections)
-
inline virtual void testCaseStarting(TestCaseInfo const &_testInfo) override#
Called once for each TEST_CASE, no matter how many times it is entered.
-
virtual void testRunEnded(TestRunStats const&) override#
Called once after all tests in a testing run are finished.
Not called if tests weren’t run (e.g. only listings happened)
-
virtual void testRunStarting(TestRunInfo const &_testRunInfo) override#
Called once in a testing run before tests are started.
Not called if tests won’t be run (e.g. only listing will happen)
Protected Attributes
-
TestCaseInfo const *currentTestCaseInfo = nullptr#
-
TestRunInfo currentTestRunInfo = {"test run has not started yet"_sr}#
-
std::vector<SectionInfo> m_sectionStack#
Stack of all active sections in the current test case.
-
inline StreamingReporterBase(ReporterConfig &&_config)#
-
class StringContainsMatcher : public Catch::Matchers::StringMatcherBase#
- #include <catch_matchers_string.hpp>
Public Functions
-
StringContainsMatcher(CasedString const &comparator)#
-
StringContainsMatcher(CasedString const &comparator)#
-
class StringEqualsMatcher : public Catch::Matchers::StringMatcherBase#
- #include <catch_matchers_string.hpp>
Public Functions
-
StringEqualsMatcher(CasedString const &comparator)#
-
StringEqualsMatcher(CasedString const &comparator)#
-
template<typename T, typename = void>
struct StringMaker# - #include <catch_tostring.hpp>
-
template<>
struct StringMaker<bool># - #include <catch_tostring.hpp>
-
template<>
struct StringMaker<Catch::Approx># - #include <catch_approx.hpp>
-
template<>
struct StringMaker<char*># - #include <catch_tostring.hpp>
-
template<>
struct StringMaker<char># - #include <catch_tostring.hpp>
-
template<>
struct StringMaker<char const*># - #include <catch_tostring.hpp>
-
template<size_t SZ>
struct StringMaker<char[SZ]># - #include <catch_tostring.hpp>
-
template<>
struct StringMaker<double># - #include <catch_tostring.hpp>
Public Static Attributes
- static CATCH_EXPORT int precision = 10
-
template<>
struct StringMaker<float># - #include <catch_tostring.hpp>
Public Static Attributes
- static CATCH_EXPORT int precision = 5
-
template<>
struct StringMaker<int># - #include <catch_tostring.hpp>
-
template<>
struct StringMaker<long># - #include <catch_tostring.hpp>
-
template<>
struct StringMaker<long long># - #include <catch_tostring.hpp>
-
template<typename R, typename C>
struct StringMaker<R C::*># - #include <catch_tostring.hpp>
-
template<typename R>
struct StringMaker<R, std::enable_if_t<is_range<R>::value && !::Catch::Detail::IsStreamInsertable<R>::value>># - #include <catch_tostring.hpp>
-
template<>
struct StringMaker<signed char># - #include <catch_tostring.hpp>
-
template<size_t SZ>
struct StringMaker<signed char[SZ]># - #include <catch_tostring.hpp>
-
template<typename Value, typename Ratio>
struct StringMaker<std::chrono::duration<Value, Ratio>># - #include <catch_tostring.hpp>
-
template<typename Value>
struct StringMaker<std::chrono::duration<Value, std::ratio<1>>># - #include <catch_tostring.hpp>
-
template<typename Value>
struct StringMaker<std::chrono::duration<Value, std::ratio<3600>>># - #include <catch_tostring.hpp>
-
template<typename Value>
struct StringMaker<std::chrono::duration<Value, std::ratio<60>>># - #include <catch_tostring.hpp>
-
template<typename Clock, typename Duration>
struct StringMaker<std::chrono::time_point<Clock, Duration>># - #include <catch_tostring.hpp>
-
template<typename Duration>
struct StringMaker<std::chrono::time_point<std::chrono::system_clock, Duration>># - #include <catch_tostring.hpp>
-
template<>
struct StringMaker<std::nullptr_t># - #include <catch_tostring.hpp>
-
template<>
struct StringMaker<std::string># - #include <catch_tostring.hpp>
-
template<typename T>
struct StringMaker<T*># - #include <catch_tostring.hpp>
-
template<typename T, size_t SZ>
struct StringMaker<T[SZ]># - #include <catch_tostring.hpp>
-
template<>
struct StringMaker<unsigned char># - #include <catch_tostring.hpp>
-
template<size_t SZ>
struct StringMaker<unsigned char[SZ]># - #include <catch_tostring.hpp>
-
template<>
struct StringMaker<unsigned int># - #include <catch_tostring.hpp>
-
template<>
struct StringMaker<unsigned long># - #include <catch_tostring.hpp>
-
template<>
struct StringMaker<unsigned long long># - #include <catch_tostring.hpp>
-
class StringMatcherBase : public Catch::Matchers::MatcherBase<std::string>#
- #include <catch_matchers_string.hpp>
Subclassed by Catch::Matchers::EndsWithMatcher, Catch::Matchers::StartsWithMatcher, Catch::Matchers::StringContainsMatcher, Catch::Matchers::StringEqualsMatcher
Public Functions
-
StringMatcherBase(StringRef operation, CasedString const &comparator)#
-
StringMatcherBase(StringRef operation, CasedString const &comparator)#
-
class StringRef#
- #include <catch_stringref.hpp>
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.
Public Functions
-
constexpr StringRef() noexcept = default#
-
StringRef(char const *rawChars) noexcept#
-
inline constexpr const_iterator begin() const#
-
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
-
inline constexpr char const *data() const noexcept#
-
inline constexpr auto empty() const noexcept -> bool#
-
inline constexpr const_iterator end() const#
Private Static Attributes
-
static constexpr char const *const s_empty = ""#
-
constexpr StringRef() noexcept = default#
-
struct StringStreams#
-
class TablePrinter#
-
Friends
-
inline friend TablePrinter &operator<<(TablePrinter &tp, ColumnBreak)#
-
inline friend TablePrinter &operator<<(TablePrinter &tp, RowBreak)#
-
template<typename T>
inline friend TablePrinter &operator<<(TablePrinter &tp, T const &value)#
-
inline friend TablePrinter &operator<<(TablePrinter &tp, ColumnBreak)#
-
struct Tag#
- #include <catch_test_case_info.hpp>
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.
-
struct TagAlias#
- #include <catch_tag_alias.hpp>
Public Functions
-
inline TagAlias(std::string const &_tag, SourceLineInfo _lineInfo)#
-
inline TagAlias(std::string const &_tag, SourceLineInfo _lineInfo)#
-
class TagAliasRegistry : public Catch::ITagAliasRegistry#
- #include <catch_tag_alias_registry.hpp>
Public Functions
-
~TagAliasRegistry() override#
-
void add(std::string const &alias, std::string const &tag, SourceLineInfo const &lineInfo)#
-
~TagAliasRegistry() override#
-
struct TagInfo#
- #include <catch_list.hpp>
-
class TagPattern : public Catch::TestSpec::Pattern#
Public Functions
-
bool matches(TestCaseInfo const &testCase) const override#
-
bool matches(TestCaseInfo const &testCase) const override#
-
template<typename T>
class TakeGenerator : public Catch::Generators::IGenerator<T># - #include <catch_generators_adapters.hpp>
Public Functions
-
inline TakeGenerator(size_t target, GeneratorWrapper<T> &&generator)#
-
inline virtual bool next() override#
Attempts to move the generator to the next element.
Returns true iff the move succeeded (and a valid element can be retrieved).
-
inline TakeGenerator(size_t target, GeneratorWrapper<T> &&generator)#
-
class TAPReporter : public Catch::StreamingReporterBase#
- #include <catch_reporter_tap.hpp>
Public Functions
-
inline TAPReporter(ReporterConfig &&config)#
-
~TAPReporter() override = default#
-
virtual void assertionEnded(AssertionStats const &_assertionStats) override#
Called after assertion was fully evaluated.
-
virtual void noMatchingTestCases(StringRef unmatchedSpec) override#
Called when no test cases match provided test spec.
-
virtual void testRunEnded(TestRunStats const &_testRunStats) override#
Called once after all tests in a testing run are finished.
Not called if tests weren’t run (e.g. only listings happened)
-
virtual void testRunStarting(TestRunInfo const &testInfo) override#
Called once in a testing run before tests are started.
Not called if tests won’t be run (e.g. only listing will happen)
-
inline TAPReporter(ReporterConfig &&config)#
-
class TeamCityReporter : public Catch::StreamingReporterBase#
- #include <catch_reporter_teamcity.hpp>
Public Functions
-
inline TeamCityReporter(ReporterConfig &&_config)#
-
~TeamCityReporter() override#
-
virtual void assertionEnded(AssertionStats const &assertionStats) override#
Called after assertion was fully evaluated.
-
inline virtual void sectionStarting(SectionInfo const §ionInfo) override#
Called when a
SECTIONis being entered. Not called for skipped sections.
-
virtual void testCaseEnded(TestCaseStats const &testCaseStats) override#
Called once for each TEST_CASE, no matter how many times it is entered.
-
virtual void testCaseStarting(TestCaseInfo const &testInfo) override#
Called once for each TEST_CASE, no matter how many times it is entered.
-
virtual void testRunEnded(TestRunStats const &testGroupStats) override#
Called once after all tests in a testing run are finished.
Not called if tests weren’t run (e.g. only listings happened)
-
virtual void testRunStarting(TestRunInfo const &groupInfo) override#
Called once in a testing run before tests are started.
Not called if tests won’t be run (e.g. only listing will happen)
-
inline TeamCityReporter(ReporterConfig &&_config)#
-
class TestCaseHandle#
- #include <catch_test_case_info.hpp>
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.
Public Functions
-
inline TestCaseHandle(TestCaseInfo *info, ITestInvoker *invoker)#
-
TestCaseInfo const &getTestCaseInfo() const#
-
inline void invoke() const#
-
inline TestCaseHandle(TestCaseInfo *info, ITestInvoker *invoker)#
-
struct TestCaseInfo : public Catch::Detail::NonCopyable#
- #include <catch_test_case_info.hpp>
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.
Public Functions
-
TestCaseInfo(StringRef _className, NameAndTags const &_tags, SourceLineInfo const &_lineInfo)#
-
void addFilenameTag()#
-
bool expectedToFail() const#
-
bool isHidden() const#
-
bool okToFail() const#
-
bool throws() const#
Friends
-
friend bool operator<(TestCaseInfo const &lhs, TestCaseInfo const &rhs)#
Orders by name, classname and tags.
-
TestCaseInfo(StringRef _className, NameAndTags const &_tags, SourceLineInfo const &_lineInfo)#
-
class TestCaseInfoHasher#
- #include <catch_test_case_info_hasher.hpp>
-
struct TestCaseStats#
- #include <catch_interfaces_reporter.hpp>
Public Functions
-
TestCaseStats(TestCaseInfo const &_testInfo, Totals const &_totals, std::string &&_stdOut, std::string &&_stdErr, bool _aborting)#
-
TestCaseStats(TestCaseInfo const &_testInfo, Totals const &_totals, std::string &&_stdOut, std::string &&_stdErr, bool _aborting)#
-
struct TestFailureException#
- #include <catch_test_failure_exception.hpp>
Used to signal that an assertion macro failed.
-
template<typename C>
class TestInvokerAsMethod : public Catch::ITestInvoker# - #include <catch_test_registry.hpp>
Public Functions
-
inline virtual void invoke() const override#
-
inline virtual void invoke() const override#
-
class TestRegistry : public Catch::ITestCaseRegistry#
- #include <catch_test_case_registry_impl.hpp>
Public Functions
-
~TestRegistry() override = default#
-
virtual std::vector<TestCaseInfo*> const &getAllInfos() const override#
-
virtual std::vector<TestCaseHandle> const &getAllTests() const override#
-
virtual std::vector<TestCaseHandle> const &getAllTestsSorted(IConfig const &config) const override#
-
void registerTest(Detail::unique_ptr<TestCaseInfo> testInfo, Detail::unique_ptr<ITestInvoker> testInvoker)#
Private Members
-
mutable TestRunOrder m_currentSortOrder = TestRunOrder::Declared#
-
std::vector<TestCaseHandle> m_handles#
-
std::vector<Detail::unique_ptr<ITestInvoker>> m_invokers#
-
std::vector<Detail::unique_ptr<TestCaseInfo>> m_owned_test_infos#
-
mutable std::vector<TestCaseHandle> m_sortedFunctions#
-
std::vector<TestCaseInfo*> m_viewed_test_infos#
-
~TestRegistry() override = default#
-
struct TestRunInfo#
- #include <catch_test_run_info.hpp>
-
struct TestRunStats#
- #include <catch_interfaces_reporter.hpp>
Public Functions
-
TestRunStats(TestRunInfo const &_runInfo, Totals const &_totals, bool _aborting)#
-
TestRunStats(TestRunInfo const &_runInfo, Totals const &_totals, bool _aborting)#
-
struct TestSkipException#
- #include <catch_test_failure_exception.hpp>
Used to signal that the remainder of a test should be skipped.
-
class TestSpec#
- #include <catch_test_spec.hpp>
Public Types
-
using Matches = std::vector<FilterMatch>#
Public Functions
-
const vectorStrings &getInvalidSpecs() const#
-
bool hasFilters() const#
-
bool matches(TestCaseInfo const &testCase) const#
-
Matches matchesByFilter(std::vector<TestCaseHandle> const &testCases, IConfig const &config) const#
Private Functions
-
using Matches = std::vector<FilterMatch>#
-
class TestSpecParser#
- #include <catch_test_spec_parser.hpp>
Public Functions
-
TestSpecParser(ITagAliasRegistry const &tagAliases)#
-
TestSpecParser &parse(std::string const &arg)#
Private Types
Private Functions
-
inline void addCharToPattern(char c)#
-
void addFilter()#
-
void addNamePattern()#
-
void addTagPattern()#
-
void endMode()#
-
void escape()#
-
bool isControlChar(char c) const#
-
void processNameChar(char c)#
-
bool processNoneChar(char c)#
-
bool processOtherChar(char c)#
-
void revertBackToLastMode()#
-
void saveLastMode()#
-
bool separate()#
-
bool visitChar(char c)#
-
TestSpecParser(ITagAliasRegistry const &tagAliases)#
-
class Timer#
- #include <catch_timer.hpp>
Public Functions
-
auto getElapsedMicroseconds() const -> uint64_t#
-
auto getElapsedMilliseconds() const -> unsigned int#
-
auto getElapsedNanoseconds() const -> uint64_t#
-
auto getElapsedSeconds() const -> double#
-
void start()#
Private Members
-
uint64_t m_nanoseconds = 0#
-
auto getElapsedMicroseconds() const -> uint64_t#
-
template<typename Duration, typename Result>
struct Timing# - #include <catch_timing.hpp>
-
struct Token#
- #include <catch_clara.hpp>
-
class TokenStream#
- #include <catch_clara.hpp>
Public Functions
-
inline size_t count() const#
-
inline explicit operator bool() const#
-
TokenStream &operator++()#
Private Functions
-
void loadBuffer()#
-
inline size_t count() const#
-
struct Totals#
- #include <catch_totals.hpp>
Public Functions
-
class TrackerBase : public Catch::TestCaseTracking::ITracker#
- #include <catch_test_case_tracker.hpp>
Subclassed by Catch::TestCaseTracking::SectionTracker
Public Functions
-
TrackerBase(NameAndLocation &&nameAndLocation, TrackerContext &ctx, ITracker *parent)#
-
virtual void close() override#
-
virtual void fail() override#
-
virtual bool isComplete() const override#
Returns true if tracker run to completion (successfully or not)
-
void open()#
Protected Attributes
-
TrackerContext &m_ctx#
-
TrackerBase(NameAndLocation &&nameAndLocation, TrackerContext &ctx, ITracker *parent)#
-
class TrackerContext#
- #include <catch_test_case_tracker.hpp>
Private Types
-
template<typename>
struct true_given : public std::true_type# - #include <catch_meta.hpp>
-
template<>
struct type# - #include <catch_complete_invoke.hpp>
-
class TypedListenerFactory : public Catch::EventListenerFactory#
Public Functions
-
inline IEventListenerPtr create(IConfig const *config) const override#
Private Functions
-
inline IEventListenerPtr create(IConfig const *config) const override#
-
template<typename LhsT>
class UnaryExpr : public Catch::ITransientExpression# - #include <catch_decomposer.hpp>
Private Functions
-
template<typename L>
struct UnaryLambdaTraits# - #include <catch_clara.hpp>
-
template<typename ClassT, typename ReturnT, typename ...Args>
struct UnaryLambdaTraits<ReturnT (ClassT::*)(Args...) const># - #include <catch_clara.hpp>
Public Static Attributes
-
static const bool isValid = false#
-
static const bool isValid = false#
-
template<typename ClassT, typename ReturnT, typename ArgT>
struct UnaryLambdaTraits<ReturnT (ClassT::*)(ArgT) const># - #include <catch_clara.hpp>
Public Types
Public Static Attributes
-
static const bool isValid = true#
-
static const bool isValid = true#
-
template<typename T>
class unique_ptr# - #include <catch_unique_ptr.hpp>
A reimplementation of
std::unique_ptrfor improved compilation performance.Does not support arrays nor custom deleters.
Public Functions
-
inline unique_ptr(unique_ptr &&rhs) noexcept#
-
unique_ptr(unique_ptr const&) = delete#
-
template<typename U, typename = std::enable_if_t<std::is_base_of<T, U>::value>>
inline unique_ptr(unique_ptr<U> &&from)#
-
inline ~unique_ptr()#
-
inline explicit operator bool() const#
-
inline unique_ptr &operator=(unique_ptr &&rhs) noexcept#
-
unique_ptr &operator=(unique_ptr const&) = delete#
-
template<typename U, typename = std::enable_if_t<std::is_base_of<T, U>::value>>
inline unique_ptr &operator=(unique_ptr<U> &&from)#
Friends
-
inline friend void swap(unique_ptr &lhs, unique_ptr &rhs)#
-
inline unique_ptr(unique_ptr &&rhs) noexcept#
-
template<typename T, typename AllocComp, typename AllocMatch>
class UnorderedEqualsMatcher : public Catch::Matchers::MatcherBase<std::vector<T, AllocMatch>># - #include <catch_matchers_vector.hpp>
Public Functions
-
inline virtual bool match(std::vector<T, AllocMatch> const &vec) const override#
-
inline virtual bool match(std::vector<T, AllocMatch> const &vec) const override#
-
template<typename TargetRangeLike, typename Equality>
class UnorderedRangeEqualsMatcher : public Catch::Matchers::MatcherGenericBase# - #include <catch_matchers_range_equals.hpp>
Matcher for checking that an element contains the same elements (but not necessarily in the same order)
Public Functions
-
template<typename TargetRangeLike2, typename Equality2>
inline UnorderedRangeEqualsMatcher(TargetRangeLike2 &&range, Equality2 &&predicate)#
-
template<typename TargetRangeLike2, typename Equality2>
-
template<typename T, typename Alloc>
class VectorContainsElementMatcher : public Catch::Matchers::MatcherBase<std::vector<T, Alloc>># - #include <catch_matchers_vector.hpp>
Public Functions
-
struct Version#
- #include <catch_version.hpp>
Public Functions
-
Version(unsigned int _majorVersion, unsigned int _minorVersion, unsigned int _patchNumber, char const *const _branchName, unsigned int _buildNumber)#
-
Version(unsigned int _majorVersion, unsigned int _minorVersion, unsigned int _patchNumber, char const *const _branchName, unsigned int _buildNumber)#
-
struct WaitForKeypress#
- #include <catch_interfaces_config.hpp>
-
struct WarnAbout#
- #include <catch_interfaces_config.hpp>
-
class WildcardPattern#
- #include <catch_wildcard_pattern.hpp>
Public Functions
-
WildcardPattern(std::string const &pattern, CaseSensitive caseSensitivity)#
Private Types
-
WildcardPattern(std::string const &pattern, CaseSensitive caseSensitivity)#
-
class WithinAbsMatcher : public Catch::Matchers::MatcherBase<double>#
- #include <catch_matchers_floating_point.hpp>
-
class WithinRelMatcher : public Catch::Matchers::MatcherBase<double>#
- #include <catch_matchers_floating_point.hpp>
-
class WithinUlpsMatcher : public Catch::Matchers::MatcherBase<double>#
- #include <catch_matchers_floating_point.hpp>
Public Functions
-
WithinUlpsMatcher(double target, uint64_t ulps, Detail::FloatingPointKind baseType)#
-
virtual bool match(double const &matchee) const override#
-
WithinUlpsMatcher(double target, uint64_t ulps, Detail::FloatingPointKind baseType)#
-
class XmlEncode#
- #include <catch_xmlwriter.hpp>
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.
Public Functions
-
XmlEncode(StringRef str, ForWhat forWhat = ForTextNodes)#
-
XmlEncode(StringRef str, ForWhat forWhat = ForTextNodes)#
-
class XmlReporter : public Catch::StreamingReporterBase#
- #include <catch_reporter_xml.hpp>
Public Functions
-
XmlReporter(ReporterConfig &&_config)#
-
~XmlReporter() override#
-
virtual void assertionEnded(AssertionStats const &assertionStats) override#
Called after assertion was fully evaluated.
-
virtual void assertionStarting(AssertionInfo const&) override#
Called before assertion success/failure is evaluated.
-
virtual void benchmarkEnded(BenchmarkStats<> const&) override#
Called with the benchmark results if benchmark successfully finishes.
-
virtual void benchmarkFailed(StringRef error) override#
Called if running the benchmarks fails for any reason.
-
virtual void benchmarkPreparing(StringRef name) override#
Called when user-code is being probed before the actual benchmark runs.
-
virtual void benchmarkStarting(BenchmarkInfo const&) override#
Called after probe but before the user-code is being benchmarked.
-
virtual 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.
-
virtual 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.
-
virtual 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.
-
virtual 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-onlyoutput.
-
virtual void sectionEnded(SectionStats const §ionStats) override#
Called after a
SECTIONhas finished running.
-
virtual void sectionStarting(SectionInfo const §ionInfo) override#
Called when a
SECTIONis being entered. Not called for skipped sections.
-
virtual void testCaseEnded(TestCaseStats const &testCaseStats) override#
Called once for each TEST_CASE, no matter how many times it is entered.
-
virtual void testCaseStarting(TestCaseInfo const &testInfo) override#
Called once for each TEST_CASE, no matter how many times it is entered.
-
virtual void testRunEnded(TestRunStats const &testRunStats) override#
Called once after all tests in a testing run are finished.
Not called if tests weren’t run (e.g. only listings happened)
-
virtual void testRunStarting(TestRunInfo const &testInfo) override#
Called once in a testing run before tests are started.
Not called if tests won’t be run (e.g. only listing will happen)
-
void writeSourceInfo(SourceLineInfo const &sourceInfo)#
-
XmlReporter(ReporterConfig &&_config)#
-
class XmlWriter#
- #include <catch_xmlwriter.hpp>
Public Functions
-
~XmlWriter()#
-
XmlWriter &endElement(XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent)#
-
void ensureTagClosed()#
-
ScopedElement scopedElement(std::string const &name, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent)#
-
XmlWriter &startElement(std::string const &name, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent)#
-
XmlWriter &writeAttribute(StringRef name, char const *attribute)#
The attribute content is XML-encoded.
-
XmlWriter &writeAttribute(StringRef name, StringRef attribute)#
The attribute content is XML-encoded.
-
template<typename T, typename = typename std::enable_if_t<!std::is_convertible<T, StringRef>::value>>
inline XmlWriter &writeAttribute(StringRef name, T const &attribute)# The attribute value must provide op<<(ostream&, T).
The resulting serialization is XML-encoded
-
XmlWriter &writeComment(StringRef text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent)#
Writes XML comment as “<!– text –>”.
-
XmlWriter &writeText(StringRef text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent)#
Writes escaped
textin a element.
Private Functions
-
void applyFormatting(XmlFormatting fmt)#
-
void newlineIfNecessary()#
-
void writeDeclaration()#
-
~XmlWriter()#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace Catch#
Typedefs
-
using ExceptionTranslators = std::vector<Detail::unique_ptr<IExceptionTranslator const>>#
-
template<typename Func, typename ...U>
using FunctionReturnType = std::remove_reference_t<std::remove_cv_t<std::result_of_t<Func(U...)>>>#
-
typedef Detail::unique_ptr<IEventListener> IEventListenerPtr#
-
typedef Detail::unique_ptr<IReporterFactory> IReporterFactoryPtr#
-
using RegistryHubSingleton = Singleton<RegistryHub, IRegistryHub, IMutableRegistryHub>#
-
using StringMatcher = Matchers::MatcherBase<std::string>#
Enums
-
enum class ColourMode : std::uint8_t#
Values:
-
enumerator PlatformDefault#
Let Catch2 pick implementation based on platform detection.
-
enumerator ANSI#
Use ANSI colour code escapes.
-
enumerator Win32#
Use Win32 console colour API.
-
enumerator None#
Don’t use any colour.
-
enumerator PlatformDefault#
-
enum class GenerateFrom#
Values:
-
enumerator Time#
-
enumerator RandomDevice#
-
enumerator Default#
Currently equivalent to RandomDevice, but can change at any point.
-
enumerator Time#
-
enum class ShowDurations#
Values:
-
enumerator DefaultForReporter#
-
enumerator Always#
-
enumerator Never#
-
enumerator DefaultForReporter#
-
enum class TestCaseProperties : uint8_t#
Values:
-
enumerator None#
-
enumerator IsHidden#
-
enumerator ShouldFail#
-
enumerator MayFail#
-
enumerator Throws#
-
enumerator NonPortable#
-
enumerator Benchmark#
-
enumerator None#
Functions
-
void addSingleton(ISingleton *singleton)#
-
void cleanUp()#
-
void cleanUpContext()#
-
void cleanupSingletons()#
-
template<typename Container>
Container createShard(Container const &container, std::size_t const shardCount, std::size_t const shardIndex)#
-
void defaultListListeners(std::ostream &out, std::vector<ListenerDescription> const &descriptions)#
Lists listeners descriptions to the provided stream in user-friendly format.
-
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.
-
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.
-
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-onlyoption, for people who used it in integrations.
-
std::vector<TestCaseHandle> filterTests(std::vector<TestCaseHandle> const &testCases, TestSpec const &testSpec, IConfig const &config)#
-
void formatReconstructedExpression(std::ostream &os, std::string const &lhs, StringRef op, std::string const &rhs)#
-
std::uint32_t generateRandomSeed(GenerateFrom from)#
-
std::vector<TestCaseHandle> const &getAllTestCasesSorted(IConfig const &config)#
-
IMutableRegistryHub &getMutableRegistryHub()#
-
IRegistryHub const &getRegistryHub()#
-
IResultCapture &getResultCapture()#
-
void handleExceptionMatchExpr(AssertionHandler &handler, std::string const &str)#
-
void handleExceptionMatchExpr(AssertionHandler &handler, StringMatcher const &matcher)#
-
bool isColourImplAvailable(ColourMode colourSelection)#
Checks if specific colour impl has been compiled into the binary.
-
bool isDebuggerActive()#
-
inline bool isFalseTest(int flags)#
-
bool isJustInfo(int flags)#
-
bool isnan(double d)#
-
bool isnan(float f)#
-
bool isThrowSafe(TestCaseHandle const &testCase, IConfig const &config)#
-
bool list(IEventListener &reporter, Config const &config)#
-
Detail::unique_ptr<ColourImpl> makeColourImpl(ColourMode colourSelection, IStream *stream)#
Provides ColourImpl based on global config and target compilation platform.
-
Clara::Parser makeCommandLineParser(ConfigData &config)#
-
template<typename ArgT, typename MatcherT>
auto makeMatchExpr(ArgT &&arg, MatcherT const &matcher) -> MatchExpr<ArgT, MatcherT>#
-
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 stdoutstdoutfor stdoutstderrfor stderrdebugfor platform specific debugging output
- Throws:
if – passed an unrecognized %-prefixed stream
-
Detail::unique_ptr<TestCaseInfo> makeTestCaseInfo(StringRef _className, NameAndTags const &nameAndTags, SourceLineInfo const &_lineInfo)#
-
Detail::unique_ptr<ITestInvoker> makeTestInvoker(void (*testAsFunction)())#
-
template<typename C>
Detail::unique_ptr<ITestInvoker> makeTestInvoker(void (C::* testAsMethod)())#
-
bool operator!=(SimplePcg32 const &lhs, SimplePcg32 const &rhs)#
-
XmlFormatting operator&(XmlFormatting lhs, XmlFormatting rhs)#
-
bool operator<(TestCaseInfo const &lhs, TestCaseInfo const &rhs)#
-
auto operator<<(std::ostream &os, LazyExpression const &lazyExpr) -> std::ostream&#
-
std::ostream &operator<<(std::ostream &os, SourceLineInfo const &info)#
-
std::ostream &operator<<(std::ostream &out, lineOfChars value)#
-
bool operator==(ProcessedReporterSpec const &lhs, ProcessedReporterSpec const &rhs)#
-
bool operator==(ReporterSpec const &lhs, ReporterSpec const &rhs)#
-
bool operator==(SimplePcg32 const &lhs, SimplePcg32 const &rhs)#
-
ResultDisposition::Flags operator|(ResultDisposition::Flags lhs, ResultDisposition::Flags rhs)#
-
XmlFormatting operator|(XmlFormatting lhs, XmlFormatting rhs)#
-
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
…
-
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.
-
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.
-
unsigned int rngSeed()#
-
bool shouldContinueOnFailure(int flags)#
-
bool shouldShowDuration(IConfig const &config, double duration)#
Should the reporter show duration of test given current configuration?
-
bool shouldSuppressFailure(int flags)#
-
std::vector<TestCaseHandle> sortTests(IConfig const &config, std::vector<TestCaseHandle> const &unsortedTestCases)#
-
void throw_test_failure_exception()#
Outlines throwing of
TestFailureExceptioninto a single TU.Also handles
CATCH_CONFIG_DISABLE_EXCEPTIONSfor callers.
-
void throw_test_skip_exception()#
Outlines throwing of
TestSkipExceptioninto a single TU.Also handles
CATCH_CONFIG_DISABLE_EXCEPTIONSfor callers.
-
char toLower(char c)#
-
StringRef trim(StringRef ref)#
Returns a substring of the original ref without whitespace. Beware lifetimes!
-
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(soulpDistance(-0, 0) == 0)ulpDistance(maxFinite, INF) == 1ulpDistance(x, -x) == 2 * ulpDistance(x, 0)
- Pre:
!isnan( lhs )- Pre:
!isnan( rhs )- Pre:
floating point numbers are represented in IEEE-754 format
-
bool uncaught_exceptions()#
Variables
- static CATCH_INTERNAL_START_WARNINGS_SUPPRESSION CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS LeakDetector leakDetector
-
using ExceptionTranslators = std::vector<Detail::unique_ptr<IExceptionTranslator const>>#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace Benchmark#
Typedefs
-
template<typename T>
using destructable_object = Detail::ObjectStorage<T, false>#
-
template<typename Clock>
using FloatDuration = std::chrono::duration<double, typename Clock::period>#
-
template<typename T>
using storage_for = Detail::ObjectStorage<T, true>#
-
template<typename Clock, typename Func, typename ...Args>
using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<FunctionReturnType<Func, Args...>>>#
-
template<typename T>
-
namespace Detail#
Typedefs
-
template<typename T>
using CompleteType_t = typename CompleteType<T>::type#
-
template<typename Clock, typename Fun>
using run_for_at_least_argument_t = std::conditional_t<is_callable<Fun(Chronometer)>::value, Chronometer, int>#
Functions
-
template<typename Duration, typename Iterator>
SampleAnalysis<Duration> analyse(const IConfig &cfg, Environment<Duration>, Iterator first, Iterator last)#
-
bootstrap_analysis analyse_samples(double confidence_level, unsigned int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last)#
-
template<typename Estimator>
Estimate<double> bootstrap(double confidence_level, std::vector<double>::iterator first, std::vector<double>::iterator last, sample const &resample, Estimator &&estimator)#
-
OutlierClassification classify_outliers(std::vector<double>::const_iterator first, std::vector<double>::const_iterator last)#
-
template<typename Fun, typename ...Args>
CompleteType_t<FunctionReturnType<Fun, Args...>> complete_invoke(Fun &&fun, Args&&... args)#
-
bool directCompare(double lhs, double rhs)#
-
double erfc_inv(double x)#
-
template<typename Clock>
EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_cost(FloatDuration<Clock> resolution)#
-
template<typename Clock>
EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_resolution(int iterations)#
-
template<typename Estimator>
sample jackknife(Estimator &&estimator, std::vector<double>::iterator first, std::vector<double>::iterator last)#
-
template<typename Clock, typename Fun, typename ...Args>
TimingOf<Clock, Fun, Args...> measure(Fun &&fun, Args&&... args)#
-
template<typename Clock>
Environment<FloatDuration<Clock>> measure_environment()#
-
template<typename Clock, typename Fun>
TimingOf<Clock, Fun, int> measure_one(Fun &&fun, int iters, std::false_type)#
-
template<typename Clock, typename Fun>
TimingOf<Clock, Fun, Chronometer> measure_one(Fun &&fun, int iters, std::true_type)#
-
inline double normal_cdf(double x)#
-
double normal_quantile(double p)#
-
template<typename Clock, typename Fun>
TimingOf<Clock, Fun, run_for_at_least_argument_t<Clock, Fun>> run_for_at_least(ClockDuration<Clock> how_long, const int initial_iterations, Fun &&fun)#
-
void throw_optimized_away_error()#
-
template<typename Clock>
int warmup()#
-
template<typename T>
-
namespace [anonymous]#
-
namespace Clara#
Enums
Variables
-
constexpr accept_many_t accept_many = {}#
-
constexpr accept_many_t accept_many = {}#
-
namespace Detail#
Typedefs
-
using InternalParseResult = BasicResult<ParseState>#
-
using ParserResult = BasicResult<ParseResultType>#
-
using Result = BasicResult<void>#
Enums
Functions
-
ParserResult convertInto(std::string const &source, bool &target)#
-
ParserResult convertInto(std::string const &source, std::string &target)#
-
template<typename T>
ParserResult convertInto(std::string const &source, T &target)#
-
template<typename ArgType, typename L>
auto invokeLambda(L const &lambda, std::string const &arg) -> ParserResult#
-
using InternalParseResult = BasicResult<ParseState>#
-
namespace Detail#
-
Functions
-
template<typename ForwardIter1, typename Sentinel1, typename ForwardIter2, typename Sentinel2, typename Comparator>
bool check_element_counts(ForwardIter1 first_1, const Sentinel1 end_1, ForwardIter2 first_2, const Sentinel2 end_2, Comparator cmp)#
-
std::string convertIntoString(StringRef string)#
Encases
stringin quotes, and escapes invisibles if user requested it via CLI.
-
std::string convertIntoString(StringRef string, bool escapeInvisibles)#
Encases `string in quotes, and optionally escapes invisibles.
-
uint64_t convertToBits(double d)#
-
uint32_t convertToBits(float f)#
-
template<typename T>
std::enable_if_t<!std::is_enum<T>::value && !std::is_base_of<std::exception, T>::value, std::string> convertUnstreamable(T const&)#
-
template<typename T>
std::enable_if_t<!std::is_enum<T>::value && std::is_base_of<std::exception, T>::value, std::string> convertUnstreamable(T const &ex)#
-
template<typename T>
std::enable_if_t<std::is_enum<T>::value, std::string> convertUnstreamable(T const &value)#
-
template<typename ForwardIter, typename Sentinel, typename T, typename Comparator>
std::ptrdiff_t count_sentinel(ForwardIter start, Sentinel sentinel, T const &value, Comparator cmp)#
-
template<typename ForwardIter, typename Sentinel, typename T, typename Comparator>
ForwardIter find_sentinel(ForwardIter start, Sentinel sentinel, T const &value, Comparator cmp)#
-
char const *getEnv(char const *varName)#
Wrapper over
std::getenvthat compiles on UWP (and always returns nullptr there)
-
template<typename ForwardIter1, typename Sentinel1, typename ForwardIter2, typename Sentinel2, typename Comparator>
bool is_permutation(ForwardIter1 first_1, const Sentinel1 end_1, ForwardIter2 first_2, const Sentinel2 end_2, Comparator cmp)#
-
template<typename T, typename ...Args>
unique_ptr<T> make_unique(Args&&... args)#
-
Catch::Detail::unique_ptr<EnumInfo> makeEnumInfo(StringRef enumName, StringRef allValueNames, std::vector<int> const &values)#
-
template<typename InputIterator, typename Sentinel = InputIterator>
std::string rangeToString(InputIterator first, Sentinel last)#
-
void registerListenerImpl(Detail::unique_ptr<EventListenerFactory> listenerFactory)#
Actually registers the factory, independent on listener’s concrete type.
-
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.
-
void registerTranslatorImpl(Detail::unique_ptr<IExceptionTranslator> &&translator)#
-
template<typename ForwardIter>
std::ptrdiff_t sentinel_distance(ForwardIter first, ForwardIter last)#
-
template<typename ForwardIter, typename Sentinel>
std::enable_if_t<!std::is_same<ForwardIter, Sentinel>::value, std::ptrdiff_t> sentinel_distance(ForwardIter iter, const Sentinel sentinel)#
-
std::vector<std::string> splitReporterSpec(StringRef reporterSpec)#
Splits the reporter spec into reporter name and kv-pair options.
-
Optional<ColourMode> stringToColourMode(StringRef colourMode)#
-
template<typename ForwardIter1, typename Sentinel1, typename ForwardIter2, typename Sentinel2, typename Comparator>
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace [anonymous]#
-
namespace Generators#
Typedefs
-
typedef Catch::Detail::unique_ptr<GeneratorUntypedBase> GeneratorBasePtr#
-
template<typename T>
using GeneratorPtr = Catch::Detail::unique_ptr<IGenerator<T>>#
Functions
-
IGeneratorTracker *acquireGeneratorTracker(StringRef generatorName, SourceLineInfo const &lineInfo)#
-
template<typename T>
GeneratorWrapper<std::vector<T>> chunk(size_t size, GeneratorWrapper<T> &&generator)#
-
IGeneratorTracker *createGeneratorTracker(StringRef generatorName, SourceLineInfo lineInfo, GeneratorBasePtr &&generator)#
-
template<typename T, typename Predicate>
GeneratorWrapper<T> filter(Predicate &&pred, GeneratorWrapper<T> &&generator)#
-
template<typename Container, typename ResultType = typename Container::value_type>
GeneratorWrapper<ResultType> from_range(Container const &cnt)#
-
template<typename InputIterator, typename InputSentinel, typename ResultType = typename std::iterator_traits<InputIterator>::value_type>
GeneratorWrapper<ResultType> from_range(InputIterator from, InputSentinel to)#
- template<typename L> auto generate (StringRef generatorName, SourceLineInfo const &lineInfo, L const &generatorExpression) -> typename decltype(generatorExpression())::type
-
template<typename T, typename U, typename ...Gs>
auto makeGenerators(as<T>, U &&val, Gs&&... moreGenerators) -> Generators<T>#
-
template<typename T>
auto makeGenerators(GeneratorWrapper<T> &&generator) -> Generators<T>#
-
template<typename T, typename ...Gs>
auto makeGenerators(GeneratorWrapper<T> &&generator, Gs&&... moreGenerators) -> Generators<T>#
-
template<typename T, typename ...Gs>
auto makeGenerators(T &&val, Gs&&... moreGenerators) -> Generators<std::decay_t<T>>#
-
template<typename Func, typename U, typename T = FunctionReturnType<Func, U>>
GeneratorWrapper<T> map(Func &&function, GeneratorWrapper<U> &&generator)#
-
template<typename T>
std::enable_if_t<std::is_integral<T>::value, GeneratorWrapper<T>> random(T a, T b)#
-
template<typename T>
std::enable_if_t<std::is_floating_point<T>::value, GeneratorWrapper<T>> random(T a, T b)#
-
template<typename T>
GeneratorWrapper<T> range(T const &start, T const &end)#
-
template<typename T>
GeneratorWrapper<T> repeat(size_t repeats, GeneratorWrapper<T> &&generator)#
-
template<typename ...Ts>
GeneratorWrapper<std::tuple<std::decay_t<Ts>...>> table(std::initializer_list<std::tuple<std::decay_t<Ts>...>> tuples)#
-
template<typename T>
GeneratorWrapper<T> take(size_t target, GeneratorWrapper<T> &&generator)#
-
template<typename T, typename DecayedT = std::decay_t<T>>
GeneratorWrapper<DecayedT> value(T &&value)#
-
template<typename T>
GeneratorWrapper<T> values(std::initializer_list<T> values)#
-
typedef Catch::Detail::unique_ptr<GeneratorUntypedBase> GeneratorBasePtr#
-
namespace [anonymous]#
-
namespace Detail#
Functions
-
void throw_generator_exception(char const *msg)#
Throws GeneratorException with the provided message.
-
void throw_generator_exception(char const *msg)#
-
namespace literals#
-
namespace Matchers#
Functions
-
template<typename Matcher>
AllMatchMatcher<Matcher> AllMatch(Matcher &&matcher)#
-
AllTrueMatcher AllTrue()#
-
template<typename Matcher>
AnyMatchMatcher<Matcher> AnyMatch(Matcher &&matcher)#
-
AnyTrueMatcher AnyTrue()#
-
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
comparatoras an element.
-
template<typename Matcher>
std::enable_if_t<Detail::is_matcher<Matcher>::value, ContainsMatcherMatcher<Matcher>> Contains(Matcher &&matcher)# Creates a matcher that checks whether a range contains element matching a matcher.
-
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
-
template<typename T>
std::enable_if_t<!Detail::is_matcher<T>::value, ContainsElementMatcher<T, std::equal_to<>>> Contains(T &&elem)# Creates a matcher that checks whether a range contains a specific element.
Uses
std::equal_toto do the comparison
-
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
eqto do the comparisons, the element is provided on the rhs
-
StringContainsMatcher ContainsSubstring(std::string const &str, CaseSensitive caseSensitivity = CaseSensitive::Yes)#
Creates matcher that accepts strings that contain
str
-
EndsWithMatcher EndsWith(std::string const &str, CaseSensitive caseSensitivity = CaseSensitive::Yes)#
Creates matcher that accepts strings that end with
str
-
StringEqualsMatcher Equals(std::string const &str, CaseSensitive caseSensitivity = CaseSensitive::Yes)#
Creates matcher that accepts strings that are exactly equal to
str
-
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
-
IsEmptyMatcher IsEmpty()#
Creates a matcher that accepts empty ranges/containers.
-
IsNaNMatcher IsNaN()#
-
RegexMatcher Matches(std::string const ®ex, CaseSensitive caseSensitivity = CaseSensitive::Yes)#
Creates matcher that accepts strings matching
regex
-
ExceptionMessageMatcher Message(std::string const &message)#
Creates a matcher that checks whether a std derived exception has the provided message.
-
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.
-
template<typename Matcher>
NoneMatchMatcher<Matcher> NoneMatch(Matcher &&matcher)#
-
NoneTrueMatcher NoneTrue()#
-
template<typename T>
Detail::MatchNotOf<T> operator!(MatcherBase<T> const &matcher)#
-
template<typename MatcherT>
std::enable_if_t<Detail::is_generic_matcher<MatcherT>::value, Detail::MatchNotOfGeneric<MatcherT>> operator!(MatcherT const &matcher)# Wrap provided generic matcher in generic negator.
-
template<typename ArgLHS, typename MatcherRHS>
std::enable_if_t<Detail::is_generic_matcher<MatcherRHS>::value, Detail::MatchAllOfGeneric<MatcherBase<ArgLHS>, MatcherRHS>> operator&&(MatcherBase<ArgLHS> const &lhs, MatcherRHS const &rhs)#
-
template<typename T>
Detail::MatchAllOf<T> operator&&(MatcherBase<T> const &lhs, MatcherBase<T> const &rhs)#
-
template<typename MatcherLHS, typename ArgRHS>
std::enable_if_t<Detail::is_generic_matcher<MatcherLHS>::value, Detail::MatchAllOfGeneric<MatcherLHS, MatcherBase<ArgRHS>>> operator&&(MatcherLHS const &lhs, MatcherBase<ArgRHS> const &rhs)#
-
template<typename MatcherLHS, typename MatcherRHS>
std::enable_if_t<Detail::are_generic_matchers<MatcherLHS, MatcherRHS>::value, Detail::MatchAllOfGeneric<MatcherLHS, MatcherRHS>> operator&&(MatcherLHS const &lhs, MatcherRHS const &rhs)#
-
template<typename ArgLHS, typename MatcherRHS>
std::enable_if_t<Detail::is_generic_matcher<MatcherRHS>::value, Detail::MatchAnyOfGeneric<MatcherBase<ArgLHS>, MatcherRHS>> operator||(MatcherBase<ArgLHS> const &lhs, MatcherRHS const &rhs)#
-
template<typename T>
Detail::MatchAnyOf<T> operator||(MatcherBase<T> const &lhs, MatcherBase<T> const &rhs)#
-
template<typename MatcherLHS, typename ArgRHS>
std::enable_if_t<Detail::is_generic_matcher<MatcherLHS>::value, Detail::MatchAnyOfGeneric<MatcherLHS, MatcherBase<ArgRHS>>> operator||(MatcherLHS const &lhs, MatcherBase<ArgRHS> const &rhs)#
-
template<typename MatcherLHS, typename MatcherRHS>
std::enable_if_t<Detail::are_generic_matchers<MatcherLHS, MatcherRHS>::value, Detail::MatchAnyOfGeneric<MatcherLHS, MatcherRHS>> operator||(MatcherLHS const &lhs, MatcherRHS const &rhs)#
-
template<typename T, typename Pred>
PredicateMatcher<T, Pred> Predicate(Pred &&predicate, std::string const &description = "")# Creates a matcher that calls delegates
matchto the provided predicate.The user has to explicitly specify the argument type to the matcher
-
template<typename RangeLike>
std::enable_if_t<!Detail::is_matcher<RangeLike>::value, RangeEqualsMatcher<RangeLike, std::equal_to<>>> RangeEquals(RangeLike &&range)# Creates a matcher that checks if all elements in a range are equal to all elements in another range.
Uses
std::equal_toto do the comparison
-
template<typename RangeLike, typename Equality>
RangeEqualsMatcher<RangeLike, Equality> RangeEquals(RangeLike &&range, Equality &&predicate)# Creates a matcher that checks if all elements in a range are equal to all elements in another range.
Uses to provided predicate
predicateto do the comparisons
-
template<typename Matcher>
std::enable_if_t<Detail::is_matcher<Matcher>::value, SizeMatchesMatcher<Matcher>> SizeIs(Matcher &&m)#
-
HasSizeMatcher SizeIs(std::size_t sz)#
Creates a matcher that accepts ranges/containers with specific size.
-
StartsWithMatcher StartsWith(std::string const &str, CaseSensitive caseSensitivity = CaseSensitive::Yes)#
Creates matcher that accepts strings that start with
str
-
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
targetmodulo permutation.
-
template<typename RangeLike>
std::enable_if_t<!Detail::is_matcher<RangeLike>::value, UnorderedRangeEqualsMatcher<RangeLike, std::equal_to<>>> UnorderedRangeEquals(RangeLike &&range)# Creates a matcher that checks if all elements in a range are equal to all elements in another range, in some permutation.
Uses
std::equal_toto do the comparison
-
template<typename RangeLike, typename Equality>
UnorderedRangeEqualsMatcher<RangeLike, Equality> UnorderedRangeEquals(RangeLike &&range, Equality &&predicate)# Creates a matcher that checks if all elements in a range are equal to all elements in another range, in some permutation.
Uses to provided predicate
predicateto do the comparisons
-
template<typename T, typename Alloc = std::allocator<T>>
VectorContainsElementMatcher<T, Alloc> VectorContains(T const &comparator)# Creates a matcher that matches vectors that contain
comparatoras an element.
-
WithinAbsMatcher WithinAbs(double target, double margin)#
Creates a matcher that accepts numbers within certain range of target.
-
WithinRelMatcher WithinRel(double target)#
Creates a matcher that accepts doubles within 100*DBL_EPS relative range of target.
-
WithinRelMatcher WithinRel(double target, double 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.
-
WithinRelMatcher WithinRel(float target, float eps)#
Creates a matcher that accepts doubles within certain relative range of target.
-
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.
-
template<typename Matcher>
-
namespace Detail#
Typedefs
-
template<typename ...Ts>
using are_generic_matchers = Catch::Detail::conjunction<is_generic_matcher<Ts>...>#
Functions
-
template<std::size_t N, std::size_t M>
std::array<void const*, N + M> array_cat(std::array<void const*, N> &&lhs, std::array<void const*, M> &&rhs)#
-
template<std::size_t N>
std::array<void const*, N + 1> array_cat(std::array<void const*, N> &&lhs, void const *rhs)#
-
template<std::size_t N>
std::array<void const*, N + 1> array_cat(void const *lhs, std::array<void const*, N> &&rhs)#
-
template<typename ...MatcherTs, std::size_t... Idx>
std::string describe_multi_matcher(StringRef combine, std::array<void const*, sizeof...(MatcherTs)> const &matchers, std::index_sequence<Idx...>)#
-
std::string describe_multi_matcher(StringRef combine, std::string const *descriptions_begin, std::string const *descriptions_end)#
-
template<std::size_t N, typename Arg>
bool match_all_of(Arg&&, std::array<void const*, N> const&, std::index_sequence<>)#
-
template<typename T, typename ...MatcherTs, std::size_t N, typename Arg, std::size_t Idx, std::size_t... Indices>
bool match_all_of(Arg &&arg, std::array<void const*, N> const &matchers, std::index_sequence<Idx, Indices...>)#
-
template<std::size_t N, typename Arg>
bool match_any_of(Arg&&, std::array<void const*, N> const&, std::index_sequence<>)#
-
template<typename T, typename ...MatcherTs, std::size_t N, typename Arg, std::size_t Idx, std::size_t... Indices>
bool match_any_of(Arg &&arg, std::array<void const*, N> const &matchers, std::index_sequence<Idx, Indices...>)#
-
template<typename ArgT>
MatchAllOf<ArgT> operator&&(MatchAllOf<ArgT> const &lhs, MatcherBase<ArgT> const &rhs) = delete# 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) = delete# lvalue overload is intentionally deleted, users should not be trying to compose stored composition matchers
-
template<typename ArgT>
MatchAnyOf<ArgT> operator||(MatchAnyOf<ArgT> const &lhs, MatcherBase<ArgT> const &rhs) = delete# 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) = delete# lvalue overload is intentionally deleted, users should not be trying to compose stored composition matchers
-
template<typename ...Ts>
-
namespace TextFlow#
-
namespace decltypeis_callable_tester#
-
namespace mpl_#
-
namespace std#
STL namespace.
- file catch_benchmark.hpp
- #include <catch2/catch_user_config.hpp>#include <catch2/internal/catch_context.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <catch2/internal/catch_unique_name.hpp>#include <catch2/benchmark/catch_clock.hpp>#include <catch2/benchmark/catch_environment.hpp>#include <catch2/benchmark/catch_execution_plan.hpp>#include <catch2/benchmark/detail/catch_analyse.hpp>#include <algorithm>#include <chrono>#include <exception>#include <functional>#include <string>#include <vector>#include <cmath>
- file catch_benchmark_all.hpp
- #include <catch2/benchmark/catch_benchmark.hpp>#include <catch2/benchmark/catch_chronometer.hpp>#include <catch2/benchmark/catch_clock.hpp>#include <catch2/benchmark/catch_constructor.hpp>#include <catch2/benchmark/catch_environment.hpp>#include <catch2/benchmark/catch_estimate.hpp>#include <catch2/benchmark/catch_execution_plan.hpp>#include <catch2/benchmark/catch_optimizer.hpp>#include <catch2/benchmark/catch_sample_analysis.hpp>#include <catch2/benchmark/detail/catch_analyse.hpp>#include <catch2/benchmark/detail/catch_measure.hpp>#include <catch2/benchmark/detail/catch_repeat.hpp>#include <catch2/benchmark/detail/catch_stats.hpp>#include <catch2/benchmark/detail/catch_timing.hpp>
This is a convenience header for Catch2’s benchmarking.
It includes all of Catch2 headers related to benchmarking.
Generally the Catch2 users should use specific includes they need, but this header can be used instead for ease-of-experimentation, or just plain convenience, at the cost of (significantly) increased compilation times.
When a new header is added to either the
benchmarkfolder, or to the corresponding internal (detail) subfolder, it should be added here.
- file catch_chronometer.cpp
- #include <catch2/benchmark/catch_chronometer.hpp>
- file catch_chronometer.hpp
- #include <catch2/benchmark/catch_clock.hpp>#include <catch2/benchmark/catch_optimizer.hpp>#include <catch2/internal/catch_meta.hpp>#include <catch2/internal/catch_move_and_forward.hpp>
- file catch_clock.hpp
- #include <chrono>#include <ratio>
- file catch_constructor.hpp
- #include <catch2/internal/catch_move_and_forward.hpp>#include <type_traits>
- file catch_environment.hpp
- #include <catch2/benchmark/catch_clock.hpp>
- file catch_estimate.hpp
- file catch_execution_plan.hpp
-
#include <catch2/benchmark/catch_clock.hpp>#include <catch2/benchmark/catch_environment.hpp>#include <catch2/benchmark/detail/catch_repeat.hpp>#include <vector>
- file catch_optimizer.hpp
- #include <catch2/internal/catch_move_and_forward.hpp>#include <type_traits>
- file catch_outlier_classification.hpp
- file catch_sample_analysis.hpp
- #include <catch2/benchmark/catch_estimate.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <vector>
- file catch_analyse.hpp
- #include <catch2/benchmark/catch_environment.hpp>#include <catch2/benchmark/catch_sample_analysis.hpp>#include <catch2/benchmark/detail/catch_stats.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <vector>
- file catch_benchmark_function.cpp
- file catch_benchmark_function.hpp
- #include <catch2/benchmark/catch_chronometer.hpp>#include <catch2/internal/catch_meta.hpp>#include <catch2/internal/catch_unique_ptr.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <type_traits>
- file catch_benchmark_stats.hpp
- #include <catch2/internal/catch_move_and_forward.hpp>#include <catch2/benchmark/catch_estimate.hpp>#include <string>#include <vector>
- file catch_benchmark_stats_fwd.hpp
- #include <chrono>
- file catch_complete_invoke.hpp
- #include <catch2/internal/catch_meta.hpp>#include <catch2/internal/catch_move_and_forward.hpp>
- file catch_estimate_clock.hpp
- #include <catch2/benchmark/catch_clock.hpp>#include <catch2/benchmark/catch_environment.hpp>#include <catch2/benchmark/detail/catch_stats.hpp>#include <catch2/benchmark/detail/catch_measure.hpp>#include <catch2/internal/catch_unique_ptr.hpp>#include <algorithm>#include <vector>#include <cmath>
- file catch_measure.hpp
-
#include <catch2/benchmark/detail/catch_timing.hpp>#include <catch2/internal/catch_move_and_forward.hpp>
- file catch_repeat.hpp
- #include <type_traits>#include <catch2/internal/catch_move_and_forward.hpp>
- file catch_run_for_at_least.cpp
-
#include <catch2/internal/catch_enforce.hpp>#include <exception>
- file catch_run_for_at_least.hpp
- #include <catch2/benchmark/catch_clock.hpp>#include <catch2/benchmark/catch_chronometer.hpp>#include <catch2/benchmark/detail/catch_measure.hpp>#include <catch2/benchmark/detail/catch_timing.hpp>#include <catch2/internal/catch_meta.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <type_traits>
- file catch_stats.cpp
- #include <catch2/benchmark/detail/catch_stats.hpp>#include <cassert>#include <cstddef>#include <numeric>#include <random>
- file catch_stats.hpp
- #include <catch2/benchmark/catch_estimate.hpp>#include <algorithm>#include <vector>#include <cmath>
- file catch_timing.hpp
- #include <catch2/benchmark/catch_clock.hpp>#include <type_traits>
- file catch_all.hpp
- #include <catch2/benchmark/catch_benchmark_all.hpp>#include <catch2/catch_approx.hpp>#include <catch2/catch_assertion_info.hpp>#include <catch2/catch_assertion_result.hpp>#include <catch2/catch_config.hpp>#include <catch2/catch_get_random_seed.hpp>#include <catch2/catch_message.hpp>#include <catch2/catch_section_info.hpp>#include <catch2/catch_session.hpp>#include <catch2/catch_tag_alias.hpp>#include <catch2/catch_tag_alias_autoregistrar.hpp>#include <catch2/catch_template_test_macros.hpp>#include <catch2/catch_test_case_info.hpp>#include <catch2/catch_test_macros.hpp>#include <catch2/catch_test_spec.hpp>#include <catch2/catch_timer.hpp>#include <catch2/catch_tostring.hpp>#include <catch2/catch_totals.hpp>#include <catch2/catch_translate_exception.hpp>#include <catch2/catch_version.hpp>#include <catch2/catch_version_macros.hpp>#include <catch2/generators/catch_generators_all.hpp>#include <catch2/interfaces/catch_interfaces_all.hpp>#include <catch2/internal/catch_assertion_handler.hpp>#include <catch2/internal/catch_case_sensitive.hpp>#include <catch2/internal/catch_clara.hpp>#include <catch2/internal/catch_commandline.hpp>#include <catch2/internal/catch_compare_traits.hpp>#include <catch2/internal/catch_config_counter.hpp>#include <catch2/internal/catch_config_wchar.hpp>#include <catch2/internal/catch_console_colour.hpp>#include <catch2/internal/catch_console_width.hpp>#include <catch2/internal/catch_context.hpp>#include <catch2/internal/catch_debug_console.hpp>#include <catch2/internal/catch_debugger.hpp>#include <catch2/internal/catch_decomposer.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_errno_guard.hpp>#include <catch2/internal/catch_getenv.hpp>#include <catch2/internal/catch_is_permutation.hpp>#include <catch2/internal/catch_istream.hpp>#include <catch2/internal/catch_lazy_expr.hpp>#include <catch2/internal/catch_leak_detector.hpp>#include <catch2/internal/catch_list.hpp>#include <catch2/internal/catch_logical_traits.hpp>#include <catch2/internal/catch_message_info.hpp>#include <catch2/internal/catch_meta.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <catch2/internal/catch_noncopyable.hpp>#include <catch2/internal/catch_optional.hpp>#include <catch2/internal/catch_output_redirect.hpp>#include <catch2/internal/catch_parse_numbers.hpp>#include <catch2/internal/catch_platform.hpp>#include <catch2/internal/catch_polyfills.hpp>#include <catch2/internal/catch_preprocessor.hpp>#include <catch2/internal/catch_reporter_registry.hpp>#include <catch2/internal/catch_result_type.hpp>#include <catch2/internal/catch_run_context.hpp>#include <catch2/internal/catch_section.hpp>#include <catch2/internal/catch_sharding.hpp>#include <catch2/internal/catch_singletons.hpp>#include <catch2/internal/catch_source_line_info.hpp>#include <catch2/internal/catch_stdstreams.hpp>#include <catch2/internal/catch_stream_end_stop.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <catch2/internal/catch_stringref.hpp>#include <catch2/internal/catch_tag_alias_registry.hpp>#include <catch2/internal/catch_test_case_tracker.hpp>#include <catch2/internal/catch_test_macro_impl.hpp>#include <catch2/internal/catch_test_registry.hpp>#include <catch2/internal/catch_test_run_info.hpp>#include <catch2/internal/catch_test_spec_parser.hpp>#include <catch2/internal/catch_textflow.hpp>#include <catch2/internal/catch_to_string.hpp>#include <catch2/internal/catch_unique_name.hpp>#include <catch2/internal/catch_unique_ptr.hpp>#include <catch2/internal/catch_void_type.hpp>#include <catch2/internal/catch_wildcard_pattern.hpp>#include <catch2/internal/catch_xmlwriter.hpp>#include <catch2/matchers/catch_matchers_all.hpp>#include <catch2/reporters/catch_reporters_all.hpp>
This is a convenience header for Catch2.
It includes all of Catch2 headers.
Generally the Catch2 users should use specific includes they need, but this header can be used instead for ease-of-experimentation, or just plain convenience, at the cost of (significantly) increased compilation times.
When a new header is added to either the top level folder, or to the corresponding internal subfolder, it should be added here. Headers added to the various subparts (e.g. matchers, generators, etc…), should go their respective catch-all headers.
- file catch_approx.cpp
- #include <catch2/catch_approx.hpp>#include <catch2/internal/catch_enforce.hpp>#include <cmath>#include <limits>
- file catch_approx.hpp
- #include <catch2/catch_tostring.hpp>#include <type_traits>
- file catch_assertion_info.hpp
- #include <catch2/internal/catch_result_type.hpp>#include <catch2/internal/catch_source_line_info.hpp>#include <catch2/internal/catch_stringref.hpp>
- file catch_assertion_result.cpp
- #include <catch2/catch_assertion_result.hpp>#include <catch2/internal/catch_move_and_forward.hpp>
- file catch_assertion_result.hpp
- #include <catch2/catch_assertion_info.hpp>#include <catch2/internal/catch_result_type.hpp>#include <catch2/internal/catch_source_line_info.hpp>#include <catch2/internal/catch_stringref.hpp>#include <catch2/internal/catch_lazy_expr.hpp>#include <string>
- file catch_config.cpp
- #include <catch2/catch_config.hpp>#include <catch2/catch_user_config.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_parse_numbers.hpp>#include <catch2/internal/catch_stdstreams.hpp>#include <catch2/internal/catch_stringref.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <catch2/internal/catch_test_spec_parser.hpp>#include <catch2/internal/catch_getenv.hpp>#include <fstream>
- file catch_config.hpp
- #include <catch2/catch_test_spec.hpp>#include <catch2/internal/catch_unique_ptr.hpp>#include <catch2/internal/catch_optional.hpp>#include <catch2/internal/catch_stringref.hpp>#include <chrono>#include <map>#include <string>#include <vector>
- file catch_get_random_seed.cpp
- #include <catch2/catch_get_random_seed.hpp>#include <catch2/internal/catch_context.hpp>#include <catch2/catch_config.hpp>
- file catch_get_random_seed.hpp
- #include <cstdint>
- file catch_message.cpp
- #include <catch2/catch_message.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <cassert>#include <stack>
- file catch_message.hpp
- #include <catch2/internal/catch_result_type.hpp>#include <catch2/internal/catch_stream_end_stop.hpp>#include <catch2/internal/catch_message_info.hpp>#include <catch2/catch_tostring.hpp>#include <string>#include <vector>
- file catch_registry_hub.cpp
-
#include <catch2/internal/catch_context.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_reporter_registry.hpp>#include <catch2/internal/catch_tag_alias_registry.hpp>#include <catch2/internal/catch_singletons.hpp>#include <catch2/catch_test_case_info.hpp>#include <catch2/internal/catch_noncopyable.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <exception>
- file catch_section_info.hpp
- #include <catch2/internal/catch_move_and_forward.hpp>#include <catch2/internal/catch_source_line_info.hpp>#include <catch2/internal/catch_stringref.hpp>#include <catch2/catch_totals.hpp>#include <string>
- file catch_session.cpp
- #include <catch2/catch_session.hpp>#include <catch2/internal/catch_console_colour.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_list.hpp>#include <catch2/internal/catch_context.hpp>#include <catch2/internal/catch_run_context.hpp>#include <catch2/catch_test_spec.hpp>#include <catch2/catch_version.hpp>#include <catch2/internal/catch_sharding.hpp>#include <catch2/internal/catch_textflow.hpp>#include <catch2/internal/catch_windows_h_proxy.hpp>#include <catch2/reporters/catch_reporter_multi.hpp>#include <catch2/internal/catch_reporter_registry.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <catch2/internal/catch_stdstreams.hpp>#include <catch2/internal/catch_istream.hpp>#include <algorithm>#include <cassert>#include <exception>#include <iomanip>#include <set>
- file catch_session.hpp
- #include <catch2/internal/catch_commandline.hpp>#include <catch2/internal/catch_noncopyable.hpp>#include <catch2/catch_config.hpp>#include <catch2/internal/catch_unique_ptr.hpp>#include <catch2/internal/catch_config_wchar.hpp>
- file catch_tag_alias.hpp
- #include <catch2/internal/catch_source_line_info.hpp>#include <string>
- file catch_tag_alias_autoregistrar.cpp
- #include <catch2/catch_tag_alias_autoregistrar.hpp>
- file catch_tag_alias_autoregistrar.hpp
-
#include <catch2/internal/catch_unique_name.hpp>#include <catch2/internal/catch_source_line_info.hpp>
Defines
-
CATCH_REGISTER_TAG_ALIAS(alias, spec)#
-
CATCH_REGISTER_TAG_ALIAS(alias, spec)#
- file catch_template_test_macros.hpp
- #include <catch2/catch_test_macros.hpp>#include <catch2/internal/catch_preprocessor.hpp>
Defines
-
TEMPLATE_LIST_TEST_CASE(...)#
-
TEMPLATE_LIST_TEST_CASE_METHOD(className, ...)#
-
TEMPLATE_PRODUCT_TEST_CASE(...)#
-
TEMPLATE_PRODUCT_TEST_CASE_METHOD(className, ...)#
-
TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG(className, ...)#
-
TEMPLATE_PRODUCT_TEST_CASE_SIG(...)#
-
TEMPLATE_TEST_CASE(...)#
-
TEMPLATE_TEST_CASE_METHOD(className, ...)#
-
TEMPLATE_TEST_CASE_METHOD_SIG(className, ...)#
-
TEMPLATE_TEST_CASE_SIG(...)#
-
TEMPLATE_LIST_TEST_CASE(...)#
- file catch_test_case_info.cpp
- #include <catch2/catch_test_case_info.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <cassert>#include <cctype>#include <algorithm>
- file catch_test_case_info.hpp
- #include <catch2/internal/catch_source_line_info.hpp>#include <catch2/internal/catch_noncopyable.hpp>#include <catch2/internal/catch_stringref.hpp>#include <catch2/internal/catch_test_registry.hpp>#include <catch2/internal/catch_unique_ptr.hpp>#include <cstdint>#include <string>#include <vector>
- file catch_test_macros.hpp
- #include <catch2/internal/catch_test_macro_impl.hpp>#include <catch2/catch_message.hpp>#include <catch2/catch_user_config.hpp>#include <catch2/internal/catch_section.hpp>#include <catch2/internal/catch_test_registry.hpp>#include <catch2/internal/catch_unique_name.hpp>
Defines
-
AND_GIVEN(desc)#
-
AND_THEN(desc)#
-
AND_WHEN(desc)#
-
CHECK(...)#
-
CHECK_FALSE(...)#
-
CHECK_NOFAIL(...)#
-
CHECK_NOTHROW(...)#
-
CHECK_THROWS(...)#
-
CHECK_THROWS_AS(expr, exceptionType)#
-
CHECKED_ELSE(...)#
-
CHECKED_IF(...)#
-
DYNAMIC_SECTION(...)#
-
FAIL(...)#
-
FAIL_CHECK(...)#
-
GIVEN(desc)#
-
METHOD_AS_TEST_CASE(method, ...)#
-
REGISTER_TEST_CASE(Function, ...)#
-
REQUIRE(...)#
-
REQUIRE_FALSE(...)#
-
REQUIRE_NOTHROW(...)#
-
REQUIRE_THROWS(...)#
-
REQUIRE_THROWS_AS(expr, exceptionType)#
-
SCENARIO(...)#
-
SCENARIO_METHOD(className, ...)#
-
SECTION(...)#
-
SKIP(...)#
-
STATIC_CHECK(...)#
-
STATIC_CHECK_FALSE(...)#
-
STATIC_REQUIRE(...)#
-
STATIC_REQUIRE_FALSE(...)#
-
SUCCEED(...)#
-
TEST_CASE(...)#
-
TEST_CASE_METHOD(className, ...)#
-
THEN(desc)#
-
WHEN(desc)#
-
AND_GIVEN(desc)#
- file catch_test_spec.cpp
- #include <catch2/catch_test_spec.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <catch2/catch_test_case_info.hpp>#include <algorithm>#include <string>#include <vector>#include <ostream>
- file catch_test_spec.hpp
- #include <catch2/internal/catch_unique_ptr.hpp>#include <catch2/internal/catch_wildcard_pattern.hpp>#include <iosfwd>#include <string>#include <vector>
- file catch_timer.cpp
- #include <catch2/catch_timer.hpp>#include <chrono>
- file catch_timer.hpp
- #include <cstdint>
- file catch_tostring.cpp
- #include <catch2/catch_tostring.hpp>#include <catch2/internal/catch_context.hpp>#include <catch2/internal/catch_polyfills.hpp>#include <cmath>#include <iomanip>
- file catch_tostring.hpp
- #include <vector>#include <cstddef>#include <type_traits>#include <string>#include <catch2/internal/catch_config_wchar.hpp>#include <catch2/internal/catch_void_type.hpp>#include <ctime>#include <ratio>#include <chrono>
Functions
-
std::ostream &operator<<(std::ostream&, Catch_global_namespace_dummy)#
-
std::ostream &operator<<(std::ostream&, Catch_global_namespace_dummy)#
- file catch_totals.cpp
- #include <catch2/catch_totals.hpp>
- file catch_totals.hpp
- #include <cstdint>
- file catch_translate_exception.cpp
- #include <catch2/catch_translate_exception.hpp>
- file catch_translate_exception.hpp
-
#include <catch2/internal/catch_unique_name.hpp>#include <exception>
- file catch_version.cpp
- #include <catch2/catch_version.hpp>#include <ostream>
- file catch_version.hpp
- #include <iosfwd>
- file catch_version_macros.hpp
- file catch_generator_exception.cpp
- file catch_generator_exception.hpp
- #include <exception>
- file catch_generators.cpp
- #include <catch2/generators/catch_generators.hpp>#include <catch2/internal/catch_enforce.hpp>
- file catch_generators.hpp
- #include <catch2/catch_tostring.hpp>#include <catch2/internal/catch_source_line_info.hpp>#include <catch2/internal/catch_stringref.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <catch2/internal/catch_unique_name.hpp>#include <vector>#include <tuple>
- file catch_generators_adapters.hpp
- #include <catch2/generators/catch_generators.hpp>#include <catch2/internal/catch_meta.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <cassert>
- file catch_generators_all.hpp
-
#include <catch2/generators/catch_generators.hpp>#include <catch2/generators/catch_generators_range.hpp>
This is a convenience header for Catch2’s Generator support.
It includes all of Catch2 headers related to generators.
Generally the Catch2 users should use specific includes they need, but this header can be used instead for ease-of-experimentation, or just plain convenience, at the cost of (significantly) increased compilation times.
When a new header is added to either the
generatorsfolder, or to the corresponding internal subfolder, it should be added here.
- file catch_generators_random.cpp
-
#include <catch2/internal/catch_context.hpp>
- file catch_generators_random.hpp
- #include <catch2/internal/catch_context.hpp>#include <catch2/generators/catch_generators.hpp>#include <random>
- file catch_generators_range.hpp
- #include <catch2/generators/catch_generators.hpp>#include <iterator>#include <type_traits>
- file catch_interfaces_all.hpp
-
This is a convenience header for Catch2’s interfaces.
It includes all of Catch2 headers related to interfaces.
Generally the Catch2 users should use specific includes they need, but this header can be used instead for ease-of-experimentation, or just plain convenience, at the cost of somewhat increased compilation times.
When a new header is added to either the
interfacesfolder, or to the corresponding internal subfolder, it should be added here.
- file catch_interfaces_capture.cpp
- file catch_interfaces_capture.hpp
- #include <string>#include <chrono>#include <catch2/internal/catch_stringref.hpp>#include <catch2/internal/catch_result_type.hpp>#include <catch2/internal/catch_unique_ptr.hpp>
- file catch_interfaces_config.cpp
- file catch_interfaces_config.hpp
- #include <catch2/internal/catch_noncopyable.hpp>#include <catch2/internal/catch_stringref.hpp>#include <chrono>#include <iosfwd>#include <string>#include <vector>
- file catch_interfaces_enum_values_registry.hpp
- #include <catch2/internal/catch_stringref.hpp>#include <vector>
- file catch_interfaces_exception.cpp
- file catch_interfaces_exception.hpp
- #include <catch2/internal/catch_unique_ptr.hpp>#include <string>#include <vector>
- file catch_interfaces_generatortracker.cpp
-
#include <string>
- file catch_interfaces_generatortracker.hpp
- #include <catch2/internal/catch_unique_ptr.hpp>#include <catch2/internal/catch_stringref.hpp>#include <string>
- file catch_interfaces_registry_hub.cpp
- file catch_interfaces_registry_hub.hpp
- #include <catch2/internal/catch_unique_ptr.hpp>#include <string>
- file catch_interfaces_reporter.cpp
-
#include <catch2/internal/catch_console_colour.hpp>#include <catch2/internal/catch_console_width.hpp>#include <catch2/catch_message.hpp>#include <catch2/internal/catch_list.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <catch2/catch_test_case_info.hpp>#include <catch2/reporters/catch_reporter_helpers.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <catch2/internal/catch_istream.hpp>#include <algorithm>#include <cassert>#include <iomanip>
- file catch_interfaces_reporter.hpp
- #include <catch2/catch_section_info.hpp>#include <catch2/catch_totals.hpp>#include <catch2/catch_assertion_result.hpp>#include <catch2/internal/catch_message_info.hpp>#include <catch2/internal/catch_stringref.hpp>#include <catch2/internal/catch_test_run_info.hpp>#include <catch2/internal/catch_unique_ptr.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <map>#include <string>#include <vector>#include <iosfwd>
- file catch_interfaces_reporter_factory.cpp
- file catch_interfaces_reporter_factory.hpp
- #include <catch2/internal/catch_unique_ptr.hpp>#include <catch2/internal/catch_stringref.hpp>#include <string>
- file catch_interfaces_tag_alias_registry.hpp
- #include <string>
- file catch_interfaces_test_invoker.hpp
- file catch_interfaces_testcase.cpp
- file catch_interfaces_testcase.hpp
- #include <vector>
- file catch_assertion_handler.cpp
- #include <catch2/internal/catch_assertion_handler.hpp>#include <catch2/internal/catch_context.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_debugger.hpp>#include <catch2/matchers/catch_matchers_string.hpp>
- file catch_assertion_handler.hpp
- #include <catch2/catch_assertion_info.hpp>#include <catch2/internal/catch_decomposer.hpp>#include <string>
- file catch_case_insensitive_comparisons.cpp
-
#include <catch2/internal/catch_string_manip.hpp>#include <algorithm>
- file catch_case_insensitive_comparisons.hpp
- #include <catch2/internal/catch_stringref.hpp>
- file catch_case_sensitive.hpp
- file catch_clara.cpp
- #include <catch2/internal/catch_clara.hpp>#include <catch2/internal/catch_console_width.hpp>#include <catch2/internal/catch_platform.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <catch2/internal/catch_textflow.hpp>#include <algorithm>#include <ostream>
- file catch_clara.hpp
- #include <catch2/internal/catch_move_and_forward.hpp>#include <catch2/internal/catch_noncopyable.hpp>#include <catch2/internal/catch_void_type.hpp>#include <cassert>#include <memory>#include <ostream>#include <sstream>#include <string>#include <type_traits>#include <vector>
- file catch_commandline.cpp
- #include <catch2/internal/catch_commandline.hpp>#include <catch2/catch_config.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <catch2/internal/catch_reporter_registry.hpp>#include <catch2/internal/catch_console_colour.hpp>#include <catch2/internal/catch_parse_numbers.hpp>#include <fstream>#include <string>
- file catch_commandline.hpp
- #include <catch2/internal/catch_clara.hpp>
- file catch_compare_traits.hpp
- #include <catch2/internal/catch_void_type.hpp>#include <type_traits>
Defines
-
CATCH_DEFINE_COMPARABLE_TRAIT(id, op)#
-
CATCH_DEFINE_COMPARABLE_TRAIT(id, op)#
- file catch_compiler_capabilities.hpp
- #include <catch2/internal/catch_platform.hpp>#include <catch2/catch_user_config.hpp>
Defines
-
CATCH_CATCH_ALL#
-
CATCH_CATCH_ANON(type)#
-
CATCH_CONFIG_CPP11_TO_STRING#
-
CATCH_CONFIG_DISABLE_EXCEPTIONS#
-
CATCH_CONFIG_GETENV#
-
CATCH_CONFIG_GLOBAL_NEXTAFTER#
-
CATCH_CONFIG_POSIX_SIGNALS#
-
CATCH_EXPORT#
-
CATCH_INTERNAL_CONFIG_GETENV#
-
CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER#
-
CATCH_INTERNAL_CONFIG_POSIX_SIGNALS#
-
CATCH_INTERNAL_IGNORE_BUT_WARN(...)#
-
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION#
-
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION#
-
CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS#
-
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS#
-
CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS#
-
CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS#
-
CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT#
-
CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS#
-
CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS#
-
CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS#
-
CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS#
-
CATCH_TRY#
-
CATCH_CATCH_ALL#
- file catch_config_android_logwrite.hpp
- #include <catch2/catch_user_config.hpp>
Wrapper for ANDROID_LOGWRITE configuration option.
We want to default to enabling it when compiled for android, but users of the library should also be able to disable it if they want to.
- file catch_config_counter.hpp
- #include <catch2/catch_user_config.hpp>
Wrapper for the CONFIG configuration option.
When generating internal unique names, there are two options. Either we mix in the current line number, or mix in an incrementing number. We prefer the latter, using
__COUNTER__, but users might want to use the former.
- file catch_config_static_analysis_support.hpp
- #include <catch2/catch_user_config.hpp>
Wrapper for the STATIC_ANALYSIS_SUPPORT configuration option.
Some of Catch2’s macros can be defined differently to work better with static analysis tools, like clang-tidy or coverity. Currently the main use case is to show that
SECTIONs are executed exclusively, and not all in one run of aTEST_CASE.
- file catch_config_uncaught_exceptions.hpp
- #include <catch2/catch_user_config.hpp>#include <exception>
Wrapper for UNCAUGHT_EXCEPTIONS configuration option.
For some functionality, Catch2 requires to know whether there is an active exception. Because
std::uncaught_exceptionis deprecated in C++17, we want to usestd::uncaught_exceptionsif possible.
- file catch_config_wchar.hpp
- #include <catch2/catch_user_config.hpp>
Wrapper for the WCHAR configuration option.
We want to support platforms that do not provide
wchar_t, so we sometimes have to disable providing wchar_t overloads through Catch2, e.g. the StringMaker specialization forstd::wstring.Defines
-
CATCH_CONFIG_WCHAR#
-
CATCH_CONFIG_WCHAR#
- file catch_console_colour.cpp
- #include <catch2/internal/catch_console_colour.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_errno_guard.hpp>#include <catch2/internal/catch_istream.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <catch2/internal/catch_context.hpp>#include <catch2/internal/catch_platform.hpp>#include <catch2/internal/catch_debugger.hpp>#include <catch2/internal/catch_windows_h_proxy.hpp>#include <cassert>#include <ostream>#include <utility>
- file catch_console_colour.hpp
- #include <catch2/internal/catch_unique_ptr.hpp>#include <iosfwd>#include <cstdint>
- file catch_console_width.hpp
- #include <catch2/catch_user_config.hpp>
Defines
-
CATCH_CONFIG_CONSOLE_WIDTH#
-
CATCH_CONFIG_CONSOLE_WIDTH#
- file catch_container_nonmembers.hpp
-
#include <cstddef>#include <initializer_list>
Defines
-
CATCH_CONFIG_POLYFILL_NONMEMBER_CONTAINER_ACCESS#
-
CATCH_CONFIG_POLYFILL_NONMEMBER_CONTAINER_ACCESS#
- file catch_context.cpp
- #include <catch2/internal/catch_context.hpp>#include <catch2/internal/catch_noncopyable.hpp>
- file catch_context.hpp
- file catch_debug_console.cpp
- #include <catch2/internal/catch_debug_console.hpp>#include <catch2/internal/catch_platform.hpp>#include <catch2/internal/catch_windows_h_proxy.hpp>#include <catch2/catch_user_config.hpp>#include <catch2/internal/catch_stdstreams.hpp>#include <ostream>
- file catch_debug_console.hpp
- #include <string>
- file catch_debugger.cpp
- #include <catch2/internal/catch_debugger.hpp>#include <catch2/internal/catch_errno_guard.hpp>#include <catch2/internal/catch_platform.hpp>#include <catch2/internal/catch_stdstreams.hpp>
- file catch_debugger.hpp
- #include <catch2/internal/catch_platform.hpp>
Defines
-
CATCH_BREAK_INTO_DEBUGGER()#
-
CATCH_BREAK_INTO_DEBUGGER()#
- file catch_decomposer.cpp
- #include <catch2/internal/catch_decomposer.hpp>
- file catch_decomposer.hpp
- #include <catch2/catch_tostring.hpp>#include <catch2/internal/catch_stringref.hpp>#include <catch2/internal/catch_compare_traits.hpp>#include <catch2/internal/catch_logical_traits.hpp>#include <type_traits>#include <iosfwd>
- file catch_enforce.cpp
- #include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_stdstreams.hpp>#include <stdexcept>
- file catch_enforce.hpp
- #include <catch2/internal/catch_source_line_info.hpp>#include <exception>
- file catch_enum_values_registry.cpp
-
#include <catch2/internal/catch_string_manip.hpp>#include <cassert>
- file catch_enum_values_registry.hpp
-
#include <catch2/internal/catch_unique_ptr.hpp>#include <catch2/internal/catch_stringref.hpp>#include <vector>
- file catch_errno_guard.cpp
- #include <catch2/internal/catch_errno_guard.hpp>#include <cerrno>
- file catch_errno_guard.hpp
- file catch_exception_translator_registry.cpp
-
#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <exception>
- file catch_exception_translator_registry.hpp
-
#include <catch2/internal/catch_unique_ptr.hpp>#include <vector>#include <string>
- file catch_fatal_condition_handler.cpp
-
#include <catch2/internal/catch_context.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_windows_h_proxy.hpp>#include <catch2/internal/catch_stdstreams.hpp>#include <algorithm>
This file provides platform specific implementations of FatalConditionHandler.
This means that there is a lot of conditional compilation, and platform specific code. Currently, Catch2 supports a dummy handler (if no handler is desired), and 2 platform specific handlers:
Windows’ SEH
POSIX signals
Consequently, various pieces of code below are compiled if either of the platform specific handlers is enabled, or if none of them are enabled. It is assumed that both cannot be enabled at the same time, and doing so should cause a compilation error.
If another platform specific handler is added, the compile guards below will need to be updated taking these assumptions into account.
- file catch_fatal_condition_handler.hpp
- #include <catch2/internal/catch_platform.hpp>#include <cassert>
- file catch_floating_point_helpers.cpp
-
#include <cstring>
- file catch_floating_point_helpers.hpp
- #include <catch2/internal/catch_polyfills.hpp>#include <cassert>#include <cmath>#include <cstdint>#include <utility>#include <limits>
- file catch_getenv.cpp
- #include <catch2/internal/catch_getenv.hpp>#include <catch2/internal/catch_platform.hpp>#include <cstdlib>
- file catch_getenv.hpp
- file catch_is_permutation.hpp
- #include <algorithm>#include <iterator>
- file catch_istream.cpp
- #include <catch2/internal/catch_istream.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_debug_console.hpp>#include <catch2/internal/catch_unique_ptr.hpp>#include <catch2/internal/catch_stdstreams.hpp>#include <cstdio>#include <fstream>#include <sstream>#include <vector>
- file catch_istream.hpp
- #include <catch2/internal/catch_noncopyable.hpp>#include <catch2/internal/catch_unique_ptr.hpp>#include <iosfwd>#include <cstddef>#include <ostream>#include <string>
- file catch_lazy_expr.cpp
- #include <catch2/internal/catch_lazy_expr.hpp>#include <catch2/internal/catch_decomposer.hpp>
- file catch_lazy_expr.hpp
- #include <iosfwd>
- file catch_leak_detector.cpp
- #include <catch2/internal/catch_leak_detector.hpp>#include <catch2/catch_user_config.hpp>
- file catch_leak_detector.hpp
- file catch_list.cpp
- #include <catch2/internal/catch_list.hpp>#include <catch2/internal/catch_reporter_registry.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <catch2/internal/catch_context.hpp>#include <catch2/catch_config.hpp>#include <catch2/catch_test_spec.hpp>#include <catch2/catch_test_case_info.hpp>
- file catch_list.hpp
- #include <catch2/internal/catch_stringref.hpp>#include <set>#include <string>
- file catch_logical_traits.hpp
- #include <type_traits>
- file catch_main.cpp
- #include <catch2/catch_session.hpp>#include <catch2/internal/catch_config_wchar.hpp>#include <catch2/internal/catch_leak_detector.hpp>#include <catch2/internal/catch_platform.hpp>
Functions
-
int main(int argc, char *argv[])#
-
int main(int argc, char *argv[])#
- file catch_message_info.cpp
- #include <catch2/internal/catch_message_info.hpp>
- file catch_message_info.hpp
- #include <catch2/internal/catch_result_type.hpp>#include <catch2/internal/catch_source_line_info.hpp>#include <catch2/internal/catch_stringref.hpp>#include <string>
- file catch_meta.hpp
- #include <type_traits>
- file catch_move_and_forward.hpp
- #include <type_traits>
- file catch_noncopyable.hpp
- file catch_optional.hpp
- #include <catch2/internal/catch_move_and_forward.hpp>#include <cassert>
- file catch_output_redirect.cpp
- #include <catch2/internal/catch_output_redirect.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_stdstreams.hpp>#include <cstdio>#include <cstring>#include <sstream>
- file catch_output_redirect.hpp
- #include <catch2/internal/catch_platform.hpp>#include <cstdio>#include <iosfwd>#include <string>
- file catch_parse_numbers.cpp
-
#include <catch2/internal/catch_parse_numbers.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <limits>#include <stdexcept>
- file catch_parse_numbers.hpp
- #include <catch2/internal/catch_optional.hpp>#include <string>
- file catch_platform.hpp
- file catch_polyfills.cpp
- #include <catch2/internal/catch_polyfills.hpp>#include <catch2/catch_user_config.hpp>#include <cmath>
- file catch_polyfills.hpp
- file catch_preprocessor.hpp
-
Defines
-
CATCH_DEFER(id)#
-
CATCH_EMPTY()#
-
CATCH_REC_END(...)#
-
CATCH_REC_GET_END(...)#
-
CATCH_REC_GET_END1(...)#
-
CATCH_REC_GET_END2()#
-
CATCH_REC_LIST(f, ...)#
-
CATCH_REC_LIST0(f, x, peek, ...)#
-
CATCH_REC_LIST0_UD(f, userdata, x, peek, ...)#
-
CATCH_REC_LIST1(f, x, peek, ...)#
-
CATCH_REC_LIST1_UD(f, userdata, x, peek, ...)#
-
CATCH_REC_LIST2(f, x, peek, ...)#
-
CATCH_REC_LIST2_UD(f, userdata, x, peek, ...)#
-
CATCH_REC_LIST_UD(f, userdata, ...)#
-
CATCH_REC_NEXT(test, next)#
-
CATCH_REC_NEXT0(test, next, ...)#
-
CATCH_REC_NEXT1(test, next)#
-
CATCH_REC_OUT#
-
CATCH_RECURSE(...)#
-
CATCH_RECURSION_LEVEL0(...)#
-
CATCH_RECURSION_LEVEL1(...)#
-
CATCH_RECURSION_LEVEL2(...)#
-
CATCH_RECURSION_LEVEL3(...)#
-
CATCH_RECURSION_LEVEL4(...)#
-
CATCH_RECURSION_LEVEL5(...)#
-
INTERNAL_CATCH_DECLARE_SIG_TEST(TestName, ...)#
-
INTERNAL_CATCH_DECLARE_SIG_TEST0(TestName)#
-
INTERNAL_CATCH_DECLARE_SIG_TEST1(TestName, signature)#
-
INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, ...)#
-
INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0(TestName, ClassName)#
-
INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1(TestName, ClassName, signature)#
-
INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X(TestName, ClassName, signature, ...)#
-
INTERNAL_CATCH_DECLARE_SIG_TEST_X(TestName, signature, ...)#
-
INTERNAL_CATCH_DEFINE_SIG_TEST(TestName, ...)#
-
INTERNAL_CATCH_DEFINE_SIG_TEST0(TestName)#
-
INTERNAL_CATCH_DEFINE_SIG_TEST1(TestName, signature)#
-
INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, ...)#
-
INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0(TestName)#
-
INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1(TestName, signature)#
-
INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X(TestName, signature, ...)#
-
INTERNAL_CATCH_DEFINE_SIG_TEST_X(TestName, signature, ...)#
-
INTERNAL_CATCH_MAKE_NAMESPACE(name)#
-
INTERNAL_CATCH_MAKE_NAMESPACE2(...)#
-
INTERNAL_CATCH_MAKE_TYPE_LIST(...)#
-
INTERNAL_CATCH_MAKE_TYPE_LIST2(...)#
-
INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(...)#
-
INTERNAL_CATCH_NTTP_0#
-
INTERNAL_CATCH_NTTP_1(signature, ...)#
-
INTERNAL_CATCH_NTTP_GEN(...)#
-
INTERNAL_CATCH_NTTP_REG_GEN(TestFunc, ...)#
-
INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, ...)#
-
INTERNAL_CATCH_NTTP_REGISTER(TestFunc, signature, ...)#
-
INTERNAL_CATCH_NTTP_REGISTER0(TestFunc, signature)#
-
INTERNAL_CATCH_NTTP_REGISTER_METHOD(TestName, signature, ...)#
-
INTERNAL_CATCH_NTTP_REGISTER_METHOD0(TestName, signature, ...)#
-
INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9)#
-
INTERNAL_CATCH_REMOVE_PARENS_11_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10)#
-
INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_0)#
-
INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_0, _1)#
-
INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_0, _1, _2)#
-
INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3)#
-
INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4)#
-
INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5)#
-
INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6)#
-
INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7)#
-
INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8)#
-
INTERNAL_CATCH_REMOVE_PARENS_GEN(...)#
-
INTERNAL_CATCH_STRINGIZE(...)#
-
INTERNAL_CATCH_STRINGIZE2(...)#
-
INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param)#
-
INTERNAL_CATCH_TYPE_GEN#
-
INTERNAL_CATCH_VA_NARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...)#
-
CATCH_DEFER(id)#
- file catch_preprocessor_internal_stringify.hpp
- #include <catch2/catch_user_config.hpp>
Defines
-
CATCH_INTERNAL_STRINGIFY(...)#
-
CATCH_INTERNAL_STRINGIFY(...)#
- file catch_preprocessor_remove_parens.hpp
- file catch_random_number_generator.cpp
- file catch_random_number_generator.hpp
- #include <cstdint>
- file catch_random_seed_generation.cpp
-
#include <catch2/internal/catch_enforce.hpp>#include <ctime>#include <random>
- file catch_random_seed_generation.hpp
- #include <cstdint>
- file catch_reporter_registry.cpp
- #include <catch2/internal/catch_reporter_registry.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <catch2/reporters/catch_reporter_automake.hpp>#include <catch2/reporters/catch_reporter_compact.hpp>#include <catch2/reporters/catch_reporter_console.hpp>#include <catch2/reporters/catch_reporter_junit.hpp>#include <catch2/reporters/catch_reporter_tap.hpp>#include <catch2/reporters/catch_reporter_teamcity.hpp>#include <catch2/reporters/catch_reporter_xml.hpp>
- file catch_reporter_registry.hpp
-
#include <catch2/internal/catch_unique_ptr.hpp>#include <map>#include <string>#include <vector>
- file catch_reporter_spec_parser.cpp
-
#include <catch2/internal/catch_move_and_forward.hpp>#include <algorithm>
- file catch_reporter_spec_parser.hpp
- #include <catch2/internal/catch_console_colour.hpp>#include <catch2/internal/catch_optional.hpp>#include <catch2/internal/catch_stringref.hpp>#include <map>#include <string>#include <vector>
- file catch_result_type.cpp
- #include <catch2/internal/catch_result_type.hpp>
- file catch_result_type.hpp
- file catch_reusable_string_stream.cpp
-
#include <catch2/internal/catch_singletons.hpp>#include <catch2/internal/catch_unique_ptr.hpp>#include <cstdio>#include <sstream>#include <vector>
- file catch_reusable_string_stream.hpp
- #include <catch2/internal/catch_noncopyable.hpp>#include <iosfwd>#include <cstddef>#include <ostream>#include <string>
- file catch_run_context.cpp
- #include <catch2/internal/catch_run_context.hpp>#include <catch2/catch_user_config.hpp>#include <catch2/internal/catch_context.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/catch_timer.hpp>#include <catch2/internal/catch_output_redirect.hpp>#include <catch2/internal/catch_assertion_handler.hpp>#include <cassert>#include <algorithm>
- file catch_run_context.hpp
-
#include <catch2/internal/catch_test_registry.hpp>#include <catch2/internal/catch_test_run_info.hpp>#include <catch2/catch_test_case_info.hpp>#include <catch2/catch_message.hpp>#include <catch2/catch_totals.hpp>#include <catch2/internal/catch_test_case_tracker.hpp>#include <catch2/catch_assertion_info.hpp>#include <catch2/catch_assertion_result.hpp>#include <catch2/internal/catch_optional.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <string>
- file catch_section.cpp
- #include <catch2/internal/catch_section.hpp>#include <catch2/internal/catch_run_context.hpp>#include <catch2/internal/catch_move_and_forward.hpp>
- file catch_section.hpp
-
#include <catch2/internal/catch_noncopyable.hpp>#include <catch2/catch_section_info.hpp>#include <catch2/catch_timer.hpp>#include <catch2/catch_totals.hpp>#include <catch2/internal/catch_unique_name.hpp>
- file catch_sharding.hpp
- #include <catch2/catch_session.hpp>#include <cmath>#include <algorithm>
- file catch_singletons.cpp
- #include <catch2/internal/catch_singletons.hpp>#include <vector>
- file catch_singletons.hpp
- file catch_source_line_info.cpp
- #include <catch2/internal/catch_source_line_info.hpp>#include <cstring>#include <ostream>
- file catch_source_line_info.hpp
- #include <cstddef>#include <iosfwd>
Defines
-
CATCH_INTERNAL_LINEINFO#
-
CATCH_INTERNAL_LINEINFO#
- file catch_startup_exception_registry.cpp
-
#include <catch2/catch_user_config.hpp>
- file catch_startup_exception_registry.hpp
- #include <vector>#include <exception>
- file catch_stdstreams.cpp
- #include <catch2/internal/catch_stdstreams.hpp>#include <catch2/catch_user_config.hpp>#include <iostream>
- file catch_stdstreams.hpp
- #include <iosfwd>
- file catch_stream_end_stop.hpp
- #include <catch2/internal/catch_stringref.hpp>
- file catch_string_manip.cpp
- #include <catch2/internal/catch_string_manip.hpp>#include <catch2/internal/catch_stringref.hpp>#include <ostream>#include <cstring>#include <cctype>#include <vector>
- file catch_string_manip.hpp
- #include <catch2/internal/catch_stringref.hpp>#include <cstdint>#include <string>#include <iosfwd>#include <vector>
- file catch_stringref.cpp
- #include <catch2/internal/catch_stringref.hpp>#include <algorithm>#include <ostream>#include <cstring>#include <cstdint>
- file catch_stringref.hpp
- #include <cstddef>#include <string>#include <iosfwd>#include <cassert>#include <cstring>
- file catch_tag_alias_registry.cpp
- #include <catch2/internal/catch_tag_alias_registry.hpp>#include <catch2/internal/catch_console_colour.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_string_manip.hpp>
- file catch_tag_alias_registry.hpp
-
#include <catch2/catch_tag_alias.hpp>#include <map>#include <string>
- file catch_template_test_registry.hpp
- #include <catch2/internal/catch_test_registry.hpp>#include <catch2/internal/catch_preprocessor.hpp>#include <catch2/internal/catch_meta.hpp>#include <catch2/internal/catch_unique_name.hpp>
Defines
-
INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE(Name, Tags, TmplList)#
-
INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2(TestName, TestFunc, Name, Tags, TmplList)#
-
INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD(ClassName, Name, Tags, TmplList)#
-
INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, TmplList)#
-
INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)#
-
INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, Signature, TmplTypes, TypesList)#
-
INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD(ClassName, Name, Tags, ...)#
-
INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, Signature, TmplTypes, TypesList)#
-
INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG(ClassName, Name, Tags, Signature, ...)#
-
INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG(Name, Tags, Signature, ...)#
-
INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...)#
-
INTERNAL_CATCH_TEMPLATE_TEST_CASE_2(TestName, TestFunc, Name, Tags, Signature, ...)#
-
INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD(ClassName, Name, Tags, ...)#
-
INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, Signature, ...)#
-
INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG(ClassName, Name, Tags, Signature, ...)#
-
INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG(Name, Tags, Signature, ...)#
-
INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE(Name, Tags, TmplList)#
- file catch_test_case_info_hasher.cpp
- #include <catch2/catch_test_case_info.hpp>
- file catch_test_case_info_hasher.hpp
- #include <cstdint>
- file catch_test_case_registry_impl.cpp
-
#include <catch2/internal/catch_context.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_run_context.hpp>#include <catch2/internal/catch_sharding.hpp>#include <catch2/catch_test_case_info.hpp>#include <catch2/catch_test_spec.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <algorithm>#include <set>
- file catch_test_case_registry_impl.hpp
-
#include <catch2/internal/catch_unique_ptr.hpp>#include <vector>
- file catch_test_case_tracker.cpp
- #include <catch2/internal/catch_test_case_tracker.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <algorithm>#include <cassert>
- file catch_test_case_tracker.hpp
- #include <catch2/internal/catch_source_line_info.hpp>#include <catch2/internal/catch_unique_ptr.hpp>#include <catch2/internal/catch_stringref.hpp>#include <string>#include <vector>
- file catch_test_failure_exception.cpp
-
#include <catch2/internal/catch_enforce.hpp>#include <catch2/catch_user_config.hpp>
- file catch_test_failure_exception.hpp
- file catch_test_macro_impl.hpp
- #include <catch2/catch_user_config.hpp>#include <catch2/internal/catch_assertion_handler.hpp>#include <catch2/internal/catch_stringref.hpp>#include <catch2/internal/catch_source_line_info.hpp>
Defines
-
INTERNAL_CATCH_CATCH(handler)#
-
INTERNAL_CATCH_ELSE(macroName, resultDisposition, ...)#
-
INTERNAL_CATCH_IF(macroName, resultDisposition, ...)#
-
INTERNAL_CATCH_NO_THROW(macroName, resultDisposition, ...)#
-
INTERNAL_CATCH_REACT(handler)#
-
INTERNAL_CATCH_TEST(macroName, resultDisposition, ...)#
-
INTERNAL_CATCH_THROWS(macroName, resultDisposition, ...)#
-
INTERNAL_CATCH_THROWS_AS(macroName, exceptionType, resultDisposition, expr)#
-
INTERNAL_CATCH_THROWS_STR_MATCHES(macroName, resultDisposition, matcher, ...)#
-
INTERNAL_CATCH_TRY#
-
INTERNAL_CATCH_CATCH(handler)#
- file catch_test_registry.cpp
- #include <catch2/internal/catch_test_registry.hpp>#include <catch2/catch_test_case_info.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <algorithm>#include <iterator>
- file catch_test_registry.hpp
-
#include <catch2/internal/catch_source_line_info.hpp>#include <catch2/internal/catch_noncopyable.hpp>#include <catch2/internal/catch_stringref.hpp>#include <catch2/internal/catch_unique_ptr.hpp>#include <catch2/internal/catch_unique_name.hpp>
- file catch_test_run_info.hpp
- #include <catch2/internal/catch_stringref.hpp>
- file catch_test_spec_parser.cpp
- #include <catch2/internal/catch_test_spec_parser.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <catch2/internal/catch_move_and_forward.hpp>
- file catch_test_spec_parser.hpp
- #include <catch2/catch_test_spec.hpp>#include <vector>#include <string>
- file catch_textflow.cpp
- #include <catch2/internal/catch_textflow.hpp>#include <algorithm>#include <cstring>#include <ostream>
- file catch_textflow.hpp
- #include <cassert>#include <catch2/internal/catch_console_width.hpp>#include <string>#include <vector>
- file catch_to_string.hpp
- #include <string>
- file catch_uncaught_exceptions.cpp
-
#include <catch2/catch_user_config.hpp>#include <exception>
- file catch_uncaught_exceptions.hpp
- file catch_unique_name.hpp
- #include <catch2/internal/catch_config_counter.hpp>
- file catch_unique_ptr.hpp
- #include <cassert>#include <type_traits>#include <catch2/internal/catch_move_and_forward.hpp>
- file catch_void_type.hpp
- file catch_wildcard_pattern.cpp
- #include <catch2/internal/catch_wildcard_pattern.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_string_manip.hpp>
- file catch_wildcard_pattern.hpp
- #include <catch2/internal/catch_case_sensitive.hpp>#include <string>
- file catch_windows_h_proxy.hpp
- #include <catch2/internal/catch_platform.hpp>
- file catch_xmlwriter.cpp
- #include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_xmlwriter.hpp>#include <cstdint>#include <iomanip>#include <type_traits>
- file catch_xmlwriter.hpp
-
#include <catch2/internal/catch_stringref.hpp>#include <iosfwd>#include <vector>
- file catch_matchers.cpp
- #include <catch2/matchers/catch_matchers.hpp>
- file catch_matchers.hpp
-
#include <catch2/internal/catch_move_and_forward.hpp>#include <string>#include <vector>
- file catch_matchers_all.hpp
- #include <catch2/matchers/catch_matchers.hpp>#include <catch2/matchers/catch_matchers_contains.hpp>#include <catch2/matchers/catch_matchers_exception.hpp>#include <catch2/matchers/catch_matchers_predicate.hpp>#include <catch2/matchers/catch_matchers_string.hpp>#include <catch2/matchers/catch_matchers_templated.hpp>#include <catch2/matchers/catch_matchers_vector.hpp>
This is a convenience header for Catch2’s Matcher support.
It includes all of Catch2 headers related to matchers.
Generally the Catch2 users should use specific includes they need, but this header can be used instead for ease-of-experimentation, or just plain convenience, at the cost of increased compilation times.
When a new header is added to either the
matchersfolder, or to the corresponding internal subfolder, it should be added here.
- file catch_matchers_container_properties.cpp
- file catch_matchers_container_properties.hpp
- #include <catch2/matchers/catch_matchers_templated.hpp>#include <catch2/internal/catch_move_and_forward.hpp>
- file catch_matchers_contains.hpp
- #include <catch2/matchers/catch_matchers_templated.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <algorithm>#include <functional>
- file catch_matchers_exception.cpp
- #include <catch2/matchers/catch_matchers_exception.hpp>
- file catch_matchers_exception.hpp
- #include <catch2/matchers/catch_matchers.hpp>
- file catch_matchers_floating_point.cpp
-
#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_polyfills.hpp>#include <catch2/internal/catch_to_string.hpp>#include <catch2/catch_tostring.hpp>#include <algorithm>#include <cmath>#include <cstdlib>#include <cstdint>#include <sstream>#include <iomanip>#include <limits>
- file catch_matchers_floating_point.hpp
- #include <catch2/matchers/catch_matchers.hpp>
- file catch_matchers_predicate.cpp
- #include <catch2/matchers/catch_matchers_predicate.hpp>
- file catch_matchers_predicate.hpp
- #include <catch2/matchers/catch_matchers.hpp>#include <catch2/internal/catch_meta.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <string>
- file catch_matchers_quantifiers.cpp
- file catch_matchers_quantifiers.hpp
- #include <catch2/matchers/catch_matchers_templated.hpp>#include <catch2/internal/catch_move_and_forward.hpp>
- file catch_matchers_range_equals.hpp
- #include <catch2/internal/catch_is_permutation.hpp>#include <catch2/matchers/catch_matchers_templated.hpp>#include <algorithm>#include <utility>
- file catch_matchers_string.cpp
- #include <catch2/matchers/catch_matchers_string.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <catch2/catch_tostring.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <regex>
- file catch_matchers_string.hpp
- #include <catch2/matchers/catch_matchers.hpp>#include <catch2/internal/catch_case_sensitive.hpp>#include <catch2/internal/catch_stringref.hpp>#include <string>
- file catch_matchers_templated.cpp
- #include <catch2/matchers/catch_matchers_templated.hpp>
- file catch_matchers_templated.hpp
- #include <catch2/matchers/catch_matchers.hpp>#include <catch2/internal/catch_stringref.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <catch2/internal/catch_logical_traits.hpp>#include <array>#include <algorithm>#include <string>#include <type_traits>
- file catch_matchers_vector.hpp
- #include <catch2/matchers/catch_matchers.hpp>#include <catch2/catch_approx.hpp>#include <algorithm>
- file catch_matchers_impl.cpp
-
#include <catch2/matchers/catch_matchers.hpp>#include <catch2/internal/catch_move_and_forward.hpp>
- file catch_matchers_impl.hpp
- #include <catch2/internal/catch_assertion_handler.hpp>#include <catch2/internal/catch_source_line_info.hpp>#include <catch2/internal/catch_decomposer.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <string>
- file catch_reporter_automake.cpp
- #include <catch2/reporters/catch_reporter_automake.hpp>#include <catch2/catch_test_case_info.hpp>#include <ostream>
- file catch_reporter_automake.hpp
-
#include <catch2/internal/catch_move_and_forward.hpp>#include <string>
- file catch_reporter_common_base.cpp
-
#include <catch2/reporters/catch_reporter_helpers.hpp>#include <catch2/internal/catch_console_colour.hpp>#include <catch2/internal/catch_istream.hpp>
- file catch_reporter_common_base.hpp
-
#include <map>#include <string>
- file catch_reporter_compact.cpp
- #include <catch2/reporters/catch_reporter_compact.hpp>#include <catch2/catch_get_random_seed.hpp>#include <catch2/catch_test_spec.hpp>#include <catch2/reporters/catch_reporter_helpers.hpp>#include <catch2/internal/catch_platform.hpp>#include <catch2/internal/catch_console_colour.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <catch2/internal/catch_stringref.hpp>#include <ostream>
- file catch_reporter_compact.hpp
- file catch_reporter_console.cpp
- #include <catch2/reporters/catch_reporter_console.hpp>#include <catch2/catch_test_spec.hpp>#include <catch2/internal/catch_console_colour.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <catch2/catch_version.hpp>#include <catch2/internal/catch_textflow.hpp>#include <catch2/internal/catch_stringref.hpp>#include <catch2/catch_test_case_info.hpp>#include <catch2/internal/catch_console_width.hpp>#include <catch2/reporters/catch_reporter_helpers.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <catch2/catch_get_random_seed.hpp>#include <cstdio>
- file catch_reporter_console.hpp
-
#include <catch2/internal/catch_unique_ptr.hpp>
- file catch_reporter_cumulative_base.cpp
-
#include <catch2/internal/catch_move_and_forward.hpp>#include <algorithm>#include <cassert>
- file catch_reporter_cumulative_base.hpp
-
#include <catch2/internal/catch_move_and_forward.hpp>#include <catch2/internal/catch_unique_ptr.hpp>#include <catch2/internal/catch_optional.hpp>#include <string>#include <vector>
- file catch_reporter_event_listener.cpp
- file catch_reporter_event_listener.hpp
- file catch_reporter_helpers.cpp
- #include <catch2/reporters/catch_reporter_helpers.hpp>#include <catch2/internal/catch_console_width.hpp>#include <catch2/internal/catch_errno_guard.hpp>#include <catch2/internal/catch_textflow.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <catch2/internal/catch_console_colour.hpp>#include <catch2/catch_tostring.hpp>#include <catch2/catch_test_case_info.hpp>#include <algorithm>#include <cfloat>#include <cstdio>#include <ostream>#include <iomanip>
- file catch_reporter_helpers.hpp
- #include <iosfwd>#include <string>#include <vector>#include <catch2/internal/catch_list.hpp>#include <catch2/catch_totals.hpp>
- file catch_reporter_junit.cpp
- #include <catch2/reporters/catch_reporter_junit.hpp>#include <catch2/reporters/catch_reporter_helpers.hpp>#include <catch2/catch_tostring.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <catch2/internal/catch_textflow.hpp>#include <catch2/catch_test_case_info.hpp>#include <catch2/catch_test_spec.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <cassert>#include <ctime>#include <algorithm>#include <iomanip>
- file catch_reporter_junit.hpp
-
#include <catch2/internal/catch_xmlwriter.hpp>#include <catch2/catch_timer.hpp>
- file catch_reporter_multi.cpp
- #include <catch2/reporters/catch_reporter_multi.hpp>#include <catch2/catch_config.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <catch2/internal/catch_stdstreams.hpp>#include <ostream>
- file catch_reporter_multi.hpp
- file catch_reporter_registrars.cpp
- file catch_reporter_registrars.hpp
-
#include <catch2/internal/catch_unique_name.hpp>#include <catch2/internal/catch_unique_ptr.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <catch2/internal/catch_void_type.hpp>#include <type_traits>
- file catch_reporter_sonarqube.cpp
-
#include <catch2/internal/catch_string_manip.hpp>#include <catch2/catch_test_case_info.hpp>#include <catch2/catch_test_spec.hpp>#include <catch2/reporters/catch_reporter_helpers.hpp>#include <map>
- file catch_reporter_sonarqube.hpp
-
#include <catch2/internal/catch_xmlwriter.hpp>#include <catch2/internal/catch_move_and_forward.hpp>
- file catch_reporter_streaming_base.cpp
- file catch_reporter_streaming_base.hpp
-
#include <catch2/internal/catch_move_and_forward.hpp>#include <vector>
- file catch_reporter_tap.cpp
- #include <catch2/reporters/catch_reporter_tap.hpp>#include <catch2/internal/catch_console_colour.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <catch2/catch_test_case_info.hpp>#include <catch2/catch_test_spec.hpp>#include <catch2/reporters/catch_reporter_helpers.hpp>#include <algorithm>#include <ostream>
- file catch_reporter_tap.hpp
-
#include <catch2/internal/catch_move_and_forward.hpp>
- file catch_reporter_teamcity.cpp
- #include <catch2/reporters/catch_reporter_teamcity.hpp>#include <catch2/reporters/catch_reporter_helpers.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <catch2/internal/catch_enforce.hpp>#include <catch2/internal/catch_textflow.hpp>#include <catch2/catch_test_case_info.hpp>#include <cassert>#include <ostream>
- file catch_reporter_teamcity.hpp
-
#include <catch2/catch_timer.hpp>#include <cstring>
- file catch_reporter_xml.cpp
- #include <catch2/reporters/catch_reporter_xml.hpp>#include <catch2/reporters/catch_reporter_helpers.hpp>#include <catch2/catch_test_spec.hpp>#include <catch2/internal/catch_string_manip.hpp>#include <catch2/internal/catch_list.hpp>#include <catch2/catch_test_case_info.hpp>#include <catch2/internal/catch_move_and_forward.hpp>#include <catch2/catch_version.hpp>
- file catch_reporter_xml.hpp
-
#include <catch2/internal/catch_xmlwriter.hpp>#include <catch2/catch_timer.hpp>
- file catch_reporters_all.hpp
- #include <catch2/reporters/catch_reporter_automake.hpp>#include <catch2/reporters/catch_reporter_compact.hpp>#include <catch2/reporters/catch_reporter_console.hpp>#include <catch2/reporters/catch_reporter_helpers.hpp>#include <catch2/reporters/catch_reporter_junit.hpp>#include <catch2/reporters/catch_reporter_multi.hpp>#include <catch2/reporters/catch_reporter_tap.hpp>#include <catch2/reporters/catch_reporter_teamcity.hpp>#include <catch2/reporters/catch_reporter_xml.hpp>
This is a convenience header for Catch2’s Reporter support.
It includes all of Catch2 headers related to reporters, including all reporters.
Generally the Catch2 users should use specific includes they need, but this header can be used instead for ease-of-experimentation, or just plain convenience, at the cost of (significantly) increased compilation times.
When a new header (reporter) is added to either the
reporterfolder, or to the corresponding internal subfolder, it should be added here.
- dir src/catch2/benchmark
- dir src/catch2
- dir src/catch2/benchmark/detail
- dir src/catch2/generators
- dir src/catch2/interfaces
- dir src/catch2/internal
- dir src/catch2/matchers/internal
- dir src/catch2/matchers
- dir src/catch2/reporters
- dir src