<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/src, branch v3.11.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>v3.11.0</title>
<updated>2025-09-30T08:54:31+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-09-30T08:54:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=b3fb4b9feafcd8d91c5cb510a4775143fdbef02f'/>
<id>b3fb4b9feafcd8d91c5cb510a4775143fdbef02f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Support Bazel's TEST_RANDOM_SEED</title>
<updated>2025-09-28T08:48:08+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-09-27T21:20:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=91b3b3bf4057e2a7e41bf1edd3e2c68b31bb3747'/>
<id>91b3b3bf4057e2a7e41bf1edd3e2c68b31bb3747</id>
<content type='text'>
As with other Bazel env vars, it overrides the corresponding CLI
parameter if both are set.

Closes #3021
Closes #3024
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As with other Bazel env vars, it overrides the corresponding CLI
parameter if both are set.

Closes #3021
Closes #3024
</pre>
</div>
</content>
</entry>
<entry>
<title>Speed up processing mostly visible strings in convertIntoString</title>
<updated>2025-09-27T20:43:14+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-09-22T20:41:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=a00d6544375e92ccedec786aaee47ac392ea4900'/>
<id>a00d6544375e92ccedec786aaee47ac392ea4900</id>
<content type='text'>
This commit causes small (~5%) slowdown when processing strings
that consist mostly of escaped characters, but improves throughput
by about 100% for strings that consist mostly of characters that
do not need escaping.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit causes small (~5%) slowdown when processing strings
that consist mostly of escaped characters, but improves throughput
by about 100% for strings that consist mostly of characters that
do not need escaping.
</pre>
</div>
</content>
</entry>
<entry>
<title>Inline the `getResultCapture` helper into header.</title>
<updated>2025-09-27T11:24:46+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-09-23T13:23:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=756ae05d307168eaa27bd904dbd8e591a6406889'/>
<id>756ae05d307168eaa27bd904dbd8e591a6406889</id>
<content type='text'>
We still keep the error check in the function, but hide it in an
outlined function inside a .cpp file, to promote inlining of the
retrieval part.

In the future, we should explore two things

1) Skipping over the context retrieval here, allowing direct access.
   I currently do not see a way to do this while keeping the
   "greppability" of mutable vs immutable accesses that is there now,
   but it would help a lot when inlining is not enabled.
2) Removing the error check, to make the function trivially inlinable,
   and without branches.

**runtime difference**

| --------- | Debug | Release |
|:----------|------:|--------:|
| Slow path |  0.98 |    1.07 |
| Fast path |  1.04 |    1.08 |

We lost bit of performance on the assertion slow path in debug mode,
but together with the previous commit, it comes out at net zero.
For other combinations, we see 5-10% perf improvement across the
two commits.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We still keep the error check in the function, but hide it in an
outlined function inside a .cpp file, to promote inlining of the
retrieval part.

In the future, we should explore two things

1) Skipping over the context retrieval here, allowing direct access.
   I currently do not see a way to do this while keeping the
   "greppability" of mutable vs immutable accesses that is there now,
   but it would help a lot when inlining is not enabled.
2) Removing the error check, to make the function trivially inlinable,
   and without branches.

**runtime difference**

| --------- | Debug | Release |
|:----------|------:|--------:|
| Slow path |  0.98 |    1.07 |
| Fast path |  1.04 |    1.08 |

We lost bit of performance on the assertion slow path in debug mode,
but together with the previous commit, it comes out at net zero.
For other combinations, we see 5-10% perf improvement across the
two commits.
</pre>
</div>
</content>
</entry>
<entry>
<title>Keep the main Context instance as static value, not pointer</title>
<updated>2025-09-27T11:24:44+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-09-23T09:32:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=a2e41916f2cc0adbd27fc3d9cb89e9615fea1ad8'/>
<id>a2e41916f2cc0adbd27fc3d9cb89e9615fea1ad8</id>
<content type='text'>
This allows us to remove the lazy init checks, improving the inlining
potential when retrieving current context, thus slightly improving
the performance of assertions.

**runtime difference**

| --------- | Debug | Release |
|:----------|------:|--------:|
| Slow path |  1.01 |    0.98 |
| Fast path |  1.02 |    1.02 |

There is small slowdown in case of Release build + assertions taking
the slow path, but

1) going through the slow path is rare
2) Given the code change, I believe this to be artifact of the
   optimizer in the old GCC version I am using locally.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows us to remove the lazy init checks, improving the inlining
potential when retrieving current context, thus slightly improving
the performance of assertions.

**runtime difference**

| --------- | Debug | Release |
|:----------|------:|--------:|
| Slow path |  1.01 |    0.98 |
| Fast path |  1.02 |    1.02 |

