Indent section names

Closes #1556
This commit is contained in:
Bert Wesarg 2022-04-14 08:20:22 +02:00
parent 62fd660583
commit 561fe26cd5
4 changed files with 171 additions and 171 deletions

View File

@ -547,8 +547,8 @@ void ConsoleReporter::printTestCaseAndSectionHeader() {
auto auto
it = m_sectionStack.begin() + 1, // Skip first section (test case) it = m_sectionStack.begin() + 1, // Skip first section (test case)
itEnd = m_sectionStack.end(); itEnd = m_sectionStack.end();
for (; it != itEnd; ++it) for (size_t indent = 2; it != itEnd; ++it, indent += 2)
printHeaderString(it->name, 2); printHeaderString(it->name, indent);
} }
SourceLineInfo lineInfo = m_sectionStack.back().lineInfo; SourceLineInfo lineInfo = m_sectionStack.back().lineInfo;

View File

@ -697,7 +697,7 @@ with expansion:
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Mayfail test case with nested sections Mayfail test case with nested sections
A A
1 1
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Condition.tests.cpp:<line number> Condition.tests.cpp:<line number>
............................................................................... ...............................................................................
@ -707,7 +707,7 @@ Condition.tests.cpp:<line number>: FAILED:
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Mayfail test case with nested sections Mayfail test case with nested sections
A A
2 2
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Condition.tests.cpp:<line number> Condition.tests.cpp:<line number>
............................................................................... ...............................................................................
@ -717,7 +717,7 @@ Condition.tests.cpp:<line number>: FAILED:
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Mayfail test case with nested sections Mayfail test case with nested sections
B B
1 1
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Condition.tests.cpp:<line number> Condition.tests.cpp:<line number>
............................................................................... ...............................................................................
@ -727,7 +727,7 @@ Condition.tests.cpp:<line number>: FAILED:
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Mayfail test case with nested sections Mayfail test case with nested sections
B B
2 2
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Condition.tests.cpp:<line number> Condition.tests.cpp:<line number>
............................................................................... ...............................................................................
@ -1309,7 +1309,7 @@ Message.tests.cpp:<line number>: warning:
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
more nested SECTION tests more nested SECTION tests
doesn't equal doesn't equal
equal equal
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Misc.tests.cpp:<line number> Misc.tests.cpp:<line number>
............................................................................... ...............................................................................

File diff suppressed because it is too large Load Diff

View File

@ -16647,8 +16647,8 @@ void ConsoleReporter::printTestCaseAndSectionHeader() {
auto auto
it = m_sectionStack.begin() + 1, // Skip first section (test case) it = m_sectionStack.begin() + 1, // Skip first section (test case)
itEnd = m_sectionStack.end(); itEnd = m_sectionStack.end();
for (; it != itEnd; ++it) for (size_t indent = 2; it != itEnd; ++it, indent += 2)
printHeaderString(it->name, 2); printHeaderString(it->name, indent);
} }
SourceLineInfo lineInfo = m_sectionStack.back().lineInfo; SourceLineInfo lineInfo = m_sectionStack.back().lineInfo;