mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Given, When, Then prefixes are now std::strings
(and so can be prepended to std::strings themselves) see #455
This commit is contained in:
parent
5bbdc8fd38
commit
6de135c63a
@ -125,11 +125,11 @@
|
|||||||
#define CATCH_SCENARIO( name, tags ) CATCH_TEST_CASE( "Scenario: " name, tags )
|
#define CATCH_SCENARIO( name, tags ) CATCH_TEST_CASE( "Scenario: " name, tags )
|
||||||
#define CATCH_SCENARIO_METHOD( className, name, tags ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " name, tags )
|
#define CATCH_SCENARIO_METHOD( className, name, tags ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " name, tags )
|
||||||
#endif
|
#endif
|
||||||
#define CATCH_GIVEN( desc ) CATCH_SECTION( "Given: " desc, "" )
|
#define CATCH_GIVEN( desc ) CATCH_SECTION( std::string( "Given: ") + desc, "" )
|
||||||
#define CATCH_WHEN( desc ) CATCH_SECTION( " When: " desc, "" )
|
#define CATCH_WHEN( desc ) CATCH_SECTION( std::string( " When: ") + desc, "" )
|
||||||
#define CATCH_AND_WHEN( desc ) CATCH_SECTION( " And: " desc, "" )
|
#define CATCH_AND_WHEN( desc ) CATCH_SECTION( std::string( " And: ") + desc, "" )
|
||||||
#define CATCH_THEN( desc ) CATCH_SECTION( " Then: " desc, "" )
|
#define CATCH_THEN( desc ) CATCH_SECTION( std::string( " Then: ") + desc, "" )
|
||||||
#define CATCH_AND_THEN( desc ) CATCH_SECTION( " And: " desc, "" )
|
#define CATCH_AND_THEN( desc ) CATCH_SECTION( std::string( " And: ") + desc, "" )
|
||||||
|
|
||||||
// If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required
|
// If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required
|
||||||
#else
|
#else
|
||||||
@ -196,11 +196,11 @@
|
|||||||
#define SCENARIO( name, tags ) TEST_CASE( "Scenario: " name, tags )
|
#define SCENARIO( name, tags ) TEST_CASE( "Scenario: " name, tags )
|
||||||
#define SCENARIO_METHOD( className, name, tags ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " name, tags )
|
#define SCENARIO_METHOD( className, name, tags ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " name, tags )
|
||||||
#endif
|
#endif
|
||||||
#define GIVEN( desc ) SECTION( " Given: " desc, "" )
|
#define GIVEN( desc ) SECTION( std::string(" Given: ") + desc, "" )
|
||||||
#define WHEN( desc ) SECTION( " When: " desc, "" )
|
#define WHEN( desc ) SECTION( std::string(" When: ") + desc, "" )
|
||||||
#define AND_WHEN( desc ) SECTION( "And when: " desc, "" )
|
#define AND_WHEN( desc ) SECTION( std::string("And when: ") + desc, "" )
|
||||||
#define THEN( desc ) SECTION( " Then: " desc, "" )
|
#define THEN( desc ) SECTION( std::string(" Then: ") + desc, "" )
|
||||||
#define AND_THEN( desc ) SECTION( " And: " desc, "" )
|
#define AND_THEN( desc ) SECTION( std::string(" And: ") + desc, "" )
|
||||||
|
|
||||||
using Catch::Detail::Approx;
|
using Catch::Detail::Approx;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user