<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/src/catch2/internal/catch_textflow.hpp, branch constexpr_approx</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>Handle ANSI escape sequences when performing column wrapping (#2849)</title>
<updated>2024-05-04T21:43:52+00:00</updated>
<author>
<name>Jeremy Rifkin</name>
</author>
<published>2024-05-04T21:43:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=8ce2426e53b2596a9823b4a314f72f1c3b30be82'/>
<id>8ce2426e53b2596a9823b4a314f72f1c3b30be82</id>
<content type='text'>
This PR adds functionality to skip around ANSI escape sequences in catch_textflow so they do not contribute to line length and line wrapping code does not split escape sequences in the middle. I've implemented this by creating a AnsiSkippingString abstraction that has a bidirectional iterator that can skip around escape sequences while iterating. Additionally I refactored Column::const_iterator to be iterator-based rather than index-based so this abstraction is a simple drop-in for std::string.

Currently only color sequences are handled, other escape sequences are left unaffected.

Motivation: Text with ANSI color sequences gets messed up when being output by Catch2 #2833.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR adds functionality to skip around ANSI escape sequences in catch_textflow so they do not contribute to line length and line wrapping code does not split escape sequences in the middle. I've implemented this by creating a AnsiSkippingString abstraction that has a bidirectional iterator that can skip around escape sequences while iterating. Additionally I refactored Column::const_iterator to be iterator-based rather than index-based so this abstraction is a simple drop-in for std::string.

Currently only color sequences are handled, other escape sequences are left unaffected.

Motivation: Text with ANSI color sequences gets messed up when being output by Catch2 #2833.</pre>
</div>
</content>
</entry>
<entry>
<title>Move-enable various parts of TextFlow</title>
<updated>2023-12-27T20:43:49+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-12-27T20:43:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=b52d97855d794175e69abc6f0eceee9ec3c1bd0e'/>
<id>b52d97855d794175e69abc6f0eceee9ec3c1bd0e</id>
<content type='text'>
This removes about 200 pointless copies from printing the help
message (the original motivation for the change), and also nicely
improves performance of the various reporters that depend on
TextFlow.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes about 200 pointless copies from printing the help
message (the original motivation for the change), and also nicely
improves performance of the various reporters that depend on
TextFlow.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix spelling</title>
<updated>2023-04-29T10:55:51+00:00</updated>
<author>
<name>Vertexwahn</name>
</author>
<published>2023-04-25T18:14:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=46539b6d9b1d429fcc2261d3e687482c878a9ddb'/>
<id>46539b6d9b1d429fcc2261d3e687482c878a9ddb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix references to license file</title>
<updated>2022-10-28T09:30:15+00:00</updated>
<author>
<name>Lars Toenning</name>
</author>
<published>2022-10-28T09:22:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=f1084fb30990fe40c8f5b70034970c7eb4e1da72'/>
<id>f1084fb30990fe40c8f5b70034970c7eb4e1da72</id>
<content type='text'>
The license file was renamed with 6a502cc2f5fedd59b3495b58708f0d6d987ed9e1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The license file was renamed with 6a502cc2f5fedd59b3495b58708f0d6d987ed9e1
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve comments and names in TextFlow::Column</title>
<updated>2021-11-01T18:14:37+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2021-11-01T18:14:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=70c4ec78fbbfadb19d520c72b83f33cd0915c078'/>
<id>70c4ec78fbbfadb19d520c72b83f33cd0915c078</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Typedef Column::iterator as Column::const_iterator not vice versa</title>
<updated>2021-10-31T12:01:41+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2021-10-31T12:01:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=455ae0c561b6254e05c5fe619b08968187d28a70'/>
<id>455ae0c561b6254e05c5fe619b08968187d28a70</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Return const_iterator from Column::begin/end const</title>
<updated>2021-10-31T11:59:00+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2021-10-31T11:58:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=2520ad4b6e0dfacbbdf802f952495532361ccb02'/>
<id>2520ad4b6e0dfacbbdf802f952495532361ccb02</id>
<content type='text'>
This is what should normally happen, even if it does not change
anything given that `Column::const_iterator` is currently a typedef
for `Column::iterator`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is what should normally happen, even if it does not change
anything given that `Column::const_iterator` is currently a typedef
for `Column::iterator`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add standardized copyright notice + SPDX identifier to source files</title>
<updated>2020-08-30T13:43:45+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2020-08-30T13:43:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=90aeffb97d6942d16f75a56b11e10fc0b010995a'/>
<id>90aeffb97d6942d16f75a56b11e10fc0b010995a</id>
<content type='text'>
This should also be done for test files, but that has lower priority.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This should also be done for test files, but that has lower priority.
</pre>
</div>
</content>
</entry>
<entry>
<title>Standardize include guard patterns to FILE_NAME_EXTENSION_INCLUDED</title>
<updated>2020-08-30T12:09:27+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2020-08-29T18:48:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=a822cb9717b64b3b17047fe1ab4dc727c2ff39c4'/>
<id>a822cb9717b64b3b17047fe1ab4dc727c2ff39c4</id>
<content type='text'>
This commit also strips the old copyright comment header in touched
files, as those will also be replaced with a more standardized and
machine-friendly version.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit also strips the old copyright comment header in touched
files, as those will also be replaced with a more standardized and
machine-friendly version.
</pre>
</div>
</content>
</entry>
<entry>
<title>Split TextFlow out from Clara</title>
<updated>2020-08-03T21:40:14+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2020-08-01T18:32:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=e7aa432850c34557e857d8675bff9b3f03de41b8'/>
<id>e7aa432850c34557e857d8675bff9b3f03de41b8</id>
<content type='text'>
Now that it has its own header, various reporter TUs that want to
format text do not have to also include Clara. Together with
outlining implementations from a header into a separate TU, this
has noticeably improved the compilation times of the testing impl.

As part of this split, I also implemented some improvements to the
TextFlow code in comparison to the upstream code. These are:

* Replaced the `Spacer` type with a free function that constructs
special `Column` that does the same thing.
* Generic performance improvements, such as eliminating needless
allocations, reserving space in needed allocations, and using smarter
algorithms in some places.
* Because `Column` only ever stored 1 string in its vector, it now
holds the string directly instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that it has its own header, various reporter TUs that want to
format text do not have to also include Clara. Together with
outlining implementations from a header into a separate TU, this
has noticeably improved the compilation times of the testing impl.

As part of this split, I also implemented some improvements to the
TextFlow code in comparison to the upstream code. These are:

* Replaced the `Spacer` type with a free function that constructs
special `Column` that does the same thing.
* Generic performance improvements, such as eliminating needless
allocations, reserving space in needed allocations, and using smarter
algorithms in some places.
* Because `Column` only ever stored 1 string in its vector, it now
holds the string directly instead.
</pre>
</div>
</content>
</entry>
</feed>
