| 12030 | } |
| 12031 | } |
| 12032 | void 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 | |
| 12056 | void ConsoleReporter::printClosedHeader(std::string const& _name) { |
| 12057 | printOpenHeader(_name); |