Skip to content

Commit

Permalink
Allow non-literal string as description for BDD macros, issue #15
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmoene committed Jul 22, 2015
1 parent fc627ed commit 839d348
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions lest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@
# define AND_THEN lest_AND_THEN
#endif

#define lest_SCENARIO( sketch ) lest_CASE( "Scenario: " sketch )
#define lest_GIVEN( context ) lest_SETUP( "Given: " context )
#define lest_WHEN( story ) lest_SECTION( " When: " story )
#define lest_THEN( story ) lest_SECTION( " Then: " story )
#define lest_AND_WHEN( story ) lest_SECTION( " And: " story )
#define lest_AND_THEN( story ) lest_SECTION( " And: " story )
#define lest_SCENARIO( sketch ) lest_CASE( lest::text("Scenario: ") + sketch )
#define lest_GIVEN( context ) lest_SETUP( lest::text( "Given: ") + context )
#define lest_WHEN( story ) lest_SECTION( lest::text( " When: ") + story )
#define lest_THEN( story ) lest_SECTION( lest::text( " Then: ") + story )
#define lest_AND_WHEN( story ) lest_SECTION( lest::text( " And: ") + story )
#define lest_AND_THEN( story ) lest_SECTION( lest::text( " And: ") + story )

#define lest_MODULE( specification, module ) \
namespace { lest::add_module _( specification, module ); }
Expand Down
12 changes: 6 additions & 6 deletions lest_cpp03.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ namespace lest
# define AND_THEN lest_AND_THEN
#endif

#define lest_SCENARIO( sketch ) lest_CASE( "Scenario: " sketch )
#define lest_GIVEN( context ) lest_SETUP( "Given: " context )
#define lest_WHEN( story ) lest_SECTION( " When: " story )
#define lest_THEN( story ) lest_SECTION( " Then: " story )
#define lest_AND_WHEN( story ) lest_SECTION( " And: " story )
#define lest_AND_THEN( story ) lest_SECTION( " And: " story )
#define lest_SCENARIO( sketch ) lest_CASE( lest::text("Scenario: ") + sketch )
#define lest_GIVEN( context ) lest_SETUP( lest::text( "Given: ") + context )
#define lest_WHEN( story ) lest_SECTION( lest::text( " When: ") + story )
#define lest_THEN( story ) lest_SECTION( lest::text( " Then: ") + story )
#define lest_AND_WHEN( story ) lest_SECTION( lest::text( " And: ") + story )
#define lest_AND_THEN( story ) lest_SECTION( lest::text( " And: ") + story )

#define lest_TEST \
lest_CASE
Expand Down

0 comments on commit 839d348

Please sign in to comment.