Skip to content

Commit

Permalink
Remove lest_TEST(), deprecated since version 1.17.0 of 29-Sep-2014
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmoene committed Jan 25, 2017
1 parent 75384e6 commit b56ae07
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,6 @@ A *lest* test specification can consist of a) one or more arrays of test cases t
**CASE(** "_proposition_", ...**) {** _code_ **}**   *(array of cases)*
Describe the expected behaviour to test for and specify the actions and expectations. After the description you can add a lambda capture list to refer to symbols in the enclosing scope. See also section [Module registration macro](#module-registration-macro) – [Single-file code example](example/02-basic.cpp) – [Multi-file code example part 1](example/12-module-1.cpp), [2](example/12-module-2.cpp), [3](example/12-module-3.cpp).
**TEST(** "_proposition_", ...**) {** _code_ **}**   *(array of cases)*
This macro is an alias for CASE(). It may be deprecated.
**lest_CASE(** _specification_, "_proposition_" **) {** _code_ **}**   *(auto-registered cases)*
Provide the collection of test cases, describe the expected behaviour to test for and specify the actions and expectations. Consider defining macro CASE(_proposition_) to hide the collection of test cases and define it in terms of lest_CASE(...) – [Single-file code example](example/11-auto-reg.cpp) – [Multi-file code example part 1](example/13-module-auto-reg-1.cpp), [2](example/13-module-auto-reg-2.cpp), [3](example/13-module-auto-reg-3.cpp).
Expand Down Expand Up @@ -307,7 +304,7 @@ int main( int argc, char *argv[] )

Compile and run:
```
prompt>g++ -std=c++11 -o main.exe -I./include/lest main.cpp && main
prompt>g++ -std=c++11 -o main.exe -I./include/lest main.cpp && main.exe
All tests passed
```

Expand All @@ -325,7 +322,7 @@ int main( int argc, char *argv[] )
Compile and run with feedback on success:
```
prompt>g++ -std=c++11 -o main.exe -I./include/lest main.cpp && main && echo All tests passed
prompt>g++ -std=c++11 -o main.exe -I./include/lest main.cpp && main.exe && echo All tests passed
All tests passed
```
Expand Down
4 changes: 0 additions & 4 deletions include/lest/lest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@

# if ! lest_FEATURE_AUTO_REGISTER
# define CASE lest_CASE
# define TEST lest_TEST
# endif

# define SETUP lest_SETUP
Expand All @@ -98,9 +97,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_TEST \
lest_CASE

#if lest_FEATURE_AUTO_REGISTER

# define lest_CASE( specification, proposition ) \
Expand Down
3 changes: 0 additions & 3 deletions include/lest/lest_cpp03.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,6 @@ namespace lest
#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

#define lest_CASE( specification, proposition ) \
static void lest_FUNCTION( lest::env & ); \
namespace { lest::add_test lest_REGISTRAR( specification, lest::test( proposition, lest_FUNCTION ) ); } \
Expand Down

0 comments on commit b56ae07

Please sign in to comment.