mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
glimagesink: properly setup/teardown tests
tcase_add_checked_fixture() is suppose to call the setup and teardown functions so the tests don't have to do it manually. https://bugzilla.gnome.org/show_bug.cgi?id=766663
This commit is contained in:
parent
6a02c8a109
commit
e071510b12
1 changed files with 1 additions and 5 deletions
|
@ -116,8 +116,6 @@ GST_START_TEST (test_query_drain)
|
||||||
loop = g_main_loop_new (NULL, FALSE);
|
loop = g_main_loop_new (NULL, FALSE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
setup_glimagesink ();
|
|
||||||
|
|
||||||
/* GstBaseSink handles the drain query as well. */
|
/* GstBaseSink handles the drain query as well. */
|
||||||
g_object_set (sinkelement, "enable-last-sample", TRUE, NULL);
|
g_object_set (sinkelement, "enable-last-sample", TRUE, NULL);
|
||||||
|
|
||||||
|
@ -210,8 +208,6 @@ GST_START_TEST (test_query_drain)
|
||||||
fail_unless (gst_buffer_pool_set_active (pool, FALSE));
|
fail_unless (gst_buffer_pool_set_active (pool, FALSE));
|
||||||
gst_object_unref (pool);
|
gst_object_unref (pool);
|
||||||
|
|
||||||
cleanup_glimagesink ();
|
|
||||||
|
|
||||||
if (loop)
|
if (loop)
|
||||||
g_main_loop_unref (loop);
|
g_main_loop_unref (loop);
|
||||||
}
|
}
|
||||||
|
@ -226,7 +222,7 @@ glimagesink_suite (void)
|
||||||
|
|
||||||
tcase_set_timeout (tc, 5);
|
tcase_set_timeout (tc, 5);
|
||||||
|
|
||||||
tcase_add_checked_fixture (tc, setup_glimagesink, NULL);
|
tcase_add_checked_fixture (tc, setup_glimagesink, cleanup_glimagesink);
|
||||||
tcase_add_test (tc, test_query_drain);
|
tcase_add_test (tc, test_query_drain);
|
||||||
suite_add_tcase (s, tc);
|
suite_add_tcase (s, tc);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue