* unit-tests: small updates to tests
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** Copyright (C) 2010 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||
** Copyright (C) 2008-2010 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or modify it
|
||||
** under the terms of the GNU General Public License as published by the
|
||||
@ -39,3 +39,10 @@ test_mu_common_get_random_tmpdir (void)
|
||||
G_DIR_SEPARATOR,
|
||||
(int)random()*getpid()*(int)time(NULL));
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
black_hole (void)
|
||||
{
|
||||
return; /* do nothing */
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** Copyright (C) 2010 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||
** Copyright (C) 2008-2010 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or modify it
|
||||
** under the terms of the GNU General Public License as published by the
|
||||
@ -31,6 +31,8 @@ G_BEGIN_DECLS
|
||||
*/
|
||||
char* test_mu_common_get_random_tmpdir (void);
|
||||
|
||||
void black_hole (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /*__TEST_MU_COMMON_H__*/
|
||||
|
||||
@ -118,10 +118,6 @@ test_mu_maildir_mkmdir_03 (void)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
shutup (void) {}
|
||||
|
||||
|
||||
static gchar*
|
||||
copy_test_data (void)
|
||||
{
|
||||
@ -252,7 +248,7 @@ main (int argc, char *argv[])
|
||||
|
||||
g_log_set_handler (NULL,
|
||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION,
|
||||
(GLogFunc)shutup, NULL);
|
||||
(GLogFunc)black_hole, NULL);
|
||||
|
||||
return g_test_run ();
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** Copyright (C) 2010 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||
** Copyright (C) 2008-2010 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or modify it
|
||||
** under the terms of the GNU General Public License as published by the
|
||||
@ -125,13 +125,6 @@ test_mu_msg_str_prio_02 (void)
|
||||
g_assert_cmpstr (mu_msg_str_prio(666), ==, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
shutup (void) {}
|
||||
|
||||
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
@ -158,7 +151,7 @@ main (int argc, char *argv[])
|
||||
|
||||
g_log_set_handler (NULL,
|
||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION,
|
||||
(GLogFunc)shutup, NULL);
|
||||
(GLogFunc)black_hole, NULL);
|
||||
|
||||
return g_test_run ();
|
||||
}
|
||||
|
||||
@ -185,9 +185,6 @@ test_mu_msg_03 (void)
|
||||
/* return FALSE; /\* don't abort *\/ */
|
||||
/* } */
|
||||
|
||||
static void
|
||||
shutup (void) {}
|
||||
|
||||
|
||||
|
||||
int
|
||||
@ -205,7 +202,7 @@ main (int argc, char *argv[])
|
||||
|
||||
g_log_set_handler (NULL,
|
||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION,
|
||||
(GLogFunc)shutup, NULL);
|
||||
(GLogFunc)black_hole, NULL);
|
||||
|
||||
return g_test_run ();
|
||||
}
|
||||
|
||||
@ -105,7 +105,8 @@ test_mu_query_01 (void)
|
||||
{ "html and contains", 1 },
|
||||
{ "from:pepernoot", 0 },
|
||||
{ "foo:pepernoot", 0 },
|
||||
{ "fünkÿ", 1 }
|
||||
{ "fünkÿ", 1 },
|
||||
// { "funky", 1 }
|
||||
};
|
||||
xpath = fill_database ();
|
||||
g_assert (xpath != NULL);
|
||||
@ -225,7 +226,7 @@ main (int argc, char *argv[])
|
||||
|
||||
g_log_set_handler (NULL,
|
||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION,
|
||||
(GLogFunc)shutup, NULL);
|
||||
(GLogFunc)black_hole, NULL);
|
||||
|
||||
return g_test_run ();
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** Copyright (C) 2010 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||
** Copyright (C) 2008-2010 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or modify it
|
||||
** under the terms of the GNU General Public License as published by the
|
||||
@ -27,8 +27,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
|
||||
#include "test-mu-common.h"
|
||||
#include "src/mu-util.h"
|
||||
|
||||
static void
|
||||
@ -183,12 +182,6 @@ test_mu_util_str_from_strv_03 (void)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static void
|
||||
shutup (void) {}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
@ -227,7 +220,7 @@ main (int argc, char *argv[])
|
||||
g_log_set_handler (NULL,
|
||||
G_LOG_LEVEL_DEBUG|
|
||||
G_LOG_LEVEL_MESSAGE|
|
||||
G_LOG_LEVEL_INFO, (GLogFunc)shutup, NULL);
|
||||
G_LOG_LEVEL_INFO, (GLogFunc)black_hole, NULL);
|
||||
|
||||
return g_test_run ();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user