tests: fix indentation

This commit is contained in:
Tim-Philipp Müller 2015-12-23 23:13:21 +00:00
parent c1494a558c
commit 2adecc18e6
5 changed files with 39 additions and 43 deletions

View file

@ -63,8 +63,7 @@ GST_START_TEST (test_properties)
"epsv-mode", &res_epsv_mode, "epsv-mode", &res_epsv_mode,
"create-dirs", &res_create_dirs, "create-dirs", &res_create_dirs,
"create-tmp-file", &res_create_tmpfile, "create-tmp-file", &res_create_tmpfile,
"temp-file-name", &res_tmp_file_name, "temp-file-name", &res_tmp_file_name, NULL);
NULL);
fail_unless (strncmp (res_location, "mylocation", strlen ("mylocation")) fail_unless (strncmp (res_location, "mylocation", strlen ("mylocation"))
== 0); == 0);
@ -72,7 +71,8 @@ GST_START_TEST (test_properties)
== 0); == 0);
fail_unless (strncmp (res_ftp_port, "1.2.3.4:0", strlen ("1.2.3.4:0")) fail_unless (strncmp (res_ftp_port, "1.2.3.4:0", strlen ("1.2.3.4:0"))
== 0); == 0);
fail_unless (strncmp (res_tmp_file_name, "test_tmp_file_", strlen ("test_tmp_file_")) fail_unless (strncmp (res_tmp_file_name, "test_tmp_file_",
strlen ("test_tmp_file_"))
== 0); == 0);
fail_unless (res_epsv_mode == FALSE); fail_unless (res_epsv_mode == FALSE);
fail_unless (res_create_dirs == FALSE); fail_unless (res_create_dirs == FALSE);
@ -99,8 +99,7 @@ GST_START_TEST (test_properties)
"epsv-mode", &res_epsv_mode, "epsv-mode", &res_epsv_mode,
"create-dirs", &res_create_dirs, "create-dirs", &res_create_dirs,
"create-tmp-file", &res_create_tmpfile, "create-tmp-file", &res_create_tmpfile,
"temp-file-name", &res_tmp_file_name, "temp-file-name", &res_tmp_file_name, NULL);
NULL);
fail_unless (strncmp (res_location, "newlocation", strlen ("newlocation")) fail_unless (strncmp (res_location, "newlocation", strlen ("newlocation"))
== 0); == 0);
@ -108,7 +107,8 @@ GST_START_TEST (test_properties)
== 0); == 0);
fail_unless (strncmp (res_ftp_port, "", strlen ("")) fail_unless (strncmp (res_ftp_port, "", strlen (""))
== 0); == 0);
fail_unless (strncmp (res_tmp_file_name, "test_tmp_file_", strlen ("test_tmp_file_")) fail_unless (strncmp (res_tmp_file_name, "test_tmp_file_",
strlen ("test_tmp_file_"))
== 0); == 0);
fail_unless (res_epsv_mode == TRUE); fail_unless (res_epsv_mode == TRUE);
fail_unless (res_create_dirs == TRUE); fail_unless (res_create_dirs == TRUE);
@ -122,6 +122,7 @@ GST_START_TEST (test_properties)
cleanup_curlftpsink (sink); cleanup_curlftpsink (sink);
} }
GST_END_TEST; GST_END_TEST;
static Suite * static Suite *

View file

@ -54,16 +54,14 @@ GST_START_TEST (test_properties)
g_object_set (G_OBJECT (sink), g_object_set (G_OBJECT (sink),
"location", "mylocation", "location", "mylocation",
"file-name","myfile", "file-name", "myfile",
"user", "user", "user", "user",
"passwd", "passwd", "passwd", "passwd",
"proxy", "myproxy", "proxy", "myproxy",
"proxy-port", 7777, "proxy-port", 7777,
"proxy-user", "proxy_user", "proxy-user", "proxy_user",
"proxy-passwd", "proxy_passwd", "proxy-passwd", "proxy_passwd",
"content-type", "image/jpeg", "content-type", "image/jpeg", "use-content-length", TRUE, NULL);
"use-content-length", TRUE,
NULL);
g_object_get (sink, g_object_get (sink,
"location", &res_location, "location", &res_location,
@ -75,8 +73,7 @@ GST_START_TEST (test_properties)
"proxy-user", &res_proxy_user, "proxy-user", &res_proxy_user,
"proxy-passwd", &res_proxy_passwd, "proxy-passwd", &res_proxy_passwd,
"content-type", &res_content_type, "content-type", &res_content_type,
"use-content-length", &res_use_content_length, "use-content-length", &res_use_content_length, NULL);
NULL);
fail_unless (strncmp (res_location, "mylocation", strlen ("mylocation")) fail_unless (strncmp (res_location, "mylocation", strlen ("mylocation"))
== 0); == 0);
@ -89,7 +86,7 @@ GST_START_TEST (test_properties)
fail_unless (strncmp (res_proxy_user, "proxy_user", strlen ("proxy_user")) fail_unless (strncmp (res_proxy_user, "proxy_user", strlen ("proxy_user"))
== 0); == 0);
fail_unless (strncmp (res_proxy_passwd, "proxy_passwd", fail_unless (strncmp (res_proxy_passwd, "proxy_passwd",
strlen ("proxy_passwd")) == 0); strlen ("proxy_passwd")) == 0);
fail_unless (strncmp (res_content_type, "image/jpeg", strlen ("image/jpeg")) fail_unless (strncmp (res_content_type, "image/jpeg", strlen ("image/jpeg"))
== 0); == 0);
fail_unless (res_use_content_length == TRUE); fail_unless (res_use_content_length == TRUE);
@ -118,6 +115,7 @@ GST_START_TEST (test_properties)
cleanup_curlhttpsink (sink); cleanup_curlhttpsink (sink);
} }
GST_END_TEST; GST_END_TEST;
static Suite * static Suite *

View file

@ -80,9 +80,7 @@ GST_START_TEST (test_properties)
"nbr-attachments", &res_nbr_attach, "nbr-attachments", &res_nbr_attach,
"use-ssl", &res_use_ssl, "use-ssl", &res_use_ssl,
"pop-location", &res_pop_location, "pop-location", &res_pop_location,
"pop_user", &res_pop_usr, "pop_user", &res_pop_usr, "pop-passwd", &res_pop_passwd, NULL);
"pop-passwd", &res_pop_passwd,
NULL);
fail_unless (strncmp (res_location, "mylocation", strlen ("mylocation")) fail_unless (strncmp (res_location, "mylocation", strlen ("mylocation"))
== 0); == 0);
@ -147,9 +145,7 @@ GST_START_TEST (test_properties)
"subject", &res_subj, "subject", &res_subj,
"use-ssl", &res_use_ssl, "use-ssl", &res_use_ssl,
"message-body", &res_msg, "message-body", &res_msg,
"mail-from", &res_mail_from, "mail-from", &res_mail_from, "mail-rcpt", &res_mail_rcpt, NULL);
"mail-rcpt", &res_mail_rcpt,
NULL);
fail_unless (strncmp (res_location, "newlocation", strlen ("newlocation")) fail_unless (strncmp (res_location, "newlocation", strlen ("newlocation"))
== 0); == 0);
@ -160,7 +156,7 @@ GST_START_TEST (test_properties)
fail_unless (strncmp (res_passwd, "newpasswd", strlen ("newpasswd")) fail_unless (strncmp (res_passwd, "newpasswd", strlen ("newpasswd"))
== 0); == 0);
fail_unless (strncmp (res_mail_rcpt, "rcpt1,rcpt2,rcpt3", fail_unless (strncmp (res_mail_rcpt, "rcpt1,rcpt2,rcpt3",
strlen ("rcpt1,rcpt2,rcpt3")) == 0); strlen ("rcpt1,rcpt2,rcpt3")) == 0);
fail_unless (strncmp (res_mail_from, "newsender", strlen ("newsender")) fail_unless (strncmp (res_mail_from, "newsender", strlen ("newsender"))
== 0); == 0);
fail_unless (strncmp (res_subj, "newsubject", strlen ("newsubject")) fail_unless (strncmp (res_subj, "newsubject", strlen ("newsubject"))
@ -190,6 +186,7 @@ GST_START_TEST (test_properties)
cleanup_curlsmtpsink (sink); cleanup_curlsmtpsink (sink);
} }
GST_END_TEST; GST_END_TEST;
static Suite * static Suite *

