Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch_assertionresult.cpp
Go to the documentation of this file.
1/*
2 * Created by Phil on 8/8/12
3 * Copyright 2012 Two Blue Cubes Ltd. All rights reserved.
4 *
5 * Distributed under the Boost Software License, Version 1.0. (See accompanying
6 * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 */
8
10
11namespace Catch {
13 lazyExpression(_lazyExpression),
14 resultType(_resultType) {}
15
17
18 if( reconstructedExpression.empty() ) {
19 if( lazyExpression ) {
21 rss << lazyExpression;
23 }
24 }
26 }
27
29 : m_info( info ),
30 m_resultData( data )
31 {}
32
33 // Result was a success
37
38 // Result was a success, or failure is suppressed
42
46
48 return m_info.capturedExpression[0] != 0;
49 }
50
52 return !m_resultData.message.empty();
53 }
54
55 std::string AssertionResult::getExpression() const {
57 return "!(" + m_info.capturedExpression + ")";
58 else
60 }
61
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 }
75
79
81 std::string expr = m_resultData.reconstructExpression();
82 return expr.empty()
84 : expr;
85 }
86
87 std::string AssertionResult::getMessage() const {
88 return m_resultData.message;
89 }
93
97
98} // end namespace Catch
std::string getExpression() const
SourceLineInfo getSourceInfo() const
std::string getExpandedExpression() const
std::string getExpressionInMacro() const
ResultWas::OfType getResultType() const
AssertionResultData m_resultData
auto str() const -> std::string
auto size() const noexcept -> size_type
bool isOk(ResultWas::OfType resultType)
bool isFalseTest(int flags)
bool shouldSuppressFailure(int flags)
ResultDisposition::Flags resultDisposition
std::string reconstructExpression() const