From 7ccdb921ad08a64262328cc944296bc501f732e2 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Fri, 1 Mar 2013 12:08:19 +0000 Subject: [PATCH] Eo tests: when comparing logs, ignore anything below warnings. Comparing all the debug messages is kinda crazy, so we just don't bother. --- src/tests/eo/suite/eo_test_class_errors.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/tests/eo/suite/eo_test_class_errors.c b/src/tests/eo/suite/eo_test_class_errors.c index 5336ed3..cf3c434 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); -- 2.7.4