From eb0d978e1e5ebb408cb24f62a42235832ef23c89 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 2 Oct 2013 13:03:54 +0200 Subject: [PATCH] caps: Add a testcase for subset checks on lists with duplicated items https://bugzilla.gnome.org/show_bug.cgi?id=709253 --- tests/check/gst/gstcaps.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/check/gst/gstcaps.c b/tests/check/gst/gstcaps.c index ca4d59b..044508b 100644 --- a/tests/check/gst/gstcaps.c +++ b/tests/check/gst/gstcaps.c @@ -335,6 +335,20 @@ GST_START_TEST (test_subset) GST_END_TEST; +GST_START_TEST (test_subset_duplication) +{ + GstCaps *c1, *c2; + + c1 = gst_caps_from_string ("audio/x-raw, format=(string)F32LE"); + c2 = gst_caps_from_string ("audio/x-raw, format=(string){ F32LE, F32LE }"); + + fail_unless (gst_caps_is_subset (c1, c2)); + gst_caps_unref (c1); + gst_caps_unref (c2); +} + +GST_END_TEST; + GST_START_TEST (test_merge_fundamental) { GstCaps *c1, *c2; @@ -1097,6 +1111,7 @@ gst_caps_suite (void) tcase_add_test (tc_chain, test_simplify); tcase_add_test (tc_chain, test_truncate); tcase_add_test (tc_chain, test_subset); + tcase_add_test (tc_chain, test_subset_duplication); tcase_add_test (tc_chain, test_merge_fundamental); tcase_add_test (tc_chain, test_merge_same); tcase_add_test (tc_chain, test_merge_subset); -- 2.7.4