diff options
| author | Phil Nash | 2015-12-04 10:19:08 +0000 |
|---|---|---|
| committer | Phil Nash | 2015-12-04 10:19:08 +0000 |
| commit | fdc42d0af47f58fa13a42b685bbeaf55a8347673 (patch) | |
| tree | 779ff3d692eeffd33353d89ad7697a592ab5201e /projects/SelfTest/GeneratorTests.cpp | |
| parent | d758428fe297655e558a86cc6a013fcb1bcc8c7d (diff) | |
| parent | d274fc571c3980b5ac04cbe1416cf2205e6c99f7 (diff) | |
| download | catch3-1.3.0.tar.gz | |
Merged from develop branchv1.3.0
- now v1.3.0
Diffstat (limited to 'projects/SelfTest/GeneratorTests.cpp')
| -rw-r--r-- | projects/SelfTest/GeneratorTests.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/projects/SelfTest/GeneratorTests.cpp b/projects/SelfTest/GeneratorTests.cpp index a961b698..af08b1d3 100644 --- a/projects/SelfTest/GeneratorTests.cpp +++ b/projects/SelfTest/GeneratorTests.cpp @@ -19,10 +19,10 @@ inline int multiply( int a, int b ) CATCH_TEST_CASE( "Generators over two ranges", "[generators]" ) { using namespace Catch::Generators; - + int i = CATCH_GENERATE( between( 1, 5 ).then( values( 15, 20, 21 ).then( 36 ) ) ); int j = CATCH_GENERATE( between( 100, 107 ) ); - + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ); CATCH_REQUIRE( multiply( j, 2 ) == j*2 ); } @@ -32,11 +32,11 @@ struct IntPair { int first, second; }; CATCH_TEST_CASE( "Generator over a range of pairs", "[generators]" ) { using namespace Catch::Generators; - + IntPair p[] = { { 0, 1 }, { 2, 3 } }; - + IntPair* i = CATCH_GENERATE( between( p, &p[1] ) ); - + CATCH_REQUIRE( i->first == i->second-1 ); - + } |