From 074c31ecae5e8d1592806f39e1b03d8a41ad82e3 Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Wed, 18 May 2011 09:52:10 +0100 Subject: [PATCH 1/2] Add a testcase for bug #37288 --- tests/dbus/test-log-manager.c | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/tests/dbus/test-log-manager.c b/tests/dbus/test-log-manager.c index 0cb00eb..6bfad12 100644 --- a/tests/dbus/test-log-manager.c +++ b/tests/dbus/test-log-manager.c @@ -451,6 +451,29 @@ test_get_entities (TestCaseFixture *fixture, g_list_free (fixture->ret); } +static void +get_entities_37288_cb (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + TestCaseFixture *fixture = user_data; + GError *error = NULL; + + tpl_log_manager_get_entities_finish (TPL_LOG_MANAGER (object), result, + NULL, &error); + + g_assert_no_error (error); + g_main_loop_quit (fixture->main_loop); +} + +static void +test_get_entities_37288 (TestCaseFixture *fixture, + gconstpointer user_data) +{ + tpl_log_manager_get_entities_async (fixture->manager, fixture->account, + get_entities_37288_cb, fixture); + g_main_loop_run (fixture->main_loop); +} static void search_cb (GObject *object, @@ -535,6 +558,10 @@ main (int argc, char **argv) TestCaseFixture, params, setup, test_get_entities, teardown); + g_test_add ("/log-manager/get-entities-37288", + TestCaseFixture, params, + setup, test_get_entities_37288, teardown); + g_test_add ("/log-manager/search", TestCaseFixture, params, setup, test_search, teardown); -- 1.7.5.1