<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/include/internal/catch_test_case_registry_impl.cpp, 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>Small cleanups for the reworked test case order hashing</title>
<updated>2020-11-17T20:08:33+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2020-11-17T20:08:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=dc7e705672ba29a57dcff53ab1ad7be51e7b6e33'/>
<id>dc7e705672ba29a57dcff53ab1ad7be51e7b6e33</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Modified hash to make it more independent of the choice of test names.</title>
<updated>2020-11-17T19:58:16+00:00</updated>
<author>
<name>Sergio Losilla</name>
</author>
<published>2020-11-17T09:16:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=3ba745552bd26cbbb7c271720c0ec9eaaf1dc8dd'/>
<id>3ba745552bd26cbbb7c271720c0ec9eaaf1dc8dd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Workaround AppleClang bug by renaming TestHasher constructor argument</title>
<updated>2020-10-02T21:22:49+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2020-10-02T21:22:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=7c75ecaef441e951a1b9240c5400e2947f190d48'/>
<id>7c75ecaef441e951a1b9240c5400e2947f190d48</id>
<content type='text'>
As far as I understand the standard, if there is a function called
`rng` in the global namespace, and a function argument called `rng`,
then the argument should shadow the function. This then means that
uses of `rng` inside the function should refer to the argument.

This is not the case for AppleClang 12.0.0. Luckily the workaround
is simple enough; just rename the argument. Given that the function
is 3 lines and uncomplicated, the change of the name doesn't really
affect readability.

Still, WTF AppleClang?

Closes #2030
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As far as I understand the standard, if there is a function called
`rng` in the global namespace, and a function argument called `rng`,
then the argument should shadow the function. This then means that
uses of `rng` inside the function should refer to the argument.

This is not the case for AppleClang 12.0.0. Luckily the workaround
is simple enough; just rename the argument. Given that the function
is 3 lines and uncomplicated, the change of the name doesn't really
affect readability.

Still, WTF AppleClang?

Closes #2030
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor implementation of hashed random order test sorting</title>
<updated>2020-04-14T14:39:48+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2020-04-14T14:39:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=bad0fb51f836a8d155fb2034980721aa36917fa8'/>
<id>bad0fb51f836a8d155fb2034980721aa36917fa8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Change random test shuffling technique</title>
<updated>2020-04-14T10:47:36+00:00</updated>
<author>
<name>John Bytheway</name>
</author>
<published>2020-04-10T00:17:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=f696ab836b9c7d9ea2f80b64597541cdc67f6821'/>
<id>f696ab836b9c7d9ea2f80b64597541cdc67f6821</id>
<content type='text'>
Previously a random test ordering was obtained by applying std::shuffle
to the tests in declaration order.  This has two problems:

- It depends on the declaration order, so the order in which the tests
  will be run will be platform-specific.
- When trying to debug accidental inter-test dependencies, it is helpful
  to be able to find a minimal subset of tests which exhibits the issue.
  However, any change to the set of tests being run will completely
  change the test ordering, making it difficult or impossible to reduce
  the set of tests being run in any reasonably efficient manner.

Therefore, change the randomization approach to resolve both these
issues.

Generate a random value based on the user-provided RNG seed.  Convert
every test case to an integer by hashing a combination of that value
with the test name.  Sort the test cases by this integer.

The test names and RNG are platform-independent, so this should be
consistent across platforms.  Also, removing one test does not change
the integer value associated with the remaining tests, so they remain in
the same order.

To hash, use the FNV-1a hash, except with the basis being our randomly
selected value rather than the fixed basis set in the algorithm.  Cannot
use std::hash, because it is important that the result be
platform-independent.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously a random test ordering was obtained by applying std::shuffle
to the tests in declaration order.  This has two problems:

- It depends on the declaration order, so the order in which the tests
  will be run will be platform-specific.
- When trying to debug accidental inter-test dependencies, it is helpful
  to be able to find a minimal subset of tests which exhibits the issue.
  However, any change to the set of tests being run will completely
  change the test ordering, making it difficult or impossible to reduce
  the set of tests being run in any reasonably efficient manner.

Therefore, change the randomization approach to resolve both these
issues.

Generate a random value based on the user-provided RNG seed.  Convert
every test case to an integer by hashing a combination of that value
with the test name.  Sort the test cases by this integer.

The test names and RNG are platform-independent, so this should be
consistent across platforms.  Also, removing one test does not change
the integer value associated with the remaining tests, so they remain in
the same order.

To hash, use the FNV-1a hash, except with the basis being our randomly
selected value rather than the fixed basis set in the algorithm.  Cannot
use std::hash, because it is important that the result be
platform-independent.
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce Catch's own RNG based on the PCG family of RNGs</title>
<updated>2019-10-07T17:56:23+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2019-10-06T19:47:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=535da5c5132bcbba6f29c60ed6bb7ded29b9ec3e'/>
<id>535da5c5132bcbba6f29c60ed6bb7ded29b9ec3e</id>
<content type='text'>
In the future, we will also want to introduce our own
`uniform_int_distribution` and `uniform_real_distribution` to get
repeatable test runs across different platforms.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the future, we will also want to introduce our own
`uniform_int_distribution` and `uniform_real_distribution` to get
repeatable test runs across different platforms.
</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>Improve reporting of unmatched filters (#1684)</title>
<updated>2019-08-06T18:51:19+00:00</updated>
<author>
<name>Steven Franzen</name>
</author>
<published>2019-08-06T18:51:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=6070745cab45a0f2284c56d5e2a1eed444447f88'/>
<id>6070745cab45a0f2284c56d5e2a1eed444447f88</id>
<content type='text'>
This PR ultimately does 3 things
* Separately tracks matched tests per each filter part (that is, a set of filters separated by an OR (`,`)), which allows Catch2 to report each of the alternative filters that don't match any tests.
* Fixes `-w NoTests` to return non-zero in the process
* Adds tests for `-w NoTests`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR ultimately does 3 things
* Separately tracks matched tests per each filter part (that is, a set of filters separated by an OR (`,`)), which allows Catch2 to report each of the alternative filters that don't match any tests.
* Fixes `-w NoTests` to return non-zero in the process
* Adds tests for `-w NoTests`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid adding a default test spec when none was provided</title>
<updated>2019-04-09T09:50:59+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2019-04-09T09:50:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=e99f1efd2899441429da55ba717b8abd20c2b53b'/>
<id>e99f1efd2899441429da55ba717b8abd20c2b53b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Replaced use of std::rand with std::mt19937</title>
<updated>2018-06-15T13:35:47+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2018-06-15T13:35:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=35a57b070fd4db56759dc3ecb8156f40841111a3'/>
<id>35a57b070fd4db56759dc3ecb8156f40841111a3</id>
<content type='text'>
This uses a global instance of the RNG
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This uses a global instance of the RNG
</pre>
</div>
</content>
</entry>
</feed>
