Skip to content

Commit

Permalink
Only define lest_MODULE() for non-auto test registration
Browse files Browse the repository at this point in the history
See issue #25
  • Loading branch information
martinmoene committed Nov 23, 2015
1 parent 03b66a3 commit 7a379ed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@
#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 ); }

#define lest_TEST \
lest_CASE

Expand All @@ -112,12 +109,15 @@
namespace { lest::add_test lest_REGISTRAR( specification, lest::test( proposition, lest_FUNCTION ) ); } \
void lest_FUNCTION( lest::env & $ )

#else
#else // lest_FEATURE_AUTO_REGISTER

# define lest_CASE( proposition, ... ) \
proposition, [__VA_ARGS__]( lest::env & $ )

#endif
#define lest_MODULE( specification, module ) \
namespace { lest::add_module _( specification, module ); }

#endif //lest_FEATURE_AUTO_REGISTER

#define lest_SETUP( context ) \
for ( int $section = 0, $count = 1; $section < $count; $count -= 0==$section++ )
Expand Down

0 comments on commit 7a379ed

Please sign in to comment.