<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/tests/SelfTest/UsageTests, 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>Add tests for comparing &amp; stringifying volatile pointers</title>
<updated>2025-08-07T22:02:33+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-08-07T22:02:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=03c62cdf2ede08ee759008637adf5d8e5581b77b'/>
<id>03c62cdf2ede08ee759008637adf5d8e5581b77b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix StringMaker for time_point&lt;system_clock&gt; with non-default duration</title>
<updated>2025-08-02T06:31:34+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-08-01T21:00:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=17fe5eaa5c0c28e7a6a197420f0f16b085a8fa9a'/>
<id>17fe5eaa5c0c28e7a6a197420f0f16b085a8fa9a</id>
<content type='text'>
Fixes #2685
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #2685
</pre>
</div>
</content>
</entry>
<entry>
<title>Add enum types to what is captured by value by default</title>
<updated>2025-07-30T18:20:38+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-07-29T21:51:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=ccabd4de891e749f472121497941bb9437b83c2e'/>
<id>ccabd4de891e749f472121497941bb9437b83c2e</id>
<content type='text'>
As it turns out, enums can be used to declare bitfields, and we
cannot form a reference to a bitfield in the cpature. Thus, we add
`std::is_enum` as a criteria to the default for `capture_by_value`,
so that enum-based bitfields are also captured by value and thus
decomposable.

Closes #3001
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As it turns out, enums can be used to declare bitfields, and we
cannot form a reference to a bitfield in the cpature. Thus, we add
`std::is_enum` as a criteria to the default for `capture_by_value`,
so that enum-based bitfields are also captured by value and thus
decomposable.

Closes #3001
</pre>
</div>
</content>
</entry>
<entry>
<title>Regularize scoped message lifetime to only consider the object's scope</title>
<updated>2025-07-21T19:50:47+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-07-21T15:47:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=10aef62f21e52e5cd73bf0dc6ac8be35fbc4a798'/>
<id>10aef62f21e52e5cd73bf0dc6ac8be35fbc4a798</id>
<content type='text'>
This means that:
1) Scoped messages are always removed at the end of their scope,
   even if the scope ended due to an exception.
2) Scoped messages outlive section end, if that section's scope is
   enclosed in their own.

Previously neither of these were true, which has led to a number
of surprising behaviour, where e.g. this:
```cpp
TEST_CASE() {
    try {
        INFO( "some info" );
        throw std::runtime_error( "ex" );
    } catch (std::exception const&amp;) {}

    REQUIRE( false );
}
```
would print "some info" as the message for the assertion, while this:
```cpp
TEST_CASE() {
    INFO("Hello");
    SECTION("dummy") {}
    REQUIRE(false);
}
```
would not print out "Hello" as the message for the assertion.

This had an underlying reason, in that it was trying to helpfully
keep the messages around in case of unexpected exceptions, so that
code like this:
```cpp
TEST_CASE() {
    auto [input, expected] = GENERATE(...);
    CAPTURE(input);
    auto result = transform(input); // throws
    REQUIRE(result == expected);
}
```
would report the value of `input` when `transform` throws. However,
it was surprising in practice and was causing various issues around
handling of messages in other cases.

Closes #1759
Closes #2019
Closes #2959
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This means that:
1) Scoped messages are always removed at the end of their scope,
   even if the scope ended due to an exception.
2) Scoped messages outlive section end, if that section's scope is
   enclosed in their own.

Previously neither of these were true, which has led to a number
of surprising behaviour, where e.g. this:
```cpp
TEST_CASE() {
    try {
        INFO( "some info" );
        throw std::runtime_error( "ex" );
    } catch (std::exception const&amp;) {}

    REQUIRE( false );
}
```
would print "some info" as the message for the assertion, while this:
```cpp
TEST_CASE() {
    INFO("Hello");
    SECTION("dummy") {}
    REQUIRE(false);
}
```
would not print out "Hello" as the message for the assertion.

This had an underlying reason, in that it was trying to helpfully
keep the messages around in case of unexpected exceptions, so that
code like this:
```cpp
TEST_CASE() {
    auto [input, expected] = GENERATE(...);
    CAPTURE(input);
    auto result = transform(input); // throws
    REQUIRE(result == expected);
}
```
would report the value of `input` when `transform` throws. However,
it was surprising in practice and was causing various issues around
handling of messages in other cases.

Closes #1759
Closes #2019
Closes #2959
</pre>
</div>
</content>
</entry>
<entry>
<title>Constify various autoregistry globals to avoid clang-tidy complaints</title>
<updated>2025-07-15T13:23:32+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-07-15T12:42:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=f7968e96975ed30231d5f5614a159e1baa7ba664'/>
<id>f7968e96975ed30231d5f5614a159e1baa7ba664</id>
<content type='text'>
Closes #2582
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #2582
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow using only types in `TEMPLATE_TEST_CASE_SIG`. (#2995)</title>
<updated>2025-07-08T12:26:25+00:00</updated>
<author>
<name>Clement Courbet</name>
</author>
<published>2025-07-08T12:26:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=2de12cb05f1e54fc2a8f7a894f2a435297295efa'/>
<id>2de12cb05f1e54fc2a8f7a894f2a435297295efa</id>
<content type='text'>
Right now `TEMPLATE_TEST_CASE_SIG` fails to compile when the signature contains only types:

```
TEMPLATE_TEST_CASE_SIG(
  "TemplateTestSig: compiles with two type parameters",
  "[template][onlytypes]",
  ((typename U, typename V), U, V), (int,int)) {}
```

The trick is to resolve the ambiguity between the two overloads of
`get_wrapper` (`TypeList` and `Nttp`) by making one match more strongly.
We also need to allow `reg_test` to register more than one type.

Add unit tests.

Fixes #2680

---------

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>
Right now `TEMPLATE_TEST_CASE_SIG` fails to compile when the signature contains only types:

```
TEMPLATE_TEST_CASE_SIG(
  "TemplateTestSig: compiles with two type parameters",
  "[template][onlytypes]",
  ((typename U, typename V), U, V), (int,int)) {}
```

The trick is to resolve the ambiguity between the two overloads of
`get_wrapper` (`TypeList` and `Nttp`) by making one match more strongly.
We also need to allow `reg_test` to register more than one type.

Add unit tests.

Fixes #2680

---------

Co-authored-by: Martin Hořeňovský &lt;martin.horenovsky@gmail.com&gt;</pre>
</div>
</content>
</entry>
<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>Add test for iterators with const T as the value_type</title>
<updated>2024-11-11T05:49:11+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2024-11-11T05:49:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=f5cee49c71e7c0e805695b03e8af533783789762'/>
<id>f5cee49c71e7c0e805695b03e8af533783789762</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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>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>
</feed>
