mirror of
https://github.com/catchorg/Catch2.git
synced 2025-07-19 15:15:32 +02:00
Move resetAssertionInfo into RunContext::reportExpr
Because `RunContext::populateReaction` no longer implicitly depends on the value of `RunContext::m_lastAssertionInfo`, we don't have to delay the reset until `RunContext::reportExpr` is finished.
This commit is contained in:
parent
efcb76874e
commit
9be81c0e05
@ -615,7 +615,6 @@ namespace Catch {
|
||||
populateReaction(
|
||||
reaction, info.resultDisposition & ResultDisposition::Normal );
|
||||
}
|
||||
resetAssertionInfo();
|
||||
}
|
||||
void RunContext::reportExpr(
|
||||
AssertionInfo const &info,
|
||||
@ -623,13 +622,14 @@ namespace Catch {
|
||||
ITransientExpression const *expr,
|
||||
bool negated ) {
|
||||
|
||||
m_lastAssertionInfo = info;
|
||||
m_lastAssertionInfo.lineInfo = info.lineInfo;
|
||||
AssertionResultData data( resultType, LazyExpression( negated ) );
|
||||
|
||||
AssertionResult assertionResult{ info, CATCH_MOVE( data ) };
|
||||
assertionResult.m_resultData.lazyExpression.m_transientExpression = expr;
|
||||
|
||||
assertionEnded( CATCH_MOVE(assertionResult) );
|
||||
resetAssertionInfo();
|
||||
}
|
||||
|
||||
void RunContext::handleMessage(
|
||||
|
Loading…
x
Reference in New Issue
Block a user