ManaPlus
Data Structures | Public Member Functions | Private Attributes
Catch::ResultBuilder Class Reference

#include <catch.hpp>

Data Structures

struct  ExprComponents
 

Public Member Functions

 ResultBuilder (char const *macroName, SourceLineInfo const &lineInfo, char const *capturedExpression, ResultDisposition::Flags resultDisposition, char const *secondArg="")
 
template<typename T >
ExpressionLhs< T const & > operator<= (T const &operand)
 
ExpressionLhs< bool > operator<= (bool value)
 
template<typename T >
ResultBuilderoperator<< (T const &value)
 
template<typename RhsT >
STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison & operator&& (RhsT const &)
 
template<typename RhsT >
STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison & operator|| (RhsT const &)
 
ResultBuildersetResultType (ResultWas::OfType result)
 
ResultBuildersetResultType (bool result)
 
ResultBuildersetLhs (std::string const &lhs)
 
ResultBuildersetRhs (std::string const &rhs)
 
ResultBuildersetOp (std::string const &op)
 
void endExpression ()
 
std::string reconstructExpression () const
 
AssertionResult build () const
 
void useActiveException (ResultDisposition::Flags resultDisposition=ResultDisposition::Normal)
 
void captureResult (ResultWas::OfType resultType)
 
void captureExpression ()
 
void captureExpectedException (std::string const &expectedMessage)
 
void captureExpectedException (Matchers::Impl::Matcher< std::string > const &matcher)
 
void handleResult (AssertionResult const &result)
 
void react ()
 
bool shouldDebugBreak () const
 
bool allowThrows () const
 

Private Attributes

AssertionInfo m_assertionInfo
 
AssertionResultData m_data
 
struct Catch::ResultBuilder::ExprComponents m_exprComponents
 
CopyableStream m_stream
 
bool m_shouldDebugBreak
 
bool m_shouldThrow
 

Detailed Description

Definition at line 1226 of file catch.hpp.

Constructor & Destructor Documentation

◆ ResultBuilder()

Catch::ResultBuilder::ResultBuilder ( char const *  macroName,
SourceLineInfo const &  lineInfo,
char const *  capturedExpression,
ResultDisposition::Flags  resultDisposition,
char const *  secondArg = "" 
)

Member Function Documentation

◆ allowThrows()

bool Catch::ResultBuilder::allowThrows ( ) const

◆ build()

AssertionResult Catch::ResultBuilder::build ( ) const

◆ captureExpectedException() [1/2]

void Catch::ResultBuilder::captureExpectedException ( Matchers::Impl::Matcher< std::string > const &  matcher)

◆ captureExpectedException() [2/2]

void Catch::ResultBuilder::captureExpectedException ( std::string const &  expectedMessage)

◆ captureExpression()

void Catch::ResultBuilder::captureExpression ( )

◆ captureResult()

void Catch::ResultBuilder::captureResult ( ResultWas::OfType  resultType)

◆ endExpression()

void Catch::ResultBuilder::endExpression ( )

◆ handleResult()

void Catch::ResultBuilder::handleResult ( AssertionResult const &  result)

◆ operator&&()

template<typename RhsT >
STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& Catch::ResultBuilder::operator&& ( RhsT const &  )

◆ operator<<()

template<typename T >
ResultBuilder& Catch::ResultBuilder::operator<< ( T const &  value)
inline

Definition at line 1239 of file catch.hpp.

1239  {
1240  m_stream.oss << value;
1241  return *this;
1242  }
CopyableStream m_stream
Definition: catch.hpp:1276
std::ostringstream oss
Definition: catch.hpp:1223

◆ operator<=() [1/2]

ExpressionLhs< bool > Catch::ResultBuilder::operator<= ( bool  value)
inline

Definition at line 1880 of file catch.hpp.

1893  {
1894  return ExpressionLhs<bool>( *this, value );
1895  }

◆ operator<=() [2/2]

template<typename T >
ExpressionLhs< T const & > Catch::ResultBuilder::operator<= ( T const &  operand)
inline

Definition at line 1880 of file catch.hpp.

1889  {
1890  return ExpressionLhs<T const&>( *this, operand );
1891  }

◆ operator||()

template<typename RhsT >
STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& Catch::ResultBuilder::operator|| ( RhsT const &  )

◆ react()

void Catch::ResultBuilder::react ( )

◆ reconstructExpression()

std::string Catch::ResultBuilder::reconstructExpression ( ) const

◆ setLhs()

ResultBuilder& Catch::ResultBuilder::setLhs ( std::string const &  lhs)

◆ setOp()

ResultBuilder& Catch::ResultBuilder::setOp ( std::string const &  op)

◆ setResultType() [1/2]

ResultBuilder& Catch::ResultBuilder::setResultType ( bool  result)

◆ setResultType() [2/2]

ResultBuilder& Catch::ResultBuilder::setResultType ( ResultWas::OfType  result)

◆ setRhs()

ResultBuilder& Catch::ResultBuilder::setRhs ( std::string const &  rhs)

◆ shouldDebugBreak()

bool Catch::ResultBuilder::shouldDebugBreak ( ) const

◆ useActiveException()

void Catch::ResultBuilder::useActiveException ( ResultDisposition::Flags  resultDisposition = ResultDisposition::Normal)

Field Documentation

◆ m_assertionInfo

AssertionInfo Catch::ResultBuilder::m_assertionInfo
private

Definition at line 1269 of file catch.hpp.

◆ m_data

AssertionResultData Catch::ResultBuilder::m_data
private

Definition at line 1270 of file catch.hpp.

◆ m_exprComponents

struct Catch::ResultBuilder::ExprComponents Catch::ResultBuilder::m_exprComponents
private

◆ m_shouldDebugBreak

bool Catch::ResultBuilder::m_shouldDebugBreak
private

Definition at line 1278 of file catch.hpp.

◆ m_shouldThrow

bool Catch::ResultBuilder::m_shouldThrow
private

Definition at line 1279 of file catch.hpp.

◆ m_stream

CopyableStream Catch::ResultBuilder::m_stream
private

Definition at line 1276 of file catch.hpp.


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