<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/docs/test-fixtures.md, branch devel-noexcept-funcs</title>
<subtitle>Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.</subtitle>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/'/>
<entry>
<title>Add configuration option to make assertions thread-safe</title>
<updated>2025-07-24T08:10:00+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-07-17T20:58:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=2a8a8a7210513fc2f6ae5e65986c0f2d730c1537'/>
<id>2a8a8a7210513fc2f6ae5e65986c0f2d730c1537</id>
<content type='text'>
All the previous refactoring to make the assertion fast paths
smaller and faster also allows us to implement the fast paths
just with thread-local and atomic variables, without full mutexes.

However, the performance overhead of thread-safe assertions is
still significant for single threaded usage:

|  slowdown |  Debug  | Release |
|-----------|--------:|--------:|
| fast path |   1.04x |   1.43x |
| slow path |   1.16x |   1.22x |

Thus, we don't make the assertions thread-safe by default, and instead
provide a build-time configuration option that the users can set to get
thread-safe assertions.

This commit is functional, but it still needs some follow-up work:
 * We do not need full seq_cst increments for the atomic counters,
   and using weaker ones can be faster.
 * We brute-force updating the reporter-friendly totals from internal
   atomic counters by doing it everywhere. We should properly trace
   where this is needed instead.
 * Message macros (`INFO`, `UNSCOPED_INFO`, `CAPTURE`, etc) are not
   made thread safe in this commit, but they can be made thread safe
   in the future, by building on top of this work.
 * Add more tests, including with thread-sanitizer, and compiled
   examples to the repository. Right now, these changes have been
   compiled with tsan manually, but these tests are not added to CI.

Closes #2948
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All the previous refactoring to make the assertion fast paths
smaller and faster also allows us to implement the fast paths
just with thread-local and atomic variables, without full mutexes.

However, the performance overhead of thread-safe assertions is
still significant for single threaded usage:

|  slowdown |  Debug  | Release |
|-----------|--------:|--------:|
| fast path |   1.04x |   1.43x |
| slow path |   1.16x |   1.22x |

Thus, we don't make the assertions thread-safe by default, and instead
provide a build-time configuration option that the users can set to get
thread-safe assertions.

This commit is functional, but it still needs some follow-up work:
 * We do not need full seq_cst increments for the atomic counters,
   and using weaker ones can be faster.
 * We brute-force updating the reporter-friendly totals from internal
   atomic counters by doing it everywhere. We should properly trace
   where this is needed instead.
 * Message macros (`INFO`, `UNSCOPED_INFO`, `CAPTURE`, etc) are not
   made thread safe in this commit, but they can be made thread safe
   in the future, by building on top of this work.
 * Add more tests, including with thread-sanitizer, and compiled
   examples to the repository. Right now, these changes have been
   compiled with tsan manually, but these tests are not added to CI.

Closes #2948
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typos</title>
<updated>2025-04-27T04:46:42+00:00</updated>
<author>
<name>Chris Thrasher</name>
</author>
<published>2025-04-27T00:46:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=4c93a595a1d9ecc8aacb7c99f6dbf0f1f2d475fa'/>
<id>4c93a595a1d9ecc8aacb7c99f6dbf0f1f2d475fa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>v3.7.0</title>
<updated>2024-08-14T10:05:21+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2024-08-14T10:05:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=31588bb4f56b638dd5afc28d3ebff9b9dcefb88d'/>
<id>31588bb4f56b638dd5afc28d3ebff9b9dcefb88d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>TEST_CASE_PERSISTENT_FIXTURE: A new fixture macro for allowing persistent fixtures throughout a TEST_CASE (#2885)</title>
<updated>2024-08-05T15:01:41+00:00</updated>
<author>
<name>Keith Stockdale</name>
</author>
<published>2024-08-05T15:01:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=f7cd0ba0511b61592e70f07533d7ea30a8a5395d'/>
<id>f7cd0ba0511b61592e70f07533d7ea30a8a5395d</id>
<content type='text'>
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ý &lt;martin.horenovsky@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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ý &lt;martin.horenovsky@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Trim superfluous whitespace in docs</title>
<updated>2022-10-17T13:02:45+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-10-17T13:02:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=6a422bae0b42313cc6a0f231c89f1b20671cf7f3'/>
<id>6a422bae0b42313cc6a0f231c89f1b20671cf7f3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Link to SECTIONS doc at top of test fixtures page.</title>
<updated>2022-10-15T14:59:52+00:00</updated>
<author>
<name>Sam Cunliffe</name>
</author>
<published>2022-10-12T09:17:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=d1394a70649d5a0f8ff42c3a90701a557a9b85fe'/>
<id>d1394a70649d5a0f8ff42c3a90701a557a9b85fe</id>
<content type='text'>
I came here looking for a way to use a fixture. But what I really wanted was better done in the SECTION macro. Feels like a link right at the top would've made it clearer faster.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I came here looking for a way to use a fixture. But what I really wanted was better done in the SECTION macro. Feels like a link right at the top would've made it clearer faster.</pre>
</div>
</content>
</entry>
<entry>
<title>test-fixtures.md: Line-wrap code examples (#2464)</title>
<updated>2022-06-19T14:24:59+00:00</updated>
<author>
<name>Frank Dana</name>
</author>
<published>2022-06-19T14:24:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=a3692678743245c3baf745250292fdfba682dafd'/>
<id>a3692678743245c3baf745250292fdfba682dafd</id>
<content type='text'>
* test-fixtures.md: Line-wrap code examples

* relinebreak

Co-authored-by: Martin Hořeňovský &lt;martin.horenovsky@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* test-fixtures.md: Line-wrap code examples

* relinebreak

Co-authored-by: Martin Hořeňovský &lt;martin.horenovsky@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Fix introduced in version placeholders</title>
<updated>2021-03-13T09:26:12+00:00</updated>
<author>
<name>Jozef Grajciar</name>
</author>
<published>2021-03-12T09:22:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=037ddbc75cc5e58b93cf5a010a94b32333ad824d'/>
<id>037ddbc75cc5e58b93cf5a010a94b32333ad824d</id>
<content type='text'>
Resolves #2082
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Resolves #2082
</pre>
</div>
</content>
</entry>
<entry>
<title>Add 'Introduced in Catch 2.8.0.' text</title>
<updated>2019-08-02T17:18:47+00:00</updated>
<author>
<name>Clare Macrae</name>
</author>
<published>2019-07-21T19:55:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=e7c3bdb3514ddb25c82180d6c9cab5a6cda939cf'/>
<id>e7c3bdb3514ddb25c82180d6c9cab5a6cda939cf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add section headers, so I can later say when features were introduced</title>
<updated>2019-08-02T17:18:47+00:00</updated>
<author>
<name>Clare Macrae</name>
</author>
<published>2019-07-21T19:53:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=9aab95866720281036d25e7e1c3dd0b0d7cad30b'/>
<id>9aab95866720281036d25e7e1c3dd0b0d7cad30b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
