check: Use GST_CHECK_MAIN () macro everywhere
authorEdward Hervey <edward@centricular.com>
Tue, 2 Jun 2015 14:32:55 +0000 (16:32 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Tue, 2 Jun 2015 14:32:55 +0000 (16:32 +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/generic/libavcodec-locking.c
tests/check/generic/plugin-test.c

index 5990941..a6dfb8e 100644 (file)
@@ -158,21 +158,4 @@ simple_launch_lines_suite (void)
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  SRunner *sr;
-  Suite *s;
-  int nf;
-
-  gst_check_init (&argc, &argv);
-
-  s = simple_launch_lines_suite ();
-  sr = srunner_create (s);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (simple_launch_lines);
index e1bfdef..53831d2 100644 (file)
@@ -95,21 +95,4 @@ plugin_test_suite (void)
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  SRunner *sr;
-  Suite *s;
-  int nf;
-
-  gst_check_init (&argc, &argv);
-
-  s = plugin_test_suite ();
-  sr = srunner_create (s);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (plugin_test);