<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/include/internal/catch_run_context.cpp, branch v2.13.4</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>Fix potential infinite loops in generators combined with section filter</title>
<updated>2020-10-31T17:04:15+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2020-10-22T12:20:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=765ac08f0811f3a9d2cd6d3bdaa6cbe457457adc'/>
<id>765ac08f0811f3a9d2cd6d3bdaa6cbe457457adc</id>
<content type='text'>
The problem was that under specific circumstances, namely that none
of their children progressed, `GeneratorTracker` will not progress.
This was changed recently, to allow for code like this, where a
`SECTION` follows a `GENERATE` at the same level:

```cpp
SECTION("A") {}
auto a = GENERATE(1, 2);
SECTION("B") {}
```

However, this interacted badly with `SECTION` filters (`-c foo`),
as they could deactivate all `SECTION`s below a generator, and thus
stop it from progressing forever. This commit makes GeneratorTracker
check whether there are any filters active, and if they are, it checks
whether its section-children can ever run.

Fixes #2025
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The problem was that under specific circumstances, namely that none
of their children progressed, `GeneratorTracker` will not progress.
This was changed recently, to allow for code like this, where a
`SECTION` follows a `GENERATE` at the same level:

```cpp
SECTION("A") {}
auto a = GENERATE(1, 2);
SECTION("B") {}
```

However, this interacted badly with `SECTION` filters (`-c foo`),
as they could deactivate all `SECTION`s below a generator, and thus
stop it from progressing forever. This commit makes GeneratorTracker
check whether there are any filters active, and if they are, it checks
whether its section-children can ever run.

Fixes #2025
</pre>
</div>
</content>
</entry>
<entry>
<title>Modify generator tracking to allow GENERATEs between SECTIONs</title>
<updated>2020-07-11T21:16:07+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2020-07-04T15:45:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=b79a83e4aa6641a00c32b760456507b1745fc06e'/>
<id>b79a83e4aa6641a00c32b760456507b1745fc06e</id>
<content type='text'>
This means that code such as

```cpp
TEST_CASE() {
    SECTION("first") { SUCCEED(); }
    auto _ = GENERATE(1, 2);
    SECTION("second") { SUCCEED(); }
}
```

will run and report 3 assertions, 1 from section "first" and 2
from section "second". This also applies for greater and potentially
more confusing nesting, but fundamentally it is up to the user to
avoid overly complex and confusing nestings, just as with `SECTION`s.

The old behaviour of `GENERATE` as first thing in a `TEST_CASE`,
`GENERATE` not followed by a `SECTION`, etc etc should be unchanged.

Closes #1938
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This means that code such as

```cpp
TEST_CASE() {
    SECTION("first") { SUCCEED(); }
    auto _ = GENERATE(1, 2);
    SECTION("second") { SUCCEED(); }
}
```

will run and report 3 assertions, 1 from section "first" and 2
from section "second". This also applies for greater and potentially
more confusing nesting, but fundamentally it is up to the user to
avoid overly complex and confusing nestings, just as with `SECTION`s.

The old behaviour of `GENERATE` as first thing in a `TEST_CASE`,
`GENERATE` not followed by a `SECTION`, etc etc should be unchanged.

Closes #1938
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace stray tabs with spaces</title>
<updated>2020-06-01T17:06:51+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2020-06-01T17:06:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=0807fdb175ae3c96357c1d583ba391ccb8462655'/>
<id>0807fdb175ae3c96357c1d583ba391ccb8462655</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Improved generator tracking</title>
<updated>2020-06-01T17:06:51+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2020-06-01T17:04:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=9500ded83b66ea02472833684135ab8573da5e2d'/>
<id>9500ded83b66ea02472833684135ab8573da5e2d</id>
<content type='text'>
* Successive executions of the same `GENERATE` macro (e.g. because
of a for loop) no longer lead to multiple nested generators.
* The same line can now contain multiple `GENERATE` macros without
issues.

Fixes #1913
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Successive executions of the same `GENERATE` macro (e.g. because
of a for loop) no longer lead to multiple nested generators.
* The same line can now contain multiple `GENERATE` macros without
issues.

