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 ...)
This commit is contained in:
Edward Hervey 2015-06-02 16:14:39 +02:00 committed by Edward Hervey
parent c0f55ecf4d
commit ce16635f46
17 changed files with 20 additions and 276 deletions

View file

@ -43,7 +43,7 @@ GST_START_TEST (test_add)
GST_END_TEST;
static Suite *
volume_suite (void)
clocks_suite (void)
{
Suite *s = suite_create ("clocks");
TCase *tc_chain = tcase_create ("general");
@ -54,19 +54,4 @@ volume_suite (void)
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = volume_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 (clocks);

View file

@ -72,19 +72,4 @@ allocators_suite (void)
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = allocators_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 (allocators);

View file

@ -630,20 +630,4 @@ audio_suite (void)
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = audio_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 (audio);

View file

@ -545,19 +545,4 @@ fft_suite (void)
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = fft_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 (fft);

View file

@ -306,19 +306,4 @@ navigation_suite (void)
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = navigation_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 (navigation);

View file

@ -1004,19 +1004,4 @@ rtp_suite (void)
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = rtp_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 (rtp);

View file

@ -672,19 +672,4 @@ rtsp_suite (void)
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = rtsp_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 (rtsp);

View file

@ -817,19 +817,4 @@ rtspconnection_suite (void)
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = rtspconnection_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 (rtspconnection);

View file

@ -1811,19 +1811,4 @@ tag_suite (void)
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = tag_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 (tag);

View file

@ -203,19 +203,4 @@ xmp_config_suite (void)
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = xmp_config_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 (xmp_config);

View file

@ -156,19 +156,4 @@ baseaudiosrc_suite (void)
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = baseaudiosrc_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 (baseaudiosrc);

View file

@ -168,19 +168,4 @@ capsfilter_renegotiation_suite (void)
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = capsfilter_renegotiation_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 (capsfilter_renegotiation);

View file

@ -151,7 +151,7 @@ GST_START_TEST (test_memory_stream)
GST_END_TEST;
static Suite *
gio_testsuite (void)
gio_suite (void)
{
Suite *s = suite_create ("gio");
TCase *tc_chain = tcase_create ("general");
@ -162,19 +162,4 @@ gio_testsuite (void)
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = gio_testsuite ();
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 (gio);

View file

@ -222,19 +222,4 @@ simple_launch_lines_suite (void)
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = simple_launch_lines_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 (simple_launch_lines);

View file

@ -328,19 +328,4 @@ theoraenc_suite (void)
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = theoraenc_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 (theoraenc);

View file

@ -94,7 +94,7 @@ GST_END_TEST;
#endif /* #ifndef GST_DISABLE_PARSE */
static Suite *
vorbisenc_suite (void)
vorbisdec_suite (void)
{
Suite *s = suite_create ("vorbisdec");
TCase *tc_chain = tcase_create ("general");
@ -107,19 +107,4 @@ vorbisenc_suite (void)
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = vorbisenc_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 (vorbisdec);

View file

@ -392,19 +392,4 @@ vorbisenc_suite (void)
return s;
}
int
main (int argc, char **argv)
{
int nf;
Suite *s = vorbisenc_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 (vorbisenc);