mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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:
parent
c0f55ecf4d
commit
ce16635f46
17 changed files with 20 additions and 276 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue