spdlog
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
Catch Namespace Reference

Namespaces

namespace  Detail
 
namespace  Generators
 
namespace  literals
 
namespace  Matchers
 

Classes

struct  always_false
 
class  AssertionHandler
 
struct  AssertionInfo
 
struct  AssertionReaction
 
struct  AutoReg
 
class  BenchmarkLooper
 
class  BinaryExpr
 
class  Capturer
 
struct  CaseSensitive
 
struct  Counts
 
struct  Decomposer
 
class  ExceptionTranslatorRegistrar
 
class  ExprLhs
 
class  GeneratorException
 
struct  IConfig
 
struct  IContext
 
struct  IExceptionTranslator
 
struct  IExceptionTranslatorRegistry
 
struct  IGeneratorTracker
 
struct  IMutableContext
 
struct  IMutableEnumValuesRegistry
 
struct  IMutableRegistryHub
 
struct  IRegistryHub
 
struct  IResultCapture
 
struct  IRunner
 
struct  is_range
 
struct  is_unique
 
struct  is_unique< T0, T1, Rest... >
 
struct  IStream
 
struct  ITestCaseRegistry
 
struct  ITestInvoker
 
struct  ITransientExpression
 
class  LazyExpression
 
class  MatchExpr
 
struct  MessageBuilder
 
struct  MessageInfo
 
struct  MessageStream
 
struct  NameAndTags
 
class  NonCopyable
 
struct  not_this_one
 
struct  pluralise
 
struct  RegistrarForTagAliases
 
struct  ResultDisposition
 
struct  ResultWas
 
class  ReusableStringStream
 
struct  RunTests
 
class  ScopedMessage
 
class  Section
 
struct  SectionEndInfo
 
struct  SectionInfo
 
struct  ShowDurations
 
struct  SourceLineInfo
 
struct  StreamEndStop
 
struct  StringMaker
 
struct  StringMaker< bool >
 
struct  StringMaker< Catch::Detail::Approx >
 
struct  StringMaker< char * >
 
struct  StringMaker< char >
 
struct  StringMaker< char const * >
 
struct  StringMaker< char[SZ]>
 
struct  StringMaker< double >
 
struct  StringMaker< float >
 
struct  StringMaker< int >
 
struct  StringMaker< long >
 
struct  StringMaker< long long >
 
struct  StringMaker< R C::* >
 
struct  StringMaker< R, typename std::enable_if< is_range< R >::value &&!::Catch::Detail::IsStreamInsertable< R >::value >::type >
 
struct  StringMaker< signed char >
 
struct  StringMaker< signed char[SZ]>
 
struct  StringMaker< std::nullptr_t >
 
struct  StringMaker< std::string >
 
struct  StringMaker< std::wstring >
 
struct  StringMaker< T * >
 
struct  StringMaker< T[SZ]>
 
struct  StringMaker< unsigned char >
 
struct  StringMaker< unsigned char[SZ]>
 
struct  StringMaker< unsigned int >
 
struct  StringMaker< unsigned long >
 
struct  StringMaker< unsigned long long >
 
struct  StringMaker< wchar_t * >
 
struct  StringMaker< wchar_t const * >
 
class  StringRef
 A non-owning string class (similar to the forthcoming std::string_view) Note that, because a StringRef may be a substring of another string, it may not be null terminated. c_str() must return a null terminated string, however, and so the StringRef will internally take ownership (taking a copy), if necessary. In theory this ownership is not externally visible - but it does mean (substring) StringRefs should not be shared between threads. More...
 
class  TestCase
 
struct  TestCaseInfo
 
struct  TestFailureException
 
class  TestInvokerAsMethod
 
class  Timer
 
struct  Totals
 
class  UnaryExpr
 
struct  UseColour
 
struct  WaitForKeypress
 
struct  WarnAbout
 

Typedefs

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

Enumerations

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

Functions

unsigned int rngSeed ()
 
std::ostreamoperator<< (std::ostream &os, SourceLineInfo const &info)
 
template<typename T >
T const & operator+ (T const &value, StreamEndStop)
 
bool matchTest (TestCase const &testCase, TestSpec const &testSpec, IConfig const &config)
 
std::vector< TestCasefilterTests (std::vector< TestCase > const &testCases, TestSpec const &testSpec, IConfig const &config)
 
std::vector< TestCase > const & getAllTestCasesSorted (IConfig const &config)
 
auto operator+ (StringRef const &lhs, StringRef const &rhs) -> std::string
 
auto operator+ (StringRef const &lhs, char const *rhs) -> std::string
 
auto operator+ (char const *lhs, StringRef const &rhs) -> std::string
 
