1 #ifndef _EO_ERROR_MSGS_H 2 #define _EO_ERROR_MSGS_H 3 4 #include "Eo.h" 5 #include "eo_suite.h" 6 7 /* The Max level to consider when working with the print cb. */ 8 #define _EINA_LOG_MAX 2 9 /* #define SHOW_LOG 1 */ 10 11 struct log_ctx { 12 const char *msg; 13 const char *fnc; 14 Eina_Bool did; 15 int expected_level; 16 }; 17 18 void 19 eo_test_print_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc, int line, const char *fmt, void *data, va_list args EINA_UNUSED); 20 21 void 22 eo_test_safety_print_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc, int line, const char *fmt, void *data, va_list args EINA_UNUSED); 23 24 #define TEST_EO_ERROR(fn, _msg) \ 25 ctx.msg = _msg; \ 26 ctx.fnc = fn; \ 27 ctx.did = EINA_FALSE; \ 28 ctx.expected_level = EINA_LOG_LEVEL_ERR 29 30 #define TEST_EO_CRITICAL(fn, _msg) \ 31 ctx.msg = _msg; \ 32 ctx.fnc = fn; \ 33 ctx.did = EINA_FALSE; \ 34 ctx.expected_level = EINA_LOG_LEVEL_CRITICAL 35 36 #endif /* _EO_ERROR_MSGS_H */ 37