<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/src/catch2/internal/catch_run_context.cpp, 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>Add -Wsuggest-destructor-override to enabled warnings</title>
<updated>2022-05-03T11:54:02+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-05-02T08:45:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=7752229105c85126712cb0b9d252a57c2ff79851'/>
<id>7752229105c85126712cb0b9d252a57c2ff79851</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename IStreamingReporterPtr =&gt; IEventListenerPtr</title>
<updated>2022-04-10T19:50:51+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-04-10T19:50:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=4e006a93ffbce660c73f3bcd503513bac03050e5'/>
<id>4e006a93ffbce660c73f3bcd503513bac03050e5</id>
<content type='text'>
This reflects the renaming of the reporter/listener base class.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reflects the renaming of the reporter/listener base class.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add some missing configuration includes</title>
<updated>2022-02-20T18:32:25+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-02-19T20:27:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=4396a9119fa32abf966f189c6f6d9c54698d89c8'/>
<id>4396a9119fa32abf966f189c6f6d9c54698d89c8</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 send full stdout so far to testCasePartialEnded event</title>
<updated>2022-01-01T11:21:41+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-01-01T11:21:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=6b55f5d780c5d8e935720f9d7d8ed28a3ba8617f'/>
<id>6b55f5d780c5d8e935720f9d7d8ed28a3ba8617f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>assertionEnded event in reporters no longer returns bool</title>
<updated>2021-09-15T16:57:56+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2021-09-15T16:57:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=f314fa1f8c9576f1879fb0a8a9b038f1108599c2'/>
<id>f314fa1f8c9576f1879fb0a8a9b038f1108599c2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
