2 * Copyright (C) 2005 Andy Wingo <wingo@pobox.com>
3 * Copyright (C) <2005> Thomas Vander Stichele <thomas at apestaart dot org>
5 * gstcaps.c: Unit test for GstCaps
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
24 #include <gst/check/gstcheck.h>
25 #include <gst/gstcaps.h>
28 GST_START_TEST (test_from_string)
35 for (i = 0; i < G_N_ELEMENTS (caps_list); i++) {
36 caps = gst_caps_from_string (caps_list[i]);
37 fail_if (caps == NULL,
38 "Could not create caps from string %s\n", caps_list[i]);
39 to_str = gst_caps_to_string (caps);
40 fail_if (to_str == NULL,
41 "Could not convert caps back to string %s\n", caps_list[i]);
42 caps2 = gst_caps_from_string (caps_list[i]);
43 fail_if (caps2 == NULL, "Could not create caps from string %s\n", to_str);
45 fail_unless (gst_caps_is_equal (caps, caps));
46 fail_unless (gst_caps_is_equal (caps, caps2));
48 gst_caps_unref (caps);
49 gst_caps_unref (caps2);
56 GST_START_TEST (test_buffer)
61 buffer = gst_buffer_new_and_alloc (1000);
62 c1 = gst_caps_new_simple ("audio/x-raw-int",
63 "buffer", GST_TYPE_BUFFER, buffer, NULL);
65 GST_DEBUG ("caps: %" GST_PTR_FORMAT, c1);
66 gst_buffer_unref (buffer);
68 buffer = gst_buffer_new_and_alloc (1000);
69 gst_buffer_set_caps (buffer, c1); /* doesn't give away our c1 ref */
72 gst_buffer_unref (buffer); /* Should now drop both references */
77 GST_START_TEST (test_double_append)
82 c1 = gst_caps_new_any ();
83 s1 = gst_structure_from_string ("audio/x-raw-int,rate=44100", NULL);
84 gst_caps_append_structure (c1, s1);
85 ASSERT_CRITICAL (gst_caps_append_structure (c1, s1));
92 GST_START_TEST (test_mutability)
98 c1 = gst_caps_new_any ();
99 s1 = gst_structure_from_string ("audio/x-raw-int,rate=44100", NULL);
100 gst_structure_set (s1, "rate", G_TYPE_INT, 48000, NULL);
101 gst_caps_append_structure (c1, s1);
102 gst_structure_set (s1, "rate", G_TYPE_INT, 22500, NULL);
104 ASSERT_CRITICAL (gst_structure_set (s1, "rate", G_TYPE_INT, 11250, NULL));
105 fail_unless (gst_structure_get_int (s1, "rate", &ret));
106 fail_unless (ret == 22500);
107 ASSERT_CRITICAL (gst_caps_set_simple (c1, "rate", G_TYPE_INT, 11250, NULL));
108 fail_unless (gst_structure_get_int (s1, "rate", &ret));
109 fail_unless (ret == 22500);
111 gst_structure_set (s1, "rate", G_TYPE_INT, 11250, NULL);
112 fail_unless (gst_structure_get_int (s1, "rate", &ret));
113 fail_unless (ret == 11250);
114 gst_caps_set_simple (c1, "rate", G_TYPE_INT, 1, NULL);
115 fail_unless (gst_structure_get_int (s1, "rate", &ret));
116 fail_unless (ret == 1);
122 GST_START_TEST (test_static_caps)
124 static GstStaticCaps scaps = GST_STATIC_CAPS ("audio/x-raw-int,rate=44100");
129 caps1 = gst_static_caps_get (&scaps);
130 fail_unless (caps1 != NULL);
131 /* 1 refcount core, one from us */
132 fail_unless (GST_CAPS_REFCOUNT (caps1) == 2);
134 /* caps should be the same */
135 caps2 = gst_static_caps_get (&scaps);
136 fail_unless (caps2 != NULL);
137 /* 1 refcount core, two from us */
138 fail_unless (GST_CAPS_REFCOUNT (caps1) == 3);
139 /* caps must be equal */
140 fail_unless (caps1 == caps2);
142 gst_caps_unref (caps1);
143 gst_caps_unref (caps2);
148 static const gchar non_simple_caps_string[] =
149 "video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)[ 1/100, 100 ], "
150 "width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-raw-yuv, "
151 "format=(fourcc)YUY2, framerate=(fraction)[ 1/100, 100 ], width=(int)[ 16, 4096 ], "
152 "height=(int)[ 16, 4096 ]; video/x-raw-rgb, bpp=(int)8, depth=(int)8, "
153 "endianness=(int)1234, framerate=(fraction)[ 1/100, 100 ], width=(int)[ 16, 4096 ], "
154 "height=(int)[ 16, 4096 ]; video/x-raw-yuv, "
155 "format=(fourcc){ I420, YUY2, YV12 }, width=(int)[ 16, 4096 ], "
156 "height=(int)[ 16, 4096 ], framerate=(fraction)[ 1/100, 100 ]";
159 check_fourcc_list (const GValue * format_value)
161 const GValue *fourcc_value;
162 gboolean got_yv12 = FALSE;
163 gboolean got_i420 = FALSE;
164 gboolean got_yuy2 = FALSE;
167 fourcc_value = gst_value_list_get_value (format_value, 0);
168 fail_unless (fourcc_value != NULL);
169 fail_unless (GST_VALUE_HOLDS_FOURCC (fourcc_value));
170 fourcc = gst_value_get_fourcc (fourcc_value);
171 fail_unless (fourcc != 0);
172 got_i420 = got_i420 || (fourcc == GST_STR_FOURCC ("I420"));
173 got_yuy2 = got_yuy2 || (fourcc == GST_STR_FOURCC ("YUY2"));
174 got_yv12 = got_yv12 || (fourcc == GST_STR_FOURCC ("YV12"));
176 fourcc_value = gst_value_list_get_value (format_value, 1);
177 fail_unless (fourcc_value != NULL);
178 fail_unless (GST_VALUE_HOLDS_FOURCC (fourcc_value));
179 fourcc = gst_value_get_fourcc (fourcc_value);
180 fail_unless (fourcc != 0);
181 got_i420 = got_i420 || (fourcc == GST_STR_FOURCC ("I420"));
182 got_yuy2 = got_yuy2 || (fourcc == GST_STR_FOURCC ("YUY2"));
183 got_yv12 = got_yv12 || (fourcc == GST_STR_FOURCC ("YV12"));
185 fourcc_value = gst_value_list_get_value (format_value, 2);
186 fail_unless (fourcc_value != NULL);
187 fail_unless (GST_VALUE_HOLDS_FOURCC (fourcc_value));
188 fourcc = gst_value_get_fourcc (fourcc_value);
189 fail_unless (fourcc != 0);
190 got_i420 = got_i420 || (fourcc == GST_STR_FOURCC ("I420"));
191 got_yuy2 = got_yuy2 || (fourcc == GST_STR_FOURCC ("YUY2"));
192 got_yv12 = got_yv12 || (fourcc == GST_STR_FOURCC ("YV12"));
194 return (got_i420 && got_yuy2 && got_yv12);
197 GST_START_TEST (test_simplify)
199 GstStructure *s1, *s2;
200 gboolean did_simplify;
203 caps = gst_caps_from_string (non_simple_caps_string);
204 fail_unless (caps != NULL,
205 "gst_caps_from_string (non_simple_caps_string) failed");
207 did_simplify = gst_caps_do_simplify (caps);
208 fail_unless (did_simplify == TRUE,
209 "gst_caps_do_simplify() should have worked");
211 /* check simplified caps, should be:
213 * video/x-raw-rgb, bpp=(int)8, depth=(int)8, endianness=(int)1234,
214 * framerate=(fraction)[ 1/100, 100 ], width=(int)[ 16, 4096 ],
215 * height=(int)[ 16, 4096 ];
216 * video/x-raw-yuv, format=(fourcc){ YV12, YUY2, I420 },
217 * width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ],
218 * framerate=(fraction)[ 1/100, 100 ]
220 fail_unless (gst_caps_get_size (caps) == 2);
221 s1 = gst_caps_get_structure (caps, 0);
222 s2 = gst_caps_get_structure (caps, 1);
223 fail_unless (s1 != NULL);
224 fail_unless (s2 != NULL);
226 if (!gst_structure_has_name (s1, "video/x-raw-rgb")) {
234 fail_unless (gst_structure_has_name (s1, "video/x-raw-rgb"));
236 const GValue *framerate_value;
237 const GValue *width_value;
238 const GValue *height_value;
239 const GValue *val_fps;
240 GValue test_fps = { 0, };
241 gint bpp, depth, endianness;
242 gint min_width, max_width;
243 gint min_height, max_height;
245 fail_unless (gst_structure_get_int (s1, "bpp", &bpp));
246 fail_unless (bpp == 8);
248 fail_unless (gst_structure_get_int (s1, "depth", &depth));
249 fail_unless (depth == 8);
251 fail_unless (gst_structure_get_int (s1, "endianness", &endianness));
252 fail_unless (endianness == G_LITTLE_ENDIAN);
254 g_value_init (&test_fps, GST_TYPE_FRACTION);
255 framerate_value = gst_structure_get_value (s1, "framerate");
256 fail_unless (framerate_value != NULL);
257 fail_unless (GST_VALUE_HOLDS_FRACTION_RANGE (framerate_value));
259 val_fps = gst_value_get_fraction_range_min (framerate_value);
260 gst_value_set_fraction (&test_fps, 1, 100);
261 fail_unless (gst_value_compare (&test_fps, val_fps) == GST_VALUE_EQUAL);
263 val_fps = gst_value_get_fraction_range_max (framerate_value);
264 gst_value_set_fraction (&test_fps, 100, 1);
265 fail_unless (gst_value_compare (&test_fps, val_fps) == GST_VALUE_EQUAL);
267 g_value_unset (&test_fps);
269 width_value = gst_structure_get_value (s1, "width");
270 fail_unless (width_value != NULL);
271 fail_unless (GST_VALUE_HOLDS_INT_RANGE (width_value));
272 min_width = gst_value_get_int_range_min (width_value);
273 max_width = gst_value_get_int_range_max (width_value);
274 fail_unless (min_width == 16 && max_width == 4096);
276 height_value = gst_structure_get_value (s1, "height");
277 fail_unless (height_value != NULL);
278 fail_unless (GST_VALUE_HOLDS_INT_RANGE (height_value));
279 min_height = gst_value_get_int_range_min (height_value);
280 max_height = gst_value_get_int_range_max (height_value);
281 fail_unless (min_height == 16 && max_height == 4096);
284 fail_unless (gst_structure_has_name (s2, "video/x-raw-yuv"));
286 const GValue *framerate_value;
287 const GValue *format_value;
288 const GValue *width_value;
289 const GValue *height_value;
290 const GValue *val_fps;
291 GValue test_fps = { 0, };
292 gint min_width, max_width;
293 gint min_height, max_height;
295 format_value = gst_structure_get_value (s2, "format");
296 fail_unless (format_value != NULL);
297 fail_unless (GST_VALUE_HOLDS_LIST (format_value));
298 fail_unless (gst_value_list_get_size (format_value) == 3);
299 fail_unless (check_fourcc_list (format_value) == TRUE);
301 g_value_init (&test_fps, GST_TYPE_FRACTION);
302 framerate_value = gst_structure_get_value (s2, "framerate");
303 fail_unless (framerate_value != NULL);
304 fail_unless (GST_VALUE_HOLDS_FRACTION_RANGE (framerate_value));
306 val_fps = gst_value_get_fraction_range_min (framerate_value);
307 gst_value_set_fraction (&test_fps, 1, 100);
308 fail_unless (gst_value_compare (&test_fps, val_fps) == GST_VALUE_EQUAL);
310 val_fps = gst_value_get_fraction_range_max (framerate_value);
311 gst_value_set_fraction (&test_fps, 100, 1);
312 fail_unless (gst_value_compare (&test_fps, val_fps) == GST_VALUE_EQUAL);
314 g_value_unset (&test_fps);
316 width_value = gst_structure_get_value (s2, "width");
317 fail_unless (width_value != NULL);
318 fail_unless (GST_VALUE_HOLDS_INT_RANGE (width_value));
319 min_width = gst_value_get_int_range_min (width_value);
320 max_width = gst_value_get_int_range_max (width_value);
321 fail_unless (min_width == 16 && max_width == 4096);
323 height_value = gst_structure_get_value (s2, "height");
324 fail_unless (height_value != NULL);
325 fail_unless (GST_VALUE_HOLDS_INT_RANGE (height_value));
326 min_height = gst_value_get_int_range_min (height_value);
327 max_height = gst_value_get_int_range_max (height_value);
328 fail_unless (min_height == 16 && max_height == 4096);
331 gst_caps_unref (caps);
336 GST_START_TEST (test_truncate)
340 caps = gst_caps_from_string (non_simple_caps_string);
341 fail_unless (caps != NULL,
342 "gst_caps_from_string (non_simple_caps_string) failed");
343 fail_unless_equals_int (gst_caps_get_size (caps), 4);
344 gst_caps_truncate (caps);
345 fail_unless_equals_int (gst_caps_get_size (caps), 1);
346 gst_caps_unref (caps);
351 GST_START_TEST (test_merge_fundamental)
355 /* ANY + specific = ANY */
356 c1 = gst_caps_from_string ("audio/x-raw-int,rate=44100");
357 c2 = gst_caps_new_any ();
358 gst_caps_merge (c2, c1);
359 GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
360 fail_unless (gst_caps_get_size (c2) == 0, NULL);
361 fail_unless (gst_caps_is_any (c2), NULL);
364 /* specific + ANY = ANY */
365 c2 = gst_caps_from_string ("audio/x-raw-int,rate=44100");
366 c1 = gst_caps_new_any ();
367 gst_caps_merge (c2, c1);
368 GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
369 fail_unless (gst_caps_get_size (c2) == 0, NULL);
370 fail_unless (gst_caps_is_any (c2), NULL);
373 /* EMPTY + specific = specific */
374 c1 = gst_caps_from_string ("audio/x-raw-int,rate=44100");
375 c2 = gst_caps_new_empty ();
376 gst_caps_merge (c2, c1);
377 GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
378 fail_unless (gst_caps_get_size (c2) == 1, NULL);
379 fail_if (gst_caps_is_empty (c2), NULL);
382 /* specific + EMPTY = specific */
383 c2 = gst_caps_from_string ("audio/x-raw-int,rate=44100");
384 c1 = gst_caps_new_empty ();
385 gst_caps_merge (c2, c1);
386 GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
387 fail_unless (gst_caps_get_size (c2) == 1, NULL);
388 fail_if (gst_caps_is_empty (c2), NULL);
394 GST_START_TEST (test_merge_same)
398 /* this is the same */
399 c1 = gst_caps_from_string ("audio/x-raw-int,rate=44100,channels=1");
400 c2 = gst_caps_from_string ("audio/x-raw-int,rate=44100,channels=1");
401 gst_caps_merge (c2, c1);
402 GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
403 fail_unless (gst_caps_get_size (c2) == 1, NULL);
407 c1 = gst_caps_from_string ("audio/x-raw-int,rate=44100,channels=1");
408 c2 = gst_caps_from_string ("audio/x-raw-int,channels=1,rate=44100");
409 gst_caps_merge (c2, c1);
410 GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
411 fail_unless (gst_caps_get_size (c2) == 1, NULL);
414 c1 = gst_caps_from_string ("video/x-foo, data=(buffer)AA");
415 c2 = gst_caps_from_string ("video/x-foo, data=(buffer)AABB");
416 gst_caps_merge (c2, c1);
417 GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
418 fail_unless (gst_caps_get_size (c2) == 2, NULL);
421 c1 = gst_caps_from_string ("video/x-foo, data=(buffer)AABB");
422 c2 = gst_caps_from_string ("video/x-foo, data=(buffer)AA");
423 gst_caps_merge (c2, c1);
424 GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
425 fail_unless (gst_caps_get_size (c2) == 2, NULL);
428 c1 = gst_caps_from_string ("video/x-foo, data=(buffer)AA");
429 c2 = gst_caps_from_string ("video/x-foo, data=(buffer)AA");
430 gst_caps_merge (c2, c1);
431 GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
432 fail_unless (gst_caps_get_size (c2) == 1, NULL);
435 c1 = gst_caps_from_string ("video/x-foo, data=(buffer)AA");
436 c2 = gst_caps_from_string ("video/x-bar, data=(buffer)AA");
437 gst_caps_merge (c2, c1);
438 GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
439 fail_unless (gst_caps_get_size (c2) == 2, NULL);
445 GST_START_TEST (test_merge_subset)
449 /* the 2nd is already covered */
450 c2 = gst_caps_from_string ("audio/x-raw-int,channels=[1,2]");
451 c1 = gst_caps_from_string ("audio/x-raw-int,channels=1");
452 gst_caps_merge (c2, c1);
453 GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
454 fail_unless (gst_caps_get_size (c2) == 1, NULL);
458 c2 = gst_caps_from_string ("audio/x-raw-int,channels=1,rate=44100");
459 c1 = gst_caps_from_string ("audio/x-raw-int,channels=[1,2],rate=44100");
460 gst_caps_merge (c2, c1);
461 GST_DEBUG ("merged: (%d) %" GST_PTR_FORMAT, gst_caps_get_size (c2), c2);
462 fail_unless (gst_caps_get_size (c2) == 2, NULL);
469 GST_START_TEST (test_intersect)
472 GstCaps *c1, *c2, *ci1, *ci2;
474 /* field not specified = any value possible, so the intersection
475 * should keep fields which are only part of one set of caps */
476 c2 = gst_caps_from_string ("video/x-raw-yuv,format=(fourcc)I420,width=20");
477 c1 = gst_caps_from_string ("video/x-raw-yuv,format=(fourcc)I420");
479 ci1 = gst_caps_intersect (c2, c1);
480 GST_DEBUG ("intersected: %" GST_PTR_FORMAT, ci1);
481 fail_unless (gst_caps_get_size (ci1) == 1, NULL);
482 s = gst_caps_get_structure (ci1, 0);
483 fail_unless (gst_structure_has_name (s, "video/x-raw-yuv"));
484 fail_unless (gst_structure_get_value (s, "format") != NULL);
485 fail_unless (gst_structure_get_value (s, "width") != NULL);
487 /* with changed order */
488 ci2 = gst_caps_intersect (c1, c2);
489 GST_DEBUG ("intersected: %" GST_PTR_FORMAT, ci2);
490 fail_unless (gst_caps_get_size (ci2) == 1, NULL);
491 s = gst_caps_get_structure (ci2, 0);
492 fail_unless (gst_structure_has_name (s, "video/x-raw-yuv"));
493 fail_unless (gst_structure_get_value (s, "format") != NULL);
494 fail_unless (gst_structure_get_value (s, "width") != NULL);
496 fail_unless (gst_caps_is_equal (ci1, ci2));
498 gst_caps_unref (ci1);
499 gst_caps_unref (ci2);
506 c2 = gst_caps_from_string ("video/x-raw-yuv,format=(fourcc)I420,width=20");
507 c1 = gst_caps_from_string ("video/x-raw-yuv,format=(fourcc)I420,width=30");
509 ci1 = gst_caps_intersect (c2, c1);
510 GST_DEBUG ("intersected: %" GST_PTR_FORMAT, ci1);
511 fail_unless (gst_caps_is_empty (ci1), NULL);
513 /* with changed order */
514 ci2 = gst_caps_intersect (c1, c2);
515 GST_DEBUG ("intersected: %" GST_PTR_FORMAT, ci2);
516 fail_unless (gst_caps_is_empty (ci2), NULL);
518 fail_unless (gst_caps_is_equal (ci1, ci2));
520 gst_caps_unref (ci1);
521 gst_caps_unref (ci2);
528 c2 = gst_caps_from_string ("video/x-raw-yuv,format=(fourcc)I420,width=20");
529 c1 = gst_caps_from_string ("video/x-raw-rgb,format=(fourcc)I420,width=20");
531 ci1 = gst_caps_intersect (c2, c1);
532 GST_DEBUG ("intersected: %" GST_PTR_FORMAT, ci1);
533 fail_unless (gst_caps_is_empty (ci1), NULL);
535 /* with changed order */
536 ci2 = gst_caps_intersect (c1, c2);
537 GST_DEBUG ("intersected: %" GST_PTR_FORMAT, ci2);
538 fail_unless (gst_caps_is_empty (ci2), NULL);
540 fail_unless (gst_caps_is_equal (ci1, ci2));
542 gst_caps_unref (ci1);
543 gst_caps_unref (ci2);
550 c2 = gst_caps_from_string ("video/x-raw-yuv,format=(fourcc)I420,width=20");
551 c1 = gst_caps_from_string ("video/x-raw-yuv,format=(fourcc)I420,height=30");
553 ci1 = gst_caps_intersect (c2, c1);
554 GST_DEBUG ("intersected: %" GST_PTR_FORMAT, ci1);
555 fail_unless (gst_caps_get_size (ci1) == 1, NULL);
556 s = gst_caps_get_structure (ci1, 0);
557 fail_unless (gst_structure_has_name (s, "video/x-raw-yuv"));
558 fail_unless (gst_structure_get_value (s, "format") != NULL);
559 fail_unless (gst_structure_get_value (s, "width") != NULL);
560 fail_unless (gst_structure_get_value (s, "height") != NULL);
562 /* with changed order */
563 ci2 = gst_caps_intersect (c1, c2);
564 GST_DEBUG ("intersected: %" GST_PTR_FORMAT, ci2);
565 fail_unless (gst_caps_get_size (ci2) == 1, NULL);
566 s = gst_caps_get_structure (ci2, 0);
567 fail_unless (gst_structure_has_name (s, "video/x-raw-yuv"));
568 fail_unless (gst_structure_get_value (s, "format") != NULL);
569 fail_unless (gst_structure_get_value (s, "height") != NULL);
570 fail_unless (gst_structure_get_value (s, "width") != NULL);
572 fail_unless (gst_caps_is_equal (ci1, ci2));
574 gst_caps_unref (ci1);
575 gst_caps_unref (ci2);
584 gst_caps_suite (void)
586 Suite *s = suite_create ("GstCaps");
587 TCase *tc_chain = tcase_create ("mutability");
589 suite_add_tcase (s, tc_chain);
590 tcase_add_test (tc_chain, test_from_string);
591 tcase_add_test (tc_chain, test_double_append);
592 tcase_add_test (tc_chain, test_mutability);
593 tcase_add_test (tc_chain, test_buffer);
594 tcase_add_test (tc_chain, test_static_caps);
595 tcase_add_test (tc_chain, test_simplify);
596 tcase_add_test (tc_chain, test_truncate);
597 tcase_add_test (tc_chain, test_merge_fundamental);
598 tcase_add_test (tc_chain, test_merge_same);
599 tcase_add_test (tc_chain, test_merge_subset);
600 tcase_add_test (tc_chain, test_intersect);
605 GST_CHECK_MAIN (gst_caps);