Display custom report if test case fails
Open
Query
- Dominant language
- C++
- Stars
- 21.5k
- Forks
- 3.5k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 2
Description
## Description
Hey I would like to display custom debug data when I run my test, but only if the test fails. So, if the test passes, nothing is displayed, and if the test fails, I have extra information to help me see what is going on.
So, the feature would be something like :
```CPP
TEST_CASE(...) {
...
IF_TEST_CASE_FAILED() {
std::cout << "Here is a complete report of the behaviour of your program, enjoy !" << std::endl;
}
} // End TEST_CASE
```
If it's already possible to do such thing, thanks for letting me know ! Otherwise, this is something that can be implemented :)
Contributor guide
Assessment
This issue has not been assessed yet.