Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
Catch Namespace Reference

Namespaces

 Detail
 
 Generators
 
 literals
 
 Matchers
 

Classes

class  AssertionHandler
 
struct  AssertionInfo
 
struct  AssertionReaction
 
struct  AutoReg
 
class  BenchmarkLooper
 
class  BinaryExpr
 
class  Capturer
 
struct  CaseSensitive
 
struct  Counts
 
struct  Decomposer
 
class  ExceptionTranslatorRegistrar
 
class  ExprLhs
 
struct  IExceptionTranslator
 
struct  IExceptionTranslatorRegistry
 
struct  IGeneratorTracker
 
struct  IMutableRegistryHub
 
struct  IRegistryHub
 
struct  IResultCapture
 
struct  IRunner
 
struct  is_range
 
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
 
class  ScopedMessage
 
class  Section
 
struct  SectionEndInfo
 
struct  SectionInfo
 
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
 
class  TestCase
 
struct  TestCaseInfo
 
struct  TestFailureException
 
class  TestInvokerAsMethod
 
class  Timer
 
struct  Totals
 
class  UnaryExpr
 

Typedefs

using ITestCasePtr = std::shared_ptr< ITestInvoker >
 
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 >
 

Functions

unsigned int rngSeed ()
 
std::ostream & operator<< (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::ostream & cout ()
 
std::ostream & cerr ()
 
std::ostream & clog ()
 
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)
 
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)
 
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

