From 93e006bd660488c25b3d476c1c8d95a4e4be5c05 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 19 Feb 2016 14:41:55 +0000 Subject: [PATCH] tests: fix indentation --- tests/check/elements/identity.c | 12 ++++++++---- tests/check/libs/gstharness.c | 34 ++++++++++++++++++++-------------- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/tests/check/elements/identity.c b/tests/check/elements/identity.c index fd59b33..bf66776 100644 --- a/tests/check/elements/identity.c +++ b/tests/check/elements/identity.c @@ -51,12 +51,13 @@ GST_START_TEST (test_one_buffer) gst_buffer_unref (buffer_out); gst_harness_teardown (h); } + GST_END_TEST; static void -handoff_func (GstElement * identity, GstBuffer * buf, GstBuffer ** ret) +handoff_func (GstElement * identity, GstBuffer * buf, GstBuffer ** ret) { - (void)identity; + (void) identity; *ret = buf; } @@ -95,6 +96,7 @@ GST_START_TEST (test_signal_handoffs) /* cleanup */ gst_harness_teardown (h); } + GST_END_TEST; GST_START_TEST (test_sync_on_timestamp) @@ -102,7 +104,7 @@ GST_START_TEST (test_sync_on_timestamp) /* the reason to use the queue in front of the identity element is to effectively make gst_harness_push asynchronous, not locking up the test, waiting for gst_clock_id_wait */ - GstHarness * h = gst_harness_new_parse ("queue ! identity sync=1"); + GstHarness *h = gst_harness_new_parse ("queue ! identity sync=1"); GstBuffer *buf; GstClock *clock; GstClockTime timestamp = 123456789; @@ -137,6 +139,7 @@ GST_START_TEST (test_sync_on_timestamp) gst_buffer_unref (buf); gst_harness_teardown (h); } + GST_END_TEST; GST_START_TEST (test_stopping_element_unschedules_sync) @@ -144,7 +147,7 @@ GST_START_TEST (test_stopping_element_unschedules_sync) /* the reason to use the queue in front of the identity element is to effectively make gst_harness_push asynchronous, not locking up the test, waiting for gst_clock_id_wait */ - GstHarness * h = gst_harness_new_parse ("queue ! identity sync=1"); + GstHarness *h = gst_harness_new_parse ("queue ! identity sync=1"); GstBuffer *buf; GstClockTime timestamp = 123456789; @@ -174,6 +177,7 @@ GST_START_TEST (test_stopping_element_unschedules_sync) gst_harness_teardown (h); } + GST_END_TEST; static Suite * diff --git a/tests/check/libs/gstharness.c b/tests/check/libs/gstharness.c index 8b93ac3..7cd003a 100644 --- a/tests/check/libs/gstharness.c +++ b/tests/check/libs/gstharness.c @@ -25,15 +25,15 @@ static void create_destroy_element_harness (gpointer data, gpointer user_data) { - GstElement * element = user_data; - GstHarness * h = gst_harness_new_with_element (element, NULL, NULL); + GstElement *element = user_data; + GstHarness *h = gst_harness_new_with_element (element, NULL, NULL); gst_harness_teardown (h); } -GST_START_TEST(test_harness_element_ref) +GST_START_TEST (test_harness_element_ref) { - GstHarness * h = gst_harness_new ("identity"); - GstHarnessThread * threads[100]; + GstHarness *h = gst_harness_new ("identity"); + GstHarnessThread *threads[100]; gint i; for (i = 0; i < G_N_ELEMENTS (threads); i++) @@ -46,12 +46,13 @@ GST_START_TEST(test_harness_element_ref) gst_harness_teardown (h); } + GST_END_TEST; -GST_START_TEST(test_src_harness) +GST_START_TEST (test_src_harness) { - GstHarness * h = gst_harness_new ("identity"); + GstHarness *h = gst_harness_new ("identity"); /* add a fakesrc that syncs to the clock and a capsfilter that adds some caps to it */ @@ -67,11 +68,12 @@ GST_START_TEST(test_src_harness) gst_harness_teardown (h); } + GST_END_TEST; -GST_START_TEST(test_src_harness_no_forwarding) +GST_START_TEST (test_src_harness_no_forwarding) { - GstHarness * h = gst_harness_new ("identity"); + GstHarness *h = gst_harness_new ("identity"); /* turn of forwarding of necessary events */ gst_harness_set_forwarding (h, FALSE); @@ -105,20 +107,22 @@ GST_START_TEST(test_src_harness_no_forwarding) gst_harness_teardown (h); } + GST_END_TEST; -GST_START_TEST(test_add_sink_harness_without_sinkpad) +GST_START_TEST (test_add_sink_harness_without_sinkpad) { - GstHarness * h = gst_harness_new ("fakesink"); + GstHarness *h = gst_harness_new ("fakesink"); gst_harness_add_sink (h, "fakesink"); gst_harness_teardown (h); } + GST_END_TEST; static GstEvent * -create_new_stream_start_event (GstHarness *h, gpointer data) +create_new_stream_start_event (GstHarness * h, gpointer data) { guint *counter = data; gchar *stream_id = g_strdup_printf ("streamid/%d", *counter); @@ -148,7 +152,7 @@ GST_START_TEST (test_forward_event_and_query_to_sink_harness_while_teardown) GstHarnessThread *q_thread = gst_harness_stress_custom_start (h, NULL, push_query, h, 0); gdouble duration = 1.0; - GTimer * timer = g_timer_new (); + GTimer *timer = g_timer_new (); while (g_timer_elapsed (timer, NULL) < duration) { gst_harness_add_sink (h, "fakesink"); @@ -160,6 +164,7 @@ GST_START_TEST (test_forward_event_and_query_to_sink_harness_while_teardown) gst_harness_stress_thread_stop (e_thread); gst_harness_teardown (h); } + GST_END_TEST; static Suite * @@ -175,7 +180,8 @@ gst_harness_suite (void) tcase_add_test (tc_chain, test_src_harness_no_forwarding); tcase_add_test (tc_chain, test_add_sink_harness_without_sinkpad); - tcase_add_test (tc_chain, test_forward_event_and_query_to_sink_harness_while_teardown); + tcase_add_test (tc_chain, + test_forward_event_and_query_to_sink_harness_while_teardown); return s; } -- 2.7.4