<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/src/catch2/internal/catch_test_registry.hpp, branch ci/platforms-like-visual-xsharp</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>Avoid bad compile time scaling of test registration with optimizations</title>
<updated>2026-09-03T18:22:37+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-09-03T18:16:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=de1330d036168492a04b649a1fa0593faece6f74'/>
<id>de1330d036168492a04b649a1fa0593faece6f74</id>
<content type='text'>
GCC is especially bad, as it had quadratic scaling in the number of
registered test cases in a TU, but Clang also scaled superlinearly, and
this commit fixes both.

AIUI:
1) Each `TEST_CASE` creates a separate global fragment to handle creating
   the `unique_ptr&lt;ITestInvoker&gt;`, moving the instance into AutoReg,
   destroying the old instance, etc, etc.
2) With optimizations enabled, the compiler merges all these global
   fragments into one big global fragment.
3) Then the compiler runs various optimizations passes on this new global
   fragment.
4) Because some of the passes scale superlinearly, the compilation times
   scale superlinearly in the number of `TEST_CASE` in a translation unit.

For bonus point, no optimization actually happens.

This commit fixes the problem (for non-LTO builds) by adding new `AutoReg`
constructor, one that takes the function pointer raw, instead of wrapped
in `ITestInvoker`. By delaying the construction of the `ITestInvoker`
into the outlined constructor, we no longer create big global fragments
for the compiler to optimize.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GCC is especially bad, as it had quadratic scaling in the number of
registered test cases in a TU, but Clang also scaled superlinearly, and
this commit fixes both.

AIUI:
1) Each `TEST_CASE` creates a separate global fragment to handle creating
   the `unique_ptr&lt;ITestInvoker&gt;`, moving the instance into AutoReg,
   destroying the old instance, etc, etc.
2) With optimizations enabled, the compiler merges all these global
   fragments into one big global fragment.
3) Then the compiler runs various optimizations passes on this new global
   fragment.
4) Because some of the passes scale superlinearly, the compilation times
   scale superlinearly in the number of `TEST_CASE` in a translation unit.

For bonus point, no optimization actually happens.

This commit fixes the problem (for non-LTO builds) by adding new `AutoReg`
constructor, one that takes the function pointer raw, instead of wrapped
in `ITestInvoker`. By delaying the construction of the `ITestInvoker`
into the outlined constructor, we no longer create big global fragments
for the compiler to optimize.
</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanups from static analysis</title>
<updated>2026-04-24T09:21:04+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-04-24T09:21:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=11a96e186af8b2779d93e550217e9c95d3f89371'/>
<id>11a96e186af8b2779d93e550217e9c95d3f89371</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Mark TestInvoker{AsMethod,Fixture} as final</title>
<updated>2026-04-07T12:36:08+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-04-07T09:07:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=e51dcdcc595371828de2b1d28985e8d8c1895345'/>
<id>e51dcdcc595371828de2b1d28985e8d8c1895345</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Sprinkle some constexpr around to make Jason happy</title>
<updated>2024-09-13T14:40:11+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2024-09-13T09:16:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=18df97df00848e91bfe1b63408bba19f8b8237ae'/>
<id>18df97df00848e91bfe1b63408bba19f8b8237ae</id>
<content type='text'>
Most of these will not matter in practice due to C++14 imposing
significant limitations on what else we can make constexpr, and we cannot
have references outliving the constexpr context either way.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most of these will not matter in practice due to C++14 imposing
significant limitations on what else we can make constexpr, and we cannot
have references outliving the constexpr context either way.
</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>Evaluate argument of TEST_CASE in static-analysis mode</title>
<updated>2024-03-01T20:24:45+00:00</updated>
<author>
<name>Martin Jeřábek</name>
</author>
<published>2024-02-19T17:38:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=dca87563bb008b94ed5b8b51ccda35f0d821473e'/>
<id>dca87563bb008b94ed5b8b51ccda35f0d821473e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix some bugprone-macro-parentheses warnings</title>
<updated>2023-09-25T08:56:45+00:00</updated>
<author>
<name>Christian Tacke</name>
</author>
<published>2023-08-20T20:11:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=0fb817e41ff24715f3436ede5a18de468c272902'/>
<id>0fb817e41ff24715f3436ede5a18de468c272902</id>
<content type='text'>
When using the public headers of catch2 in another project
that uses clang-tidy with some checks enabled, then some
warnings in catch2's headers are also reported.

This fixes a bunch of bugprone-macro-parentheses warnings.

See: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/macro-parentheses.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using the public headers of catch2 in another project
that uses clang-tidy with some checks enabled, then some
warnings in catch2's headers are also reported.

This fixes a bunch of bugprone-macro-parentheses warnings.

See: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/macro-parentheses.html
</pre>
</div>
</content>
</entry>
<entry>
<title>Experimental static analysis support in TEST_CASE and SECTION</title>
<updated>2023-05-29T19:45:28+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-05-15T12:33:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=bf5aa7b383b143ba9939fad289d1f7a41f07f8cd'/>
<id>bf5aa7b383b143ba9939fad289d1f7a41f07f8cd</id>
<content type='text'>
Closes #2681
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #2681
</pre>
</div>
</content>
</entry>
<entry>
<title>Split ITestInvoker into its own header</title>
<updated>2023-03-23T15:50:11+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-03-23T13:02:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=1f881ab4641b866304b818a063164dae976dba5f'/>
<id>1f881ab4641b866304b818a063164dae976dba5f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use StringRef UDL in more preprocessor-generated strings</title>
<updated>2023-02-23T12:25:08+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-02-23T08:37:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=4d802ca58f32bdb80c6ff23ce4d614f2d80b2e05'/>
<id>4d802ca58f32bdb80c6ff23ce4d614f2d80b2e05</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
