Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console: Indent section names #2409

Open
wants to merge 1 commit into
base: v2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/reporters/catch_reporter_console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions projects/SelfTest/Baselines/console.std.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ with expansion:
-------------------------------------------------------------------------------
Mayfail test case with nested sections
A
1
1
-------------------------------------------------------------------------------
Condition.tests.cpp:<line number>
...............................................................................
Expand All @@ -707,7 +707,7 @@ Condition.tests.cpp:<line number>: FAILED:
-------------------------------------------------------------------------------
Mayfail test case with nested sections
A
2
2
-------------------------------------------------------------------------------
Condition.tests.cpp:<line number>
...............................................................................
Expand All @@ -717,7 +717,7 @@ Condition.tests.cpp:<line number>: FAILED:
-------------------------------------------------------------------------------
Mayfail test case with nested sections
B
1
1
-------------------------------------------------------------------------------
Condition.tests.cpp:<line number>
...............................................................................
Expand All @@ -727,7 +727,7 @@ Condition.tests.cpp:<line number>: FAILED:
-------------------------------------------------------------------------------
Mayfail test case with nested sections
B
2
2
-------------------------------------------------------------------------------
Condition.tests.cpp:<line number>
...............................................................................
Expand Down Expand Up @@ -1309,7 +1309,7 @@ Message.tests.cpp:<line number>: warning:
-------------------------------------------------------------------------------
more nested SECTION tests
doesn't equal
equal
equal
-------------------------------------------------------------------------------
Misc.tests.cpp:<line number>
...............................................................................
Expand Down