summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2013-10-02 13:03:54 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-10-10 12:42:52 +0200
commiteb0d978e1e5ebb408cb24f62a42235832ef23c89 (patch)
tree229b4447766dec3090d7c3b92fc3f723f35e3344
parent0564c1c2b8ad274692ba8358e27fcf00a3b10ce3 (diff)
caps: Add a testcase for subset checks on lists with duplicated items
https://bugzilla.gnome.org/show_bug.cgi?id=709253
-rw-r--r--tests/check/gst/gstcaps.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/check/gst/gstcaps.c b/tests/check/gst/gstcaps.c
index ca4d59b37..044508bc9 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);