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

summary: align even large values #402 #403

Merged
merged 1 commit into from
Sep 6, 2020
Merged

summary: align even large values #402 #403

merged 1 commit into from
Sep 6, 2020

Conversation

dankamongmen
Copy link
Member

As requested by the issue template, I have not changed doctest/doctest.h directly, but instead only doctest/doctest.cpp from which it is said to be generated (btw, the issue template refers to "two headers in doctest/parts", but only one of these has a .h extension. Perhaps "two files"?).

Description

When there are one million or more tests/asserts, the summary output gets out of wack (see #402). This fixes it in my tests. In addition, the output now uses only the necessary space for the total/passed/failed columns. If this last is undesirable, just add a ', 6' to the various std::max() parameters (or request that I do so).

before:

===============================================================================
[doctest] test cases:     36 |     36 passed |      0 failed |      1 skipped
[doctest] assertions: 8509223 | 8509223 passed |      0 failed |
[doctest] Status: SUCCESS!

after:

[schwarzgerat](0) $ ./notcurses-tester -p ../data/
Running with TERM=vte-256color
[doctest] doctest version is "2.4.0"
[doctest] run with "--help" for options
DirectMode *italic*!
DirectMode *bold*!
DirectMode *underline*!
===============================================================================
[doctest] test cases:      36 |      36 passed | 0 failed |      1 skipped
[doctest] assertions: 8509223 | 8509223 passed | 0 failed |
[doctest] Status: SUCCESS!
[schwarzgerat](0) $ 

GitHub Issues

Closes #402.

@dankamongmen
Copy link
Member Author

I have updated all tests affected by this change, which now pass. PTAL.

@dankamongmen
Copy link
Member Author

friendly ping! =]

@onqtam
Copy link
Member

onqtam commented Sep 6, 2020

Sorry for the huuuuUUuuge delay! I was busy July/August but I didn't get a notification for your pings - I guess I should have noted in a comment that it might take me a while to review this - will adopt this practice in the future. I'll take a look at this now, thanks!

@onqtam onqtam merged commit 74b8ac4 into doctest:dev Sep 6, 2020
@dankamongmen
Copy link
Member Author

Sorry for the huuuuUUuuge delay! I was busy July/August but I didn't get a notification for your pings - I guess I should have noted in a comment that it might take me a while to review this - will adopt this practice in the future. I'll take a look at this now, thanks!

no worries at all man!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants