From 04ac64efc5cb8f54f0e9ca0672c11623e70ff609 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 30 Sep 2013 12:09:40 +0200 Subject: test-tpl-log-store: test end reasons --- tests/dbus/test-tpl-log-store-xml.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/dbus/test-tpl-log-store-xml.c b/tests/dbus/test-tpl-log-store-xml.c index 11e841d..e2bd4d8 100644 --- a/tests/dbus/test-tpl-log-store-xml.c +++ b/tests/dbus/test-tpl-log-store-xml.c @@ -974,16 +974,31 @@ test_get_events_for_date (XmlTestCaseFixture *fixture, g_assert_cmpint ( tpl_call_event_get_duration (TPL_CALL_EVENT (g_list_nth_data (events, idx))), ==, 1); + g_assert_cmpint ( + tpl_call_event_get_end_reason (TPL_CALL_EVENT (g_list_nth_data (events, idx))), + ==, TP_CALL_STATE_CHANGE_REASON_USER_REQUESTED); + g_assert_cmpstr (tpl_call_event_get_detailed_end_reason (TPL_CALL_EVENT (g_list_nth_data (events, idx))), + ==, TP_ERROR_STR_CANCELLED); g_assert (TPL_IS_CALL_EVENT (g_list_nth_data (events, ++idx))); g_assert_cmpint ( tpl_call_event_get_duration (TPL_CALL_EVENT (g_list_nth_data (events, idx))), ==, 2); + g_assert_cmpint ( + tpl_call_event_get_end_reason (TPL_CALL_EVENT (g_list_nth_data (events, idx))), + ==, TP_CALL_STATE_CHANGE_REASON_USER_REQUESTED); + g_assert_cmpstr (tpl_call_event_get_detailed_end_reason (TPL_CALL_EVENT (g_list_nth_data (events, idx))), + ==, TP_ERROR_STR_CANCELLED); g_assert (TPL_IS_CALL_EVENT (g_list_nth_data (events, ++idx))); g_assert_cmpint ( tpl_call_event_get_duration (TPL_CALL_EVENT (g_list_nth_data (events, idx))), ==, 3); + g_assert_cmpint ( + tpl_call_event_get_end_reason (TPL_CALL_EVENT (g_list_nth_data (events, idx))), + ==, TP_CALL_STATE_CHANGE_REASON_USER_REQUESTED); + g_assert_cmpstr (tpl_call_event_get_detailed_end_reason (TPL_CALL_EVENT (g_list_nth_data (events, idx))), + ==, TP_ERROR_STR_CANCELLED); g_assert (TPL_IS_TEXT_EVENT (g_list_nth_data (events, ++idx))); g_assert_cmpstr ( -- cgit v1.2.1