View file

@ -37,7 +37,7 @@ verify_buffer (buffer_verify_data_s * vdata, GstBuffer * buffer)
if (vdata->data_to_verify == pcap_frame_with_eth_padding) { if (vdata->data_to_verify == pcap_frame_with_eth_padding) {
offset = pcap_frame_with_eth_padding_offset; offset = pcap_frame_with_eth_padding_offset;
size = sizeof (pcap_frame_with_eth_padding) - size = sizeof (pcap_frame_with_eth_padding) -
pcap_frame_with_eth_padding_offset - 2; pcap_frame_with_eth_padding_offset - 2;
} }
fail_unless_equals_int (gst_buffer_get_size (buffer), size); fail_unless_equals_int (gst_buffer_get_size (buffer), size);
@ -51,7 +51,7 @@ static GstElement *
setup_element (const gchar * desc) setup_element (const gchar * desc)
{ {
GstElement *element; GstElement *element;
GstCaps * caps; GstCaps *caps;
(void) desc; (void) desc;

View file

@ -55,7 +55,7 @@ event_probe (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
{ {
GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info); GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
GST_INFO ("got %" GST_PTR_FORMAT, event); GST_INFO ("got %" GST_PTR_FORMAT, event);
myreceivedevents = g_list_append (myreceivedevents, gst_event_ref (event)); myreceivedevents = g_list_append (myreceivedevents, gst_event_ref (event));
return GST_PAD_PROBE_OK; return GST_PAD_PROBE_OK;
@ -78,22 +78,22 @@ create_event (GstEventType type)
GstEvent *event = NULL; GstEvent *event = NULL;
switch (type) { switch (type) {
case GST_EVENT_CUSTOM_DOWNSTREAM: case GST_EVENT_CUSTOM_DOWNSTREAM:
event = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM, event = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM,
gst_structure_new ("x-app/test", "test-field", G_TYPE_STRING, gst_structure_new ("x-app/test", "test-field", G_TYPE_STRING,
"test-value", NULL)); "test-value", NULL));
break; break;
case GST_EVENT_CUSTOM_DOWNSTREAM_OOB: case GST_EVENT_CUSTOM_DOWNSTREAM_OOB:
event = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM_OOB, event = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM_OOB,
gst_structure_new ("x-app/test", "test-field", G_TYPE_STRING, gst_structure_new ("x-app/test", "test-field", G_TYPE_STRING,
"test-value", NULL)); "test-value", NULL));
break; break;
case GST_EVENT_EOS: case GST_EVENT_EOS:
event = gst_event_new_eos (); event = gst_event_new_eos ();
break; break;
default: default:
g_assert_not_reached (); g_assert_not_reached ();
break; break;
} }
return event; return event;
@ -131,7 +131,7 @@ check_and_clear_events (gint expected, gboolean compare)
} }
} }
g_list_free_full (myreceivedevents, (GDestroyNotify)gst_event_unref); g_list_free_full (myreceivedevents, (GDestroyNotify) gst_event_unref);
myreceivedevents = NULL; myreceivedevents = NULL;
g_list_free (mypushedevents); g_list_free (mypushedevents);
mypushedevents = NULL; mypushedevents = NULL;
@ -699,7 +699,7 @@ do_ntp_time (GstClockTime buffer_time, gint segment_start, gint segment_base)
expected_ntp_time = gst_segment_to_stream_time (&segment, GST_FORMAT_TIME, expected_ntp_time = gst_segment_to_stream_time (&segment, GST_FORMAT_TIME,
buffer_time); buffer_time);
expected_ntp_time += NTP_OFFSET; expected_ntp_time += NTP_OFFSET;
expected_ntp_time = gst_util_uint64_scale (expected_ntp_time, expected_ntp_time = gst_util_uint64_scale (expected_ntp_time,
(G_GINT64_CONSTANT (1) << 32), GST_SECOND); (G_GINT64_CONSTANT (1) << 32), GST_SECOND);