Add SET_UP and TEAR_DOWN or similar macros to the Catch framework
- Dominant language
- C++
- Stars
- 21.5k
- Forks
- 3.5k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 2
Description
Would it be possible to add a global set up and tear down macros to the Catch?
Today this is possible to do in the custom main, but it would be much more useful to do it in a similar way as we write TEST_CASES so I can do CHECKS and REQUIRE in the SET_UP.
The advantage is that if SET_UP fails then 1. you get a report of that in the reporter output, 2. test cases would not run in that case.
Contributor guide
Research direction
Start by reviewing how custom main currently provides global setup and teardown, then trace the Catch framework lifecycle and TEST_CASE registration. Determine how SET_UP and TEAR_DOWN-style macros could run CHECK and REQUIRE before test cases, report failures, and prevent test execution when setup fails. Done means the behavior is specified and covered by framework tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100