mirror of
https://github.com/catchorg/Catch2.git
synced 2025-10-20 02:35:31 +02:00
Fairly major reworking of console reporter (still in progress).
Changed reporter interface a bit.
This commit is contained in:
@@ -26,3 +26,17 @@ CATCH_TEST_CASE( "./succeeding/generators/1", "Generators over two ranges" )
|
||||
CATCH_REQUIRE( multiply( i, 2 ) == i*2 );
|
||||
CATCH_REQUIRE( multiply( j, 2 ) == j*2 );
|
||||
}
|
||||
|
||||
struct IntPair { int first, second; };
|
||||
|
||||
CATCH_TEST_CASE( "./succeeding/generators/2", "Generator over a range of pairs" )
|
||||
{
|
||||
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 );
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user