diff options
| author | Martin Hořeňovský | 2025-07-27 20:28:51 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2025-07-27 21:41:02 +0200 |
| commit | d547cae549f484dda3c6a2b3cc5f71b9db40e842 (patch) | |
| tree | fb947c6dd70b9eb5e8d7fd792bd85684b454d0fd /docs | |
| parent | fee81626d2a4811095c3a39d20fb355eeb954101 (diff) | |
| download | catch3-d547cae549f484dda3c6a2b3cc5f71b9db40e842.tar.gz | |
Fix bad error reporting for nested exceptions in default configuration
Bad handling of `TestFailureException` when translating unexpected
exceptions inside assertion macros led to the unexpected exceptions
handling erroring out through throwing the same exception again.
This was then backstopped by the machinery for handling uncaught
exceptions from assertions, which is normally used by the
`CATCH_CONFIG_FAST_COMPILE` machinery, where we assume that it can
only be invoked because the assertion macros are not configured to
catch assertions.
Closes #1292
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/skipping-passing-failing.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/skipping-passing-failing.md b/docs/skipping-passing-failing.md index 52bb18f7..1bdc1f03 100644 --- a/docs/skipping-passing-failing.md +++ b/docs/skipping-passing-failing.md @@ -52,6 +52,20 @@ TEST_CASE("failing test") { } ``` +Same applies for a `SKIP` nested inside an assertion: + +```cpp +static bool do_skip() { + SKIP(); + return true; +} + +TEST_CASE("Another failing test") { + CHECK(do_skip()); +} +``` + + ### Interaction with Sections and Generators Sections, nested sections as well as specific outputs from [generators](generators.md#top) |