auto operator+= (std::string &lhs, StringRef const &sr) -> std::string &
 
auto operator<< (std::ostream &os, StringRef const &sr) -> std::ostream &
 
auto operator""_sr (char const *rawChars, std::size_t size) noexcept -> StringRef
 
auto makeTestInvoker (void(*testAsFunction)()) noexcept -> ITestInvoker *
 
template<typename C >
auto makeTestInvoker (void(C::*testAsMethod)()) noexcept -> ITestInvoker *
 
bool isOk (ResultWas::OfType resultType)
 
bool isJustInfo (int flags)
 
ResultDisposition::Flags operator| (ResultDisposition::Flags lhs, ResultDisposition::Flags rhs)
 
bool shouldContinueOnFailure (int flags)
 
bool isFalseTest (int flags)
 
bool shouldSuppressFailure (int flags)
 
std::ostreamcout ()
 
std::ostreamcerr ()
 
std::ostreamclog ()
 
auto makeStream (StringRef const &filename) -> IStream const *
 
template<typename Range >
std::string rangeToString (Range const &range)
 
template<typename Allocator >
std::string rangeToString (std::vector< bool, Allocator > const &v)
 
void formatReconstructedExpression (std::ostream &os, std::string const &lhs, StringRef op, std::string const &rhs)
 
template<typename LhsT , typename RhsT >
auto compareEqual (LhsT const &lhs, RhsT const &rhs) -> bool
 
template<typename T >
auto compareEqual (T *const &lhs, int rhs) -> bool
 
template<typename T >
auto compareEqual (T *const &lhs, long rhs) -> bool
 
template<typename T >
auto compareEqual (int lhs, T *const &rhs) -> bool
 
template<typename T >
auto compareEqual (long lhs, T *const &rhs) -> bool
 
template<typename LhsT , typename RhsT >
auto compareNotEqual (LhsT const &lhs, RhsT &&rhs) -> bool
 
template<typename T >
auto compareNotEqual (T *const &lhs, int rhs) -> bool
 
template<typename T >
auto compareNotEqual (T *const &lhs, long rhs) -> bool
 
template<typename T >
auto compareNotEqual (int lhs, T *const &rhs) -> bool
 
template<typename T >
auto compareNotEqual (long lhs, T *const &rhs) -> bool
 
void handleExpression (ITransientExpression const &expr)
 
template<typename T >
void handleExpression (ExprLhs< T > const &expr)
 
IResultCapturegetResultCapture ()
 
void handleExceptionMatchExpr (AssertionHandler &handler, std::string const &str, StringRef const &matcherString)
 
auto getCurrentNanosecondsSinceEpoch () -> uint64_t
 
auto getEstimatedClockResolution () -> uint64_t
 
IRegistryHub const & getRegistryHub ()
 
IMutableRegistryHubgetMutableRegistryHub ()
 
void cleanUp ()
 
std::string translateActiveException ()
 
bool startsWith (std::string const &s, std::string const &prefix)
 
bool startsWith (std::string const &s, char prefix)
 
bool endsWith (std::string const &s, std::string const &suffix)
 
bool endsWith (std::string const &s, char suffix)
 
bool contains (std::string const &s, std::string const &infix)
 
void toLowerInPlace (std::string &s)
 
std::string toLower (std::string const &s)
 
std::string trim (std::string const &str)
 
std::vector< StringRefsplitStringRef (StringRef str, char delimiter)
 
bool replaceInPlace (std::string &str, std::string const &replaceThis, std::string const &withThis)
 
void handleExceptionMatchExpr (AssertionHandler &handler, StringMatcher const &matcher, StringRef const &matcherString)
 
template<typename ArgT , typename MatcherT >
auto makeMatchExpr (ArgT const &arg, MatcherT const &matcher, StringRef const &matcherString) -> MatchExpr< ArgT, MatcherT >
 
void throw_exception (std::exception const &e)
 
IMutableContextgetCurrentMutableContext ()
 
IContextgetCurrentContext ()
 
void cleanUpContext ()
 
TestCase makeTestCase (ITestInvoker *testCase, std::string const &className, NameAndTags const &nameAndTags, SourceLineInfo const &lineInfo)
 

Variables

not_this_one begin (...)
 
not_this_one end (...)
 

Typedef Documentation

◆ exceptionTranslateFunction

Definition at line 2877 of file catch.hpp.

◆ ExceptionTranslators

Definition at line 2880 of file catch.hpp.

◆ IConfigPtr

Definition at line 4147 of file catch.hpp.

◆ IReporterFactoryPtr

using Catch::IReporterFactoryPtr = typedef std::shared_ptr<IReporterFactory>

Definition at line 2835 of file catch.hpp.

◆ StringMatcher

Definition at line 3602 of file catch.hpp.

Enumeration Type Documentation

◆ Verbosity

enum class Catch::Verbosity
strongprivate
Enumerator
Quiet 
Normal 
High 

Definition at line 4197 of file catch.hpp.

Function Documentation

◆ cerr()

std::ostream & Catch::cerr ( )

◆ cleanUp()

void Catch::cleanUp ( )

◆ cleanUpContext()

void Catch::cleanUpContext ( )

◆ clog()

std::ostream & Catch::clog ( )

◆ compareEqual() [1/5]

template<typename T >
auto Catch::compareEqual ( int  lhs,
T *const &  rhs 
) -> bool

Definition at line 2172 of file catch.hpp.

◆ compareEqual() [2/5]

template<typename LhsT , typename RhsT >
auto Catch::compareEqual ( LhsT const &  lhs,
RhsT const &  rhs 
) -> bool

Definition at line 2166 of file catch.hpp.

◆ compareEqual() [3/5]

template<typename T >
auto Catch::compareEqual ( long  lhs,
T *const &  rhs 
) -> bool

Definition at line 2174 of file catch.hpp.

◆ compareEqual() [4/5]

template<typename T >
auto Catch::compareEqual ( T *const &  lhs,
int  rhs 
) -> bool

Definition at line 2168 of file catch.hpp.

◆ compareEqual() [5/5]

template<typename T >
auto Catch::compareEqual ( T *const &  lhs,
long  rhs 
) -> bool

Definition at line 2170 of file catch.hpp.

◆ compareNotEqual() [1/5]

template<typename T >
auto Catch::compareNotEqual ( int  lhs,
T *const &  rhs 
) -> bool

Definition at line 2183 of file catch.hpp.

◆ compareNotEqual() [2/5]

template<typename LhsT , typename RhsT >
auto Catch::compareNotEqual ( LhsT const &  lhs,
RhsT &&  rhs 
) -> bool

Definition at line 2177 of file catch.hpp.

◆ compareNotEqual() [3/5]

template<typename T >
auto Catch::compareNotEqual ( long  lhs,
T *const &  rhs 
) -> bool

Definition at line 2185 of file catch.hpp.

◆ compareNotEqual() [4/5]

template<typename T >
auto Catch::compareNotEqual ( T *const &  lhs,
int  rhs 
) -> bool

Definition at line 2179 of file catch.hpp.

◆ compareNotEqual() [5/5]

template<typename T >
auto Catch::compareNotEqual ( T *const &  lhs,
long  rhs 
) -> bool

Definition at line 2181 of file catch.hpp.

◆ contains()

bool Catch::contains ( std::string const &  s,
std::string const &  infix 
)

◆ cout()

std::ostream & Catch::cout ( )

◆ endsWith() [1/2]

bool Catch::endsWith ( std::string const &  s,
char  suffix 
)

◆ endsWith() [2/2]

bool Catch::endsWith ( std::string const &  s,
std::string const &  suffix 
)

◆ filterTests()

std::vector< TestCase > Catch::filterTests ( std::vector< TestCase > const &  testCases,
TestSpec const &  testSpec,
IConfig const &  config 
)

◆ formatReconstructedExpression()

void Catch::formatReconstructedExpression ( std::ostream os,
std::string const &  lhs,
StringRef  op,
std::string const &  rhs 
)

◆ getAllTestCasesSorted()

std::vector< TestCase > const & Catch::getAllTestCasesSorted ( IConfig const &  config)

◆ getCurrentContext()

IContext & Catch::getCurrentContext ( )
inline

Definition at line 4179 of file catch.hpp.

◆ getCurrentMutableContext()

IMutableContext & Catch::getCurrentMutableContext ( )
inline

Definition at line 4172 of file catch.hpp.

◆ getCurrentNanosecondsSinceEpoch()

auto Catch::getCurrentNanosecondsSinceEpoch ( ) -> uint64_t

◆ getEstimatedClockResolution()

auto Catch::getEstimatedClockResolution ( ) -> uint64_t

◆ getMutableRegistryHub()

IMutableRegistryHub & Catch::getMutableRegistryHub ( )

◆ getRegistryHub()

IRegistryHub const & Catch::getRegistryHub ( )

◆ getResultCapture()

IResultCapture & Catch::getResultCapture ( )

◆ handleExceptionMatchExpr() [1/2]

void Catch::handleExceptionMatchExpr ( AssertionHandler handler,
std::string const &  str,
StringRef const &  matcherString 
)

