forked from enlightenment/efl
eo: improve tests suite debugging by always displaying the error message before abort.
This commit is contained in:
parent
b1954ce1e7
commit
48738d125c
|
@ -8,12 +8,6 @@ eo_test_print_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *fil
|
||||||
if (level > _EINA_LOG_MAX)
|
if (level > _EINA_LOG_MAX)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ck_assert_int_eq(level, myctx->expected_level);
|
|
||||||
if (myctx->msg)
|
|
||||||
ck_assert_str_eq(myctx->msg, fmt);
|
|
||||||
ck_assert_str_eq(myctx->fnc, fnc);
|
|
||||||
myctx->did = EINA_TRUE;
|
|
||||||
|
|
||||||
#ifdef SHOW_LOG
|
#ifdef SHOW_LOG
|
||||||
eina_log_print_cb_stderr(d, level, file, fnc, line, fmt, NULL, args);
|
eina_log_print_cb_stderr(d, level, file, fnc, line, fmt, NULL, args);
|
||||||
#else
|
#else
|
||||||
|
@ -21,6 +15,12 @@ eo_test_print_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *fil
|
||||||
(void)file;
|
(void)file;
|
||||||
(void)line;
|
(void)line;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
ck_assert_int_eq(level, myctx->expected_level);
|
||||||
|
if (myctx->msg)
|
||||||
|
ck_assert_str_eq(myctx->msg, fmt);
|
||||||
|
ck_assert_str_eq(myctx->fnc, fnc);
|
||||||
|
myctx->did = EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -33,6 +33,14 @@ eo_test_safety_print_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const ch
|
||||||
if (level > _EINA_LOG_MAX)
|
if (level > _EINA_LOG_MAX)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#ifdef SHOW_LOG
|
||||||
|
eina_log_print_cb_stderr(d, level, file, fnc, line, fmt, NULL, args);
|
||||||
|
#else
|
||||||
|
(void)d;
|
||||||
|
(void)file;
|
||||||
|
(void)line;
|
||||||
|
#endif
|
||||||
|
|
||||||
va_copy(cp_args, args);
|
va_copy(cp_args, args);
|
||||||
str = va_arg(cp_args, const char *);
|
str = va_arg(cp_args, const char *);
|
||||||
va_end(cp_args);
|
va_end(cp_args);
|
||||||
|
@ -42,12 +50,4 @@ eo_test_safety_print_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const ch
|
||||||
ck_assert_str_eq(myctx->msg, str);
|
ck_assert_str_eq(myctx->msg, str);
|
||||||
ck_assert_str_eq(myctx->fnc, fnc);
|
ck_assert_str_eq(myctx->fnc, fnc);
|
||||||
myctx->did = EINA_TRUE;
|
myctx->did = EINA_TRUE;
|
||||||
|
|
||||||
#ifdef SHOW_LOG
|
|
||||||
eina_log_print_cb_stderr(d, level, file, fnc, line, fmt, NULL, args);
|
|
||||||
#else
|
|
||||||
(void)d;
|
|
||||||
(void)file;
|
|
||||||
(void)line;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue