MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / AssertionStats

Method AssertionStats

unittests/catch.hpp:7549–7567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7547 {}
7548
7549 AssertionStats::AssertionStats( AssertionResult const& _assertionResult,
7550 std::vector<MessageInfo> const& _infoMessages,
7551 Totals const& _totals )
7552 : assertionResult( _assertionResult ),
7553 infoMessages( _infoMessages ),
7554 totals( _totals )
7555 {
7556 assertionResult.m_resultData.lazyExpression.m_transientExpression = _assertionResult.m_resultData.lazyExpression.m_transientExpression;
7557
7558 if( assertionResult.hasMessage() ) {
7559 // Copy message into messages list.
7560 // !TBD This should have been done earlier, somewhere
7561 MessageBuilder builder( assertionResult.getTestMacroName(), assertionResult.getSourceInfo(), assertionResult.getResultType() );
7562 builder << assertionResult.getMessage();
7563 builder.m_info.message = builder.m_stream.str();
7564
7565 infoMessages.push_back( builder.m_info );
7566 }
7567 }
7568
7569 AssertionStats::~AssertionStats() = default;
7570

Callers

nothing calls this directly

Calls 6

hasMessageMethod · 0.80
getTestMacroNameMethod · 0.80
getSourceInfoMethod · 0.80
getResultTypeMethod · 0.80
getMessageMethod · 0.80
strMethod · 0.45

Tested by

no test coverage detected