<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/include/internal/catch_capture.hpp, branch v2.x</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 clang-tidy `bugprone-chained-comparison` warnings on v2.x</title>
<updated>2024-04-22T20:05:38+00:00</updated>
<author>
<name>Oz</name>
</author>
<published>2024-04-22T20:05:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=a2b2e1f707eb45cf1c136f03d597c299db10da2e'/>
<id>a2b2e1f707eb45cf1c136f03d597c299db10da2e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix compilation error when lambdas are used in assertions</title>
<updated>2020-03-19T12:32:45+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2020-03-19T12:32:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=3a33315ff8e047b1ff46b1ee2a5be3fdd7fbac08'/>
<id>3a33315ff8e047b1ff46b1ee2a5be3fdd7fbac08</id>
<content type='text'>
This is a partial revert of b7b346c3e5603.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a partial revert of b7b346c3e5603.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make warnings in assertions fire for GCC/Clang again</title>
<updated>2020-03-19T08:45:41+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2020-03-18T19:59:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=b7b346c3e56030d19ac58d33326b69bbaf226552'/>
<id>b7b346c3e56030d19ac58d33326b69bbaf226552</id>
<content type='text'>
The old code caused warnings to fire under MSVC, and Clang &lt;3.8.
I could not find a GCC version where it worked, but I assume that it
did at some point.

This new code causes all of MSVC, GCC, Clang, in current versions,
to emit signed/unsigned comparison warning in test like this:

```cpp
TEST_CASE() {
    int32_t i = -1;
    uint32_t j = 1;
    REQUIRE(i != j);
}
```

Where previously only MSVC would emit the warning.

Fixes #1880
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The old code caused warnings to fire under MSVC, and Clang &lt;3.8.
I could not find a GCC version where it worked, but I assume that it
did at some point.

This new code causes all of MSVC, GCC, Clang, in current versions,
to emit signed/unsigned comparison warning in test like this:

```cpp
TEST_CASE() {
    int32_t i = -1;
    uint32_t j = 1;
    REQUIRE(i != j);
}
```

Where previously only MSVC would emit the warning.

Fixes #1880
</pre>
</div>
</content>
</entry>
<entry>
<title>Rework how warning suppression in macros is done</title>
<updated>2019-10-27T20:07:21+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2019-10-27T20:07:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=849f2848bdf625a7b6248e4e62ba0e39ee609634'/>
<id>849f2848bdf625a7b6248e4e62ba0e39ee609634</id>
<content type='text'>
Previously, each warning suppression was self-contained, with its
own pair of `SUPPRESS_X_WARNING` and `UNSUPPRESS_X_WARNING` macros.
This had the obvious advantage of being self-containing, but it
also meant that if we needed to suppress more than one warning
in a single place, then we would manipulate the compiler's warning
state multiple times, even though logically we would only need one
layer.

The new way of suppressing warnings in macros is to push compiler's
warning state with `CATCH_INTERNAL_START_WARNINGS_SUPPRESSION` macro,
then disable whatever macros we need with the
`CATCH_INTERNAL_SUPPRESS_X_WARNINGS` macro, and then return to the
previous state using `CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, each warning suppression was self-contained, with its
own pair of `SUPPRESS_X_WARNING` and `UNSUPPRESS_X_WARNING` macros.
This had the obvious advantage of being self-containing, but it
also meant that if we needed to suppress more than one warning
in a single place, then we would manipulate the compiler's warning
state multiple times, even though logically we would only need one
layer.

The new way of suppressing warnings in macros is to push compiler's
warning state with `CATCH_INTERNAL_START_WARNINGS_SUPPRESSION` macro,
then disable whatever macros we need with the
`CATCH_INTERNAL_SUPPRESS_X_WARNINGS` macro, and then return to the
previous state using `CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add unscoped info functionality</title>
<updated>2019-03-06T21:04:35+00:00</updated>
<author>
<name>Omer Ozarslan</name>
</author>
<published>2019-02-01T15:11:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=99575b45db0ec0de2fb84b5e5cce7e93559387e5'/>
<id>99575b45db0ec0de2fb84b5e5cce7e93559387e5</id>
<content type='text'>
This adds UNSCOPED_INFO macro, creating a log message that is stored
until the end of next assertion or the end of test case, whichever comes
first. These messages are not scoped locally, unlike messages created by
INFO macro.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds UNSCOPED_INFO macro, creating a log message that is stored
until the end of next assertion or the end of test case, whichever comes
first. These messages are not scoped locally, unlike messages created by
INFO macro.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix "code will never be executed" under clang</title>
<updated>2019-02-18T18:01:43+00:00</updated>
<author>
<name>Paul Lesur</name>
</author>
<published>2019-02-12T12:25:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=2bd0722470b2cda8573b9da8afa9ba6763b774f0'/>
<id>2bd0722470b2cda8573b9da8afa9ba6763b774f0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for -fno-exceptions (or equivalent)</title>
<updated>2018-09-03T19:08:27+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2018-09-03T15:52:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=8b0188385498d6ac101854dc3983c6ebd220adc3'/>
<id>8b0188385498d6ac101854dc3983c6ebd220adc3</id>
<content type='text'>
This means

* Adding new configuration toggle `CATCH_CONFIG_DISABLE_EXCEPTIONS`
and a best-guess configuration auto-checking for it.
* Adding new set of internal macros, `CATCH_TRY`, `CATCH_CATCH_ALL`
and `CATCH_CATCH_ANON` that can be used in place of regular `try`,
`catch(...)` and `catch(T const&amp;)` respectively, while disappearing
when `CATCH_CONFIG_DISABLE_EXCEPTIONS` is enabled.
* Replacing all uses of `throw` with calls to `Catch::throw_exception`
customization point.
* Providing a default implementation for the above customization point
when `CATCH_CONFIG_DISABLE_EXCEPTIONS` is set.
* Letting users override this implementation with their own.
* Some minor changes and ifdefs all around to support the above
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This means

* Adding new configuration toggle `CATCH_CONFIG_DISABLE_EXCEPTIONS`
and a best-guess configuration auto-checking for it.
* Adding new set of internal macros, `CATCH_TRY`, `CATCH_CATCH_ALL`
and `CATCH_CATCH_ANON` that can be used in place of regular `try`,
`catch(...)` and `catch(T const&amp;)` respectively, while disappearing
when `CATCH_CONFIG_DISABLE_EXCEPTIONS` is enabled.
* Replacing all uses of `throw` with calls to `Catch::throw_exception`
customization point.
* Providing a default implementation for the above customization point
when `CATCH_CONFIG_DISABLE_EXCEPTIONS` is set.
* Letting users override this implementation with their own.
* Some minor changes and ifdefs all around to support the above
</pre>
</div>
</content>
</entry>
<entry>
<title>CAPTURE is now variadic</title>
<updated>2018-08-19T20:40:20+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2018-06-27T20:34:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=1cdaa48a0b20e28ee32553070700b86557f9619d'/>
<id>1cdaa48a0b20e28ee32553070700b86557f9619d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Construct StringRef from constant strings in macros directly using UDL</title>
<updated>2018-07-23T12:00:45+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2018-07-23T11:55:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=83bfae1a50c0ff0893e809ce287432c1c3d94620'/>
<id>83bfae1a50c0ff0893e809ce287432c1c3d94620</id>
<content type='text'>
This avoids having to call `strlen` to get the constant string's length
and thus should improve performance.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This avoids having to call `strlen` to get the constant string's length
and thus should improve performance.
</pre>
</div>
</content>
</entry>
<entry>
<title>Direct construct empty StringRef in test macros</title>
<updated>2018-07-22T12:13:34+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2018-07-22T12:06:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=82b8744b8cd645ed461479fd826f42cd72de01b4'/>
<id>82b8744b8cd645ed461479fd826f42cd72de01b4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
