mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 11:43:29 +01:00
Fix compilation of examples
This commit is contained in:
parent
0807fdb175
commit
0f12995501
@ -23,11 +23,11 @@ TEST_CASE("Generate random doubles across different ranges",
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
auto r2(r1);
|
auto r2(r1);
|
||||||
|
|
||||||
// This will take r1 by reference and r2 by value.
|
// This will take r1 by reference and r2 by value.
|
||||||
// Note that there are no advantages for doing so in this example,
|
// Note that there are no advantages for doing so in this example,
|
||||||
// it is done only for expository purposes.
|
// 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]{
|
[&r1, r2]{
|
||||||
using namespace Catch::Generators;
|
using namespace Catch::Generators;
|
||||||
return makeGenerators(take(50, random(std::get<0>(r1), std::get<1>(r2))));
|
return makeGenerators(take(50, random(std::get<0>(r1), std::get<1>(r2))));
|
||||||
|
Loading…
Reference in New Issue
Block a user