[farsight2/master] Add tests for error case
Olivier Crête
olivier.crete at collabora.co.uk
Tue Jul 14 09:50:53 PDT 2009
---
tests/check/msn/conference.c | 28 ++++++++++++++++++++++++----
1 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/tests/check/msn/conference.c b/tests/check/msn/conference.c
index bbdb7b1..195510a 100644
--- a/tests/check/msn/conference.c
+++ b/tests/check/msn/conference.c
@@ -344,10 +344,11 @@ GST_START_TEST (test_msnconference_recv_to_send)
GST_END_TEST;
- /*
-
GST_START_TEST (test_msnconference_error)
{
+ struct SimpleMsnConference *dat = setup_conference (FS_DIRECTION_SEND,
+ NULL);
+ GError *error = NULL;
ts_fail_unless (
fs_conference_new_participant (dat->conf, "", &error) == NULL);
@@ -356,11 +357,25 @@ GST_START_TEST (test_msnconference_error)
g_clear_error (&error);
+ ts_fail_unless (
+ fs_conference_new_session (dat->conf, FS_MEDIA_TYPE_VIDEO, &error) == NULL);
+ ts_fail_unless (error->domain == FS_ERROR &&
+ error->code == FS_ERROR_ALREADY_EXISTS);
+ g_clear_error (&error);
+
+
+ ts_fail_unless (
+ fs_session_new_stream (dat->session, dat->part, FS_DIRECTION_SEND,
+ NULL, 0, NULL, &error) == NULL);
+ ts_fail_unless (error->domain == FS_ERROR &&
+ error->code == FS_ERROR_ALREADY_EXISTS);
+ g_clear_error (&error);
+
+
+ free_conference (dat);
}
GST_END_TEST;
- */
-
static Suite *
fsmsnconference_suite (void)
{
@@ -386,6 +401,11 @@ fsmsnconference_suite (void)
suite_add_tcase (s, tc_chain);
+ tc_chain = tcase_create ("fsmsnconference_error");
+ tcase_add_test (tc_chain, test_msnconference_error);
+ suite_add_tcase (s, tc_chain);
+
+
return s;
}
--
1.5.6.5
More information about the farsight-commits
mailing list