aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-03-01 12:08:19 +0000
committerTom Hacohen <tom@stosb.com>2013-03-01 12:08:19 +0000
commit7ccdb921ad08a64262328cc944296bc501f732e2 (patch)
tree3c5b5ef6654e362a9cf45eb54ea70e0adb3f1802
parent71b1576bc53572c7333b6e41e1c88ba3458f284b (diff)
downloadefl-7ccdb921ad08a64262328cc944296bc501f732e2.tar.gz
efl-7ccdb921ad08a64262328cc944296bc501f732e2.tar.xz
efl-7ccdb921ad08a64262328cc944296bc501f732e2.zip
Eo tests: when comparing logs, ignore anything below warnings.
Comparing all the debug messages is kinda crazy, so we just don't bother.
-rw-r--r--src/tests/eo/suite/eo_test_class_errors.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tests/eo/suite/eo_test_class_errors.c b/src/tests/eo/suite/eo_test_class_errors.c
index 5336ed309..cf3c43434 100644
--- a/src/tests/eo/suite/eo_test_class_errors.c
+++ b/src/tests/eo/suite/eo_test_class_errors.c
@@ -8,6 +8,9 @@
#include "eo_suite.h"
#include "eo_test_class_simple.h"
+/* The Max level to consider when working with the print cb. */
+#define _EINA_LOG_MAX 2
+
struct log_ctx {
const char *msg;
const char *fnc;
@@ -22,6 +25,9 @@ _eo_test_print_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *fi
{
struct log_ctx *myctx = data;
+ if (level > _EINA_LOG_MAX)
+ return;
+
ck_assert_int_eq(level, myctx->expected_level);
if (myctx->msg)
ck_assert_str_eq(myctx->msg, fmt);
@@ -44,6 +50,9 @@ _eo_test_safety_print_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const c
va_list cp_args;
const char *str;
+ if (level > _EINA_LOG_MAX)
+ return;
+
va_copy(cp_args, args);
str = va_arg(cp_args, const char *);
va_end(cp_args);