From 97103c90b0adadf695f02322ae440a123f7c706d Mon Sep 17 00:00:00 2001 From: Matthieu Bouron Date: Wed, 29 Jan 2014 14:39:19 +0000 Subject: [PATCH] tests: add caps features unit tests https://bugzilla.gnome.org/show_bug.cgi?id=723236 --- 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 4d26462345..92140975c2 100644 --- a/tests/check/gst/gstcaps.c +++ b/tests/check/gst/gstcaps.c @@ -1114,6 +1114,21 @@ GST_START_TEST (test_features) gst_caps_unref (c3); gst_caps_unref (c2); gst_caps_unref (c1); + + c1 = gst_caps_from_string ("video/x-raw"); + c2 = gst_caps_from_string ("video/x-raw"); + + f1 = gst_caps_get_features (c1, 0); + gst_caps_features_add (f1, "memory:VASurface"); + + fail_unless (gst_caps_features_is_equal (f1, gst_caps_get_features (c1, 0))); + + f2 = gst_caps_get_features (c2, 0); + fail_unless (gst_caps_features_is_equal + (GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY, f2)); + + gst_caps_unref (c2); + gst_caps_unref (c1); } GST_END_TEST;