diff options
| author | James Wilkinson | 2014-07-10 10:22:20 +0100 |
|---|---|---|
| committer | James Wilkinson | 2014-07-10 10:22:20 +0100 |
| commit | 63005a1d89eff43c938e454085fd0a339244df92 (patch) | |
| tree | 4b002a1ceb4bf46e25f6a137f64f6283b66afc7b /include | |
| parent | ca42b2c585e0c02aeaed0c884ccba5f7e6c1d11f (diff) | |
| download | catch3-63005a1d89eff43c938e454085fd0a339244df92.tar.gz | |
Added SCENARIO_METHOD for BDD testing with fixtures.
Diffstat (limited to 'include')
| -rw-r--r-- | include/catch.hpp | 4 | ||||
| -rw-r--r-- | include/internal/catch_version.hpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/catch.hpp b/include/catch.hpp index b05c485b..4251cd08 100644 --- a/include/catch.hpp +++ b/include/catch.hpp @@ -112,8 +112,10 @@ // "BDD-style" convenience wrappers #ifdef CATCH_CONFIG_VARIADIC_MACROS #define CATCH_SCENARIO( ... ) CATCH_TEST_CASE( "Scenario: " __VA_ARGS__ ) +#define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " __VA_ARGS__ ) #else #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 ) #endif #define CATCH_GIVEN( desc ) CATCH_SECTION( "Given: " desc, "" ) #define CATCH_WHEN( desc ) CATCH_SECTION( " When: " desc, "" ) @@ -179,8 +181,10 @@ // "BDD-style" convenience wrappers #ifdef CATCH_CONFIG_VARIADIC_MACROS #define SCENARIO( ... ) TEST_CASE( "Scenario: " __VA_ARGS__ ) +#define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " __VA_ARGS__ ) #else #define SCENARIO( name, tags ) TEST_CASE( "Scenario: " name, tags ) +#define SCENARIO_METHOD( className, name, tags ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " name, tags ) #endif #define GIVEN( desc ) SECTION( " Given: " desc, "" ) #define WHEN( desc ) SECTION( " When: " desc, "" ) diff --git a/include/internal/catch_version.hpp b/include/internal/catch_version.hpp index 831e354d..db7a7ec8 100644 --- a/include/internal/catch_version.hpp +++ b/include/internal/catch_version.hpp @@ -13,7 +13,7 @@ namespace Catch { // These numbers are maintained by a script - Version libraryVersion( 1, 0, 52, "master" ); + Version libraryVersion( 1, 0, 53, "master" ); } #endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED |