+GST_START_TEST (test_subset)
+{
+ GstCaps *c1, *c2;
+
+ c1 = gst_caps_from_string ("video/x-raw-yuv; video/x-raw-rgb");
+ c2 = gst_caps_from_string ("video/x-raw-yuv, format=(fourcc)YUY2");
+ fail_unless (gst_caps_is_subset (c2, c1));
+ fail_if (gst_caps_is_subset (c1, c2));
+ gst_caps_unref (c1);
+ gst_caps_unref (c2);
+
+ c1 = gst_caps_from_string
+ ("audio/x-raw-int, channels=(int)[ 1, 2 ], rate=(int)44100");
+ c2 = gst_caps_from_string
+ ("audio/x-raw-int, channels=(int)1, rate=(int)44100");
+ fail_unless (gst_caps_is_subset (c2, c1));
+ fail_if (gst_caps_is_subset (c1, c2));
+ gst_caps_unref (c1);
+ gst_caps_unref (c2);
+}
+
+GST_END_TEST;
+