summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2011-02-24 09:42:05 -0500
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2011-02-24 09:42:05 -0500
commite2d7d16d7e7ca112224eee2f5369371707b70c47 (patch)
tree6a8a785cd05d6fad6f7e22414a4e8286b11073b1
parent6d14b2b45c111bc99d6ecbbf81b30edbdd61a191 (diff)
downloadtelepathy-logger-e2d7d16d7e7ca112224eee2f5369371707b70c47.tar.gz
Remove dead test code
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/test-searches.c91
2 files changed, 0 insertions, 92 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index baaa38c..936705e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -66,7 +66,6 @@ check_c_sources = \
test-tpl-channel.c \
test-tpl-conf.c \
test-tpl-observer.c \
- test-searches.c \
$(NULL)
include $(top_srcdir)/tools/check-coding-style.mk
diff --git a/tests/test-searches.c b/tests/test-searches.c
deleted file mode 100644
index d498d53..0000000
--- a/tests/test-searches.c
+++ /dev/null
@@ -1,91 +0,0 @@
-#include "constants.h"
-
-#include <glib.h>
-
-#include <telepathy-logger/debug-internal.h>
-#include <telepathy-logger/log-manager.h>
-#include <telepathy-logger/log-manager-internal.h>
-#include <telepathy-logger/log-store-internal.h>
-#include <telepathy-logger/log-store-xml-internal.h>
-
-
-static GMainLoop *loop = NULL;
-
-static void
-got_dates_cb (GObject *obj, GAsyncResult *result, gpointer user_data)
-{
- GList *ret;
- GError *error = NULL;
-
- tpl_log_manager_get_dates_finish (TPL_LOG_MANAGER (obj), result, &ret,
- &error);
- g_assert_no_error (error);
-
- for (; ret != NULL; ret = g_list_next (ret))
- {
- GDate *date = ret->data;
- /* g_assert (!tp_strdiff (date, "12345678")); */
- g_date_free (date);
- }
- g_list_free (ret);
- g_main_loop_quit (loop);
-}
-
-int
-main (int argc, char *argv[])
-{
- GError *error = NULL;
- TpDBusDaemon *dbus;
- TpAccount *acc;
- TplLogManager *manager;
- TplLogStore *logstore;
- GList *ret, *loc;
-
- g_type_init ();
-
- dbus = tp_dbus_daemon_dup (&error);
- if (error != NULL)
- {
- g_debug ("%s", error->message);
- }
- acc = tp_account_new (dbus, ACCOUNT_PATH, NULL);
- if (acc == NULL)
- {
- g_debug ("error during TpAccount creation");
- }
-
- /* get the LogManager and register a non-default LogManager */
- manager = tpl_log_manager_dup_singleton ();
- logstore = g_object_new (TPL_TYPE_LOG_STORE_XML,
- "name", "Empathy", NULL);
- _tpl_log_manager_register_log_store (manager, logstore);
-
- /* we are using the blocking API, the non-blocking one is a wrap around, so
- * it's assured to work as long as the blocking API and the wapper work */
-
- /* we do not want duplicates */
- ret = _tpl_log_manager_get_dates (manager, acc, ID, FALSE);
- ret = g_list_sort (ret, (GCompareFunc) g_strcmp0);
- for (loc = ret; loc; loc = g_list_next (loc))
- if (loc->next)
- g_assert (g_date_compare (loc->data, loc->next->data) != 0);
- g_list_foreach (ret, (GFunc) g_free, NULL);
- g_list_free (ret);
-
-
- /* we do not want duplicates */
- ret = _tpl_log_manager_get_entities (manager, acc);
- ret = g_list_sort (ret, (GCompareFunc) _tpl_entity_compare);
- for (loc = ret; loc; loc = g_list_next (loc))
- if (loc->next)
- g_assert (_tpl_entity_compare (loc->data,
- loc->next->data) != 0);
- g_list_foreach (ret, (GFunc) g_object_unref, NULL);
- g_list_free (ret);
-
-
- tpl_log_manager_get_dates_async (manager, acc, ID, FALSE, got_dates_cb, NULL);
-
- loop = g_main_loop_new (NULL, FALSE);
- g_main_loop_run (loop);
-}