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
it = m_sectionStack.begin() + 1, // Skip first section (test case)
itEnd = m_sectionStack.end();
for (; it != itEnd; ++it)
printHeaderString(it->name, 2);
for (size_t indent = 2; it != itEnd; ++it, indent += 2)
printHeaderString(it->name, indent);
}
SourceLineInfo lineInfo = m_sectionStack.back().lineInfo;

View File

@ -9077,10 +9077,10 @@ Scenario: This is a really long scenario name to see how the list command deals
with wrapping
Given: A section name that is so long that it cannot fit in a single
console width
When: The test headers are printed as part of the normal running of the
scenario
Then: The, deliberately very long and overly verbose (you see what I did
there?) section names must wrap, along with an indent
When: The test headers are printed as part of the normal running of
the scenario
Then: The, deliberately very long and overly verbose (you see what I
did there?) section names must wrap, along with an indent
-------------------------------------------------------------------------------
BDD.tests.cpp:<line number>
...............................................................................

View File

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