mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 02:55:14 +00:00
caps: Add unit test for GST_CAPS_{ANY,NONE} and GST_STATIC_CAPS_{ANY,NONE}
https://bugzilla.gnome.org/show_bug.cgi?id=696435
This commit is contained in:
parent
7decc9bef7
commit
7b00fd3701
1 changed files with 10 additions and 0 deletions
|
@ -103,6 +103,8 @@ GST_START_TEST (test_static_caps)
|
|||
static GstStaticCaps scaps = GST_STATIC_CAPS ("audio/x-raw,rate=44100");
|
||||
GstCaps *caps1;
|
||||
GstCaps *caps2;
|
||||
static GstStaticCaps sany = GST_STATIC_CAPS_ANY;
|
||||
static GstStaticCaps snone = GST_STATIC_CAPS_NONE;
|
||||
|
||||
/* caps creation */
|
||||
caps1 = gst_static_caps_get (&scaps);
|
||||
|
@ -120,6 +122,14 @@ GST_START_TEST (test_static_caps)
|
|||
|
||||
gst_caps_unref (caps1);
|
||||
gst_caps_unref (caps2);
|
||||
|
||||
caps1 = gst_static_caps_get (&sany);
|
||||
fail_unless (gst_caps_is_equal (caps1, GST_CAPS_ANY));
|
||||
caps2 = gst_static_caps_get (&snone);
|
||||
fail_unless (gst_caps_is_equal (caps2, GST_CAPS_NONE));
|
||||
fail_if (gst_caps_is_equal (caps1, caps2));
|
||||
gst_caps_unref (caps1);
|
||||
gst_caps_unref (caps2);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
|
Loading…
Reference in a new issue