diff options
author | Edward Hervey <edward@centricular.com> | 2015-06-02 17:27:24 +0300 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2015-06-02 17:27:24 +0300 |
commit | d524439b35a70619010fe6e73a731d7104475a37 (patch) | |
tree | c2ed9254bc18e9e9996c06b4df92700e1b979efc /tests/check/elements | |
parent | 647eefea67bf1ec4858b1108784e73e9216a7c13 (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/check/elements')
32 files changed, 63 insertions, 545 deletions
diff --git a/tests/check/elements/aacparse.c b/tests/check/elements/aacparse.c index 9a5064704..6ec29d624 100644 --- a/tests/check/elements/aacparse.c +++ b/tests/check/elements/aacparse.c @@ -240,6 +240,11 @@ aacparse_suite (void) Suite *s = suite_create ("aacparse"); TCase *tc_chain = tcase_create ("general"); + /* init test context */ + ctx_factory = "aacparse"; + ctx_sink_template = &sinktemplate; + ctx_src_template = &srctemplate; + suite_add_tcase (s, tc_chain); /* ADIF tests */ tcase_add_test (tc_chain, test_parse_adif_normal); @@ -267,25 +272,4 @@ aacparse_suite (void) * - Both push- and pull-modes need to be tested * * Pull-mode & EOS */ - -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = aacparse_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - /* init test context */ - ctx_factory = "aacparse"; - ctx_sink_template = &sinktemplate; - ctx_src_template = &srctemplate; - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (aacparse); diff --git a/tests/check/elements/ac3parse.c b/tests/check/elements/ac3parse.c index 7877cd08f..1bbe59b08 100644 --- a/tests/check/elements/ac3parse.c +++ b/tests/check/elements/ac3parse.c @@ -122,6 +122,11 @@ ac3parse_suite (void) Suite *s = suite_create ("ac3parse"); TCase *tc_chain = tcase_create ("general"); + /* init test context */ + ctx_factory = "ac3parse"; + ctx_sink_template = &sinktemplate; + ctx_src_template = &srctemplate; + suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_parse_normal); tcase_add_test (tc_chain, test_parse_drain_single); @@ -139,25 +144,4 @@ ac3parse_suite (void) * - Both push- and pull-modes need to be tested * * Pull-mode & EOS */ - -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = ac3parse_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - /* init test context */ - ctx_factory = "ac3parse"; - ctx_sink_template = &sinktemplate; - ctx_src_template = &srctemplate; - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (ac3parse); diff --git a/tests/check/elements/apev2mux.c b/tests/check/elements/apev2mux.c index 88f9e3ecb..ef1907ecd 100644 --- a/tests/check/elements/apev2mux.c +++ b/tests/check/elements/apev2mux.c @@ -408,19 +408,4 @@ apev2mux_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = apev2mux_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 (apev2mux); diff --git a/tests/check/elements/aspectratiocrop.c b/tests/check/elements/aspectratiocrop.c index 1728afd6e..83d6fb48d 100644 --- a/tests/check/elements/aspectratiocrop.c +++ b/tests/check/elements/aspectratiocrop.c @@ -172,19 +172,4 @@ aspectratiocrop_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = aspectratiocrop_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 (aspectratiocrop); diff --git a/tests/check/elements/audioamplify.c b/tests/check/elements/audioamplify.c index bebb00450..a6e3c2dd6 100644 --- a/tests/check/elements/audioamplify.c +++ b/tests/check/elements/audioamplify.c @@ -464,19 +464,4 @@ amplify_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = amplify_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 (amplify); diff --git a/tests/check/elements/audiochebband.c b/tests/check/elements/audiochebband.c index 70218223a..a636e2007 100644 --- a/tests/check/elements/audiochebband.c +++ b/tests/check/elements/audiochebband.c @@ -1667,19 +1667,4 @@ audiochebband_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = audiochebband_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 (audiochebband); diff --git a/tests/check/elements/audiocheblimit.c b/tests/check/elements/audiocheblimit.c index c155b202f..039eab59e 100644 --- a/tests/check/elements/audiocheblimit.c +++ b/tests/check/elements/audiocheblimit.c @@ -1083,19 +1083,4 @@ audiocheblimit_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = audiocheblimit_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 (audiocheblimit); diff --git a/tests/check/elements/audiodynamic.c b/tests/check/elements/audiodynamic.c index 779f8e947..5b82a03ab 100644 --- a/tests/check/elements/audiodynamic.c +++ b/tests/check/elements/audiodynamic.c @@ -439,19 +439,4 @@ dynamic_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = dynamic_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 (dynamic); diff --git a/tests/check/elements/audioinvert.c b/tests/check/elements/audioinvert.c index 50981d7af..d121fdd34 100644 --- a/tests/check/elements/audioinvert.c +++ b/tests/check/elements/audioinvert.c @@ -281,19 +281,4 @@ invert_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = invert_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 (invert); diff --git a/tests/check/elements/audiowsincband.c b/tests/check/elements/audiowsincband.c index 0a5b9c128..2235abedd 100644 --- a/tests/check/elements/audiowsincband.c +++ b/tests/check/elements/audiowsincband.c @@ -1134,19 +1134,4 @@ audiowsincband_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = audiowsincband_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 (audiowsincband); diff --git a/tests/check/elements/audiowsinclimit.c b/tests/check/elements/audiowsinclimit.c index de80451a5..3263cf986 100644 --- a/tests/check/elements/audiowsinclimit.c +++ b/tests/check/elements/audiowsinclimit.c @@ -785,19 +785,4 @@ audiowsinclimit_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = audiowsinclimit_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 (audiowsinclimit); diff --git a/tests/check/elements/avimux.c b/tests/check/elements/avimux.c index 47c155fd9..1bd27fb1e 100644 --- a/tests/check/elements/avimux.c +++ b/tests/check/elements/avimux.c @@ -266,19 +266,4 @@ avimux_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = avimux_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 (avimux); diff --git a/tests/check/elements/equalizer.c b/tests/check/elements/equalizer.c index 491e0394d..2869bea91 100644 --- a/tests/check/elements/equalizer.c +++ b/tests/check/elements/equalizer.c @@ -377,19 +377,4 @@ equalizer_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = equalizer_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 (equalizer); diff --git a/tests/check/elements/flacparse.c b/tests/check/elements/flacparse.c index 306f0109b..86b6c2b6b 100644 --- a/tests/check/elements/flacparse.c +++ b/tests/check/elements/flacparse.c @@ -250,6 +250,19 @@ flacparse_suite (void) Suite *s = suite_create ("flacparse"); TCase *tc_chain = tcase_create ("general"); + + /* init test context */ + ctx_factory = "flacparse"; + ctx_sink_template = &sinktemplate; + ctx_src_template = &srctemplate; + ctx_discard = 3; + ctx_headers[0].data = streaminfo_header; + ctx_headers[0].size = sizeof (streaminfo_header); + ctx_headers[1].data = comment_header; + ctx_headers[1].size = sizeof (comment_header); + + /* custom offsets, and ts always repeatedly 0 */ + ctx_no_metadata = TRUE; suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_parse_flac_normal); tcase_add_test (tc_chain, test_parse_flac_drain_single); @@ -269,32 +282,4 @@ flacparse_suite (void) * - Both push- and pull-modes need to be tested * * Pull-mode & EOS */ - -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = flacparse_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - /* init test context */ - ctx_factory = "flacparse"; - ctx_sink_template = &sinktemplate; - ctx_src_template = &srctemplate; - ctx_discard = 3; - ctx_headers[0].data = streaminfo_header; - ctx_headers[0].size = sizeof (streaminfo_header); - ctx_headers[1].data = comment_header; - ctx_headers[1].size = sizeof (comment_header); - /* custom offsets, and ts always repeatedly 0 */ - ctx_no_metadata = TRUE; - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (flacparse); diff --git a/tests/check/elements/id3v2mux.c b/tests/check/elements/id3v2mux.c index 21869e6b7..0a47f1d83 100644 --- a/tests/check/elements/id3v2mux.c +++ b/tests/check/elements/id3v2mux.c @@ -518,19 +518,4 @@ id3v2mux_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = id3v2mux_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 (id3v2mux); diff --git a/tests/check/elements/jpegdec.c b/tests/check/elements/jpegdec.c index 81b8b9105..f6ac5234b 100644 --- a/tests/check/elements/jpegdec.c +++ b/tests/check/elements/jpegdec.c @@ -138,19 +138,4 @@ jpegdec_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = jpegdec_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 (jpegdec); diff --git a/tests/check/elements/jpegenc.c b/tests/check/elements/jpegenc.c index fe55fb291..b774316f2 100644 --- a/tests/check/elements/jpegenc.c +++ b/tests/check/elements/jpegenc.c @@ -236,19 +236,4 @@ jpegenc_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = jpegenc_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 (jpegenc); diff --git a/tests/check/elements/matroskamux.c b/tests/check/elements/matroskamux.c index 1c18e75ec..455c2865c 100644 --- a/tests/check/elements/matroskamux.c +++ b/tests/check/elements/matroskamux.c @@ -477,19 +477,4 @@ matroskamux_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = matroskamux_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 (matroskamux); diff --git a/tests/check/elements/mpegaudioparse.c b/tests/check/elements/mpegaudioparse.c index dfe4735c1..c144e95fa 100644 --- a/tests/check/elements/mpegaudioparse.c +++ b/tests/check/elements/mpegaudioparse.c @@ -129,6 +129,12 @@ mpegaudioparse_suite (void) Suite *s = suite_create ("mpegaudioparse"); TCase *tc_chain = tcase_create ("general"); + + /* init test context */ + ctx_factory = "mpegaudioparse"; + ctx_sink_template = &sinktemplate; + ctx_src_template = &srctemplate; + suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_parse_normal); tcase_add_test (tc_chain, test_parse_drain_single); @@ -146,25 +152,4 @@ mpegaudioparse_suite (void) * - Both push- and pull-modes need to be tested * * Pull-mode & EOS */ - -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = mpegaudioparse_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - /* init test context */ - ctx_factory = "mpegaudioparse"; - ctx_sink_template = &sinktemplate; - ctx_src_template = &srctemplate; - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (mpegaudioparse); diff --git a/tests/check/elements/rganalysis.c b/tests/check/elements/rganalysis.c index 1f6f6ee55..61a9c08af 100644 --- a/tests/check/elements/rganalysis.c +++ b/tests/check/elements/rganalysis.c @@ -1976,19 +1976,4 @@ rganalysis_suite (void) return s; } -int -main (int argc, char **argv) -{ - gint nf; - - Suite *s = rganalysis_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_ENV); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (rganalysis); diff --git a/tests/check/elements/rglimiter.c b/tests/check/elements/rglimiter.c index 926ca33df..a56065934 100644 --- a/tests/check/elements/rglimiter.c +++ b/tests/check/elements/rglimiter.c @@ -274,19 +274,4 @@ rglimiter_suite (void) return s; } -int -main (int argc, char **argv) -{ - gint nf; - - Suite *s = rglimiter_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_ENV); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (rglimiter); diff --git a/tests/check/elements/rgvolume.c b/tests/check/elements/rgvolume.c index 62abf2b51..b02fcc17f 100644 --- a/tests/check/elements/rgvolume.c +++ b/tests/check/elements/rgvolume.c @@ -669,19 +669,4 @@ rgvolume_suite (void) return s; } -int -main (int argc, char **argv) -{ - gint nf; - - Suite *s = rgvolume_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_ENV); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} +GST_CHECK_MAIN (rgvolume); diff --git a/tests/check/elements/rtpbin.c b/tests/check/elements/rtpbin.c index fc52b38cb..372faede2 100644 --- a/tests/check/elements/rtpbin.c +++ b/tests/check/elements/rtpbin.c @@ -687,7 +687,7 @@ GST_START_TEST (test_aux_receiver) GST_END_TEST; static Suite * -gstrtpbin_suite (void) +rtpbin_suite (void) { Suite *s = suite_create ("rtpbin"); TCase *tc_chain = tcase_create ("general"); @@ -706,19 +706,4 @@ gstrtpbin_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = gstrtpbin_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 (rtpbin); diff --git a/tests/check/elements/rtpsession.c b/tests/check/elements/rtpsession.c index 7c7b5688f..085ae9f65 100644 --- a/tests/check/elements/rtpsession.c +++ b/tests/check/elements/rtpsession.c @@ -566,7 +566,7 @@ GST_START_TEST (test_internal_sources_timeout) GST_END_TEST; static Suite * -gstrtpsession_suite (void) +rtpsession_suite (void) { Suite *s = suite_create ("rtpsession"); TCase *tc_chain = tcase_create ("general"); @@ -579,19 +579,4 @@ gstrtpsession_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = gstrtpsession_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 (rtpsession); diff --git a/tests/check/elements/spectrum.c b/tests/check/elements/spectrum.c index e562e72d8..e97be0363 100644 --- a/tests/check/elements/spectrum.c +++ b/tests/check/elements/spectrum.c @@ -538,19 +538,4 @@ spectrum_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = spectrum_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 (spectrum); diff --git a/tests/check/elements/videobox.c b/tests/check/elements/videobox.c index 895344956..ec4825a51 100644 --- a/tests/check/elements/videobox.c +++ b/tests/check/elements/videobox.c @@ -220,19 +220,4 @@ videobox_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = videobox_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 (videobox); diff --git a/tests/check/elements/videocrop.c b/tests/check/elements/videocrop.c index a7bb46d2b..6e76e5a60 100644 --- a/tests/check/elements/videocrop.c +++ b/tests/check/elements/videocrop.c @@ -816,19 +816,4 @@ videocrop_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = videocrop_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 (videocrop); diff --git a/tests/check/elements/videofilter.c b/tests/check/elements/videofilter.c index 17b67f880..7cc02f7e3 100644 --- a/tests/check/elements/videofilter.c +++ b/tests/check/elements/videofilter.c @@ -263,19 +263,4 @@ videofilter_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = videofilter_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 (videofilter); diff --git a/tests/check/elements/wavpackdec.c b/tests/check/elements/wavpackdec.c index 9b30db56b..33ed05a37 100644 --- a/tests/check/elements/wavpackdec.c +++ b/tests/check/elements/wavpackdec.c @@ -240,19 +240,4 @@ wavpackdec_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = wavpackdec_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 (wavpackdec); diff --git a/tests/check/elements/wavpackenc.c b/tests/check/elements/wavpackenc.c index 22e2e7c9f..6b2eea4f2 100644 --- a/tests/check/elements/wavpackenc.c +++ b/tests/check/elements/wavpackenc.c @@ -179,19 +179,4 @@ wavpackenc_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = wavpackenc_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 (wavpackenc); diff --git a/tests/check/elements/wavpackparse.c b/tests/check/elements/wavpackparse.c index f123afb30..6364ded0c 100644 --- a/tests/check/elements/wavpackparse.c +++ b/tests/check/elements/wavpackparse.c @@ -231,19 +231,4 @@ wavpackparse_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = wavpackparse_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 (wavpackparse); diff --git a/tests/check/elements/y4menc.c b/tests/check/elements/y4menc.c index 2117ada8b..cfbdb2775 100644 --- a/tests/check/elements/y4menc.c +++ b/tests/check/elements/y4menc.c @@ -165,19 +165,4 @@ y4menc_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = y4menc_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 (y4menc); |