Skip to content

Commit

Permalink
Reorder macros, remove unused include file
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmoene committed Jul 11, 2013
1 parent d084d1a commit 74cf10a
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions lest_cpp03.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <sstream>
#include <stdexcept>
#include <string>
#include <utility>
#include <vector>

#ifndef lest_NO_SHORT_ASSERTION_NAMES
Expand All @@ -23,6 +22,11 @@
# define EXPECT_THROWS_AS lest_EXPECT_TRHOWS_AS
#endif

#define lest_TEST( specification, name ) \
void lest_FUNCTION(); \
namespace { lest::registrar lest_REGISTRAR( specification, test( name, lest_FUNCTION ) ); } \
void lest_FUNCTION()

#define lest_EXPECT( expr ) \
try \
{ \
Expand Down Expand Up @@ -58,19 +62,14 @@

#define lest_DECOMPOSE( expr ) ( lest::expression_decomposer()->* expr )

#define lest_LOCATION lest::location(__FILE__, __LINE__)

#define lest_NAME2( name, line ) name##line
#define lest_NAME( name, line ) lest_NAME2( name, line )

#define lest_LOCATION lest::location(__FILE__, __LINE__)

#define lest_FUNCTION lest_NAME(__lest_function__, __LINE__)
#define lest_REGISTRAR lest_NAME(__lest_registrar__, __LINE__)

#define lest_TEST( spec, name ) \
void lest_FUNCTION(); \
namespace { lest::registrar lest_REGISTRAR( spec, test( name, lest_FUNCTION ) ); } \
void lest_FUNCTION()

namespace lest {

struct test
Expand Down

0 comments on commit 74cf10a

Please sign in to comment.