<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/projects/SelfTest/IntrospectiveTests/String.tests.cpp, branch v2.13.9</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>Cleanup tests for C++20</title>
<updated>2019-11-04T09:42:34+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2019-11-04T09:42:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=c409dccee50fb64723b98fb9c61f00a65393ade4'/>
<id>c409dccee50fb64723b98fb9c61f00a65393ade4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rework StringRef interface and internals</title>
<updated>2019-10-25T11:57:52+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2019-10-21T15:44:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=50cc14c94c972fc743afca92b22ad7bdc63c429a'/>
<id>50cc14c94c972fc743afca92b22ad7bdc63c429a</id>
<content type='text'>
Now it no longer tries to be this weird hybrid between an owning
and non-owning reference, and is only ever non-owning. This is also
reflected in its interface, for example `StringRef::isNullTerminated`
is now public, and `StringRef::c_str()` has the precondition that it
is true.

Overview of the changes:
* The `StringRef::m_data` member has been completely removed, as it
had no more uses.
* `StringRef::isSubstring()` has been made public and renamed to
`StringRef::isNullTerminated()`, so that the name reflects what the
method actually does.
* `StringRef::currentData()` has been renamed to `StringRef::data()`,
to be in line with common C++ containers and container-alikes.
* `StringRef::c_str()` will no longer silently make copies. It instead
has a precondition that `isNullTerminated()` is true.
* If the user needs a null-terminated string, they should use the
`std::string` conversion operator and call `c_str()` on the resulting
`std::string`.
* Some small optimizations in various places.
* Basic functionality is now `constexpr`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now it no longer tries to be this weird hybrid between an owning
and non-owning reference, and is only ever non-owning. This is also
reflected in its interface, for example `StringRef::isNullTerminated`
is now public, and `StringRef::c_str()` has the precondition that it
is true.

Overview of the changes:
* The `StringRef::m_data` member has been completely removed, as it
had no more uses.
* `StringRef::isSubstring()` has been made public and renamed to
`StringRef::isNullTerminated()`, so that the name reflects what the
method actually does.
* `StringRef::currentData()` has been renamed to `StringRef::data()`,
to be in line with common C++ containers and container-alikes.
* `StringRef::c_str()` will no longer silently make copies. It instead
has a precondition that `isNullTerminated()` is true.
* If the user needs a null-terminated string, they should use the
`std::string` conversion operator and call `c_str()` on the resulting
`std::string`.
* Some small optimizations in various places.
* Basic functionality is now `constexpr`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add test for past-the-end substr on StringRef</title>
<updated>2019-09-08T19:07:21+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2019-09-08T19:04:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=dab0296b64483034d7b802a0635fae840ba31727'/>
<id>dab0296b64483034d7b802a0635fae840ba31727</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make StringRef's operator std::string explicit</title>
<updated>2019-09-08T13:58:10+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2019-09-08T12:49:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=7b865daccc7bba2dcc25a4f0b9ea7348b1b4d61f'/>
<id>7b865daccc7bba2dcc25a4f0b9ea7348b1b4d61f</id>
<content type='text'>
This way it is explicit when there is a `StringRef` -&gt; `std::string`
conversion and makes it easier to look for allocations that could
be avoided.

Doing this has already removed one allocation per registered test
case, as there was a completely pointless `StringRef` -&gt; `std::string`
conversion when parsing tags of a test case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This way it is explicit when there is a `StringRef` -&gt; `std::string`
conversion and makes it easier to look for allocations that could
be avoided.

Doing this has already removed one allocation per registered test
case, as there was a completely pointless `StringRef` -&gt; `std::string`
conversion when parsing tags of a test case.
</pre>
</div>
</content>
</entry>
<entry>
<title>Split out the rest of string manipulation tests</title>
<updated>2019-09-07T18:22:36+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2019-09-07T18:22:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=6da00c1b64b0826bdc735805a65c7dd2147fdf2b'/>
<id>6da00c1b64b0826bdc735805a65c7dd2147fdf2b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove the ill-considered StringRef::numberOfCharacters</title>
<updated>2019-09-07T18:13:22+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2019-09-07T18:13:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=fe967b1f4122a67ae1b31febf26cf1751917a0eb'/>
<id>fe967b1f4122a67ae1b31febf26cf1751917a0eb</id>
<content type='text'>
It never counted characters, only codepoints. If you think these
are interchangeable, you should not touch non-ascii text.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It never counted characters, only codepoints. If you think these
are interchangeable, you should not touch non-ascii text.
</pre>
</div>
</content>
</entry>
<entry>
<title>StringRef no longer repoints m_start to m_data after c_str() on a substring.</title>
<updated>2019-05-20T23:04:44+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2019-05-20T23:04:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=96355da34edf51cc813400115984050bd7c50630'/>
<id>96355da34edf51cc813400115984050bd7c50630</id>
<content type='text'>
This fixes an issue where a self-assignment of a StringRef copy would point into internally (and now dangling) data.
(now self-assignment check is no longer needed)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes an issue where a self-assignment of a StringRef copy would point into internally (and now dangling) data.
(now self-assignment check is no longer needed)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix clang warning on self-assignment</title>
<updated>2019-05-20T23:04:44+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2019-05-20T22:56:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=71fce429afcebba7c32b6c46aced1013c6df9c0b'/>
<id>71fce429afcebba7c32b6c46aced1013c6df9c0b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix StringRef self-assignment after substring</title>
<updated>2019-05-18T16:54:39+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2019-05-18T16:54:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=3bce8ba14b5dfb55c0127b8ad9eddf5a92b662c0'/>
<id>3bce8ba14b5dfb55c0127b8ad9eddf5a92b662c0</id>
<content type='text'>
Thanks to Alex Tkachenko for spotting it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Thanks to Alex Tkachenko for spotting it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Changed splitString to splitStringRef</title>
<updated>2019-04-21T17:03:44+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2019-04-21T17:03:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=9d5d71986831d044527fe987ed8c41a4f69a3eea'/>
<id>9d5d71986831d044527fe987ed8c41a4f69a3eea</id>
<content type='text'>
Now takes and returns StringRefs
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now takes and returns StringRefs
</pre>
</div>
</content>
</entry>
</feed>
