From: Tim-Philipp Müller Date: Tue, 15 Mar 2011 09:43:35 +0000 (+0000) Subject: tests: in videofilter unit test also check with 'odd' widths and heights X-Git-Tag: 1.19.3~509^2~7910^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e1c70749593ba171fe215331ba13c43e8576975;p=platform%2Fupstream%2Fgstreamer.git tests: in videofilter unit test also check with 'odd' widths and heights And only use one test suite. --- diff --git a/tests/check/elements/videofilter.c b/tests/check/elements/videofilter.c index b3034a4..0bd148a 100644 --- a/tests/check/elements/videofilter.c +++ b/tests/check/elements/videofilter.c @@ -146,13 +146,24 @@ check_filter (const gchar * name, gint num_buffers, const gchar * prop, ...) 288, "framerate", GST_TYPE_FRACTION, 25, 1, NULL); GST_DEBUG ("Testing with caps: %" GST_PTR_FORMAT, caps); - gst_video_format_parse_caps (caps, &format, NULL, NULL); size = gst_video_format_get_size (format, 384, 288); va_start (varargs, prop); check_filter_caps (name, caps, size, num_buffers, prop, varargs); va_end (varargs); + /* and again with 'odd' width/height */ + caps = gst_caps_make_writable (caps); + gst_caps_set_simple (caps, "width", G_TYPE_INT, 385, "height", G_TYPE_INT, + 289, "framerate", GST_TYPE_FRACTION, 25, 1, NULL); + + GST_DEBUG ("Testing with caps: %" GST_PTR_FORMAT, caps); + gst_video_format_parse_caps (caps, &format, NULL, NULL); + size = gst_video_format_get_size (format, 385, 289); + va_start (varargs, prop); + check_filter_caps (name, caps, size, num_buffers, prop, varargs); + va_end (varargs); + gst_caps_unref (caps); } @@ -189,36 +200,14 @@ GST_END_TEST; static Suite * -videobalance_suite (void) +videofilter_suite (void) { - Suite *s = suite_create ("videobalance"); + Suite *s = suite_create ("videofilter"); TCase *tc_chain = tcase_create ("general"); suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_videobalance); - - return s; -} - -static Suite * -videoflip_suite (void) -{ - Suite *s = suite_create ("videoflip"); - TCase *tc_chain = tcase_create ("general"); - - suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_videoflip); - - return s; -} - -static Suite * -gamma_suite (void) -{ - Suite *s = suite_create ("gamma"); - TCase *tc_chain = tcase_create ("general"); - - suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_gamma); return s; @@ -229,12 +218,9 @@ main (int argc, char **argv) { int nf; - Suite *s = videobalance_suite (); + Suite *s = videofilter_suite (); SRunner *sr = srunner_create (s); - srunner_add_suite (sr, videoflip_suite ()); - srunner_add_suite (sr, gamma_suite ()); - gst_check_init (&argc, &argv); srunner_run_all (sr, CK_NORMAL);