<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/src/catch2/internal/catch_console_colour.cpp, branch v3.0.0-preview5</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>Split out IStream out of catch_stream.hpp</title>
<updated>2022-04-16T14:33:57+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-04-16T12:43:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=98bb638fb2e3f1af7ef87bc483faff35076c6c51'/>
<id>98bb638fb2e3f1af7ef87bc483faff35076c6c51</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Some IWYU include cleanups</title>
<updated>2022-04-14T15:16:01+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-04-14T15:16:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=c742ea9ad97a34c8f652dd7f67012d5b3f818c2d'/>
<id>c742ea9ad97a34c8f652dd7f67012d5b3f818c2d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make IStream::stream non-const</title>
<updated>2022-04-13T12:59:39+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-04-12T18:59:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=4f09f1120ba0a28f218a00821a8347a443042ecb'/>
<id>4f09f1120ba0a28f218a00821a8347a443042ecb</id>
<content type='text'>
This way it makes much more sense from logically-const point
of view, and also means that concrete implementations don't
have to always have a `mutable` keyword on the stream member.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This way it makes much more sense from logically-const point
of view, and also means that concrete implementations don't
have to always have a `mutable` keyword on the stream member.
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor colour handling to prepare for per-reporter colour modes</title>
<updated>2022-03-28T11:10:13+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-03-27T21:35:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=1a8a793178d50b74b0f9a0adb3eec937b61039a9'/>
<id>1a8a793178d50b74b0f9a0adb3eec937b61039a9</id>
<content type='text'>
This includes always compiling the ANSI and None colour
implementations, as they don't need to touch any platform
specific APIs, and removing their respective compile-time
configuration options.

Because the Win32 colour implementation requires Win32-specific
APIs, it is still hidden behind a compile-time toggle,
`CATCH_CONFIG_COLOUR_WIN32` (renamed from `..._COLOUR_WINDOWS`).

The commandline options for colours were also changed. The
option now uses different name, and allows to select between
different implementations, rather than changing whether
the compiled-in colour implementation is used through
"yes/no/default" options.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This includes always compiling the ANSI and None colour
implementations, as they don't need to touch any platform
specific APIs, and removing their respective compile-time
configuration options.

Because the Win32 colour implementation requires Win32-specific
APIs, it is still hidden behind a compile-time toggle,
`CATCH_CONFIG_COLOUR_WIN32` (renamed from `..._COLOUR_WINDOWS`).

The commandline options for colours were also changed. The
option now uses different name, and allows to select between
different implementations, rather than changing whether
the compiled-in colour implementation is used through
"yes/no/default" options.
</pre>
</div>
</content>
</entry>
<entry>
<title>ColourGuard is no longer constructed engaged</title>
<updated>2022-03-24T15:02:54+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-03-21T22:20:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=081a1e9abaf32a759fd08a01fcf7a65860f91a63'/>
<id>081a1e9abaf32a759fd08a01fcf7a65860f91a63</id>
<content type='text'>
Forcing it to be engaged explicitly, either via `op&lt;&lt;`, or by
`ColourGuard::engage`, fixes an issue with multiple `ColourGuard`s
being constructed in a single expression. Because the construction
of the `ColourGuard` instances can happen in arbitrary order,
colours would be applied in arbitrary order too. However, a chain
of `op&lt;&lt;`s has strict call orders, fixing this issue.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Forcing it to be engaged explicitly, either via `op&lt;&lt;`, or by
`ColourGuard::engage`, fixes an issue with multiple `ColourGuard`s
being constructed in a single expression. Because the construction
of the `ColourGuard` instances can happen in arbitrary order,
colours would be applied in arbitrary order too. However, a chain
of `op&lt;&lt;`s has strict call orders, fixing this issue.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename isStdout =&gt; isConsole and add doccomment</title>
<updated>2022-03-24T15:02:51+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-03-20T23:22:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=4d8acafecb973d9b03178346c3f1566fe7485fb1'/>
<id>4d8acafecb973d9b03178346c3f1566fe7485fb1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactored colour handling</title>
<updated>2022-03-18T13:04:07+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-03-14T14:04:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=0e176c318bf309aaa4acd8686a82517fda7b859a'/>
<id>0e176c318bf309aaa4acd8686a82517fda7b859a</id>
<content type='text'>
* POSIX colour impl is now compiled for all platforms.
* Deciding whether a colour impl should be picked is now stream
  dependent, and thus incompatible implementations can be removed
  immediately, rather than checking when the colour is being used.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* POSIX colour impl is now compiled for all platforms.
* Deciding whether a colour impl should be picked is now stream
  dependent, and thus incompatible implementations can be removed
  immediately, rather than checking when the colour is being used.
</pre>
</div>
</content>
</entry>
<entry>
<title>Each reporter keeps its own colour implementation</title>
<updated>2022-03-08T11:51:13+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-03-06T18:20:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=913f79a661a02be5791be9bdf2b8ee123579b51d'/>
<id>913f79a661a02be5791be9bdf2b8ee123579b51d</id>
<content type='text'>
This opens path to per-reporter colour output customization,
and fixes multiple issues with the old colour implementation.

Under the old implementation, using Win32-backed colouring
would always change the colour used by the console, even if the
actual output was written elsewhere, such as a file passed by
the `--out` flag. This will no longer happen, as the reporter's
colour impl will check that the reporter's stream is pointed
to console before trying to change the colours.

POSIX/ANSI colour implementation suffered a similar-ish issue,
in that it only wrote the colour escape codes into the default
output stream, even if the reporter asking for colouring was
actually writing to a completely different output stream.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This opens path to per-reporter colour output customization,
and fixes multiple issues with the old colour implementation.

Under the old implementation, using Win32-backed colouring
would always change the colour used by the console, even if the
actual output was written elsewhere, such as a file passed by
the `--out` flag. This will no longer happen, as the reporter's
colour impl will check that the reporter's stream is pointed
to console before trying to change the colours.

POSIX/ANSI colour implementation suffered a similar-ish issue,
in that it only wrote the colour escape codes into the default
output stream, even if the reporter asking for colouring was
actually writing to a completely different output stream.
</pre>
</div>
</content>
</entry>
<entry>
<title>Pass the whole IStream wrapper into reporter</title>
<updated>2022-03-06T15:34:13+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-02-23T22:46:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=61d0f7a9afb88c12f8931f80321e58f2cfbc62db'/>
<id>61d0f7a9afb88c12f8931f80321e58f2cfbc62db</id>
<content type='text'>
This will become useful when reworking colour support, because
Win32 colour support requires checking whether the output is
stdout, which is done through the `IStream` wrapper.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will become useful when reworking colour support, because
Win32 colour support requires checking whether the output is
stdout, which is done through the `IStream` wrapper.
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't cache stdout handle in Windows console colour impl</title>
<updated>2022-01-29T22:12:55+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-01-29T22:12:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=efb54926eec28900e020131930b35116075f6f84'/>
<id>efb54926eec28900e020131930b35116075f6f84</id>
<content type='text'>
The cached handle would become invalid if some other code, say
a user-provided test code, redirects stdout through `freopen`
or `_dup2`, which would then cause AppVerifier to complain.

Fixes #2345
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The cached handle would become invalid if some other code, say
a user-provided test code, redirects stdout through `freopen`
or `_dup2`, which would then cause AppVerifier to complain.

Fixes #2345
</pre>
</div>
</content>
</entry>
</feed>
