From fe14a23327554b62a256b327d9cd79faed4c739b Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Tue, 2 Jun 2015 16:31:10 +0200 Subject: [PATCH] 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 ...) --- tests/check/elements/amrnbenc.c | 17 +---------------- tests/check/elements/mpeg2dec.c | 17 +---------------- tests/check/elements/x264enc.c | 17 +---------------- tests/check/elements/xingmux.c | 17 +---------------- tests/check/pipelines/lame.c | 17 +---------------- 5 files changed, 5 insertions(+), 80 deletions(-) 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);