mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-22 11:23:29 +01:00
f7cd0ba051
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> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
ToDo.txt | ||
X01-PrefixedMacros.cpp | ||
X02-DisabledMacros.cpp | ||
X03-DisabledExceptions-DefaultHandler.cpp | ||
X04-DisabledExceptions-CustomHandler.cpp | ||
X05-DeferredStaticChecks.cpp | ||
X10-FallbackStringifier.cpp | ||
X11-DisableStringification.cpp | ||
X12-CustomDebugBreakMacro.cpp | ||
X20-AssertionStartingEventGoesBeforeAssertionIsEvaluated.cpp | ||
X21-PartialTestCaseEvents.cpp | ||
X22-BenchmarksInCumulativeReporter.cpp | ||
X23-CasingInReporterNames.cpp | ||
X24-ListenerStdoutCaptureInMultireporter.cpp | ||
X25-ListenerCanAskForCapturedStdout.cpp | ||
X26-ReporterPreferencesForPassingAssertionsIsRespected.cpp | ||
X27-CapturedStdoutInTestCaseEvents.cpp | ||
X28-ListenersGetEventsBeforeReporters.cpp | ||
X29-CustomArgumentsForReporters.cpp | ||
X30-BazelReporter.cpp | ||
X31-DuplicatedTestCases.cpp | ||
X32-DuplicatedTestCasesDifferentTags.cpp | ||
X33-DuplicatedTestCaseMethods.cpp | ||
X34-DuplicatedTestCaseMethodsDifferentFixtures.cpp | ||
X35-DuplicatedReporterNames.cpp | ||
X36-ReportingCrashWithJunitReporter.cpp | ||
X90-WindowsHeaderInclusion.cpp | ||
X91-AmalgamatedCatch.cpp | ||
X92-NoTests.cpp | ||
X93-AllSkipped.cpp |