mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 14:09:26 +00:00
Renamed ShouldNegate to FalseTest
This commit is contained in:
parent
10801c2876
commit
be9fe76101
4 changed files with 16 additions and 18 deletions
|
@ -18,10 +18,6 @@
|
|||
|
||||
namespace Catch {
|
||||
|
||||
inline bool isFalseTest( int flags ) {
|
||||
return ( flags & ResultDisposition::NegateResult ) != 0;
|
||||
}
|
||||
|
||||
ResultBuilder::ResultBuilder( char const* macroName,
|
||||
SourceLineInfo const& lineInfo,
|
||||
char const* capturedExpression,
|
||||
|
@ -94,10 +90,12 @@ namespace Catch {
|
|||
AssertionResultData data = m_data;
|
||||
|
||||
// Flip bool results if testFalse is set
|
||||
if( m_exprComponents.testFalse && data.resultType == ResultWas::Ok )
|
||||
data.resultType = ResultWas::ExpressionFailed;
|
||||
else if( m_exprComponents.testFalse && data.resultType == ResultWas::ExpressionFailed )
|
||||
data.resultType = ResultWas::Ok;
|
||||
if( m_exprComponents.testFalse ) {
|
||||
if( data.resultType == ResultWas::Ok )
|
||||
data.resultType = ResultWas::ExpressionFailed;
|
||||
else if( data.resultType == ResultWas::ExpressionFailed )
|
||||
data.resultType = ResultWas::Ok;
|
||||
}
|
||||
|
||||
data.message = m_stream.oss.str();
|
||||
data.reconstructedExpression = reconstructExpression();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue