mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
tests/check/gst/gstcaps.c: Don't leak caps in unit test; add a few more simple checks.
Original commit message from CVS: * tests/check/gst/gstcaps.c: (GST_START_TEST): Don't leak caps in unit test; add a few more simple checks.
This commit is contained in:
parent
fc8d184bba
commit
e8578fd5cf
2 changed files with 35 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-08-24 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* tests/check/gst/gstcaps.c: (GST_START_TEST):
|
||||
Don't leak caps in unit test; add a few more simple
|
||||
checks.
|
||||
|
||||
2006-08-24 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* docs/gst/gstreamer-sections.txt:
|
||||
|
|
|
@ -401,6 +401,7 @@ GST_START_TEST (test_merge_same)
|
|||
gst_caps_merge (c2, c1);
|
||||
GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
|
||||
fail_unless (gst_caps_get_size (c2) == 1, NULL);
|
||||
gst_caps_unref (c2);
|
||||
|
||||
/* and so is this */
|
||||
c1 = gst_caps_from_string ("audio/x-raw-int,rate=44100,channels=1");
|
||||
|
@ -408,7 +409,34 @@ GST_START_TEST (test_merge_same)
|
|||
gst_caps_merge (c2, c1);
|
||||
GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
|
||||
fail_unless (gst_caps_get_size (c2) == 1, NULL);
|
||||
gst_caps_unref (c2);
|
||||
|
||||
c1 = gst_caps_from_string ("video/x-foo, data=(buffer)AA");
|
||||
c2 = gst_caps_from_string ("video/x-foo, data=(buffer)AABB");
|
||||
gst_caps_merge (c2, c1);
|
||||
GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
|
||||
fail_unless (gst_caps_get_size (c2) == 2, NULL);
|
||||
gst_caps_unref (c2);
|
||||
|
||||
c1 = gst_caps_from_string ("video/x-foo, data=(buffer)AABB");
|
||||
c2 = gst_caps_from_string ("video/x-foo, data=(buffer)AA");
|
||||
gst_caps_merge (c2, c1);
|
||||
GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
|
||||
fail_unless (gst_caps_get_size (c2) == 2, NULL);
|
||||
gst_caps_unref (c2);
|
||||
|
||||
c1 = gst_caps_from_string ("video/x-foo, data=(buffer)AA");
|
||||
c2 = gst_caps_from_string ("video/x-foo, data=(buffer)AA");
|
||||
gst_caps_merge (c2, c1);
|
||||
GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
|
||||
fail_unless (gst_caps_get_size (c2) == 1, NULL);
|
||||
gst_caps_unref (c2);
|
||||
|
||||
c1 = gst_caps_from_string ("video/x-foo, data=(buffer)AA");
|
||||
c2 = gst_caps_from_string ("video/x-bar, data=(buffer)AA");
|
||||
gst_caps_merge (c2, c1);
|
||||
GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
|
||||
fail_unless (gst_caps_get_size (c2) == 2, NULL);
|
||||
gst_caps_unref (c2);
|
||||
}
|
||||
|
||||
|
@ -424,6 +452,7 @@ GST_START_TEST (test_merge_subset)
|
|||
gst_caps_merge (c2, c1);
|
||||
GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
|
||||
fail_unless (gst_caps_get_size (c2) == 1, NULL);
|
||||
gst_caps_unref (c2);
|
||||
|
||||
/* here it is not */
|
||||
c2 = gst_caps_from_string ("audio/x-raw-int,channels=1,rate=44100");
|
||||
|
|
Loading…
Reference in a new issue