Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-06-01 19:04:23 +0200
committerMartin Hořeňovský2020-07-22 20:44:22 +0200
commit480f3f418b07cba56421041564211f24d8376e37 (patch)
treee9166abd289766819aa2c254b0de97acc45dd63e /examples
parent3ceaad7d6603d637f0d80f2bd3470ef3ac2b41fd (diff)
downloadcatch3-480f3f418b07cba56421041564211f24d8376e37.tar.gz
Improved generator tracking
* 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
Diffstat (limited to 'examples')
-rw-r--r--examples/311-Gen-CustomCapture.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/311-Gen-CustomCapture.cpp b/examples/311-Gen-CustomCapture.cpp
index 13a7eab3..d12ee709 100644
--- a/examples/311-Gen-CustomCapture.cpp
+++ b/examples/311-Gen-CustomCapture.cpp
@@ -29,7 +29,7 @@ TEST_CASE("Generate random doubles across different ranges",
// This will take r1 by reference and r2 by value.
// Note that there are no advantages for doing so in this example,
// it is done only for expository purposes.
- auto number = Catch::Generators::generate( CATCH_INTERNAL_LINEINFO,
+ auto number = Catch::Generators::generate( "custom capture generator", CATCH_INTERNAL_LINEINFO,
[&r1, r2]{
using namespace Catch::Generators;
return makeGenerators(take(50, random(std::get<0>(r1), std::get<1>(r2))));