diff -r c160bf9f18ef -r 580af8cf2f6a test/test_tools.h --- a/test/test_tools.h Thu Nov 05 10:01:02 2009 +0100 +++ b/test/test_tools.h Thu Nov 05 10:23:16 2009 +0100 @@ -37,10 +37,14 @@ ///\code check(0==1,"This is obviously false.");\endcode will ///print something like this (and then exits). ///\verbatim file_name.cc:123: error: This is obviously false. \endverbatim -#define check(rc, msg) \ - if(!(rc)) { \ - std::cerr << __FILE__ ":" << __LINE__ << ": error: " << msg << std::endl; \ - abort(); \ - } else { } \ +#define check(rc, msg) \ + { \ + if(!(rc)) { \ + std::cerr << __FILE__ ":" << __LINE__ << ": error: " \ + << msg << std::endl; \ + abort(); \ + } else { } \ + } \ + #endif