48 #ifdef XERUS_TEST_COVERAGE 49 #include "../test/test.h" 51 #define XERUS_REQUIRE_TEST (void)0 54 #ifndef XERUS_DISABLE_RUNTIME_CHECKS 59 #ifdef XERUS_TEST_COVERAGE 60 #define XERUS_CHECK(condition, level, message) XERUS_REQUIRE_TEST; if(XERUS_IS_LOGGING(level) && !(condition)) { XERUS_LOG(level, #condition " failed msg: " << message); } else void(0) 62 #define XERUS_CHECK(condition, level, message) if(XERUS_IS_LOGGING(level) && !(condition)) { XERUS_LOG(level, #condition " failed msg: " << message); } else void(0) 65 #define XERUS_REQUIRE(condition, message) XERUS_CHECK(condition, error, message) 67 #define XERUS_INTERNAL_CHECK(condition, message) \ 70 "########################################################################\n"\ 71 "### AN INTERNAL ERROR OCCURED! ###\n"\ 72 "### Please send the following information to contact@libxerus.org ! ###\n"\ 73 "########################################################################\n"\ 74 "xerus version: " << ::xerus::VERSION_MAJOR << '.' << ::xerus::VERSION_MINOR << '.' << ::xerus::VERSION_REVISION << '-' << ::xerus::VERSION_COMMIT << "\n" \ 75 "at: " __FILE__ " : " XERUS_STRINGIFY(__LINE__) "\n" \ 76 "message: " #condition " failed: " << message << '\n' \ 77 << "callstack: \n" << ::xerus::misc::get_call_stack() << "\n" \ 78 "########################################################################\n"\ 79 "### thank you :-) ###\n"\ 80 "########################################################################" << std::endl; \ 81 XERUS_LOG(critical, #condition " failed msg: " << message); \ 84 #define XERUS_IF_CHECK(expression) expression 86 #define XERUS_IF_NO_CHECK(expression) 88 #define XERUS_CHECK(condition, level, message) void(0) 90 #define XERUS_REQUIRE(condition, message) void(0) 92 #define XERUS_INTERNAL_CHECK(condition, msg) void(0) 94 #define XERUS_IF_CHECK(expression) 96 #define XERUS_IF_NO_CHECK(expression) expression Header file for the call-stack functionality.
Header file for all logging macros and log-buffer functionality.
Header file for the standard container to standard ostream operators.