<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/src/catch2/internal, branch v3.0.1</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>Only reseed the internal RNG when a test is first entered</title>
<updated>2022-05-17T19:49:26+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-05-17T19:49:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=dcafc605f3232f5109e3f86ac8d8281e6ed611d2'/>
<id>dcafc605f3232f5109e3f86ac8d8281e6ed611d2</id>
<content type='text'>
This fixes multiple issues with random generators, with the most
important one being that multiple nested generators could return
values from the same sequence, due to internal implementation
details of `GENERATE`, and how they interact with test case
paths.

The cost of doing this is that given this simple `TEST_CASE`,
```cpp
TEST_CASE("foo") {
    auto i = GENERATE(take(10, random(0, 100));
    SECTION("A") {
        auto j = GENERATE(take(10, random(0, 100));
    }
    SECTION("B") {
        auto k = GENERATE(take(10, random(0, 100));
    }
}
```

`k` will have different values between running the test as
a whole, e.g. with `./tests "foo"`, and running only the "B"
section with `./tests "foo" -c "B"`.

I consider this an acceptable cost, because the only alternative
would be very messy to implement, and add a lot of brittle and
complex code for relatively little benefit.

If this calculation changes, we will need to instead walk
the current tracker tree whenever a random generator is being
constructed, check for random generators on the path to root,
and take a seed from them.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes multiple issues with random generators, with the most
important one being that multiple nested generators could return
values from the same sequence, due to internal implementation
details of `GENERATE`, and how they interact with test case
paths.

The cost of doing this is that given this simple `TEST_CASE`,
```cpp
TEST_CASE("foo") {
    auto i = GENERATE(take(10, random(0, 100));
    SECTION("A") {
        auto j = GENERATE(take(10, random(0, 100));
    }
    SECTION("B") {
        auto k = GENERATE(take(10, random(0, 100));
    }
}
```

`k` will have different values between running the test as
a whole, e.g. with `./tests "foo"`, and running only the "B"
section with `./tests "foo" -c "B"`.

I consider this an acceptable cost, because the only alternative
would be very messy to implement, and add a lot of brittle and
complex code for relatively little benefit.

If this calculation changes, we will need to instead walk
the current tracker tree whenever a random generator is being
constructed, check for random generators on the path to root,
and take a seed from them.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename global rng() to sharedRng()</title>
<updated>2022-05-17T13:43:23+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-05-17T13:37:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=359cd6187d7e8fe40dec82e77bafe5066115cb53'/>
<id>359cd6187d7e8fe40dec82e77bafe5066115cb53</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Reseed global rng instance unconditionally</title>
<updated>2022-05-17T10:35:34+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-05-17T10:35:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=9c72b303d9ed0de4fc1ed3247223e5449cdd328d'/>
<id>9c72b303d9ed0de4fc1ed3247223e5449cdd328d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't reseed std::srand when resetting rng state</title>
<updated>2022-05-17T09:54:19+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-05-17T09:54:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=6044f021cf53ac51c307566dd9b5c13054b097d6'/>
<id>6044f021cf53ac51c307566dd9b5c13054b097d6</id>
<content type='text'>
We no longer use `std::rand` anywhere, so there is no point,
and it might even interfere with our users use of `std::(s)rand`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We no longer use `std::rand` anywhere, so there is no point,
and it might even interfere with our users use of `std::(s)rand`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Generators now keep track of the index of current element</title>
<updated>2022-05-16T09:56:21+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-05-16T09:56:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=af8b54ecd59f8174aaaa97682e3544f2820a0900'/>
<id>af8b54ecd59f8174aaaa97682e3544f2820a0900</id>
<content type='text'>
This might become potentially useful in the future, when we want
to provide the ability to forward jump generators, to be able to
simply reproduce specific input to a test.

I am not yet sure how it would work, but the basic idea is that
it could be similar to the `-c` switch for selecting specific
`SECTION` in a test case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This might become potentially useful in the future, when we want
to provide the ability to forward jump generators, to be able to
simply reproduce specific input to a test.

I am not yet sure how it would work, but the basic idea is that
it could be similar to the `-c` switch for selecting specific
`SECTION` in a test case.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use better instruction for CATCH_TRAP on ARM Macs</title>
<updated>2022-05-15T21:22:00+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-05-15T21:15:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=07bec74096d91e68efa97587554004740d9aa32a'/>
<id>07bec74096d91e68efa97587554004740d9aa32a</id>
<content type='text'>
The old instruction would cause the debugger to be stuck at the
triggering source line forever, while the new one should have the
expected semantics, where the debugger can then single-step,
continue. or generally do things, afterwards.

Closes #2422
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The old instruction would cause the debugger to be stuck at the
triggering source line forever, while the new one should have the
expected semantics, where the debugger can then single-step,
continue. or generally do things, afterwards.

Closes #2422
</pre>
</div>
</content>
</entry>
<entry>
<title>Add check for registering multiple reporters under same name</title>
<updated>2022-05-15T07:54:27+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-05-15T07:54:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=33aeb603fee982d8f7d5aec3e746741e8776942e'/>
<id>33aeb603fee982d8f7d5aec3e746741e8776942e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add Wfloat-equal to default-enabled warnings</title>
<updated>2022-05-14T13:47:20+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-05-14T13:37:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=fc3d11b1d1090a5bcbcc9e410a460f9bf6a1f474'/>
<id>fc3d11b1d1090a5bcbcc9e410a460f9bf6a1f474</id>
<content type='text'>
This is kinda messy, because there is no good way to signal to
the compiler that some code uses direct comparison of floating
point numbers intentionally, so instead we have to use diagnostic
pragmas.

We also have to over-suppress the test files, because Clang (and
possibly GCC) still issue warnings from template instantiation
even if the instantion site is under warning suppression, so the
template definition has to be under warning suppression as well.

Closes #2406
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is kinda messy, because there is no good way to signal to
the compiler that some code uses direct comparison of floating
point numbers intentionally, so instead we have to use diagnostic
pragmas.

We also have to over-suppress the test files, because Clang (and
possibly GCC) still issue warnings from template instantiation
even if the instantion site is under warning suppression, so the
template definition has to be under warning suppression as well.

Closes #2406
</pre>
</div>
</content>
</entry>
<entry>
<title>Add --list-listeners option</title>
<updated>2022-05-10T18:57:59+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-05-10T18:00:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=5a49285e9cf203dd20b00ac7488a6a3233d60fff'/>
<id>5a49285e9cf203dd20b00ac7488a6a3233d60fff</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename useColourOnPlatform =&gt; useImplementationForStream</title>
<updated>2022-05-03T17:04:43+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-05-03T17:04:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=40c8909a49c3edcab626de79b9d3a33db6098b00'/>
<id>40c8909a49c3edcab626de79b9d3a33db6098b00</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
