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

Method printTestCaseAndSectionHeader

unittests/catch.hpp:12032–12054  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12030 }
12031}
12032void ConsoleReporter::printTestCaseAndSectionHeader() {
12033 assert(!m_sectionStack.empty());
12034 printOpenHeader(currentTestCaseInfo->name);
12035
12036 if (m_sectionStack.size() > 1) {
12037 Colour colourGuard(Colour::Headers);
12038
12039 auto
12040 it = m_sectionStack.begin() + 1, // Skip first section (test case)
12041 itEnd = m_sectionStack.end();
12042 for (; it != itEnd; ++it)
12043 printHeaderString(it->name, 2);
12044 }
12045
12046 SourceLineInfo lineInfo = m_sectionStack.back().lineInfo;
12047
12048 if (!lineInfo.empty()) {
12049 stream << getLineOfChars<'-'>() << '\n';
12050 Colour colourGuard(Colour::FileName);
12051 stream << lineInfo << '\n';
12052 }
12053 stream << getLineOfChars<'.'>() << '\n' << std::endl;
12054}
12055
12056void ConsoleReporter::printClosedHeader(std::string const& _name) {
12057 printOpenHeader(_name);

Callers

nothing calls this directly

Calls 5

backMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected