mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-17 03:02:24 +01:00
Fixes overflow issue when listing tests.
This commit is contained in:
parent
54d759816f
commit
2267c950a3
@ -86,12 +86,13 @@ namespace Catch {
|
|||||||
std::cout << nameCol;
|
std::cout << nameCol;
|
||||||
}
|
}
|
||||||
if( i < tagsWrapper.size() && !tagsWrapper[i].empty() ) {
|
if( i < tagsWrapper.size() && !tagsWrapper[i].empty() ) {
|
||||||
|
size_t padLen( maxNameLen > nameCol.size() ? maxNameLen - nameCol.size() : 0 );
|
||||||
if( i == 0 ) {
|
if( i == 0 ) {
|
||||||
Colour colourGuard( Colour::SecondaryText );
|
Colour colourGuard( Colour::SecondaryText );
|
||||||
std::cout << " " << std::string( maxNameLen - nameCol.size(), '.' ) << " ";
|
std::cout << " " << std::string( padLen, '.' ) << " ";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
std::cout << std::string( maxNameLen - nameCol.size(), ' ' ) << " ";
|
std::cout << std::string( padLen, ' ' ) << " ";
|
||||||
}
|
}
|
||||||
std::cout << tagsWrapper[i];
|
std::cout << tagsWrapper[i];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user