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

"benchmark name" has overly wide column width #1885

Closed
uckelman-sf opened this issue Mar 19, 2020 · 1 comment · Fixed by #1886
Closed

"benchmark name" has overly wide column width #1885

uckelman-sf opened this issue Mar 19, 2020 · 1 comment · Fixed by #1886
Labels

Comments

@uckelman-sf
Copy link
Contributor

Describe the bug
The "benchmark name" column is too wide for the default CATCH_CONFIG_CONSOLE_WIDTH in full analysis mode, which prevents output from appearing as intended on a single line in a terminal which is 80 columns wide.

Example of current output:

                                                mean          low mean      high mean
                                                std dev       low std dev   high std dev
-------------------------------------------------------------------------------
to_hex_old 0                                              100            17     2.0876 ms 
                                                     1.188 us      1.177 us      1.215 us 
                                                        84 ns         36 ns        152 ns 

Expected behavior

                                      mean          low mean      high mean
                                      std dev       low std dev   high std dev
-------------------------------------------------------------------------------
to_hex_old 0                                    100            17       2.04 ms 
                                           1.112 us      1.103 us      1.132 us 
                                              64 ns         34 ns        121 ns 

Reproduction steps
Use BENCHMARK in a test. See the output.

Additional context
The problem is caused by setting the "benchmark name" column width to CATCH_CONFIG_CONSOLE_WIDTH - 32 in ConsoleReporter::ConsoleReporter(), when the other three columns are each 14 characters wide. (14*3 = 42 > 32).

@drazen911

This comment was marked as spam.

@horenmar horenmar added the Bug label Mar 26, 2020
horenmar added a commit that referenced this issue 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 a pull request may close this issue.

3 participants