Fixes #1913
</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>Various improvements to the benchmarking support</title>
<updated>2019-06-06T19:28:56+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2019-05-19T18:54:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=e340ab8db6dbe07a58b6e72a9364d67d2178293c'/>
<id>e340ab8db6dbe07a58b6e72a9364d67d2178293c</id>
<content type='text'>
* Units from &lt;ratio&gt; are no longer redeclared in our own namespace
* The default clock is `steady_clock`, not `high_resolution_clock`,
because, as HH says "high_resolution_clock is useless. If you want
measure the passing of time, use steady_clock. If you want user
friendly time, use system_clock".
* Benchmarking support is opt-in, not opt-out, to avoid the large
(~10%) compile time penalty.
* Benchmarking-related options in CLI are always present, to decrease
the amount of code that is only compiled conditionally and making
the whole shebang more maintainble.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Units from &lt;ratio&gt; are no longer redeclared in our own namespace
* The default clock is `steady_clock`, not `high_resolution_clock`,
because, as HH says "high_resolution_clock is useless. If you want
measure the passing of time, use steady_clock. If you want user
friendly time, use system_clock".
* Benchmarking support is opt-in, not opt-out, to avoid the large
(~10%) compile time penalty.
* Benchmarking-related options in CLI are always present, to decrease
the amount of code that is only compiled conditionally and making
the whole shebang more maintainble.
</pre>
</div>
</content>
</entry>
<entry>
<title>Integrate Nonius benchmark into Catch2</title>
<updated>2019-06-06T17:33:37+00:00</updated>
<author>
<name>Joachim Meyer</name>
</author>
<published>2019-04-23T21:41:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=ce2560ca956c1743f8bc871e0bf95f65a3db887c'/>
<id>ce2560ca956c1743f8bc871e0bf95f65a3db887c</id>
<content type='text'>
Changes done to Nonius:
* Moved things into "Catch::Benchmark" namespace
* Benchmarks were integrated with `TEST_CASE`/`SECTION`/`GENERATE` macros
* Removed Nonius's parameters for benchmarks, Generators should be used instead
* Added relevant methods to the reporter interface (default-implemented, to avoid
breaking existing 3rd party reporters)
* Async processing is guarded with `_REENTRANT` macro for GCC/Clang, used by default
on MSVC
* Added a macro `CATCH_CONFIG_DISABLE_BENCHMARKING` that removes all traces of
benchmarking from Catch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changes done to Nonius:
* Moved things into "Catch::Benchmark" namespace
* Benchmarks were integrated with `TEST_CASE`/`SECTION`/`GENERATE` macros
* Removed Nonius's parameters for benchmarks, Generators should be used instead
* Added relevant methods to the reporter interface (default-implemented, to avoid
breaking existing 3rd party reporters)
* Async processing is guarded with `_REENTRANT` macro for GCC/Clang, used by default
on MSVC
* Added a macro `CATCH_CONFIG_DISABLE_BENCHMARKING` that removes all traces of
benchmarking from Catch
</pre>
</div>
</content>
</entry>
<entry>
<title>Add unscoped info functionality</title>
<updated>2019-03-06T21:04:35+00:00</updated>
<author>
<name>Omer Ozarslan</name>
</author>
<published>2019-02-01T15:11:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=99575b45db0ec0de2fb84b5e5cce7e93559387e5'/>
<id>99575b45db0ec0de2fb84b5e5cce7e93559387e5</id>
<content type='text'>
This adds UNSCOPED_INFO macro, creating a log message that is stored
until the end of next assertion or the end of test case, whichever comes
first. These messages are not scoped locally, unlike messages created by
INFO macro.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds UNSCOPED_INFO macro, creating a log message that is stored
until the end of next assertion or the end of test case, whichever comes
first. These messages are not scoped locally, unlike messages created by
INFO macro.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix output redirection in failing tests (#1525)</title>
<updated>2019-03-02T20:18:48+00:00</updated>
<author>
<name>SimonChh</name>
</author>
<published>2019-03-02T20:18:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=7d2451f119457db33eb777f97b7b88849743352e'/>
<id>7d2451f119457db33eb777f97b7b88849743352e</id>
<content type='text'>
Fixes #1514 
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #1514 
</pre>
</div>
</content>
</entry>
</feed>
