mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +00:00
tests: add unit test for gst_caps_is_any() and _is_empty()
https://bugzilla.gnome.org//show_bug.cgi?id=731704
This commit is contained in:
parent
8e30a9462c
commit
39b69d27da
1 changed files with 21 additions and 0 deletions
|
@ -1133,6 +1133,26 @@ GST_START_TEST (test_features)
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
|
GST_START_TEST (test_special_caps)
|
||||||
|
{
|
||||||
|
GstCaps *caps;
|
||||||
|
|
||||||
|
caps = gst_caps_new_any ();
|
||||||
|
fail_unless (gst_caps_is_any (caps));
|
||||||
|
fail_unless (gst_caps_is_any (caps) == TRUE);
|
||||||
|
fail_if (gst_caps_is_empty (caps));
|
||||||
|
fail_unless (gst_caps_is_empty (caps) == FALSE);
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
|
caps = gst_caps_new_empty ();
|
||||||
|
fail_if (gst_caps_is_any (caps));
|
||||||
|
fail_unless (gst_caps_is_any (caps) == FALSE);
|
||||||
|
fail_unless (gst_caps_is_empty (caps));
|
||||||
|
fail_unless (gst_caps_is_empty (caps) == TRUE);
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
}
|
||||||
|
|
||||||
|
GST_END_TEST;
|
||||||
static Suite *
|
static Suite *
|
||||||
gst_caps_suite (void)
|
gst_caps_suite (void)
|
||||||
{
|
{
|
||||||
|
@ -1161,6 +1181,7 @@ gst_caps_suite (void)
|
||||||
tcase_add_test (tc_chain, test_normalize);
|
tcase_add_test (tc_chain, test_normalize);
|
||||||
tcase_add_test (tc_chain, test_broken);
|
tcase_add_test (tc_chain, test_broken);
|
||||||
tcase_add_test (tc_chain, test_features);
|
tcase_add_test (tc_chain, test_features);
|
||||||
|
tcase_add_test (tc_chain, test_special_caps);
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue