<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/extras, branch v3.15.3</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.15.3</title>
<updated>2026-07-26T20:19:31+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-07-26T20:19:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=8b08d4d79514f45f7e4ce2a607ac9c94e920d1bb'/>
<id>8b08d4d79514f45f7e4ce2a607ac9c94e920d1bb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid quadratic JSON array parse behaviour in `catch_discover_tests`</title>
<updated>2026-07-26T17:51:58+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-07-26T11:15:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=1079da4c5f5fea2a31d795bba95eacaa2f622849'/>
<id>1079da4c5f5fea2a31d795bba95eacaa2f622849</id>
<content type='text'>
Using CMake's `string(JSON` to parse JSON array leads to quadratic
running time in number of tests, see https://gitlab.kitware.com/cmake/cmake/-/work_items/27985

This leads to _terrible_ runtime for `catch_discover_tests` when called
on binaries with lot of tests (1k+). To get reasonable runtimes, we have
to avoid using `string(JSON` to parse out the individual test objects
from the array with all tests.

This commit replaces the sane approach of using real JSON parser with
a set of terrible hacks, where we use CMake's string APIs to split the
JSON array on what looks like object boundary (`}&lt;ws&gt;*,&lt;ws&gt;*{`), and then
checking whether the resulting thing can be parsed as JSON object. If not,
we append the next piece and check again. And again, and again, until we
get a proper JSON object.

This is all around a hilariously terrible idea, however:

1) It works in practice for all tested inputs.
2) It improves the time it takes to run `catch_discover_tests` on binary
   with 1k tests from 4.2s to 1.1s and 2k tests from 16s to 3.9s.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using CMake's `string(JSON` to parse JSON array leads to quadratic
running time in number of tests, see https://gitlab.kitware.com/cmake/cmake/-/work_items/27985

This leads to _terrible_ runtime for `catch_discover_tests` when called
on binaries with lot of tests (1k+). To get reasonable runtimes, we have
to avoid using `string(JSON` to parse out the individual test objects
from the array with all tests.

This commit replaces the sane approach of using real JSON parser with
a set of terrible hacks, where we use CMake's string APIs to split the
JSON array on what looks like object boundary (`}&lt;ws&gt;*,&lt;ws&gt;*{`), and then
checking whether the resulting thing can be parsed as JSON object. If not,
we append the next piece and check again. And again, and again, until we
get a proper JSON object.

This is all around a hilariously terrible idea, however:

1) It works in practice for all tested inputs.
2) It improves the time it takes to run `catch_discover_tests` on binary
   with 1k tests from 4.2s to 1.1s and 2k tests from 16s to 3.9s.
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid n^2 behaviour when appending script commands in catch_discover_tests</title>
<updated>2026-07-26T13:50:33+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-07-26T08:51:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=60c8b878292ec4afc625a807cdc3902397a408a3'/>
<id>60c8b878292ec4afc625a807cdc3902397a408a3</id>
<content type='text'>
Repeatedly calling `string(APPEND` on the same destination string
leads to quadratic running time. We avoid this by flushing the CTest
script into a file periodically, currently every 50kB of text.

This can cause _slight_ slowdown just around the flush boundary (each
file write is quite expensive, so if we flush just before the last test
is written, it hurts), but it avoids terrible performance for large
test suites.

The performance is roughly equal at 500 tests to discover, and clearly
wins at more; for 1/2/4/8 k tests, the improvements are 0.3/1.6/6.4/27 s.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Repeatedly calling `string(APPEND` on the same destination string
leads to quadratic running time. We avoid this by flushing the CTest
script into a file periodically, currently every 50kB of text.

This can cause _slight_ slowdown just around the flush boundary (each
file write is quite expensive, so if we flush just before the last test
is written, it hurts), but it avoids terrible performance for large
test suites.

The performance is roughly equal at 500 tests to discover, and clearly
wins at more; for 1/2/4/8 k tests, the improvements are 0.3/1.6/6.4/27 s.
</pre>
</div>
</content>
</entry>
<entry>
<title>Optimize adding test commands in catch_discover_tests</title>
<updated>2026-07-26T13:50:31+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-07-24T10:22:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=64a551e2e7edb85e4f2cd99e5737a587eb06c35b'/>
<id>64a551e2e7edb85e4f2cd99e5737a587eb06c35b</id>
<content type='text'>
The previous approach was for `add_command` to behave as append function
via concatenating the command string internally and then saving it into
`PARENT_SCOPE`. Because this in practice ended up meaning concatenating
a copy of the string inside the function and then overwriting the string
outside the function, the performance was lacking.

The new approach is for `prepare_command` to only escape &amp; return the
command from single call, and the caller is responsible for concatenating
the result. Since the actual concatenation no longer crosses function
scope boundaries, the performance is much better, even though the scaling
is still quadratic.

The new approach only takes 1/4-1/5 of the time, saving ~1s at 1k tests,
4.5s at 2k tests and 19s at 4k tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous approach was for `add_command` to behave as append function
via concatenating the command string internally and then saving it into
`PARENT_SCOPE`. Because this in practice ended up meaning concatenating
a copy of the string inside the function and then overwriting the string
outside the function, the performance was lacking.

The new approach is for `prepare_command` to only escape &amp; return the
command from single call, and the caller is responsible for concatenating
the result. Since the actual concatenation no longer crosses function
scope boundaries, the performance is much better, even though the scaling
is still quadratic.

The new approach only takes 1/4-1/5 of the time, saving ~1s at 1k tests,
4.5s at 2k tests and 19s at 4k tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>Determinize the test registration order in catch_discover_tests</title>
<updated>2026-07-26T13:23:39+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-07-24T10:33:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=2b971368dd9ba954604f45e748fb2d46493bb7d7'/>
<id>2b971368dd9ba954604f45e748fb2d46493bb7d7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Document that DISCOVERY_MODE PRE_TEST should be used with catch_discover_tests when used with XCode.</title>
<updated>2026-07-22T18:50:17+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2026-07-10T15:42:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=eb431764b4cb9b6fa2296a034b4231064f8e464e'/>
<id>eb431764b4cb9b6fa2296a034b4231064f8e464e</id>
<content type='text'>
This addresses https://github.com/catchorg/Catch2/issues/2411 by making the "workaround" the official approach and is consistent with how gtest and cmake deal with the same situation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This addresses https://github.com/catchorg/Catch2/issues/2411 by making the "workaround" the official approach and is consistent with how gtest and cmake deal with the same situation.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove debug message for environment variable check</title>
<updated>2026-07-15T09:19:22+00:00</updated>
<author>
<name>Manuel Knörle</name>
</author>
<published>2026-07-15T08:30:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=ae5d271da2c88b859d6365281ac075112115d4b1'/>
<id>ae5d271da2c88b859d6365281ac075112115d4b1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Optimize JSON parsing in catch_discover_tests()</title>
<updated>2026-07-08T08:29:59+00:00</updated>
<author>
<name>Nikolay Baklicharov</name>
</author>
<published>2026-07-07T21:29:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=a15f718c825b29d009c98e0770c35646332217c1'/>
<id>a15f718c825b29d009c98e0770c35646332217c1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>v3.15.2</title>
<updated>2026-07-07T18:44:33+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-07-07T18:44:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=191fa38c9b1596cd2576ab531d4ab4d5e8e05190'/>
<id>191fa38c9b1596cd2576ab531d4ab4d5e8e05190</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>catch_discover_tests uses tempfile to retrieve JSON from the binary</title>
<updated>2026-07-04T14:36:05+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-07-04T14:35:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=9ec44dd62b1b593e01feaf95eb485d26fcdd50ce'/>
<id>9ec44dd62b1b593e01feaf95eb485d26fcdd50ce</id>
<content type='text'>
This allows it to deal with badly behaved code, where 3rd party
dependencies write into stdout during global construction.

Closes #3162
Closes #3166
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows it to deal with badly behaved code, where 3rd party
dependencies write into stdout during global construction.

Closes #3162
Closes #3166
</pre>
</div>
</content>
</entry>
</feed>
