summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2015-06-02 16:14:39 +0200
committerEdward Hervey <bilboed@bilboed.com>2015-06-02 16:14:39 +0200
commitce16635f46bbfab45d34d660ee95bacdf8edb76d (patch)
tree0368293aa094c62f2881641d522687eb4d998087 /tests
parentc0f55ecf4dca509732b8986cf010e99ac4a8dcf2 (diff)
check: Use GST_CHECK_MAIN () macro everywhere
Makes source code smaller, and ensures we go through common initialization path (like the one that sets up XML unit test output ...)
Diffstat (limited to 'tests')
-rw-r--r--tests/check/generic/clock-selection.c19
-rw-r--r--tests/check/libs/allocators.c17
-rw-r--r--tests/check/libs/audio.c18
-rw-r--r--tests/check/libs/fft.c17
-rw-r--r--tests/check/libs/navigation.c17
-rw-r--r--tests/check/libs/rtp.c17
-rw-r--r--tests/check/libs/rtsp.c17
-rw-r--r--tests/check/libs/rtspconnection.c17
-rw-r--r--tests/check/libs/tag.c17
-rw-r--r--tests/check/libs/xmpwriter.c17
-rw-r--r--tests/check/pipelines/basetime.c17
-rw-r--r--tests/check/pipelines/capsfilter-renegotiation.c17
-rw-r--r--tests/check/pipelines/gio.c19
-rw-r--r--tests/check/pipelines/simple-launch-lines.c17
-rw-r--r--tests/check/pipelines/theoraenc.c17
-rw-r--r--tests/check/pipelines/vorbisdec.c19
-rw-r--r--tests/check/pipelines/vorbisenc.c17
17 files changed, 20 insertions, 276 deletions
diff --git a/tests/check/generic/clock-selection.c b/tests/check/generic/clock-selection.c
index 703ffd88d..cfea856d9 100644
--- a/tests/check/generic/clock-selection.c
+++ b/tests/check/generic/clock-selection.c
@@ -43,7 +43,7 @@ GST_START_TEST (test_add)
GST_END_TEST;
static Suite *
-volume_suite (void)
+clocks_suite (void)
{
Suite *s = suite_create ("clocks");
TCase *tc_chain = tcase_create ("general");
@@ -54,19 +54,4 @@ volume_suite (void)
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = volume_suite ();
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (clocks);
diff --git a/tests/check/libs/allocators.c b/tests/check/libs/allocators.c
index f2b92c7d8..c96edf161 100644
--- a/tests/check/libs/allocators.c
+++ b/tests/check/libs/allocators.c
@@ -72,19 +72,4 @@ allocators_suite (void)
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = allocators_suite ();
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (allocators);
diff --git a/tests/check/libs/audio.c b/tests/check/libs/audio.c
index d95923ee8..e19fd620e 100644
--- a/tests/check/libs/audio.c
+++ b/tests/check/libs/audio.c
@@ -630,20 +630,4 @@ audio_suite (void)
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = audio_suite ();
-
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (audio);
diff --git a/tests/check/libs/fft.c b/tests/check/libs/fft.c
index 8151797eb..dccaae552 100644
--- a/tests/check/libs/fft.c
+++ b/tests/check/libs/fft.c
@@ -545,19 +545,4 @@ fft_suite (void)
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = fft_suite ();
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (fft);
diff --git a/tests/check/libs/navigation.c b/tests/check/libs/navigation.c
index b33b497af..930e42ac4 100644
--- a/tests/check/libs/navigation.c
+++ b/tests/check/libs/navigation.c
@@ -306,19 +306,4 @@ navigation_suite (void)
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = navigation_suite ();
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (navigation);
diff --git a/tests/check/libs/rtp.c b/tests/check/libs/rtp.c
index 2c0ffdf2e..ac6c15d57 100644
--- a/tests/check/libs/rtp.c
+++ b/tests/check/libs/rtp.c
@@ -1004,19 +1004,4 @@ rtp_suite (void)
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = rtp_suite ();
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (rtp);
diff --git a/tests/check/libs/rtsp.c b/tests/check/libs/rtsp.c
index 0730a318e..ba23f0c3b 100644
--- a/tests/check/libs/rtsp.c
+++ b/tests/check/libs/rtsp.c
@@ -672,19 +672,4 @@ rtsp_suite (void)
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = rtsp_suite ();
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (rtsp);
diff --git a/tests/check/libs/rtspconnection.c b/tests/check/libs/rtspconnection.c
index 3fc77ca16..ee3c18cdf 100644
--- a/tests/check/libs/rtspconnection.c
+++ b/tests/check/libs/rtspconnection.c
@@ -817,19 +817,4 @@ rtspconnection_suite (void)
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = rtspconnection_suite ();
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (rtspconnection);
diff --git a/tests/check/libs/tag.c b/tests/check/libs/tag.c
index 38f18c3e8..16b5dcfac 100644
--- a/tests/check/libs/tag.c
+++ b/tests/check/libs/tag.c
@@ -1811,19 +1811,4 @@ tag_suite (void)
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = tag_suite ();
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (tag);
diff --git a/tests/check/libs/xmpwriter.c b/tests/check/libs/xmpwriter.c
index e7889d604..6a84e1076 100644
--- a/tests/check/libs/xmpwriter.c
+++ b/tests/check/libs/xmpwriter.c
@@ -203,19 +203,4 @@ xmp_config_suite (void)
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = xmp_config_suite ();
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (xmp_config);
diff --git a/tests/check/pipelines/basetime.c b/tests/check/pipelines/basetime.c
index 1664188f1..228e97c2f 100644
--- a/tests/check/pipelines/basetime.c
+++ b/tests/check/pipelines/basetime.c
@@ -156,19 +156,4 @@ baseaudiosrc_suite (void)
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = baseaudiosrc_suite ();
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (baseaudiosrc);
diff --git a/tests/check/pipelines/capsfilter-renegotiation.c b/tests/check/pipelines/capsfilter-renegotiation.c
index 727093605..4a3fc98ab 100644
--- a/tests/check/pipelines/capsfilter-renegotiation.c
+++ b/tests/check/pipelines/capsfilter-renegotiation.c
@@ -168,19 +168,4 @@ capsfilter_renegotiation_suite (void)
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = capsfilter_renegotiation_suite ();
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (capsfilter_renegotiation);
diff --git a/tests/check/pipelines/gio.c b/tests/check/pipelines/gio.c
index 5ce6688c1..60b45c2a9 100644
--- a/tests/check/pipelines/gio.c
+++ b/tests/check/pipelines/gio.c
@@ -151,7 +151,7 @@ GST_START_TEST (test_memory_stream)
GST_END_TEST;
static Suite *
-gio_testsuite (void)
+gio_suite (void)
{
Suite *s = suite_create ("gio");
TCase *tc_chain = tcase_create ("general");
@@ -162,19 +162,4 @@ gio_testsuite (void)
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = gio_testsuite ();
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (gio);
diff --git a/tests/check/pipelines/simple-launch-lines.c b/tests/check/pipelines/simple-launch-lines.c
index 7a6b76c7a..d3e9bb7c4 100644
--- a/tests/check/pipelines/simple-launch-lines.c
+++ b/tests/check/pipelines/simple-launch-lines.c
@@ -222,19 +222,4 @@ simple_launch_lines_suite (void)
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = simple_launch_lines_suite ();
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (simple_launch_lines);
diff --git a/tests/check/pipelines/theoraenc.c b/tests/check/pipelines/theoraenc.c
index 03750ff5e..ff8b6e1fb 100644
--- a/tests/check/pipelines/theoraenc.c
+++ b/tests/check/pipelines/theoraenc.c
@@ -328,19 +328,4 @@ theoraenc_suite (void)
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = theoraenc_suite ();
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (theoraenc);
diff --git a/tests/check/pipelines/vorbisdec.c b/tests/check/pipelines/vorbisdec.c
index 43c673a0a..51b7f38bb 100644
--- a/tests/check/pipelines/vorbisdec.c
+++ b/tests/check/pipelines/vorbisdec.c
@@ -94,7 +94,7 @@ GST_END_TEST;
#endif /* #ifndef GST_DISABLE_PARSE */
static Suite *
-vorbisenc_suite (void)
+vorbisdec_suite (void)
{
Suite *s = suite_create ("vorbisdec");
TCase *tc_chain = tcase_create ("general");
@@ -107,19 +107,4 @@ vorbisenc_suite (void)
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = vorbisenc_suite ();
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (vorbisdec);
diff --git a/tests/check/pipelines/vorbisenc.c b/tests/check/pipelines/vorbisenc.c
index a9bb2bebe..246c903c7 100644
--- a/tests/check/pipelines/vorbisenc.c
+++ b/tests/check/pipelines/vorbisenc.c
@@ -392,19 +392,4 @@ vorbisenc_suite (void)
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = vorbisenc_suite ();
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (vorbisenc);