From: Edward Hervey Date: Tue, 2 Jun 2015 14:31:10 +0000 (+0200) Subject: check: Use GST_CHECK_MAIN () macro everywhere X-Git-Tag: 1.19.3~505^2~424 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe14a23327554b62a256b327d9cd79faed4c739b;p=platform%2Fupstream%2Fgstreamer.git 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 ...) --- diff --git a/tests/check/elements/amrnbenc.c b/tests/check/elements/amrnbenc.c index bea108d1ed..bd8a21023a 100644 --- a/tests/check/elements/amrnbenc.c +++ b/tests/check/elements/amrnbenc.c @@ -145,19 +145,4 @@ amrnbenc_suite () return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = amrnbenc_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 (amrnbenc); diff --git a/tests/check/elements/mpeg2dec.c b/tests/check/elements/mpeg2dec.c index 56de619843..14515c8328 100644 --- a/tests/check/elements/mpeg2dec.c +++ b/tests/check/elements/mpeg2dec.c @@ -1955,19 +1955,4 @@ mpeg2dec_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = mpeg2dec_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 (mpeg2dec); diff --git a/tests/check/elements/x264enc.c b/tests/check/elements/x264enc.c index e91c7ce6c3..572ee79baf 100644 --- a/tests/check/elements/x264enc.c +++ b/tests/check/elements/x264enc.c @@ -305,19 +305,4 @@ x264enc_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = x264enc_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 (x264enc); diff --git a/tests/check/elements/xingmux.c b/tests/check/elements/xingmux.c index a77058887f..b1fa51067e 100644 --- a/tests/check/elements/xingmux.c +++ b/tests/check/elements/xingmux.c @@ -151,19 +151,4 @@ xingmux_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = xingmux_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 (xingmux); diff --git a/tests/check/pipelines/lame.c b/tests/check/pipelines/lame.c index 2fc18f4eec..a69f58a9cb 100644 --- a/tests/check/pipelines/lame.c +++ b/tests/check/pipelines/lame.c @@ -124,19 +124,4 @@ lame_suite (void) return s; } -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = lame_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 (lame);