◆ handleExceptionMatchExpr() [2/2]

void Catch::handleExceptionMatchExpr ( AssertionHandler handler,
StringMatcher const &  matcher,
StringRef const &  matcherString 
)
private

◆ handleExpression() [1/2]

template<typename T >
void Catch::handleExpression ( ExprLhs< T > const &  expr)

Definition at line 2248 of file catch.hpp.

◆ handleExpression() [2/2]

void Catch::handleExpression ( ITransientExpression const &  expr)

◆ isFalseTest()

bool Catch::isFalseTest ( int  flags)
inline

Definition at line 1252 of file catch.hpp.

◆ isJustInfo()

bool Catch::isJustInfo ( int  flags)

◆ isOk()

bool Catch::isOk ( ResultWas::OfType  resultType)

◆ makeMatchExpr()

template<typename ArgT , typename MatcherT >
auto Catch::makeMatchExpr ( ArgT const &  arg,
MatcherT const &  matcher,
StringRef const &  matcherString 
) -> MatchExpr<ArgT, MatcherT>
private

Definition at line 3607 of file catch.hpp.

◆ makeStream()

auto Catch::makeStream ( StringRef const &  filename) -> IStream const *

◆ makeTestCase()

TestCase Catch::makeTestCase ( ITestInvoker testCase,
std::string const &  className,
NameAndTags const &  nameAndTags,
SourceLineInfo const &  lineInfo 
)

◆ makeTestInvoker() [1/2]

auto Catch::makeTestInvoker ( void(*)()  testAsFunction) -> ITestInvoker *
privatenoexcept

◆ makeTestInvoker() [2/2]

template<typename C >
auto Catch::makeTestInvoker ( void(C::*)()  testAsMethod) -> ITestInvoker*
privatenoexcept

Definition at line 911 of file catch.hpp.

◆ matchTest()

bool Catch::matchTest ( TestCase const &  testCase,
TestSpec const &  testSpec,
IConfig const &  config 
)

◆ operator""_sr()

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

Definition at line 630 of file catch.hpp.

◆ operator+() [1/4]

auto Catch::operator+ ( char const *  lhs,
StringRef const &  rhs 
) -> std::string

◆ operator+() [2/4]

auto Catch::operator+ ( StringRef const &  lhs,
char const *  rhs 
) -> std::string

◆ operator+() [3/4]

auto Catch::operator+ ( StringRef const &  lhs,
StringRef const &  rhs 
) -> std::string

◆ operator+() [4/4]

template<typename T >
T const & Catch::operator+ ( T const &  value,
StreamEndStop   
)

Definition at line 463 of file catch.hpp.

◆ operator+=()

auto Catch::operator+= ( std::string lhs,
StringRef const &  sr 
) -> std::string &

◆ operator<<() [1/2]

std::ostream & Catch::operator<< ( std::ostream os,
SourceLineInfo const &  info 
)

◆ operator<<() [2/2]

auto Catch::operator<< ( std::ostream os,
StringRef const &  sr 
) -> std::ostream &

◆ operator|()

◆ rangeToString() [1/2]

template<typename Range >
std::string Catch::rangeToString ( Range const &  range)

Definition at line 1868 of file catch.hpp.

◆ rangeToString() [2/2]

template<typename Allocator >
std::string Catch::rangeToString ( std::vector< bool, Allocator > const &  v)

Definition at line 1874 of file catch.hpp.

◆ replaceInPlace()

bool Catch::replaceInPlace ( std::string str,
std::string const &  replaceThis,
std::string const &  withThis 
)

◆ rngSeed()

unsigned int Catch::rngSeed ( )

◆ shouldContinueOnFailure()

bool Catch::shouldContinueOnFailure ( int  flags)

◆ shouldSuppressFailure()

bool Catch::shouldSuppressFailure ( int  flags)

◆ splitStringRef()

std::vector< StringRef > Catch::splitStringRef ( StringRef  str,
char  delimiter 
)

◆ startsWith() [1/2]

bool Catch::startsWith ( std::string const &  s,
char  prefix 
)

◆ startsWith() [2/2]

bool Catch::startsWith ( std::string const &  s,
std::string const &  prefix 
)

◆ throw_exception()

void Catch::throw_exception ( std::exception const &  e)

◆ toLower()

std::string Catch::toLower ( std::string const &  s)

◆ toLowerInPlace()

void Catch::toLowerInPlace ( std::string s)

◆ translateActiveException()

std::string Catch::translateActiveException ( )

◆ trim()

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

Variable Documentation

◆ begin

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

◆ end

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