using Catch::exceptionTranslateFunction = typedef std::string(*)(

Definition at line 2208 of file catch.hpp.

using Catch::ExceptionTranslators = typedef std::vector<std::unique_ptr<IExceptionTranslator const>>

Definition at line 2211 of file catch.hpp.

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

Definition at line 2166 of file catch.hpp.

using Catch::ITestCasePtr = typedef std::shared_ptr<ITestInvoker>

Definition at line 456 of file catch.hpp.

using Catch::StringMatcher = typedef Matchers::Impl::MatcherBase<std::string>

Definition at line 2935 of file catch.hpp.

Function Documentation

std::ostream& Catch::cerr ( )
void Catch::cleanUp ( )
std::ostream& Catch::clog ( )

Referenced by lngamma_fftlog().

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

Definition at line 1523 of file catch.hpp.

Referenced by Catch::ExprLhs< LhsT >::operator==().

1523 { return static_cast<bool>(lhs == rhs); }
template<typename T >
auto Catch::compareEqual ( T *const &  lhs,
int  rhs 
) -> bool

Definition at line 1525 of file catch.hpp.

1525 { return lhs == reinterpret_cast<void const*>( rhs ); }
template<typename T >
auto Catch::compareEqual ( T *const &  lhs,
long  rhs 
) -> bool

Definition at line 1527 of file catch.hpp.

1527 { return lhs == reinterpret_cast<void const*>( rhs ); }
template<typename T >
auto Catch::compareEqual ( int  lhs,
T *const &  rhs 
) -> bool

Definition at line 1529 of file catch.hpp.

1529 { return reinterpret_cast<void const*>( lhs ) == rhs; }
template<typename T >
auto Catch::compareEqual ( long  lhs,
T *const &  rhs 
) -> bool

Definition at line 1531 of file catch.hpp.

1531 { return reinterpret_cast<void const*>( lhs ) == rhs; }
template<typename LhsT , typename RhsT >
auto Catch::compareNotEqual ( LhsT const &  lhs,
RhsT &&  rhs 
) -> bool

Definition at line 1534 of file catch.hpp.

Referenced by Catch::ExprLhs< LhsT >::operator!=().

1534 { return static_cast<bool>(lhs != rhs); }
template<typename T >
auto Catch::compareNotEqual ( T *const &  lhs,
int  rhs 
) -> bool

Definition at line 1536 of file catch.hpp.

1536 { return lhs != reinterpret_cast<void const*>( rhs ); }
template<typename T >
auto Catch::compareNotEqual ( T *const &  lhs,
long  rhs 
) -> bool

Definition at line 1538 of file catch.hpp.

1538 { return lhs != reinterpret_cast<void const*>( rhs ); }
template<typename T >
auto Catch::compareNotEqual ( int  lhs,
T *const &  rhs 
) -> bool

Definition at line 1540 of file catch.hpp.

1540 { return reinterpret_cast<void const*>( lhs ) != rhs; }
template<typename T >
auto Catch::compareNotEqual ( long  lhs,
T *const &  rhs 
) -> bool

Definition at line 1542 of file catch.hpp.

1542 { return reinterpret_cast<void const*>( lhs ) != rhs; }
bool Catch::contains ( std::string const &  s,
std::string const &  infix 
)
bool Catch::endsWith ( std::string const &  s,
std::string const &  suffix 
)
bool Catch::endsWith ( std::string const &  s,
char  suffix 
)
std::vector<TestCase> Catch::filterTests ( std::vector< TestCase > const &  testCases,
TestSpec const &  testSpec,
IConfig const &  config 
)
void Catch::formatReconstructedExpression ( std::ostream &  os,
std::string const &  lhs,
StringRef  op,
std::string const &  rhs 
)
std::vector<TestCase> const& Catch::getAllTestCasesSorted ( IConfig const &  config)
auto Catch::getCurrentNanosecondsSinceEpoch ( ) -> uint64_t
auto Catch::getEstimatedClockResolution ( ) -> uint64_t
IRegistryHub const& Catch::getRegistryHub ( )
IResultCapture& Catch::getResultCapture ( )
void Catch::handleExceptionMatchExpr ( AssertionHandler handler,
std::string const &  str,
StringRef const &  matcherString 
)
void Catch::handleExceptionMatchExpr ( AssertionHandler handler,
StringMatcher const &  matcher,
StringRef const &  matcherString 
)
void Catch::handleExpression ( ITransientExpression const &  expr)
template<typename T >
void Catch::handleExpression ( ExprLhs< T > const &  expr)

Definition at line 1591 of file catch.hpp.

References handleExpression(), and Catch::ExprLhs< LhsT >::makeUnaryExpr().

1591  {
1592  handleExpression( expr.makeUnaryExpr() );
1593  }
void handleExpression(ExprLhs< T > const &expr)
Definition: catch.hpp:1591
bool Catch::isFalseTest ( int  flags)
inline

Definition at line 735 of file catch.hpp.

References Catch::ResultDisposition::FalseTest, and shouldSuppressFailure().

735 { return ( flags & ResultDisposition::FalseTest ) != 0; }
bool Catch::isJustInfo ( int  flags)
bool Catch::isOk ( ResultWas::OfType  resultType)
template<typename ArgT , typename MatcherT >
auto Catch::makeMatchExpr ( ArgT const &  arg,
MatcherT const &  matcher,
StringRef const &  matcherString 
) -> MatchExpr<ArgT, MatcherT>

Definition at line 2940 of file catch.hpp.

2940  {
2941  return MatchExpr<ArgT, MatcherT>( arg, matcher, matcherString );
2942  }
auto Catch::makeStream ( StringRef const &  filename) -> IStream const *
TestCase Catch::makeTestCase ( ITestInvoker testCase,
std::string const &  className,
NameAndTags const &  nameAndTags,
SourceLineInfo const &  lineInfo 
)
auto Catch::makeTestInvoker ( void(*)()  testAsFunction) -> ITestInvoker *
noexcept
template<typename C >
auto Catch::makeTestInvoker ( void(C::*)()  testAsMethod) -> ITestInvoker*
noexcept

Definition at line 617 of file catch.hpp.

617  {
618  return new(std::nothrow) TestInvokerAsMethod<C>( testAsMethod );
619 }
bool Catch::matchTest ( TestCase const &  testCase,
TestSpec const &  testSpec,
IConfig const &  config 
)
auto Catch::operator""_sr ( char const *  rawChars,
std::size_t  size 
) -> StringRef
inlinenoexcept

Definition at line 589 of file catch.hpp.

589  {
590  return StringRef( rawChars, size );
591  }
template<typename T >
T const& Catch::operator+ ( T const &  value,
StreamEndStop   
)

Definition at line 417 of file catch.hpp.

References Catch::Generators::value().

Referenced by nlohmann::detail::json_reverse_iterator< Base >::operator+(), nlohmann::detail::json_reverse_iterator< Base >::operator[](), and Catch::StringRef::size().

417  {
418  return value;
419  }
auto value(T const &val) -> Generator< T >
Definition: catch.hpp:3177
auto Catch::operator+ ( StringRef const &  lhs,
StringRef const &  rhs 
) -> std::string
auto Catch::operator+ ( StringRef const &  lhs,
char const *  rhs 
) -> std::string
auto Catch::operator+ ( char const *  lhs,
StringRef const &  rhs 
) -> std::string
auto Catch::operator+= ( std::string &  lhs,
StringRef const &  sr 
) -> std::string &
std::ostream& Catch::operator<< ( std::ostream &  os,
SourceLineInfo const &  info 
)

Referenced by Catch::StringRef::size().

auto Catch::operator<< ( std::ostream &  os,
StringRef const &  sr 
) -> std::ostream &
template<typename Range >
std::string Catch::rangeToString ( Range const &  range)

Definition at line 1294 of file catch.hpp.

References begin, end, and rangeToString().

Referenced by Catch::StringMaker< R, typename std::enable_if< is_range< R >::value &&!::Catch::Detail::IsStreamInsertable< R >::value >::type >::convert(), and Catch::StringMaker< T[SZ]>::convert().

1294  {
1296  }
not_this_one end(...)
not_this_one begin(...)
auto range(T const &first, T const &last) -> Generator< T >
Definition: catch.hpp:3156
std::string rangeToString(std::vector< bool, Allocator > const &v)
Definition: catch.hpp:1300
template<typename Allocator >
std::string Catch::rangeToString ( std::vector< bool, Allocator > const &  v)

Definition at line 1300 of file catch.hpp.

References Catch::ReusableStringStream::str(), and Catch::Detail::stringify().

Referenced by rangeToString().

1300  {
1301  ReusableStringStream rss;
1302  rss << "{ ";
1303  bool first = true;
1304  for( bool b : v ) {
1305  if( first )
1306  first = false;
1307  else
1308  rss << ", ";
1309  rss << ::Catch::Detail::stringify( b );
1310  }
1311  rss << " }";
1312  return rss.str();
1313  }
std::string stringify(const T &e)
Definition: catch.hpp:955
bool Catch::replaceInPlace ( std::string &  str,
std::string const &  replaceThis,
std::string const &  withThis 
)
unsigned int Catch::rngSeed ( )
bool Catch::shouldContinueOnFailure ( int  flags)
bool Catch::shouldSuppressFailure ( int  flags)

Referenced by isFalseTest().

bool Catch::startsWith ( std::string const &  s,
std::string const &  prefix 
)
bool Catch::startsWith ( std::string const &  s,
char  prefix 
)
void Catch::throw_exception ( std::exception const &  e)
std::string Catch::toLower ( std::string const &  s)
void Catch::toLowerInPlace ( std::string &  s)
std::string Catch::translateActiveException ( )
std::string Catch::trim ( std::string const &  str)

Variable Documentation