Moved generator tests into their own file
This commit is contained in:
1 parent
ffcde2dd0e
commit
d944e69b18
3 files changed
+33
-17
No files matched your search
@@ -79,20 +79,3 @@ TEST_CASE( "./succeeding/Misc/stdout,stderr", "Sends stuff to stdout and stderr"
|
||||
|
||||
std::cerr << "An error";
|
||||
}
|
||||
|
||||
size_t multiply( int a, int b )
|
||||
{
|
||||
return a*b;
|
||||
}
|
||||
|
||||
|
||||
TEST_CASE( "./succeeding/generators/1", "Generators over two ranges" )
|
||||
{
|
||||
using namespace Catch::Generators;
|
||||
|
||||
size_t i = GENERATE( between( 1, 5 ).then( values( 15, 20, 21 ).then( 36 ) ) );
|
||||
size_t j = GENERATE( between( 100, 107 ) );
|
||||
|
||||
REQUIRE( multiply( i, 2 ) == i*2 );
|
||||
REQUIRE( multiply( j, 2 ) == j*2 );
|
||||
}
|
||||
Reference in new issue
Block a user