mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-16 18:52:25 +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> |
||
---|---|---|
.. | ||
Approx.tests.cpp | ||
BDD.tests.cpp | ||
Benchmark.tests.cpp | ||
Class.tests.cpp | ||
Compilation.tests.cpp | ||
Condition.tests.cpp | ||
Decomposition.tests.cpp | ||
EnumToString.tests.cpp | ||
Exception.tests.cpp | ||
Generators.tests.cpp | ||
Matchers.tests.cpp | ||
MatchersRanges.tests.cpp | ||
Message.tests.cpp | ||
Misc.tests.cpp | ||
Skip.tests.cpp | ||
ToStringByte.tests.cpp | ||
ToStringChrono.tests.cpp | ||
ToStringGeneral.tests.cpp | ||
ToStringOptional.tests.cpp | ||
ToStringPair.tests.cpp | ||
ToStringTuple.tests.cpp | ||
ToStringVariant.tests.cpp | ||
ToStringVector.tests.cpp | ||
ToStringWhich.tests.cpp | ||
Tricky.tests.cpp | ||
VariadicMacros.tests.cpp |