Loading [MathJax]/extensions/tex2jax.js
LSST Applications g0fba68d861+05816baf74,g1ec0fe41b4+f536777771,g1fd858c14a+a9301854fb,g35bb328faa+fcb1d3bbc8,g4af146b050+a5c07d5b1d,g4d2262a081+6e5fcc2a4e,g53246c7159+fcb1d3bbc8,g56a49b3a55+9c12191793,g5a012ec0e7+3632fc3ff3,g60b5630c4e+ded28b650d,g67b6fd64d1+ed4b5058f4,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g8352419a5c+fcb1d3bbc8,g87b7deb4dc+7b42cf88bf,g8852436030+e5453db6e6,g89139ef638+ed4b5058f4,g8e3bb8577d+d38d73bdbd,g9125e01d80+fcb1d3bbc8,g94187f82dc+ded28b650d,g989de1cb63+ed4b5058f4,g9d31334357+ded28b650d,g9f33ca652e+50a8019d8c,gabe3b4be73+1e0a283bba,gabf8522325+fa80ff7197,gb1101e3267+d9fb1f8026,gb58c049af0+f03b321e39,gb665e3612d+2a0c9e9e84,gb89ab40317+ed4b5058f4,gcf25f946ba+e5453db6e6,gd6cbbdb0b4+bb83cc51f8,gdd1046aedd+ded28b650d,gde0f65d7ad+941d412827,ge278dab8ac+d65b3c2b70,ge410e46f29+ed4b5058f4,gf23fb2af72+b7cae620c0,gf5e32f922b+fcb1d3bbc8,gf67bdafdda+ed4b5058f4,w.2025.16
LSST Data Management Base Package
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
doctest::detail Namespace Reference

Namespaces

namespace  assertAction
 
namespace  binaryAssertComparison
 
namespace  types
 

Classes

class  ContextScope
 
struct  ContextScopeBase
 
struct  deferred_false
 
class  ExceptionTranslator
 OCLINT destructor of virtual class. More...
 
struct  Expression_lhs
 
struct  ExpressionDecomposer
 
struct  filldata
 
struct  filldata< const char[N]>
 
struct  filldata< const void * >
 
struct  filldata< T * >
 
struct  filldata< T[N]>
 
struct  has_insertion_operator
 
struct  has_insertion_operator< T, decltype(operator<<(declval< std::ostream & >(), declval< const T & >()), void())>
 
struct  IExceptionTranslator
 
struct  MessageBuilder
 
struct  RelationalComparator
 
struct  RelationalComparator< 0, L, R >
 
struct  RelationalComparator< 1, L, R >
 
struct  RelationalComparator< 2, L, R >
 
struct  RelationalComparator< 3, L, R >
 
struct  RelationalComparator< 4, L, R >
 
struct  RelationalComparator< 5, L, R >
 
struct  Result
 
struct  ResultBuilder
 
struct  should_stringify_as_underlying_type
 
struct  StringMakerBase
 
struct  StringMakerBase< true >
 
struct  Subcase
 
struct  TestCase
 
struct  TestFailureException
 
struct  TestSuite
 

Typedefs

using funcType = void (*)()
 
using assert_handler = void (*)(const AssertData&)
 
using reporterCreatorFunc = IReporter* (*)(const ContextOptions&)
 

Functions

template<typename T>
T && declval ()
 
template<class T>
constexpr T && forward (typename types::remove_reference< T >::type &t) noexcept
 
template<class T>
constexpr T && forward (typename types::remove_reference< T >::type &&t) noexcept
 
std::ostreamtlssPush ()
 
String tlssPop ()
 
template<typename T>
void filloss (std::ostream *stream, const T &in)
 
template<typename T, size_t N>
void filloss (std::ostream *stream, const T(&in)[N])
 
template<typename T>
String toStream (const T &in)
 
bool checkIfShouldThrow (assertType::Enum at)
 
void throwException ()
 
template<typename L, typename R>
String stringifyBinaryExpr (const L &lhs, const char *op, const R &rhs)
 
template<typename L, typename R>
bool eq (const L &lhs, const R &rhs)
 
template<typename L, typename R>
bool ne (const L &lhs, const R &rhs)
 
