catch2/tests/SelfTest/UsageTests
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
..
Approx.tests.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
BDD.tests.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
Benchmark.tests.cpp Fix various useful clang-tidy warnings 2024-03-01 21:24:45 +01:00
Class.tests.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
Compilation.tests.cpp Fix & extend tests for comparing const instances of zero lit types 2024-04-08 13:15:35 +02:00
Condition.tests.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
Decomposition.tests.cpp Add test for comparing pointers to NULL with != 2022-11-04 19:24:39 +01:00
EnumToString.tests.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
Exception.tests.cpp Fix various useful clang-tidy warnings 2024-03-01 21:24:45 +01:00
Generators.tests.cpp Add test showing literals and complex generators in one GENERATE 2023-12-10 18:32:45 +01:00
Matchers.tests.cpp Fix various useful clang-tidy warnings 2024-03-01 21:24:45 +01:00
MatchersRanges.tests.cpp Fix spelling 2023-04-29 12:55:51 +02:00
Message.tests.cpp Fix various useful clang-tidy warnings 2024-03-01 21:24:45 +01:00
Misc.tests.cpp Ignore C++98 related compiler warnings 2024-03-12 22:56:37 +01:00
Skip.tests.cpp Test & document SKIP in generator constructor 2023-05-31 15:12:43 +02:00
ToStringByte.tests.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
ToStringChrono.tests.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
ToStringGeneral.tests.cpp Default StringMaker<FloatingPointType>::precision to max_digits10 2024-04-30 17:18:48 +02:00
ToStringOptional.tests.cpp implement stringify for std::nullopt_t 2023-08-30 16:21:02 +02:00
ToStringPair.tests.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
ToStringTuple.tests.cpp Default StringMaker<FloatingPointType>::precision to max_digits10 2024-04-30 17:18:48 +02:00
ToStringVariant.tests.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
ToStringVector.tests.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
ToStringWhich.tests.cpp Fix references to license file 2022-10-28 11:30:15 +02:00
Tricky.tests.cpp Fix various useful clang-tidy warnings 2024-03-01 21:24:45 +01:00
VariadicMacros.tests.cpp Fix references to license file 2022-10-28 11:30:15 +02:00