src/test/test_tools.h
changeset 811 e27135322727
parent 721 1df9b762269b
child 825 738abd9d1262
equal deleted inserted replaced
2:b7528a56b566 3:4f6e835fa9f4
    18 ///
    18 ///
    19 ///For example
    19 ///For example
    20 ///\code check(0==1,"This is obviously false.");\endcode will
    20 ///\code check(0==1,"This is obviously false.");\endcode will
    21 ///print this (and then exits).
    21 ///print this (and then exits).
    22 ///\verbatim graph_test.cc:123: error: This is obviously false. \endverbatim
    22 ///\verbatim graph_test.cc:123: error: This is obviously false. \endverbatim
       
    23 ///
       
    24 ///\todo It should be in \c error.h
    23 #define check(rc, msg) \
    25 #define check(rc, msg) \
    24   if(!(rc)) { \
    26   if(!(rc)) { \
    25     std::cerr << __FILE__ ":" << __LINE__ << ": error: " << msg << std::endl; \
    27     std::cerr << __FILE__ ":" << __LINE__ << ": error: " << msg << std::endl; \
    26     exit(1); \
    28     exit(1); \
    27   } else { } \
    29   } else { } \