template<typename L, typename R>
bool lt (const L &lhs, const R &rhs)
 
template<typename L, typename R>
bool gt (const L &lhs, const R &rhs)
 
template<typename L, typename R>
bool le (const L &lhs, const R &rhs)
 
template<typename L, typename R>
bool ge (const L &lhs, const R &rhs)
 
int regTest (const TestCase &tc)
 
int setTestSuite (const TestSuite &ts)
 
bool isDebuggerActive ()
 
template<typename T>
int instantiationHelper (const T &)
 
void failed_out_of_a_testing_context (const AssertData &ad)
 
bool decomp_assert (assertType::Enum at, const char *file, int line, const char *expr, const Result &result)
 
template<int comparison, typename L, typename R>
 __attribute__ ((noinline)) bool binary_assert(assertType
 
template<typename L>
 __attribute__ ((noinline)) bool unary_assert(assertType
 
void registerExceptionTranslatorImpl (const IExceptionTranslator *et)
 
template<typename L>
ContextScope< L > MakeContextScope (const L &lambda)
 
void registerReporterImpl (const char *name, int prio, reporterCreatorFunc c, bool isReporter)
 
template<typename Reporter>
IReporterreporterCreator (const ContextOptions &o)
 

Typedef Documentation

◆ assert_handler

using doctest::detail::assert_handler = void (*)(const AssertData&)

Definition at line 1960 of file doctest.h.

◆ funcType

using doctest::detail::funcType = void (*)()

Definition at line 1612 of file doctest.h.

◆ reporterCreatorFunc

Definition at line 2099 of file doctest.h.

Function Documentation

◆ __attribute__() [1/2]

template<int comparison, typename L, typename R>
doctest::detail::__attribute__ ( (noinline) )

Definition at line 1764 of file doctest.h.

1766 {
1767 bool failed = !RelationalComparator<comparison, L, R>()(lhs, rhs);
1768
1769 // ###################################################################################
1770 // IF THE DEBUGGER BREAKS HERE - GO 1 LEVEL UP IN THE CALLSTACK FOR THE FAILING ASSERT
1771 // THIS IS THE EFFECT OF HAVING 'DOCTEST_CONFIG_SUPER_FAST_ASSERTS' DEFINED
1772 // ###################################################################################
1775 return !failed;
1776 }
#define DOCTEST_ASSERT_IN_TESTS(decomp)
Definition doctest.h:1753
#define DOCTEST_ASSERT_OUT_OF_TESTS(decomp)
Definition doctest.h:1736
String stringifyBinaryExpr(const L &lhs, const char *op, const R &rhs)
Definition doctest.h:1354

◆ __attribute__() [2/2]

template<typename L>
doctest::detail::__attribute__ ( (noinline) )

OCLINT bitwise operator in conditional

Definition at line 1779 of file doctest.h.

1780 {
1781 bool failed = !val;
1782
1783 if(at & assertType::is_false)
1784 failed = !failed;
1785
1786 // ###################################################################################
1787 // IF THE DEBUGGER BREAKS HERE - GO 1 LEVEL UP IN THE CALLSTACK FOR THE FAILING ASSERT
1788 // THIS IS THE EFFECT OF HAVING 'DOCTEST_CONFIG_SUPER_FAST_ASSERTS' DEFINED
1789 // ###################################################################################
1792 return !failed;
1793 }
#define DOCTEST_STRINGIFY(...)
Definition doctest.h:1088

◆ checkIfShouldThrow()

bool doctest::detail::checkIfShouldThrow ( assertType::Enum at)

◆ declval()

template<typename T>
T && doctest::detail::declval ( )

◆ decomp_assert()

bool doctest::detail::decomp_assert ( assertType::Enum at,
const char * file,
int line,
const char * expr,
const Result & result )

◆ eq()

template<typename L, typename R>
bool doctest::detail::eq ( const L & lhs,
const R & rhs )

Definition at line 1474 of file doctest.h.

◆ failed_out_of_a_testing_context()

void doctest::detail::failed_out_of_a_testing_context ( const AssertData & ad)

◆ filloss() [1/2]

template<typename T>
void doctest::detail::filloss ( std::ostream * stream,
const T & in )

Definition at line 1052 of file doctest.h.

1052 {
1053 filldata<T>::fill(stream, in);
1054 }
static void fill(std::ostream *stream, const T &in)
Definition doctest.h:1151

◆ filloss() [2/2]

template<typename T, size_t N>
void doctest::detail::filloss ( std::ostream * stream,
const T(&) in[N] )

Definition at line 1057 of file doctest.h.

1057 { // NOLINT(*-avoid-c-arrays)
1058 // T[N], T(&)[N], T(&&)[N] have same behaviour.
1059 // Hence remove reference.
1060 filloss<typename types::remove_reference<decltype(in)>::type>(stream, in);
1061 }
void filloss(std::ostream *stream, const T &in)
Definition doctest.h:1052

◆ forward() [1/2]

template<class T>
T && doctest::detail::forward ( typename types::remove_reference< T >::type && t)
constexprnoexcept

Definition at line 988 of file doctest.h.

988 {
989 return static_cast<T&&>(t);
990 }

◆ forward() [2/2]

template<class T>
T && doctest::detail::forward ( typename types::remove_reference< T >::type & t)
constexprnoexcept

Definition at line 983 of file doctest.h.

983 {
984 return static_cast<T&&>(t);
985 }

◆ ge()

template<typename L, typename R>
bool doctest::detail::ge ( const L & lhs,
const R & rhs )

Definition at line 1479 of file doctest.h.

◆ gt()

template<typename L, typename R>
bool doctest::detail::gt ( const L & lhs,
const R & rhs )

Definition at line 1477 of file doctest.h.

◆ instantiationHelper()

template<typename T>
int doctest::detail::instantiationHelper ( const T & )

Definition at line 1653 of file doctest.h.

1653{ return 0; }

◆ isDebuggerActive()

bool doctest::detail::isDebuggerActive ( )

◆ le()

template<typename L, typename R>
bool doctest::detail::le ( const L & lhs,
const R & rhs )

Definition at line 1478 of file doctest.h.

◆ lt()

template<typename L, typename R>
bool doctest::detail::lt ( const L & lhs,
const R & rhs )

Definition at line 1476 of file doctest.h.

◆ MakeContextScope()

template<typename L>
ContextScope< L > doctest::detail::MakeContextScope ( const L & lambda)

Definition at line 1909 of file doctest.h.

1909 {
1910 return ContextScope<L>(lambda);
1911 }

◆ ne()

template<typename L, typename R>
bool doctest::detail::ne ( const L & lhs,
const R & rhs )

Definition at line 1475 of file doctest.h.

◆ registerExceptionTranslatorImpl()

void doctest::detail::registerExceptionTranslatorImpl ( const IExceptionTranslator * et)

◆ registerReporterImpl()

void doctest::detail::registerReporterImpl ( const char * name,
int prio,
reporterCreatorFunc c,
bool isReporter )

◆ regTest()

int doctest::detail::regTest ( const TestCase & tc)

◆ reporterCreator()

template<typename Reporter>
IReporter * doctest::detail::reporterCreator ( const ContextOptions & o)

Definition at line 2104 of file doctest.h.

2104 {
2105 return new Reporter(o);
2106 }

◆ setTestSuite()

int doctest::detail::setTestSuite ( const TestSuite & ts)

◆ stringifyBinaryExpr()

template<typename L, typename R>
String doctest::detail::stringifyBinaryExpr ( const L & lhs,
const char * op,
const R & rhs )

Definition at line 1354 of file doctest.h.

1355 {
1356 return (DOCTEST_STRINGIFY(lhs)) + op + (DOCTEST_STRINGIFY(rhs));
1357 }

◆ throwException()

void doctest::detail::throwException ( )

◆ tlssPop()

String doctest::detail::tlssPop ( )

◆ tlssPush()

std::ostream * doctest::detail::tlssPush ( )

◆ toStream()

template<typename T>
String doctest::detail::toStream ( const T & in)

Definition at line 1064 of file doctest.h.

1064 {
1065 std::ostream* stream = tlssPush();
1066 filloss(stream, in);
1067 return tlssPop();
1068 }
String tlssPop()
std::ostream * tlssPush()