tests: fix indentation

Fix and "fix".
This commit is contained in:
Tim-Philipp Müller 2018-01-13 15:02:28 +00:00
parent d0a4ddc2bb
commit 4e048f7b8a
4 changed files with 25 additions and 14 deletions

View file

@ -156,7 +156,8 @@ GST_START_TEST (test_record)
gint i; gint i;
mfactory = mfactory =
start_record_server ("( rtppcmadepay name=depay0 ! appsink name=sink async=false )"); start_record_server
("( rtppcmadepay name=depay0 ! appsink name=sink async=false )");
g_signal_connect (mfactory, "media-constructed", g_signal_connect (mfactory, "media-constructed",
G_CALLBACK (media_constructed_cb), &server_sink); G_CALLBACK (media_constructed_cb), &server_sink);

View file

@ -342,7 +342,8 @@ read_response (GstRTSPConnection * conn)
return NULL; return NULL;
} }
type = gst_rtsp_message_get_type (response); type = gst_rtsp_message_get_type (response);
fail_unless (type == GST_RTSP_MESSAGE_RESPONSE || type == GST_RTSP_MESSAGE_DATA); fail_unless (type == GST_RTSP_MESSAGE_RESPONSE
|| type == GST_RTSP_MESSAGE_DATA);
return response; return response;
} }
@ -1104,7 +1105,8 @@ do_test_play_tcp_full (const gchar * range)
{ {
GstRTSPMessage *message; GstRTSPMessage *message;
fail_unless (gst_rtsp_message_new (&message) == GST_RTSP_OK); fail_unless (gst_rtsp_message_new (&message) == GST_RTSP_OK);
fail_unless (gst_rtsp_connection_receive (conn, message, NULL) == GST_RTSP_OK); fail_unless (gst_rtsp_connection_receive (conn, message,
NULL) == GST_RTSP_OK);
fail_unless (gst_rtsp_message_get_type (message) == GST_RTSP_MESSAGE_DATA); fail_unless (gst_rtsp_message_get_type (message) == GST_RTSP_MESSAGE_DATA);
gst_rtsp_message_free (message); gst_rtsp_message_free (message);
} }
@ -1276,7 +1278,7 @@ GST_START_TEST (test_play_tcp)
/* send PLAY request and check that we get 200 OK */ /* send PLAY request and check that we get 200 OK */
fail_unless (do_simple_request (conn, GST_RTSP_PLAY, fail_unless (do_simple_request (conn, GST_RTSP_PLAY,
session)== GST_RTSP_STS_OK); session) == GST_RTSP_STS_OK);
/* send TEARDOWN request and check that we get 200 OK */ /* send TEARDOWN request and check that we get 200 OK */
fail_unless (do_simple_request (conn, GST_RTSP_TEARDOWN, fail_unless (do_simple_request (conn, GST_RTSP_TEARDOWN,
@ -2336,7 +2338,8 @@ do_test_multiple_transports (GstRTSPLowerTrans trans1, GstRTSPLowerTrans trans2)
{ {
GstRTSPMessage *message; GstRTSPMessage *message;
fail_unless (gst_rtsp_message_new (&message) == GST_RTSP_OK); fail_unless (gst_rtsp_message_new (&message) == GST_RTSP_OK);
fail_unless (gst_rtsp_connection_receive (conn2, message, NULL) == GST_RTSP_OK); fail_unless (gst_rtsp_connection_receive (conn2, message,
NULL) == GST_RTSP_OK);
fail_unless (gst_rtsp_message_get_type (message) == GST_RTSP_MESSAGE_DATA); fail_unless (gst_rtsp_message_get_type (message) == GST_RTSP_MESSAGE_DATA);
gst_rtsp_message_free (message); gst_rtsp_message_free (message);
} }
@ -2364,7 +2367,8 @@ do_test_multiple_transports (GstRTSPLowerTrans trans1, GstRTSPLowerTrans trans2)
GST_START_TEST (test_multiple_transports) GST_START_TEST (test_multiple_transports)
{ {
start_server (TRUE); start_server (TRUE);
do_test_multiple_transports (GST_RTSP_LOWER_TRANS_UDP, GST_RTSP_LOWER_TRANS_TCP); do_test_multiple_transports (GST_RTSP_LOWER_TRANS_UDP,
GST_RTSP_LOWER_TRANS_TCP);
stop_server (); stop_server ();
} }

View file

@ -111,8 +111,10 @@ GST_START_TEST (test_pool)
{ {
Responses responses = { Responses responses = {
{session1, session2, session3}, {session1, session2, session3}
{GST_RTSP_FILTER_KEEP, GST_RTSP_FILTER_KEEP, GST_RTSP_FILTER_KEEP}, ,
{GST_RTSP_FILTER_KEEP, GST_RTSP_FILTER_KEEP, GST_RTSP_FILTER_KEEP}
,
}; };
list = gst_rtsp_session_pool_filter (pool, filter_func, &responses); list = gst_rtsp_session_pool_filter (pool, filter_func, &responses);
@ -121,8 +123,10 @@ GST_START_TEST (test_pool)
{ {
Responses responses = { Responses responses = {
{session1, session2, session3}, {session1, session2, session3}
{GST_RTSP_FILTER_REF, GST_RTSP_FILTER_KEEP, GST_RTSP_FILTER_KEEP}, ,
{GST_RTSP_FILTER_REF, GST_RTSP_FILTER_KEEP, GST_RTSP_FILTER_KEEP}
,
}; };
list = gst_rtsp_session_pool_filter (pool, filter_func, &responses); list = gst_rtsp_session_pool_filter (pool, filter_func, &responses);
@ -133,8 +137,10 @@ GST_START_TEST (test_pool)
{ {
Responses responses = { Responses responses = {
{session1, session2, session3}, {session1, session2, session3}
{GST_RTSP_FILTER_KEEP, GST_RTSP_FILTER_KEEP, GST_RTSP_FILTER_REMOVE}, ,
{GST_RTSP_FILTER_KEEP, GST_RTSP_FILTER_KEEP, GST_RTSP_FILTER_REMOVE}
,
}; };
list = gst_rtsp_session_pool_filter (pool, filter_func, &responses); list = gst_rtsp_session_pool_filter (pool, filter_func, &responses);

View file

@ -76,7 +76,7 @@ get_sockets (GstRTSPLowerTrans lower_transport, GSocketFamily socket_family)
/* allocate ports */ /* allocate ports */
fail_unless (gst_rtsp_stream_allocate_udp_sockets (stream, fail_unless (gst_rtsp_stream_allocate_udp_sockets (stream,
socket_family, transport, FALSE)); socket_family, transport, FALSE));
fail_unless (gst_rtsp_stream_complete_stream (stream, transport)); fail_unless (gst_rtsp_stream_complete_stream (stream, transport));
fail_unless (gst_rtsp_transport_free (transport) == GST_RTSP_OK); fail_unless (gst_rtsp_transport_free (transport) == GST_RTSP_OK);
@ -194,7 +194,7 @@ GST_START_TEST (test_allocate_udp_ports_fail)
fail_unless (gst_rtsp_transport_new (&transport) == GST_RTSP_OK); fail_unless (gst_rtsp_transport_new (&transport) == GST_RTSP_OK);
transport->lower_transport = GST_RTSP_LOWER_TRANS_UDP_MCAST; transport->lower_transport = GST_RTSP_LOWER_TRANS_UDP_MCAST;
fail_if (gst_rtsp_stream_allocate_udp_sockets (stream, G_SOCKET_FAMILY_IPV4, fail_if (gst_rtsp_stream_allocate_udp_sockets (stream, G_SOCKET_FAMILY_IPV4,
transport, FALSE)); transport, FALSE));
fail_unless (gst_rtsp_transport_free (transport) == GST_RTSP_OK); fail_unless (gst_rtsp_transport_free (transport) == GST_RTSP_OK);
g_object_unref (pool); g_object_unref (pool);