check: Use GST_CHECK_MAIN () macro everywhere
authorEdward Hervey <edward@centricular.com>
Tue, 2 Jun 2015 14:31:10 +0000 (16:31 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Tue, 2 Jun 2015 14:31:10 +0000 (16:31 +0200)
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
tests/check/elements/mpeg2dec.c
tests/check/elements/x264enc.c
tests/check/elements/xingmux.c
tests/check/pipelines/lame.c

index bea108d..bd8a210 100644 (file)
@@ -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);
index 56de619..14515c8 100644 (file)
@@ -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);
index e91c7ce..572ee79 100644 (file)
@@ -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);
index a770588..b1fa510 100644 (file)
@@ -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);
index 2fc18f4..a69f58a 100644 (file)
@@ -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);