[farsight2/master] Add test to verify that set_local_codecs_config() with the local codecs is idempotent
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:22:48 PST 2008
---
tests/check/main/rtpcodecs.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/tests/check/main/rtpcodecs.c b/tests/check/main/rtpcodecs.c
index 8581ac4..d8f55a4 100644
--- a/tests/check/main/rtpcodecs.c
+++ b/tests/check/main/rtpcodecs.c
@@ -47,6 +47,17 @@ GST_START_TEST (test_rtpcodecs_local_codecs_config)
g_object_get (dat->session, "local-codecs", &orig_codecs, NULL);
+ fail_unless (fs_session_set_local_codecs_config (dat->session, orig_codecs,
+ &error), "Could not set local codecs as codec config");
+
+ g_object_get (dat->session, "local-codecs", &codecs, NULL);
+
+ fail_unless (fs_codec_list_are_equal (orig_codecs, codecs),
+ "Setting local codecs as preferences changes the list of local codecs");
+
+ fs_codec_list_destroy (codecs);
+ codecs = NULL;
+
for (item = g_list_first (orig_codecs); item; item = g_list_next (item))
{
FsCodec *codec = item->data;
@@ -58,7 +69,7 @@ GST_START_TEST (test_rtpcodecs_local_codecs_config)
fail_unless (has0 && has8, "You need the PCMA and PCMU encoder and payloades"
" from gst-plugins-good");
- codecs = g_list_append (codecs,
+ codecs = g_list_append (NULL,
fs_codec_new (
FS_CODEC_ID_DISABLE,
"PCMU",
--
1.5.6.5
More information about the farsight-commits
mailing list