-
-
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
When are test cases run without sections? #552
Comments
The way In the second example, because you throw from the first At one point I had it so it always did the final, sectionless, run-through - for consistency (in fact it did the sectionless run-through first - that's the behaviour being discussed in the linked issue). I hope that clears it up? |
Thanks @philsquared. This clears up the behaviour, but it isn't really intuitive, so I think it should be in the documentation. Maybe in an extra section titled something like "How this all works internally. Reads this if you get unexpected interaction between your code and Catch macros." |
It's mostly covered here: But I agree it doesn't specifically mention that this implies a run through with no sections under some circumstances. I'll try and get something added. Thanks for the feedback. |
I am a bit unclear on when the code in a TEST_CASE is run when there are nested SECTIONs. I can't find anything about the details in the documentation so I am not sure what the intended action is here and whether there is a bug or not.
Here is some example code:
This prints out:
indicating that the first example was only run once, but the second was run twice, once without and once with the
SECTION("bar")
code.See also #191.
The text was updated successfully, but these errors were encountered: