mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-27 23:19:32 +00:00
First cut of new Colour class (to replace TextColour)
This commit is contained in:
parent
5c7d3d75cc
commit
a3703faa0a
6 changed files with 275 additions and 10 deletions
|
@ -118,7 +118,7 @@ namespace Catch {
|
|||
tagItEnd = it->getTestCaseInfo().tags.end();
|
||||
tagIt != tagItEnd;
|
||||
++tagIt ) {
|
||||
std::string tagName = "[" + *tagIt + "]";
|
||||
std::string tagName = *tagIt;
|
||||
maxTagLen = (std::max)( maxTagLen, tagName.size() );
|
||||
std::map<std::string, int>::iterator countIt = tagCounts.find( tagName );
|
||||
if( countIt == tagCounts.end() )
|
||||
|
@ -128,7 +128,7 @@ namespace Catch {
|
|||
}
|
||||
}
|
||||
}
|
||||
maxTagLen +=2;
|
||||
maxTagLen +=4;
|
||||
if( maxTagLen > CATCH_CONFIG_CONSOLE_WIDTH-10 )
|
||||
maxTagLen = CATCH_CONFIG_CONSOLE_WIDTH-10;
|
||||
|
||||
|
@ -136,7 +136,7 @@ namespace Catch {
|
|||
countIt != countItEnd;
|
||||
++countIt ) {
|
||||
LineWrapper wrapper;
|
||||
wrapper.setIndent(2).setRight( maxTagLen ).wrap( countIt->first );
|
||||
wrapper.setIndent(2).setRight( maxTagLen ).wrap( "[" + countIt->first + "]" );
|
||||
|
||||
std::cout << wrapper;
|
||||
std::size_t dots = 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue