mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-30 16:37:56 +00:00
Added BDD macros
(Also includes regenerated files from previous commits)
This commit is contained in:
parent
0db35c0f35
commit
37186a1d04
4 changed files with 437 additions and 451 deletions
|
@ -88,6 +88,14 @@
|
|||
|
||||
#define CATCH_GENERATE( expr) INTERNAL_CATCH_GENERATE( expr )
|
||||
|
||||
// "BDD-style" convenience wrappers
|
||||
#define CATCH_SCENARIO( name, tags ) CATCH_TEST_CASE( "Scenario: " name, tags )
|
||||
#define CATCH_GIVEN( desc ) CATCH_SECTION( "Given: " desc, "" )
|
||||
#define CATCH_WHEN( desc ) CATCH_SECTION( " When: " desc, "" )
|
||||
#define CATCH_AND_WHEN( desc ) CATCH_SECTION( " And: " desc, "" )
|
||||
#define CATCH_THEN( desc ) CATCH_SECTION( " Then: " desc, "" )
|
||||
#define CATCH_AND_THEN( desc ) CATCH_SECTION( " And: " desc, "" )
|
||||
|
||||
// If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required
|
||||
#else
|
||||
|
||||
|
@ -135,6 +143,14 @@
|
|||
|
||||
#define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature )
|
||||
|
||||
// "BDD-style" convenience wrappers
|
||||
#define SCENARIO( name, tags ) TEST_CASE( "Scenario: " name, tags )
|
||||
#define GIVEN( desc ) SECTION( "Given: " desc, "" )
|
||||
#define WHEN( desc ) SECTION( " When: " desc, "" )
|
||||
#define AND_WHEN( desc ) SECTION( " And: " desc, "" )
|
||||
#define THEN( desc ) SECTION( " Then: " desc, "" )
|
||||
#define AND_THEN( desc ) SECTION( " And: " desc, "" )
|
||||
|
||||
using Catch::Detail::Approx;
|
||||
|
||||
#ifdef __clang__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue