catch2/tests/ExtraTests
Keith Stockdale f7cd0ba051
TEST_CASE_PERSISTENT_FIXTURE: A new fixture macro for allowing persistent fixtures throughout a TEST_CASE (#2885)
This PR introduces a new `TEST_CASE` macro called `TEST_CASE_PERSISTENT_FIXTURE`. `TEST_CASE_PERSISTENT_FIXTURE` offers the same functionality as `TEST_CASE_METHOD` except for one difference. The object on which the test method is invoked is only created once for all invocations of the test case. The object is created just after the `testCaseStarting` event is broadcast and the object is destroyed just before the `testCaseEnding` event is broadcast.

The main motivation for this new functionality is to allow `TEST_CASE`s to do expensive setup and teardown once per `TEST_CASE`, without having to resort to abusing event listeners or static function variables with manual initialization.


Implements #1602

---------

Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
2024-08-05 17:01:41 +02:00
..
CMakeLists.txt Add test for handleFatalErrorCondition within JUnit reporter 2024-04-21 21:52:33 +02:00
ToDo.txt Remove CATCH_CONFIG_DISABLE_MATCHERS 2020-01-25 09:07:36 +01:00
X01-PrefixedMacros.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X02-DisabledMacros.cpp TEST_CASE_PERSISTENT_FIXTURE: A new fixture macro for allowing persistent fixtures throughout a TEST_CASE (#2885) 2024-08-05 17:01:41 +02:00
X03-DisabledExceptions-DefaultHandler.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X04-DisabledExceptions-CustomHandler.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X05-DeferredStaticChecks.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X10-FallbackStringifier.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X11-DisableStringification.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X12-CustomDebugBreakMacro.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X20-AssertionStartingEventGoesBeforeAssertionIsEvaluated.cpp Clean up explanation in tests 2023-07-12 11:49:43 +02:00
X21-PartialTestCaseEvents.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X22-BenchmarksInCumulativeReporter.cpp Fix various useful clang-tidy warnings 2024-03-01 21:24:45 +01:00
X23-CasingInReporterNames.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X24-ListenerStdoutCaptureInMultireporter.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X25-ListenerCanAskForCapturedStdout.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X26-ReporterPreferencesForPassingAssertionsIsRespected.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X27-CapturedStdoutInTestCaseEvents.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X28-ListenersGetEventsBeforeReporters.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X29-CustomArgumentsForReporters.cpp Fix various useful clang-tidy warnings 2024-03-01 21:24:45 +01:00
X30-BazelReporter.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X31-DuplicatedTestCases.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X32-DuplicatedTestCasesDifferentTags.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X33-DuplicatedTestCaseMethods.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X34-DuplicatedTestCaseMethodsDifferentFixtures.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X35-DuplicatedReporterNames.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X36-ReportingCrashWithJunitReporter.cpp Add test for handleFatalErrorCondition within JUnit reporter 2024-04-21 21:52:33 +02:00
X90-WindowsHeaderInclusion.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X91-AmalgamatedCatch.cpp Fix various useful clang-tidy warnings 2024-03-01 21:24:45 +01:00
X92-NoTests.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
X93-AllSkipped.cpp Add new SKIP macro for skipping tests at runtime (#2360) 2023-01-12 15:01:47 +01:00