Skip to content

Commit

Permalink
Indent section names
Browse files Browse the repository at this point in the history
Closes #1556
  • Loading branch information
bertwesarg committed Apr 25, 2022
1 parent 62fd660 commit 561fe26
Show file tree
Hide file tree
Showing 4 changed files with 171 additions and 171 deletions.
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
Loading

0 comments on commit 561fe26

Please sign in to comment.