summaryrefslogtreecommitdiff
path: root/src/tests/eo
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-05-22 16:13:53 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-05-24 16:02:20 -0700
commit48738d125c7ad287e5b055d440f6376227506829 (patch)
treed2eed44b62862c03b63237bf7fc8a20239966a2c /src/tests/eo
parentb1954ce1e79ff3088f8d1766a5d37fca48731d54 (diff)
eo: improve tests suite debugging by always displaying the error message before abort.
Diffstat (limited to 'src/tests/eo')
-rw-r--r--src/tests/eo/suite/eo_error_msgs.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/tests/eo/suite/eo_error_msgs.c b/src/tests/eo/suite/eo_error_msgs.c
index ae5b5d0ddc..bd187d3f97 100644
--- a/src/tests/eo/suite/eo_error_msgs.c
+++ b/src/tests/eo/suite/eo_error_msgs.c
@@ -8,12 +8,6 @@ eo_test_print_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *fil
8 if (level > _EINA_LOG_MAX) 8 if (level > _EINA_LOG_MAX)
9 return; 9 return;
10 10
11 ck_assert_int_eq(level, myctx->expected_level);
12 if (myctx->msg)
13 ck_assert_str_eq(myctx->msg, fmt);
14 ck_assert_str_eq(myctx->fnc, fnc);
15 myctx->did = EINA_TRUE;
16
17#ifdef SHOW_LOG 11#ifdef SHOW_LOG
18 eina_log_print_cb_stderr(d, level, file, fnc, line, fmt, NULL, args); 12 eina_log_print_cb_stderr(d, level, file, fnc, line, fmt, NULL, args);
19#else 13#else
@@ -21,6 +15,12 @@ eo_test_print_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *fil
21 (void)file; 15 (void)file;
22 (void)line; 16 (void)line;
23#endif 17#endif
18
19 ck_assert_int_eq(level, myctx->expected_level);
20 if (myctx->msg)
21 ck_assert_str_eq(myctx->msg, fmt);
22 ck_assert_str_eq(myctx->fnc, fnc);
23 myctx->did = EINA_TRUE;
24} 24}
25 25
26void 26void
@@ -33,6 +33,14 @@ eo_test_safety_print_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const ch
33 if (level > _EINA_LOG_MAX) 33 if (level > _EINA_LOG_MAX)
34 return; 34 return;
35 35
36#ifdef SHOW_LOG
37 eina_log_print_cb_stderr(d, level, file, fnc, line, fmt, NULL, args);
38#else
39 (void)d;
40 (void)file;
41 (void)line;
42#endif
43
36 va_copy(cp_args, args); 44 va_copy(cp_args, args);
37 str = va_arg(cp_args, const char *); 45 str = va_arg(cp_args, const char *);
38 va_end(cp_args); 46 va_end(cp_args);
@@ -42,12 +50,4 @@ eo_test_safety_print_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const ch
42 ck_assert_str_eq(myctx->msg, str); 50 ck_assert_str_eq(myctx->msg, str);
43 ck_assert_str_eq(myctx->fnc, fnc); 51 ck_assert_str_eq(myctx->fnc, fnc);
44 myctx->did = EINA_TRUE; 52 myctx->did = EINA_TRUE;
45
46#ifdef SHOW_LOG
47 eina_log_print_cb_stderr(d, level, file, fnc, line, fmt, NULL, args);
48#else
49 (void)d;
50 (void)file;
51 (void)line;
52#endif
53} 53}