-
-
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
Undocumented Macros #1367
Comments
I think this probably fits as an addition to your issue rather than opening my own. The When I read about it I thought instantly of the limitation regarding sections nested in loops, it could be good to add a blurb saying something like
|
@cstratopoulos out of curiosity - why would one want to use a section inside of a loop in that manner? Why not just use Sections are designed for re-entering the whole test case multiple times and sharing setup/teardown code - not for labeling loop iterations... This use case doesn't stop amusing me. |
@onqtam not sure why you're asking this here, or asking me, I'm just quoting from (and suggesting a one-line addition to) the existing Catch docs. Is it really that hard (or "amusing") to imagine running common setup code to generate intermediate inputs that get mutated and/or asserted on in some manner parametrized by a loop counter or range-for loop elements? This is left as an exercise to the reader, I'd rather not further derail this issue 🙈🙉🙊 |
I am in the process of adding some documentation for these macros, so they should be documented soon(ish). The work-in-progress can be found in branch dev-macro-docs. I am going to comment on the rest of this thread later. |
I was working on writing some thread-safe versions of the catch macros (see below) when I noticed several macros I had never seen before. I checked the docs to see what they do and I see that they're not documented. I would like to see some documentation about what they do. This seems like a win all around, since showing that the library has even more functionality make it more appealing, while current users are introduced to cool things they already have access to.
Here are the macros I couldn't find documentation for:
CHECKED_IF
CHECKED_ELSE
CHECK_NOFAIL
METHOD_AS_TEST_CASE
REGISTER_TEST_CASE
SUCCEED
ANON_TEST_CASE
DYNAMIC_SECTION
As for my idea for thread-safe catch macros, it's something like this...
This adds thread-safe versions of the macros on an opt-in basis. Something worth considering if thread-safe macros by default has been considered and rejected.
The text was updated successfully, but these errors were encountered: