mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Don't clear out all messages upon printing an assertion.
Previously, this would not print out any messages for the last CHECK ```cpp TEST_CASE("Foo") { INFO("Test case start"); for (int i = 0; i < 2; ++i) { INFO("The number is " << i); CHECK(i == 0); } CHECK(false); } ``` now it does.
This commit is contained in:
parent
9ceae8f51f
commit
b819432271
@ -145,8 +145,9 @@ namespace Catch {
|
||||
m_totals.assertions.failed++;
|
||||
}
|
||||
|
||||
if( m_reporter->assertionEnded( AssertionStats( result, m_messages, m_totals ) ) )
|
||||
m_messages.clear();
|
||||
// We have no use for the return value (whether messages should be cleared), because messages were made scoped
|
||||
// and should be let to clear themselves out.
|
||||
static_cast<void>(m_reporter->assertionEnded(AssertionStats(result, m_messages, m_totals)));
|
||||
|
||||
// Reset working state
|
||||
m_lastAssertionInfo = AssertionInfo( std::string(), m_lastAssertionInfo.lineInfo, "{Unknown expression after the reported line}" , m_lastAssertionInfo.resultDisposition );
|
||||
|
Loading…
Reference in New Issue
Block a user