Eo tests: when comparing logs, ignore anything below warnings.

Comparing all the debug messages is kinda crazy, so we just don't bother.
This commit is contained in:
Tom Hacohen 2013-03-01 12:08:19 +00:00
parent 71b1576bc5
commit 7ccdb921ad
1 changed files with 9 additions and 0 deletions

View File

@ -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);