Skip to content
Snippets Groups Projects
Commit c4ce6a4f authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

caps: Add unit test for GST_CAPS_{ANY,NONE} and GST_STATIC_CAPS_{ANY,NONE}

https://bugzilla.gnome.org/show_bug.cgi?id=696435
parent c942fb38
No related branches found
No related tags found
No related merge requests found
...@@ -103,6 +103,8 @@ GST_START_TEST (test_static_caps) ...@@ -103,6 +103,8 @@ GST_START_TEST (test_static_caps)
static GstStaticCaps scaps = GST_STATIC_CAPS ("audio/x-raw,rate=44100"); static GstStaticCaps scaps = GST_STATIC_CAPS ("audio/x-raw,rate=44100");
GstCaps *caps1; GstCaps *caps1;
GstCaps *caps2; GstCaps *caps2;
static GstStaticCaps sany = GST_STATIC_CAPS_ANY;
static GstStaticCaps snone = GST_STATIC_CAPS_NONE;
/* caps creation */ /* caps creation */
caps1 = gst_static_caps_get (&scaps); caps1 = gst_static_caps_get (&scaps);
...@@ -120,6 +122,14 @@ GST_START_TEST (test_static_caps) ...@@ -120,6 +122,14 @@ GST_START_TEST (test_static_caps)
gst_caps_unref (caps1); gst_caps_unref (caps1);
gst_caps_unref (caps2); 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; GST_END_TEST;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment