mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 23:36:11 +01:00
Fixes overflow issue when listing tests.
This commit is contained in:
parent
93a945cee9
commit
6253386458
@ -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