Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
Catch::LazyExpression Class Reference

#include <catch_assertionhandler.h>

Public Member Functions

 LazyExpression (bool isNegated)
 
 LazyExpression (LazyExpression const &other)
 
LazyExpressionoperator= (LazyExpression const &)=delete
 
 operator bool () const
 
 LazyExpression (bool isNegated)
 
 LazyExpression (LazyExpression const &other)
 
LazyExpressionoperator= (LazyExpression const &)=delete
 
 operator bool () const
 

Friends

class AssertionHandler
 
struct AssertionStats
 
class RunContext
 
auto operator<< (std::ostream &os, LazyExpression const &lazyExpr) -> std::ostream &
 
auto operator<< (std::ostream &os, LazyExpression const &lazyExpr) -> std::ostream &
 

Detailed Description

Definition at line 2151 of file catch.hpp.

Constructor & Destructor Documentation

◆ LazyExpression() [1/4]

Catch::LazyExpression::LazyExpression ( bool isNegated)

Definition at line 28 of file catch_assertionhandler.cpp.

29 : m_isNegated( isNegated )
30 {}

◆ LazyExpression() [2/4]

Catch::LazyExpression::LazyExpression ( LazyExpression const & other)

Definition at line 32 of file catch_assertionhandler.cpp.

32: m_isNegated( other.m_isNegated ) {}

◆ LazyExpression() [3/4]

Catch::LazyExpression::LazyExpression ( bool isNegated)

◆ LazyExpression() [4/4]

Catch::LazyExpression::LazyExpression ( LazyExpression const & other)

Member Function Documentation

◆ operator bool() [1/2]

Catch::LazyExpression::operator bool ( ) const
explicit

Definition at line 34 of file catch_assertionhandler.cpp.

34 {
35 return m_transientExpression != nullptr;
36 }

◆ operator bool() [2/2]

Catch::LazyExpression::operator bool ( ) const
explicit

◆ operator=() [1/2]

LazyExpression & Catch::LazyExpression::operator= ( LazyExpression const & )
delete

◆ operator=() [2/2]

LazyExpression & Catch::LazyExpression::operator= ( LazyExpression const & )
delete

Friends And Related Symbol Documentation

◆ AssertionHandler

Definition at line 23 of file catch_assertionhandler.h.

◆ AssertionStats

Definition at line 24 of file catch_assertionhandler.h.

◆ operator<< [1/2]

auto operator<< ( std::ostream & os,
LazyExpression const & lazyExpr ) -> std::ostream&
friend

Definition at line 38 of file catch_assertionhandler.cpp.

38 {
39 if( lazyExpr.m_isNegated )
40 os << "!";
41
42 if( lazyExpr ) {
43 if( lazyExpr.m_isNegated && lazyExpr.m_transientExpression->isBinaryExpression() )
44 os << "(" << *lazyExpr.m_transientExpression << ")";
45 else
46 os << *lazyExpr.m_transientExpression;
47 }
48 else {
49 os << "{** error - unchecked empty expression requested **}";
50 }
51 return os;
52 }
os_t os

◆ operator<< [2/2]

auto operator<< ( std::ostream & os,
LazyExpression const & lazyExpr ) -> std::ostream&
friend

Definition at line 38 of file catch_assertionhandler.cpp.

38 {
39 if( lazyExpr.m_isNegated )
40 os << "!";
41
42 if( lazyExpr ) {
43 if( lazyExpr.m_isNegated && lazyExpr.m_transientExpression->isBinaryExpression() )
44 os << "(" << *lazyExpr.m_transientExpression << ")";
45 else
46 os << *lazyExpr.m_transientExpression;
47 }
48 else {
49 os << "{** error - unchecked empty expression requested **}";
50 }
51 return os;
52 }

◆ RunContext

RunContext
friend

Definition at line 25 of file catch_assertionhandler.h.


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