There is small slowdown in case of Release build + assertions taking
the slow path, but

1) going through the slow path is rare
2) Given the code change, I believe this to be artifact of the
   optimizer in the old GCC version I am using locally.
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow composability of unhandled exception filters (#3033)</title>
<updated>2025-09-27T09:09:34+00:00</updated>
<author>
<name>Duncan Horn</name>
</author>
<published>2025-09-27T09:09:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=0e772cc0d29e7518f84a1ad11aa179167a6ab6bc'/>
<id>0e772cc0d29e7518f84a1ad11aa179167a6ab6bc</id>
<content type='text'>
The change is very simple. If a handler previously existed, Catch2 will invoke it after printing out its output. I've also updated the comment to better reflect that it's returning EXCEPTION_CONTINUE_SEARCH even in scenarios where the exception is one that the library cares about.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The change is very simple. If a handler previously existed, Catch2 will invoke it after printing out its output. I've also updated the comment to better reflect that it's returning EXCEPTION_CONTINUE_SEARCH even in scenarios where the exception is one that the library cares about.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix ReusableStringStream to access the container under the lock (#3031)</title>
<updated>2025-09-25T11:31:49+00:00</updated>
<author>
<name>Duncan Horn</name>
</author>
<published>2025-09-25T11:31:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=f7e7fa0983e83b922cb6336ff3a55d33b2873943'/>
<id>f7e7fa0983e83b922cb6336ff3a55d33b2873943</id>
<content type='text'>
Commit 582200a made `ReusableStringStream`'s index reservation thread safe, however it's still accessing the `m_streams` vector outside the lock. This makes it so that the `add` call returns the pointer in addition to the index so that the lock doesn't need to get acquired again until destruction.

The issue with accessing `m_streams` outside the lock is that `add` can call `push_back` on the vector, which might re-allocate. If this re-allocation occurs concurrently with anther thread trying to index into this array, you get UB (typically a null pointer read).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 582200a made `ReusableStringStream`'s index reservation thread safe, however it's still accessing the `m_streams` vector outside the lock. This makes it so that the `add` call returns the pointer in addition to the index so that the lock doesn't need to get acquired again until destruction.

The issue with accessing `m_streams` outside the lock is that `add` can call `push_back` on the vector, which might re-allocate. If this re-allocation occurs concurrently with anther thread trying to index into this array, you get UB (typically a null pointer read).</pre>
</div>
</content>
</entry>
<entry>
<title>Make message push/pop static</title>
<updated>2025-09-23T09:46:26+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-09-23T09:01:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=434bf55d4727ab1d1aef244ef16823a0ed1e6b4a'/>
<id>434bf55d4727ab1d1aef244ef16823a0ed1e6b4a</id>
<content type='text'>
Since the change to make the message macros thread-safe, and thus
thread-local, there is no need to handle messages through instance
of `RunContext`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the change to make the message macros thread-safe, and thus
thread-local, there is no need to handle messages through instance
of `RunContext`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve QNX support</title>
<updated>2025-09-22T13:36:46+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-09-22T13:12:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=9048c24fa7c6b568d52f76cbf06bbd62b7f83556'/>
<id>9048c24fa7c6b568d52f76cbf06bbd62b7f83556</id>
<content type='text'>
This cherry-picks the source changes from PR made by @pkleymonov-qnx,
without including the build path changes that are irrelevant unless
we can add a QNX target to our CI.

Close #2953
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This cherry-picks the source changes from PR made by @pkleymonov-qnx,
without including the build path changes that are irrelevant unless
we can add a QNX target to our CI.

Close #2953
</pre>
</div>
</content>
</entry>
<entry>
<title>Support Bazel's TEST_PREMATURE_EXIT_FILE and add it to CLI as well</title>
<updated>2025-09-22T12:02:45+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-09-21T09:19:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=8ed8c431c601c7b303dbfe7eb412a63f1641b812'/>
<id>8ed8c431c601c7b303dbfe7eb412a63f1641b812</id>
<content type='text'>
This tells Catch2 to create an empty file at specified path before
the tests start, and delete it after the tests finish. This allows
callers to catch cases where the test binary silently exits before
finishing (e.g. via call to `exit(0)` inside the code under test),
by looking whether the file still exists.

Closes #3020
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This tells Catch2 to create an empty file at specified path before
the tests start, and delete it after the tests finish. This allows
callers to catch cases where the test binary silently exits before
finishing (e.g. via call to `exit(0)` inside the code under test),
by looking whether the file still exists.

Closes #3020
</pre>
</div>
</content>
</entry>
</feed>
