catch2/tests/SelfTest
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
..
Baselines 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
IntrospectiveTests Handle ANSI escape sequences when performing column wrapping (#2849) 2024-05-04 23:43:52 +02:00
Misc Move tests from projects/ to tests/ 2019-12-05 16:00:20 +01:00
TimingTests Fix references to license file 2022-10-28 11:30:15 +02:00
UsageTests 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
helpers Fix & extend tests for comparing const instances of zero lit types 2024-04-08 13:15:35 +02:00
TestRegistrations.cpp Ignore C++98 related compiler warnings 2024-03-12 22:56:37 +01:00