* tests: small cleanups

This commit is contained in:
Dirk-Jan C. Binnema
2010-09-12 23:38:34 +03:00
parent ad4005bdf9
commit 88ed5a9a6f
3 changed files with 17 additions and 15 deletions

View File

@ -24,6 +24,12 @@ INCLUDES=$(XAPIAN_CXXFLAGS) \
-DMU_PROGRAM=\"${abs_top_builddir}/src/mu\" \
-DABS_SRCDIR=\"${abs_srcdir}\"
# don't use -Werror, as it might break on other compilers
# use -Wno-unused-parameters, because some callbacks may not
# really need all the params they get
AM_CFLAGS=-Wall -Wextra -Wno-unused-parameter -Wdeclaration-after-statement
AM_CXXFLAGS=-Wall -Wextra -Wno-unused-parameter
noinst_PROGRAMS= $(TEST_PROGS)
noinst_LTLIBRARIES=libtestmucommon.la

View File

@ -156,7 +156,6 @@ static void
test_mu_msg_03 (void)
{
MuMsg *msg;
int i;
msg = mu_msg_new (MU_TESTMAILDIR
"cur/1283599333.1840_11.cthulhu!2,", NULL);
@ -179,12 +178,12 @@ test_mu_msg_03 (void)
}
static gboolean
ignore_error (const char* log_domain, GLogLevelFlags log_level, const gchar* msg,
gpointer user_data)
{
return FALSE; /* don't abort */
}
/* static gboolean */
/* ignore_error (const char* log_domain, GLogLevelFlags log_level, const gchar* msg, */
/* gpointer user_data) */
/* { */
/* return FALSE; /\* don't abort *\/ */
/* } */
static void
shutup (void) {}

View File

@ -62,17 +62,17 @@ run_and_count_matches (const char *xpath, const char *query)
MuQuery *mquery;
MuMsgIter *iter;
guint count;
gchar *prep;
mquery = mu_query_new (xpath);
g_assert (query);
iter = mu_query_run (mquery, query, NULL, FALSE, 1);
g_assert (iter);
/* prep = mu_query_preprocess (query); */
/* g_print ("\n%s:\n(1)'%s'\n(2)'%s'\n", xpath, query, prep); */
/* g_free (prep); */
{
gchar *prep = mu_query_preprocess (query);
g_print ("\n%s:\n(1)'%s'\n(2)'%s'\n", xpath, query, prep);
g_free (prep);
}
for (count = 0; !mu_msg_iter_is_done(iter);
mu_msg_iter_next(iter), ++count);
@ -92,7 +92,6 @@ typedef struct {
static void
test_mu_query_01 (void)
{
MuQuery *query;
gchar *xpath;
int i;
@ -136,7 +135,6 @@ test_mu_query_02 (void)
static void
test_mu_query_03 (void)
{
MuQuery *query;
gchar *xpath;
int i;
@ -162,7 +160,6 @@ test_mu_query_03 (void)
static void
test_mu_query_04 (void)
{
MuQuery *query;
gchar *xpath;
int i;