MCPcopy Create free account
hub / github.com/catchorg/Catch2 / printTestCaseAndSectionHeader

Method printTestCaseAndSectionHeader

extras/catch_amalgamated.cpp:9972–9993  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9970 m_testRunInfoPrinted = true;
9971}
9972void ConsoleReporter::printTestCaseAndSectionHeader() {
9973 assert(!m_sectionStack.empty());
9974 printOpenHeader(currentTestCaseInfo->name);
9975
9976 if (m_sectionStack.size() > 1) {
9977 auto guard = m_colour->guardColour( Colour::Headers ).engage( m_stream );
9978
9979 auto
9980 it = m_sectionStack.begin() + 1, // Skip first section (test case)
9981 itEnd = m_sectionStack.end();
9982 for (; it != itEnd; ++it)
9983 printHeaderString(it->name, 2);
9984 }
9985
9986 SourceLineInfo lineInfo = m_sectionStack.back().lineInfo;
9987
9988
9989 m_stream << lineOfChars( '-' ) << '\n'
9990 << m_colour->guardColour( Colour::FileName ) << lineInfo << '\n'
9991 << lineOfChars( '.' ) << "\n\n"
9992 << std::flush;
9993}
9994
9995void ConsoleReporter::printClosedHeader(std::string const& _name) {
9996 printOpenHeader(_name);

Callers

nothing calls this directly

Calls 8

printHeaderStringFunction · 0.70
lineOfCharsClass · 0.70
emptyMethod · 0.45
sizeMethod · 0.45
engageMethod · 0.45
guardColourMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected