tasn pushed a commit to branch master.
commit 7ccdb921ad08a64262328cc944296bc501f732e2
Author: Tom Hacohen <[email protected]>
Date: Fri Mar 1 12:08:19 2013 +0000
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);
--
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb