[farsight2/master] Add test to make sure a module can be reused

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:23:43 PST 2008


---
 tests/check/transmitter/rawudp.c |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/tests/check/transmitter/rawudp.c b/tests/check/transmitter/rawudp.c
index c878929..418face 100644
--- a/tests/check/transmitter/rawudp.c
+++ b/tests/check/transmitter/rawudp.c
@@ -73,6 +73,30 @@ GST_START_TEST (test_rawudptransmitter_new)
 
   g_object_unref (trans);
 
+  /* lets do it again to see if it still works */
+
+  trans = fs_transmitter_new ("rawudp", 2, &error);
+
+  if (error) {
+    ts_fail ("Error creating transmitter: (%s:%d) %s",
+      g_quark_to_string (error->domain), error->code, error->message);
+  }
+
+  ts_fail_if (trans == NULL, "No transmitter create, yet error is still NULL");
+
+  pipeline = setup_pipeline (trans, NULL);
+
+  g_object_get (trans, "gst-sink", &trans_sink, "gst-src", &trans_src, NULL);
+
+  ts_fail_if (trans_sink == NULL, "Sink is NULL");
+  ts_fail_if (trans_src == NULL, "Src is NULL");
+
+  gst_object_unref (trans_sink);
+  gst_object_unref (trans_src);
+
+  g_object_unref (trans);
+
+
   gst_object_unref (pipeline);
 
 }
-- 
1.5.6.5




More information about the farsight-commits mailing list