Added SCENARIO_METHOD for BDD testing with fixtures.

This commit is contained in:
James Wilkinson
2014-07-10 10:22:20 +01:00
parent ca42b2c585
commit 63005a1d89
5 changed files with 48 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
/*
* CATCH v1.0 build 52 (master branch)
* Generated: 2014-07-10 09:17:43.994453
* CATCH v1.0 build 53 (master branch)
* Generated: 2014-07-10 10:03:22.176925
* ----------------------------------------------------------
* This file has been merged from multiple headers. Please don't edit it directly
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
@@ -6410,7 +6410,7 @@ namespace Catch {
namespace Catch {
// These numbers are maintained by a script
Version libraryVersion( 1, 0, 52, "master" );
Version libraryVersion( 1, 0, 53, "master" );
}
// #included from: catch_message.hpp
@@ -8333,7 +8333,6 @@ namespace Catch {
std::string row = oss.str();
for( std::vector<std::string>::iterator it = rows.begin(); it != rows.end(); ++it ) {
while( it->size() < row.size() )
*it = " " + *it;
while( it->size() > row.size() )
row = " " + row;
}
@@ -8884,8 +8883,10 @@ int main (int argc, char * const argv[]) {
// "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, "" )
@@ -8951,8 +8952,10 @@ int main (int argc, char * const argv[]) {
// "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, "" )