ManaPlus
Public Member Functions | Data Fields
doctest::detail::ResultBuilder Struct Reference

#include <doctest.h>

Inheritance diagram for doctest::detail::ResultBuilder:
doctest::AssertData

Public Member Functions

 ResultBuilder (assertType::Enum at, const char *file, int line, const char *expr, const char *exception_type="")
 
 ResultBuilder ()
 
 ~ ResultBuilder ()
 
 ResultBuilder (const ResultBuilder &)=delete
 
ResultBuilderoperator= (const ResultBuilder &)=delete
 
void setResult (const Result &res)
 
template<int comparison, typename L , typename R >
 __attribute__ ((noinline)) void binary_assert(const L &lhs
 
 if (m_failed||getContextOptions() ->success) m_decomposition
 
template<typename L >
 __attribute__ ((noinline)) void unary_assert(const L &val)
 
void unexpectedExceptionOccurred ()
 
bool log ()
 
void react () const
 
- Public Member Functions inherited from doctest::AssertData
 AssertData ()
 
 ~ AssertData ()
 
 AssertData (const AssertData &)=delete
 
AssertDataoperator= (const AssertData &)=delete
 

Data Fields

const R & rhs
 
- Data Fields inherited from doctest::AssertData
const TestCaseDatam_test_case
 
assertType::Enum m_at
 
const char * m_file
 
int m_line
 
const char * m_expr
 
bool m_failed
 
bool m_threw
 
String m_exception
 
String m_decomposition
 
bool m_threw_as
 
const char * m_exception_type
 

Detailed Description

Definition at line 1326 of file doctest.h.

Constructor & Destructor Documentation

◆ ResultBuilder() [1/3]

doctest::detail::ResultBuilder::ResultBuilder ( assertType::Enum  at,
const char *  file,
int  line,
const char *  expr,
const char *  exception_type = "" 
)

◆ ResultBuilder() [2/3]

doctest::detail::ResultBuilder::ResultBuilder ( )

◆ ~ ResultBuilder()

doctest::detail::ResultBuilder::~ ResultBuilder ( )

◆ ResultBuilder() [3/3]

doctest::detail::ResultBuilder::ResultBuilder ( const ResultBuilder )
delete

Member Function Documentation

◆ __attribute__() [1/2]

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

◆ __attribute__() [2/2]

template<typename L >
doctest::detail::ResultBuilder::__attribute__ ( (noinline)  ) const &
inline

OCLINT bitwise operator in conditional

Definition at line 1345 of file doctest.h.

1345  {
1346  m_failed = !val;
1347 
1348  if(m_at & assertType::is_false)
1349  m_failed = !m_failed;
1350 
1351  if(m_failed || getContextOptions()->success)
1352  m_decomposition = toString(val);
1353  }
const ContextOptions * getContextOptions()
String toString(const T &value)
Definition: doctest.h:883
assertType::Enum m_at
Definition: doctest.h:673
String m_decomposition
Definition: doctest.h:684

References doctest::detail::getContextOptions(), doctest::assertType::is_false, and doctest::toString().

◆ if()

doctest::detail::ResultBuilder::if ( m_failed||getContextOptions() ->  success)

◆ log()

bool doctest::detail::ResultBuilder::log ( )

◆ operator=()

ResultBuilder& doctest::detail::ResultBuilder::operator= ( const ResultBuilder )
delete

◆ react()

void doctest::detail::ResultBuilder::react ( ) const

◆ setResult()

void doctest::detail::ResultBuilder::setResult ( const Result res)

◆ unexpectedExceptionOccurred()

void doctest::detail::ResultBuilder::unexpectedExceptionOccurred ( )

Field Documentation

◆ rhs

const R& doctest::detail::ResultBuilder::rhs
Initial value:
{
m_failed = !RelationalComparator<comparison, L, R>()(lhs, rhs)

Definition at line 1338 of file doctest.h.


The documentation for this struct was generated from the following file: