<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/tests/SelfTest/Baselines, branch v3.8.1</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>Fix wrong reference to REGISTER_ENUM</title>
<updated>2024-11-12T22:29:54+00:00</updated>
<author>
<name>Thomas Braun</name>
</author>
<published>2024-11-12T21:13:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=506276c59217429c93abd2fe9507c7f45eb81072'/>
<id>506276c59217429c93abd2fe9507c7f45eb81072</id>
<content type='text'>
This was renamed to CATCH_REGISTER_ENUM in 541f1ed1 (Only provide
CATCH_REGISTER_ENUM, 2019-04-21).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was renamed to CATCH_REGISTER_ENUM in 541f1ed1 (Only provide
CATCH_REGISTER_ENUM, 2019-04-21).
</pre>
</div>
</content>
</entry>
<entry>
<title>Provide overloads for {Unordered}RangeEquals taking a std::initializer_list</title>
<updated>2024-10-14T19:02:03+00:00</updated>
<author>
<name>Stefan Haller</name>
</author>
<published>2024-10-12T15:18:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=69d62abc9a48033177b99ae79c13a6f1b280e94c'/>
<id>69d62abc9a48033177b99ae79c13a6f1b280e94c</id>
<content type='text'>
This allows writing something like

  const auto v = calculateSomeVectorOfInts();
  CHECK_THAT(v, RangeEquals({1, 2, 3}));

Fixes #2915.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows writing something like

  const auto v = calculateSomeVectorOfInts();
  CHECK_THAT(v, RangeEquals({1, 2, 3}));

Fixes #2915.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix bug in TokenStream parser</title>
<updated>2024-09-13T13:32:49+00:00</updated>
<author>
<name>Mark Jansen</name>
</author>
<published>2024-09-05T21:06:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=02d3304782c715cb787e53a20f4e44ec249d3466'/>
<id>02d3304782c715cb787e53a20f4e44ec249d3466</id>
<content type='text'>
When presented with just '-' it would access the string at position [1]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When presented with just '-' it would access the string at position [1]
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve performance of SonarQube reporter handling passing assertions</title>
<updated>2024-08-14T10:33:55+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2024-08-14T10:32:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=fa306fc85eca7cc68a5362c503019fa823cbe411'/>
<id>fa306fc85eca7cc68a5362c503019fa823cbe411</id>
<content type='text'>
This mirrors the changes done to the JUnit reporter in commit
fe483c056d9516d3550519c29fbf14a4d84d06d4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This mirrors the changes done to the JUnit reporter in commit
fe483c056d9516d3550519c29fbf14a4d84d06d4
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve performance of JUnit reporter when handling passing assertions</title>
<updated>2024-08-13T17:13:03+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2024-08-13T16:57:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=fe483c056d9516d3550519c29fbf14a4d84d06d4'/>
<id>fe483c056d9516d3550519c29fbf14a4d84d06d4</id>
<content type='text'>
This is done by no longer requiring all assertions to be seen
by the JUnit reporter. Since the JUnit reporter never outputs
all assertions, even with `-s`, the only difference from storing
passing assertions in the `CumulativeReporterBase` was some
bookkeeping in deciding which sections are relevant to the output.

Given `TEST_CASE` that just runs many passing assertions, e.g.

```
TEST_CASE( "PERFORMANCE_TEST_CASE", "[.]" ) {
    for (size_t i = 0; i &lt; 1000'000'000; ++i) {
        REQUIRE( i == i );
    }
}
```

the new JUnit reporter will finish in 5:47, using up ~7.7 MB of RAM.
The old JUnit reporter would finish in 0:30, due to bad_alloc
after using up 14.5 GB of RAM (the system has 16 GB total).

If the total number of assertions is lowered to 10M, the old
implementation uses up ~7.1 GB of RAM and finishes in 12 minutes.
The new implementation still needs only ~7.7 MB of RAM, and finishes
in 4 minutes.

There is a slight downside in that the output is slightly different;
the new implementation will include the `TEST_CASE` level section
in output, even if it does not have its own assertion. In other words,
given a `TEST_CASE` like this

```
TEST_CASE( "JsonWriter", "[JSON][JsonWriter]" ) {
    std::stringstream stream;
    SECTION( "Newly constructed JsonWriter does nothing" ) {
        Catch::JsonValueWriter writer{ stream };
        REQUIRE( stream.str() == "" );
    }

    SECTION( "Calling writeObject will create an empty pair of braces" ) {
        { auto writer = Catch::JsonValueWriter{ stream }.writeObject(); }
        REQUIRE( stream.str() == "{\n}" );
    }
}
```

the new implementation will output 3 `testcase` tags, 2 for the explicit
 `SECTION`s with tests, and 1 for the top level section.

However, this can be worked-around if required, and the performance
improvement is such that it is worth changing the current output,
even if it needs to be fixed in the future.

Closes #2897
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is done by no longer requiring all assertions to be seen
by the JUnit reporter. Since the JUnit reporter never outputs
all assertions, even with `-s`, the only difference from storing
passing assertions in the `CumulativeReporterBase` was some
bookkeeping in deciding which sections are relevant to the output.

Given `TEST_CASE` that just runs many passing assertions, e.g.

```
TEST_CASE( "PERFORMANCE_TEST_CASE", "[.]" ) {
    for (size_t i = 0; i &lt; 1000'000'000; ++i) {
        REQUIRE( i == i );
    }
}
```

the new JUnit reporter will finish in 5:47, using up ~7.7 MB of RAM.
The old JUnit reporter would finish in 0:30, due to bad_alloc
after using up 14.5 GB of RAM (the system has 16 GB total).

If the total number of assertions is lowered to 10M, the old
implementation uses up ~7.1 GB of RAM and finishes in 12 minutes.
The new implementation still needs only ~7.7 MB of RAM, and finishes
in 4 minutes.

There is a slight downside in that the output is slightly different;
the new implementation will include the `TEST_CASE` level section
in output, even if it does not have its own assertion. In other words,
given a `TEST_CASE` like this

```
TEST_CASE( "JsonWriter", "[JSON][JsonWriter]" ) {
    std::stringstream stream;
    SECTION( "Newly constructed JsonWriter does nothing" ) {
        Catch::JsonValueWriter writer{ stream };
        REQUIRE( stream.str() == "" );
    }

    SECTION( "Calling writeObject will create an empty pair of braces" ) {
        { auto writer = Catch::JsonValueWriter{ stream }.writeObject(); }
        REQUIRE( stream.str() == "{\n}" );
    }
}
```

the new implementation will output 3 `testcase` tags, 2 for the explicit
 `SECTION`s with tests, and 1 for the top level section.

However, this can be worked-around if required, and the performance
improvement is such that it is worth changing the current output,
even if it needs to be fixed in the future.

Closes #2897
</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>Don't include numerically unstable tests in approvals</title>
<updated>2024-04-30T17:21:27+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2024-04-30T17:21:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=a654e4b0382f3c41bdb911739b05276a11cf644a'/>
<id>a654e4b0382f3c41bdb911739b05276a11cf644a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Default StringMaker&lt;FloatingPointType&gt;::precision to max_digits10</title>
<updated>2024-04-30T15:18:48+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2024-04-30T14:43:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=ef713582d268d9b1b15381325021d7e0f91d6ab9'/>
<id>ef713582d268d9b1b15381325021d7e0f91d6ab9</id>
<content type='text'>
`max_digits10` is the number of decimal digits that the type _can_
represent, in other words, the number of decimal digits needed to
disambiguate any two floating point numbers when serialized to
a string.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`max_digits10` is the number of decimal digits that the type _can_
represent, in other words, the number of decimal digits needed to
disambiguate any two floating point numbers when serialized to
a string.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use Catch::StringMaker for output in WithinRelMatcher (#2846)</title>
<updated>2024-04-15T11:35:39+00:00</updated>
<author>
<name>Ian Bell</name>
</author>
<published>2024-04-15T11:35:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=53ddf37af4488cac7724761858ae3cca9d2d65e7'/>
<id>53ddf37af4488cac7724761858ae3cca9d2d65e7</id>
<content type='text'>
The WithinRelMatcher does not listen to the precision specification; it just naively pipes to stringstream. If you specify the precision, that has no impact on the outputted values when the match fails.

This fix makes the WithinRelMatcher listen to the precision (https://github.com/catchorg/Catch2/blob/devel/docs/tostring.md#floating-point-precision) specified by: Catch::StringMaker&lt;float&gt;::precision</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The WithinRelMatcher does not listen to the precision specification; it just naively pipes to stringstream. If you specify the precision, that has no impact on the outputted values when the match fails.

This fix makes the WithinRelMatcher listen to the precision (https://github.com/catchorg/Catch2/blob/devel/docs/tostring.md#floating-point-precision) specified by: Catch::StringMaker&lt;float&gt;::precision</pre>
</div>
</content>
</entry>
<entry>
<title>less copies and allocations in replaceInPlace</title>
<updated>2024-03-01T20:24:45+00:00</updated>
<author>
<name>Martin Jeřábek</name>
</author>
<published>2024-02-25T17:01:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=4d8affc989cc13f60796f66781b8729d175c18e9'/>
<id>4d8affc989cc13f60796f66781b8729d175c18e9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
