* tests: small cleanups
This commit is contained in:
@ -24,6 +24,12 @@ INCLUDES=$(XAPIAN_CXXFLAGS) \
|
|||||||
-DMU_PROGRAM=\"${abs_top_builddir}/src/mu\" \
|
-DMU_PROGRAM=\"${abs_top_builddir}/src/mu\" \
|
||||||
-DABS_SRCDIR=\"${abs_srcdir}\"
|
-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_PROGRAMS= $(TEST_PROGS)
|
||||||
|
|
||||||
noinst_LTLIBRARIES=libtestmucommon.la
|
noinst_LTLIBRARIES=libtestmucommon.la
|
||||||
|
|||||||
@ -156,7 +156,6 @@ static void
|
|||||||
test_mu_msg_03 (void)
|
test_mu_msg_03 (void)
|
||||||
{
|
{
|
||||||
MuMsg *msg;
|
MuMsg *msg;
|
||||||
int i;
|
|
||||||
|
|
||||||
msg = mu_msg_new (MU_TESTMAILDIR
|
msg = mu_msg_new (MU_TESTMAILDIR
|
||||||
"cur/1283599333.1840_11.cthulhu!2,", NULL);
|
"cur/1283599333.1840_11.cthulhu!2,", NULL);
|
||||||
@ -179,12 +178,12 @@ test_mu_msg_03 (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static gboolean
|
/* static gboolean */
|
||||||
ignore_error (const char* log_domain, GLogLevelFlags log_level, const gchar* msg,
|
/* ignore_error (const char* log_domain, GLogLevelFlags log_level, const gchar* msg, */
|
||||||
gpointer user_data)
|
/* gpointer user_data) */
|
||||||
{
|
/* { */
|
||||||
return FALSE; /* don't abort */
|
/* return FALSE; /\* don't abort *\/ */
|
||||||
}
|
/* } */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
shutup (void) {}
|
shutup (void) {}
|
||||||
|
|||||||
@ -62,17 +62,17 @@ run_and_count_matches (const char *xpath, const char *query)
|
|||||||
MuQuery *mquery;
|
MuQuery *mquery;
|
||||||
MuMsgIter *iter;
|
MuMsgIter *iter;
|
||||||
guint count;
|
guint count;
|
||||||
gchar *prep;
|
|
||||||
|
|
||||||
mquery = mu_query_new (xpath);
|
mquery = mu_query_new (xpath);
|
||||||
g_assert (query);
|
g_assert (query);
|
||||||
|
|
||||||
iter = mu_query_run (mquery, query, NULL, FALSE, 1);
|
iter = mu_query_run (mquery, query, NULL, FALSE, 1);
|
||||||
g_assert (iter);
|
g_assert (iter);
|
||||||
|
{
|
||||||
/* prep = mu_query_preprocess (query); */
|
gchar *prep = mu_query_preprocess (query);
|
||||||
/* g_print ("\n%s:\n(1)'%s'\n(2)'%s'\n", xpath, query, prep); */
|
g_print ("\n%s:\n(1)'%s'\n(2)'%s'\n", xpath, query, prep);
|
||||||
/* g_free (prep); */
|
g_free (prep);
|
||||||
|
}
|
||||||
|
|
||||||
for (count = 0; !mu_msg_iter_is_done(iter);
|
for (count = 0; !mu_msg_iter_is_done(iter);
|
||||||
mu_msg_iter_next(iter), ++count);
|
mu_msg_iter_next(iter), ++count);
|
||||||
@ -92,7 +92,6 @@ typedef struct {
|
|||||||
static void
|
static void
|
||||||
test_mu_query_01 (void)
|
test_mu_query_01 (void)
|
||||||
{
|
{
|
||||||
MuQuery *query;
|
|
||||||
gchar *xpath;
|
gchar *xpath;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -136,7 +135,6 @@ test_mu_query_02 (void)
|
|||||||
static void
|
static void
|
||||||
test_mu_query_03 (void)
|
test_mu_query_03 (void)
|
||||||
{
|
{
|
||||||
MuQuery *query;
|
|
||||||
gchar *xpath;
|
gchar *xpath;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -162,7 +160,6 @@ test_mu_query_03 (void)
|
|||||||
static void
|
static void
|
||||||
test_mu_query_04 (void)
|
test_mu_query_04 (void)
|
||||||
{
|
{
|
||||||
MuQuery *query;
|
|
||||||
gchar *xpath;
|
gchar *xpath;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user