diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | 2011-02-22 19:34:48 -0500 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | 2011-02-22 19:34:48 -0500 |
commit | a51796d7f3ed86ae5656ad58b98de64710a21270 (patch) | |
tree | 19d8c0dffc98194dc64bed47be46793337c33ad1 /tests | |
parent | 2fc6dc7fe60e1ea689557d464f45ceea2119cd73 (diff) |
Introduce TplEventTypeMask to be able to select event type
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dbus/test-searches.c | 3 | ||||
-rw-r--r-- | tests/dbus/test-tpl-log-store-pidgin.c | 18 | ||||
-rw-r--r-- | tests/dbus/test-tpl-log-store-xml.c | 26 |
3 files changed, 28 insertions, 19 deletions
diff --git a/tests/dbus/test-searches.c b/tests/dbus/test-searches.c index dbf3f56..a9324b7 100644 --- a/tests/dbus/test-searches.c +++ b/tests/dbus/test-searches.c @@ -95,7 +95,8 @@ test_get_dates (TestCaseFixture *fixture, TplEntity *entity; entity = tpl_entity_new (ID, TPL_ENTITY_CONTACT, NULL, NULL); - ret = _tpl_log_manager_get_dates (fixture->manager, fixture->account, entity); + ret = _tpl_log_manager_get_dates (fixture->manager, fixture->account, entity, + TPL_EVENT_MASK_ANY); g_object_unref (entity); /* it includes 1 date from libpurple logs, 5 from TpLogger. Empathy diff --git a/tests/dbus/test-tpl-log-store-pidgin.c b/tests/dbus/test-tpl-log-store-pidgin.c index 0a6435f..7076e74 100644 --- a/tests/dbus/test-tpl-log-store-pidgin.c +++ b/tests/dbus/test-tpl-log-store-pidgin.c @@ -272,7 +272,7 @@ test_get_dates_jabber (PidginTestCaseFixture *fixture, /* Chatroom messages */ dates = log_store_pidgin_get_dates (TPL_LOG_STORE (fixture->store), - fixture->account, fixture->room); + fixture->account, fixture->room, TPL_EVENT_MASK_ANY); g_assert_cmpint (g_list_length (dates), ==, 2); @@ -291,7 +291,7 @@ test_get_dates_jabber (PidginTestCaseFixture *fixture, /* 1-1 messages */ dates = log_store_pidgin_get_dates (TPL_LOG_STORE (fixture->store), - fixture->account, fixture->contact); + fixture->account, fixture->contact, TPL_EVENT_MASK_ANY); g_assert_cmpint (g_list_length (dates), ==, 1); @@ -312,7 +312,8 @@ test_get_dates_irc (PidginTestCaseFixture *fixture, dates = log_store_pidgin_get_dates (TPL_LOG_STORE (fixture->store), fixture->account, - fixture->irc_room); + fixture->irc_room, + TPL_EVENT_MASK_ANY); g_assert_cmpint (g_list_length (dates), ==, 1); @@ -362,6 +363,7 @@ test_get_events_for_date_jabber (PidginTestCaseFixture *fixture, l = log_store_pidgin_get_events_for_date (TPL_LOG_STORE (fixture->store), fixture->account, fixture->room, + TPL_EVENT_MASK_ANY, date); g_assert_cmpint (g_list_length (l), ==, 6); @@ -378,6 +380,7 @@ test_get_events_for_date_jabber (PidginTestCaseFixture *fixture, l = log_store_pidgin_get_events_for_date (TPL_LOG_STORE (fixture->store), fixture->account, fixture->contact, + TPL_EVENT_MASK_ANY, date); g_assert_cmpint (g_list_length (l), ==, 2); @@ -427,7 +430,8 @@ test_search_new (PidginTestCaseFixture *fixture, /* empty search */ l = log_store_pidgin_search_new (TPL_LOG_STORE (fixture->store), - "I do not exist in this log store data base!"); + "I do not exist in this log store data base!", + TPL_EVENT_MASK_ANY); g_assert_cmpint (g_list_length (l), ==, 0); @@ -435,7 +439,8 @@ test_search_new (PidginTestCaseFixture *fixture, /* non empty search matching 1-1 */ l = log_store_pidgin_search_new (TPL_LOG_STORE (fixture->store), - "hey you"); + "hey you", + TPL_EVENT_MASK_ANY); g_assert_cmpint (g_list_length (l), ==, 1); @@ -445,7 +450,8 @@ test_search_new (PidginTestCaseFixture *fixture, /* non empty search, checking chatrooms are also searched */ l = log_store_pidgin_search_new (TPL_LOG_STORE (fixture->store), - "disco remote servers"); + "disco remote servers", + TPL_EVENT_MASK_ANY); g_assert_cmpint (g_list_length (l), ==, 1); diff --git a/tests/dbus/test-tpl-log-store-xml.c b/tests/dbus/test-tpl-log-store-xml.c index 7090584..8db04ba 100644 --- a/tests/dbus/test-tpl-log-store-xml.c +++ b/tests/dbus/test-tpl-log-store-xml.c @@ -90,7 +90,8 @@ test_clear (XmlTestCaseFixture *fixture, { GList *hits; hits = _tpl_log_store_search_new (TPL_LOG_STORE (fixture->store), - "1263405203"); + "1263405203", + TPL_EVENT_MASK_TEXT); g_assert (hits != NULL); g_assert_cmpint (g_list_length (hits), ==, 1); @@ -100,7 +101,8 @@ test_clear (XmlTestCaseFixture *fixture, _tpl_log_store_clear (TPL_LOG_STORE (fixture->store)); hits = _tpl_log_store_search_new (TPL_LOG_STORE (fixture->store), - "1263405203"); + "1263405203", + TPL_EVENT_MASK_TEXT); g_assert_cmpint (g_list_length (hits), ==, 0); } @@ -117,14 +119,14 @@ test_clear_account (XmlTestCaseFixture *fixture, const gchar *cleared = "f95e605a3ae97c463b626a3538567bc90fc58730"; hits = _tpl_log_store_search_new (TPL_LOG_STORE (fixture->store), - kept); + kept, TPL_EVENT_MASK_TEXT); g_assert_cmpint (g_list_length (hits), ==, 1); tpl_log_manager_search_free (hits); hits = _tpl_log_store_search_new (TPL_LOG_STORE (fixture->store), - cleared); + cleared, TPL_EVENT_MASK_TEXT); g_assert_cmpint (g_list_length (hits), ==, 1); @@ -141,14 +143,14 @@ test_clear_account (XmlTestCaseFixture *fixture, g_object_unref (account); hits = _tpl_log_store_search_new (TPL_LOG_STORE (fixture->store), - kept); + kept, TPL_EVENT_MASK_TEXT); g_assert_cmpint (g_list_length (hits), ==, 1); tpl_log_manager_search_free (hits); hits = _tpl_log_store_search_new (TPL_LOG_STORE (fixture->store), - cleared); + cleared, TPL_EVENT_MASK_TEXT); g_assert_cmpint (g_list_length (hits), ==, 0); } @@ -179,21 +181,21 @@ test_clear_entity (XmlTestCaseFixture *fixture, } hits = _tpl_log_store_search_new (TPL_LOG_STORE (fixture->store), - always_kept); + always_kept, TPL_EVENT_MASK_TEXT); g_assert_cmpint (g_list_length (hits), ==, 1); tpl_log_manager_search_free (hits); hits = _tpl_log_store_search_new (TPL_LOG_STORE (fixture->store), - kept); + kept, TPL_EVENT_MASK_TEXT); g_assert_cmpint (g_list_length (hits), ==, 1); tpl_log_manager_search_free (hits); hits = _tpl_log_store_search_new (TPL_LOG_STORE (fixture->store), - cleared); + cleared, TPL_EVENT_MASK_TEXT); g_assert_cmpint (g_list_length (hits), ==, 1); @@ -217,21 +219,21 @@ test_clear_entity (XmlTestCaseFixture *fixture, g_object_unref (entity); hits = _tpl_log_store_search_new (TPL_LOG_STORE (fixture->store), - always_kept); + always_kept, TPL_EVENT_MASK_TEXT); g_assert_cmpint (g_list_length (hits), ==, 1); tpl_log_manager_search_free (hits); hits = _tpl_log_store_search_new (TPL_LOG_STORE (fixture->store), - kept); + kept, TPL_EVENT_MASK_TEXT); g_assert_cmpint (g_list_length (hits), ==, 1); tpl_log_manager_search_free (hits); hits = _tpl_log_store_search_new (TPL_LOG_STORE (fixture->store), - cleared); + cleared, TPL_EVENT_MASK_TEXT); g_assert_cmpint (g_list_length (hits), ==, 0); } |