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

#include <catch_assertionresult.h>

Collaboration diagram for Catch::AssertionResult:

Public Member Functions

 AssertionResult ()=delete
 
 AssertionResult (AssertionInfo const &info, AssertionResultData const &data)
 
bool isOk () const
 
bool succeeded () const
 
ResultWas::OfType getResultType () const
 
bool hasExpression () const
 
bool hasMessage () const
 
std::string getExpression () const
 
std::string getExpressionInMacro () const
 
bool hasExpandedExpression () const
 
std::string getExpandedExpression () const
 
std::string getMessage () const
 
SourceLineInfo getSourceInfo () const
 
StringRef getTestMacroName () const
 

Public Attributes

AssertionInfo m_info
 
AssertionResultData m_resultData
 

Detailed Description

Definition at line 34 of file catch_assertionresult.h.

Constructor & Destructor Documentation

◆ AssertionResult() [1/2]

Catch::AssertionResult::AssertionResult ( )
delete

◆ AssertionResult() [2/2]

Catch::AssertionResult::AssertionResult ( AssertionInfo const & info,
AssertionResultData const & data )

Definition at line 28 of file catch_assertionresult.cpp.

29 : m_info( info ),
30 m_resultData( data )
31 {}
AssertionResultData m_resultData

Member Function Documentation

◆ getExpandedExpression()

std::string Catch::AssertionResult::getExpandedExpression ( ) const

Definition at line 80 of file catch_assertionresult.cpp.

80 {
81 std::string expr = m_resultData.reconstructExpression();
82 return expr.empty()
84 : expr;
85 }
std::string getExpression() const
std::string reconstructExpression() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getExpression()

std::string Catch::AssertionResult::getExpression ( ) const

Definition at line 55 of file catch_assertionresult.cpp.

55 {
57 return "!(" + m_info.capturedExpression + ")";
58 else
60 }
bool isFalseTest(int flags)
ResultDisposition::Flags resultDisposition
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getExpressionInMacro()

std::string Catch::AssertionResult::getExpressionInMacro ( ) const

Definition at line 62 of file catch_assertionresult.cpp.

62 {
63 std::string expr;
64 if( m_info.macroName[0] == 0 )
66 else {
67 expr.reserve( m_info.macroName.size() + m_info.capturedExpression.size() + 4 );
68 expr += m_info.macroName;
69 expr += "( ";
71 expr += " )";
72 }
73 return expr;
74 }
auto size() const noexcept -> size_type
Here is the call graph for this function:

◆ getMessage()

std::string Catch::AssertionResult::getMessage ( ) const

Definition at line 87 of file catch_assertionresult.cpp.

87 {
88 return m_resultData.message;
89 }

◆ getResultType()

ResultWas::OfType Catch::AssertionResult::getResultType ( ) const

Definition at line 43 of file catch_assertionresult.cpp.

43 {
45 }
Here is the caller graph for this function:

◆ getSourceInfo()

SourceLineInfo Catch::AssertionResult::getSourceInfo ( ) const

Definition at line 90 of file catch_assertionresult.cpp.

90 {
91 return m_info.lineInfo;
92 }

◆ getTestMacroName()

StringRef Catch::AssertionResult::getTestMacroName ( ) const

Definition at line 94 of file catch_assertionresult.cpp.

94 {
95 return m_info.macroName;
96 }

◆ hasExpandedExpression()

bool Catch::AssertionResult::hasExpandedExpression ( ) const

Definition at line 76 of file catch_assertionresult.cpp.

76 {
78 }
std::string getExpandedExpression() const
Here is the call graph for this function:

◆ hasExpression()

bool Catch::AssertionResult::hasExpression ( ) const

Definition at line 47 of file catch_assertionresult.cpp.

47 {
48 return m_info.capturedExpression[0] != 0;
49 }
Here is the caller graph for this function:

◆ hasMessage()

bool Catch::AssertionResult::hasMessage ( ) const

Definition at line 51 of file catch_assertionresult.cpp.

51 {
52 return !m_resultData.message.empty();
53 }
Here is the caller graph for this function:

◆ isOk()

bool Catch::AssertionResult::isOk ( ) const

Definition at line 39 of file catch_assertionresult.cpp.

39 {
41 }
bool isOk(ResultWas::OfType resultType)
bool shouldSuppressFailure(int flags)
Here is the call graph for this function:

◆ succeeded()

bool Catch::AssertionResult::succeeded ( ) const

Definition at line 34 of file catch_assertionresult.cpp.

34 {
36 }
Here is the call graph for this function:

Member Data Documentation

◆ m_info

AssertionInfo Catch::AssertionResult::m_info

Definition at line 53 of file catch_assertionresult.h.

◆ m_resultData

AssertionResultData Catch::AssertionResult::m_resultData

Definition at line 54 of file catch_assertionresult.h.


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