Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests/SelfTest/UsageTests/ToStringVector.tests.cpp
diff options
context:
space:
mode:
authorTyson Jones2025-03-15 02:42:04 +0100
committerMartin Hořeňovský2025-07-02 14:13:07 +0200
commitbd2d918f328ddb916202f4952b25cf809434b290 (patch)
tree668af35f8913e95710255e2ace7fd501a69f500d /tests/SelfTest/UsageTests/ToStringVector.tests.cpp
parentd134b0cae3033c4ddc027fae6f76c66e8b0a6a73 (diff)
downloadcatch3-bd2d918f328ddb916202f4952b25cf809434b290.tar.gz
patched >2-digit tag-count padding in base reporter
Passing the CLI argument '--list-tags' outputs a list like: ``` All available tags: 11 [mytag] 4 [myothertag] 2 tags ``` However, the width of the tag-count column was previously hardcoded to 2, such that the formatting broke (with the tag names awkwardly misaligned/displaced) for 3+ digit tag counts. This occurred whenever a tag contains one hundred or more tests, and would result in formatting like: ``` All available tags: 11 [mytag] 100 [myjumbotag] 4 [myothertag] 3 tags ``` This patch pre-computes the maximum number of digits among the tag counts, expanding the padding when there are more than 100 tests in a tag (and handling when tags are empty). It now outputs e.g. ``` All available tags: 11 [mytag] 100 [myjumbotag] 4 [myothertag] 3 tags ```
Diffstat (limited to 'tests/SelfTest/UsageTests/ToStringVector.tests.cpp')
0 files changed, 0 insertions, 0 deletions