catchorg / catchorg/Catch2

Feature Request: optionally only redirect to Catch::cout/cerr if test failed

Open
#919 10 comments 0 reactions 0 assignees View on GitHub
Feature Request
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

In my opinion it would be a useful option to redirect both `std::cerr` and `std::cout` into a temporary buffer, which is only printed to console after a test failed.
I was not able to discern if this could be done by writing a new `Reporter`.

In a code I am developing I have a lot of Log messages to help with debugging etc., which I usually do not want to show up for tests which passed. On failing tests, however, the output would often be very useful.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.