Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typo in "benchmark name" column width calculation. #1886

Merged
merged 1 commit into from
Mar 26, 2020

Conversation

uckelman-sf
Copy link
Contributor

Description

The width for the "benchmark name" column in full analysis mode is too large, which makes the output spill beyond CATCH_CONFIG_CONSOLE_WIDTH.

The width was set to CATCH_CONFIG_CONSOLE_WIDTH - 32, but the other three columns are each 14 wide, for a total of 42, not 32, thus giving a total line length of CATCH_CONFIG_CONSOLE_WIDTH + 10, when it should obviously not exceed CATCH_CONFIG_CONSOLE_WIDTH. (My guess is that 32 was a typo for 42.)

The best solution I see is setting the width of the "benchmark name" column to CATCH_CONFIG_CONSOLE_WIDTH - 43, the same as it is in the no analysis case. This PR does that.

GitHub Issues

Fixes #1885.

@horenmar horenmar force-pushed the benchmark_width_fix branch from 850fbad to 104642b Compare March 25, 2020 14:28
@codecov
Copy link

codecov bot commented Mar 25, 2020

Codecov Report

Merging #1886 into master will not change coverage by %.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1886   +/-   ##
=======================================
  Coverage   86.49%   86.49%           
=======================================
  Files         131      131           
  Lines        3900     3900           
=======================================
  Hits         3373     3373           
  Misses        527      527           

@horenmar
Copy link
Member

Thanks, the changes, and the analysis seems reasonable.

The failing CI was because of a test that expected the specific look of the header, including whitespace. I updated it so that the new, shortened, header is checked instead.

@horenmar horenmar force-pushed the benchmark_width_fix branch from 104642b to 6d701b2 Compare March 25, 2020 23:05
@horenmar horenmar merged commit e5c9a58 into catchorg:master Mar 26, 2020
horenmar added a commit that referenced this pull request Apr 21, 2020
--- Improvements ---
* Running tests in random order (`--order rand`) has been reworked significantly (#1908)
  * Given same seed, all platforms now produce the same order
  * Given same seed, the relative order of tests does not change if you select only a subset of them
* Vector matchers support custom allocators (#1909)
* `|` and `&` (bitwise or and bitwise and) are now supported in `CHECK` and `REQUIRE`
  * The resulting type must be convertible to `bool`

--- Fixes ---
* Fixed computation of benchmarking column widths in ConsoleReporter (#1885, #1886)
* Suppressed clang-tidy's `cppcoreguidelines-pro-type-vararg` in assertions (#1901)
  * It was a false positive trigered by the new warning support workaround
* Fixed bug in test specification parser handling of OR'd patterns using escaping (#1905)

--- Miscellaneous ---
* Worked around IBM XL's codegen bug (#1907)
  * It would emit code for _destructors_ of temporaries in an unevaluated context
* Improved detection of stdlib's support for `std::uncaught_exceptions` (#1911)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"benchmark name" has overly wide column width
2 participants