-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Failing on purpose #765
Comments
You're right to be suspicious of using anything that starts with |
Works like FAIL, but does not abort test. As proposed in #765
That's in now on master (but not the single include). |
Great! 👍 |
This is in the latest release, so I am going to close the issue. |
Sometimes I find it useful to let a test fail deliberately.
For this matter I discovered the
FAIL
macro digging around incatch.hpp
.Nice! 👍
However
FAIL
- likeREQUIRE
- aborts the execution of the local scope.I needed something like
FAIL
but in the flavor ofCHECK
:Is that macro future-proof? I.e is
FAIL
part of Catch' public API?INTERNAL_CATCH_MSG
is certainly not meant to be used be clients, or is it?Now I can let the test fail deliberately e.g. from inside a timeout callback which has previously crashed using
FAIL
Example with Reactive Extensions for C++:
The text was updated successfully, but these errors were encountered: