<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/src/catch2/internal/catch_run_context.cpp, branch v3.13.0</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>Support filtering on both sections and generators (#3069)</title>
<updated>2026-02-15T19:27:15+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-02-15T19:27:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=3a0cf7e75fdc571ff9ed25303fb268665f6260c0'/>
<id>3a0cf7e75fdc571ff9ed25303fb268665f6260c0</id>
<content type='text'>
Not being able to filter generators to specific element has been regularly
causing problems. It was possible to use a dynamic section to run tests
for specific element in a generator, at least if the element had a nice
string representation, but the test case would still run once per element
in the generator.

With this change, it is possible to have the generator return only one
specific element, and do so based on the index, rather than the string
representation of the element. This enables simple debugging of tests
that fail for specific generator element.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Not being able to filter generators to specific element has been regularly
causing problems. It was possible to use a dynamic section to run tests
for specific element in a generator, at least if the element had a nice
string representation, but the test case would still run once per element
in the generator.

With this change, it is possible to have the generator return only one
specific element, and do so based on the index, rather than the string
representation of the element. This enables simple debugging of tests
that fail for specific generator element.
</pre>
</div>
</content>
</entry>
<entry>
<title>Simplify IGeneratorTracker</title>
<updated>2026-02-13T20:17:37+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-02-12T20:39:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=045ac7acce5205e529a7a6fda155cadc3dfe68e7'/>
<id>045ac7acce5205e529a7a6fda155cadc3dfe68e7</id>
<content type='text'>
* Removed `IGeneratorTracker::hasGenerator`, as it was never used.
* Removed `IGeneratorTracker::setGenerator`, as actually using it
  after the tracker was used would lead to inconsistent behaviour.
  Instead, the tracker is given the generator it guards during
  construction.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Removed `IGeneratorTracker::hasGenerator`, as it was never used.
* Removed `IGeneratorTracker::setGenerator`, as actually using it
  after the tracker was used would lead to inconsistent behaviour.
  Instead, the tracker is given the generator it guards during
  construction.
</pre>
</div>
</content>
</entry>
<entry>
<title>Check for infinite generators before we construct generator's tracker</title>
<updated>2026-02-13T20:17:06+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-02-12T20:32:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=72671fdbdfc7a6f1fad03af40e75ad8d881822a8'/>
<id>72671fdbdfc7a6f1fad03af40e75ad8d881822a8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add --warn InfiniteGenerators</title>
<updated>2026-02-10T08:37:19+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-02-10T08:16:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=daadf42a0e21ac09abc1f286f875078b24e2dd4d'/>
<id>daadf42a0e21ac09abc1f286f875078b24e2dd4d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add UNSCOPED_CAPTURE</title>
<updated>2026-01-11T13:53:08+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-01-08T13:35:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=2580eadc4230eedf1b66841bdd27a8aacc2412a5'/>
<id>2580eadc4230eedf1b66841bdd27a8aacc2412a5</id>
<content type='text'>
Closes #2954
Closes #3010
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #2954
Closes #3010
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix lifetime issues when using UNSCOPED_X message macros</title>
<updated>2025-12-26T14:53:30+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-12-26T14:31:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=eb3811c555eccd2de8b63ba16e0f62c444970acf'/>
<id>eb3811c555eccd2de8b63ba16e0f62c444970acf</id>
<content type='text'>
The original implementation of `UNSCOPED_X` message macros used a
clever hack to make the original implementation simpler: construct
an instance of `ScopedMessage` to manage its lifetime, but store
it in a vector, so its lifetime is not actually scope-based, and
we can manage it through the vector instance.

This hack made it so that the lifetime of the vector that manages
the fake `ScopedMessage`s must be outlived by the vector with the
actual messages. Originally this wasn't a problem, because they both
lived inside the run context instance. However, since then these
vectors became globals and thread-local. When this happened, it
still wasn't a problem; the two globals were declared in the right
order, so they were destroyed in the right order as well.

Then, in f80956a43a3e276686ed59531b41617282d75a0c, these globals
were turned into magic static globals to improve their behaviour
in MSVC's Debug build mode. This caused their lifetimes to be
runtime-dependent; if a specific test thread added its first scoped
message before it added first unscoped message, the lifetimes
would be correct. If it instead added first unscoped message
before adding first scoped message, then there **might** be
invalid reads during thread destruction.

The fix is simple: do things properly and manage the lifetime of
messages in `UNSCOPED_X` explicitly. Then we don't have to deal
with the destruction of fake `ScopedMessage`s while the thread is
being destroyed, and the lifetime of the two vectors is no longer
tied together.

I also threw them both into a new type, to encapsulate some of the
unscoped message logic.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The original implementation of `UNSCOPED_X` message macros used a
clever hack to make the original implementation simpler: construct
an instance of `ScopedMessage` to manage its lifetime, but store
it in a vector, so its lifetime is not actually scope-based, and
we can manage it through the vector instance.

This hack made it so that the lifetime of the vector that manages
the fake `ScopedMessage`s must be outlived by the vector with the
actual messages. Originally this wasn't a problem, because they both
lived inside the run context instance. However, since then these
vectors became globals and thread-local. When this happened, it
still wasn't a problem; the two globals were declared in the right
order, so they were destroyed in the right order as well.

Then, in f80956a43a3e276686ed59531b41617282d75a0c, these globals
were turned into magic static globals to improve their behaviour
in MSVC's Debug build mode. This caused their lifetimes to be
runtime-dependent; if a specific test thread added its first scoped
message before it added first unscoped message, the lifetimes
would be correct. If it instead added first unscoped message
before adding first scoped message, then there **might** be
invalid reads during thread destruction.

The fix is simple: do things properly and manage the lifetime of
messages in `UNSCOPED_X` explicitly. Then we don't have to deal
with the destruction of fake `ScopedMessage`s while the thread is
being destroyed, and the lifetime of the two vectors is no longer
tied together.

I also threw them both into a new type, to encapsulate some of the
unscoped message logic.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use magic statics for non-trivial thread-local globals</title>
<updated>2025-12-02T13:19:21+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-12-01T21:23:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=f80956a43a3e276686ed59531b41617282d75a0c'/>
<id>f80956a43a3e276686ed59531b41617282d75a0c</id>
<content type='text'>
This avoids calling the global's constructor on threads that will
never interact with them. Calling the constructor can have surprising
overhead, as e.g. MSVC's Debug mode `std::vector` will allocate in
the default constructor.

Closes #3050
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This avoids calling the global's constructor on threads that will
never interact with them. Calling the constructor can have surprising
overhead, as e.g. MSVC's Debug mode `std::vector` will allocate in
the default constructor.

Closes #3050
</pre>
</div>
</content>
</entry>
<entry>
<title>Only use thread_local in builds with thread safety enabled</title>
<updated>2025-12-02T13:01:55+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-12-01T13:18:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=32eac2d1bb63d6b58a32e341e22b9438f1bd041a'/>
<id>32eac2d1bb63d6b58a32e341e22b9438f1bd041a</id>
<content type='text'>
MSVC cannot dllexport thread_local variables, so we avoid making
globals thread local if we won't support multiple threads anyway.

Closes #3044
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MSVC cannot dllexport thread_local variables, so we avoid making
globals thread local if we won't support multiple threads anyway.

Closes #3044
</pre>
</div>
</content>
</entry>
<entry>
<title>Initialize ReusableStringStream cache before user threads can run</title>
<updated>2025-12-01T09:44:31+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-11-30T20:34:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=d26f763180c081c8c10d17dee59b2b1139268220'/>
<id>d26f763180c081c8c10d17dee59b2b1139268220</id>
<content type='text'>
The initialization itself is thread unsafe, and as such we cannot
allow it to be delayed until multiple user-spawned threads need it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The initialization itself is thread unsafe, and as such we cannot
allow it to be delayed until multiple user-spawned threads need it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix lazy removal of unscoped messages also removing still valid msgs</title>
<updated>2025-11-30T13:30:19+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-11-30T11:56:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=985a3f44605bf3ee7bd4a0c6129ca69ec53a7ebe'/>
<id>985a3f44605bf3ee7bd4a0c6129ca69ec53a7ebe</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
