mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01: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:
		| @@ -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( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský