tests: Check gst_rtsp_url_parse return value

See https://bugzilla.gnome.org/show_bug.cgi?id=710202
This commit is contained in:
Sebastian Rasmussen 2013-10-15 18:01:38 +02:00 committed by Wim Taymans
parent 7e8f6ffc34
commit eee8b0db88
3 changed files with 19 additions and 10 deletions

View file

@ -34,7 +34,8 @@ GST_START_TEST (test_launch)
factory = gst_rtsp_media_factory_new ();
fail_if (gst_rtsp_media_factory_is_shared (factory));
gst_rtsp_url_parse ("rtsp://localhost:8554/test", &url);
fail_unless (gst_rtsp_url_parse ("rtsp://localhost:8554/test",
&url) == GST_RTSP_OK);
gst_rtsp_media_factory_set_launch (factory,
"( videotestsrc ! rtpvrawpay pt=96 name=pay0 )");
@ -135,7 +136,8 @@ GST_START_TEST (test_media_prepare)
/* test non-reusable media first */
factory = gst_rtsp_media_factory_new ();
fail_if (gst_rtsp_media_factory_is_shared (factory));
gst_rtsp_url_parse ("rtsp://localhost:8554/test", &url);
fail_unless (gst_rtsp_url_parse ("rtsp://localhost:8554/test",
&url) == GST_RTSP_OK);
gst_rtsp_media_factory_set_launch (factory,
"( videotestsrc ! rtpvrawpay pt=96 name=pay0 )");
@ -161,7 +163,8 @@ GST_START_TEST (test_media_prepare)
/* test reusable media */
factory = gst_rtsp_media_factory_new ();
fail_if (gst_rtsp_media_factory_is_shared (factory));
gst_rtsp_url_parse ("rtsp://localhost:8554/test", &url);
fail_unless (gst_rtsp_url_parse ("rtsp://localhost:8554/test",
&url) == GST_RTSP_OK);
gst_rtsp_media_factory_set_launch (factory,
"( videotestsrc ! rtpvrawpay pt=96 name=pay0 )");
@ -279,7 +282,8 @@ GST_START_TEST (test_media_take_pipeline)
GstElement *pipeline;
factory = gst_rtsp_media_factory_new ();
gst_rtsp_url_parse ("rtsp://localhost:8554/test", &url);
fail_unless (gst_rtsp_url_parse ("rtsp://localhost:8554/test",
&url) == GST_RTSP_OK);
gst_rtsp_media_factory_set_launch (factory,
"( fakesrc ! text/plain ! rtpgstpay name=pay0 )");

View file

@ -29,7 +29,8 @@ GST_START_TEST (test_parse_error)
factory = gst_rtsp_media_factory_new ();
gst_rtsp_media_factory_set_launch (factory, "foo");
gst_rtsp_url_parse ("rtsp://localhost:8554/test", &url);
fail_unless (gst_rtsp_url_parse ("rtsp://localhost:8554/test",
&url) == GST_RTSP_OK);
ASSERT_CRITICAL (gst_rtsp_media_factory_create_element (factory, url));
ASSERT_CRITICAL (gst_rtsp_media_factory_construct (factory, url));
@ -47,7 +48,8 @@ GST_START_TEST (test_launch)
factory = gst_rtsp_media_factory_new ();
fail_if (gst_rtsp_media_factory_is_shared (factory));
gst_rtsp_url_parse ("rtsp://localhost:8554/test", &url);
fail_unless (gst_rtsp_url_parse ("rtsp://localhost:8554/test",
&url) == GST_RTSP_OK);
gst_rtsp_media_factory_set_launch (factory,
"( videotestsrc ! rtpvrawpay pt=96 name=pay0 )");
@ -71,7 +73,8 @@ GST_START_TEST (test_launch_construct)
factory = gst_rtsp_media_factory_new ();
fail_if (gst_rtsp_media_factory_is_shared (factory));
gst_rtsp_url_parse ("rtsp://localhost:8554/test", &url);
fail_unless (gst_rtsp_url_parse ("rtsp://localhost:8554/test",
&url) == GST_RTSP_OK);
gst_rtsp_media_factory_set_launch (factory,
"( videotestsrc ! rtpvrawpay pt=96 name=pay0 )");
@ -103,7 +106,8 @@ GST_START_TEST (test_shared)
gst_rtsp_media_factory_set_shared (factory, TRUE);
fail_unless (gst_rtsp_media_factory_is_shared (factory));
gst_rtsp_url_parse ("rtsp://localhost:8554/test", &url);
fail_unless (gst_rtsp_url_parse ("rtsp://localhost:8554/test",
&url) == GST_RTSP_OK);
gst_rtsp_media_factory_set_launch (factory,
"( videotestsrc ! rtpvrawpay pt=96 name=pay0 )");
@ -141,7 +145,8 @@ GST_START_TEST (test_addresspool)
factory = gst_rtsp_media_factory_new ();
gst_rtsp_media_factory_set_shared (factory, TRUE);
gst_rtsp_url_parse ("rtsp://localhost:8554/test", &url);
fail_unless (gst_rtsp_url_parse ("rtsp://localhost:8554/test",
&url) == GST_RTSP_OK);
gst_rtsp_media_factory_set_launch (factory,
"( videotestsrc ! rtpvrawpay pt=96 name=pay0 "

View file

@ -203,7 +203,7 @@ connect_to_server (gint port, const gchar * mount_point)
address = gst_rtsp_server_get_address (server);
uri_string = g_strdup_printf ("rtsp://%s:%d%s", address, port, mount_point);
g_free (address);
gst_rtsp_url_parse (uri_string, &url);
fail_unless (gst_rtsp_url_parse (uri_string, &url) == GST_RTSP_OK);
g_free (uri_string);
fail_unless (gst_rtsp_connection_create (url, &conn) == GST_RTSP_OK);