testsuite/caps/caps.c: A check for appending

Original commit message from CVS:
* testsuite/caps/caps.c: (test3), (main): A check for appending
ANY caps.
This commit is contained in:
David Schleef 2004-05-08 01:41:12 +00:00
parent ac77bfe982
commit 28942dc4ed
4 changed files with 44 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2004-05-07 David Schleef <ds@schleef.org>
* testsuite/caps/caps.c: (test3), (main): A check for appending
ANY caps.
2004-05-07 David Schleef <ds@schleef.org> 2004-05-07 David Schleef <ds@schleef.org>
* common/m4/as-compiler-flag.m4: Properly quote arguments, * common/m4/as-compiler-flag.m4: Properly quote arguments,

2
common

@ -1 +1 @@
Subproject commit 95ba8839c03a7f8939a2ae4b0586b012e929fc84 Subproject commit 5f51018de093a26d447de03e1ec6dd0377fc4c77

View file

@ -128,6 +128,24 @@ test2 (void)
} }
void
test3 (void)
{
GstCaps *caps1;
GstCaps *caps2;
caps1 = gst_caps_new_any ();
caps2 = gst_caps_new_simple ("audio/raw", NULL);
gst_caps_append (caps1, caps2);
g_print ("%s\n", gst_caps_to_string (caps1));
g_assert (gst_caps_is_any (caps1));
g_assert (gst_caps_get_size (caps1) == 0);
gst_caps_free (caps1);
}
int int
main (int argc, char *argv[]) main (int argc, char *argv[])
{ {
@ -135,6 +153,7 @@ main (int argc, char *argv[])
test1 (); test1 ();
test2 (); test2 ();
test3 ();
return 0; return 0;
} }

View file

@ -128,6 +128,24 @@ test2 (void)
} }
void
test3 (void)
{
GstCaps *caps1;
GstCaps *caps2;
caps1 = gst_caps_new_any ();
caps2 = gst_caps_new_simple ("audio/raw", NULL);
gst_caps_append (caps1, caps2);
g_print ("%s\n", gst_caps_to_string (caps1));
g_assert (gst_caps_is_any (caps1));
g_assert (gst_caps_get_size (caps1) == 0);
gst_caps_free (caps1);
}
int int
main (int argc, char *argv[]) main (int argc, char *argv[])
{ {
@ -135,6 +153,7 @@ main (int argc, char *argv[])
test1 (); test1 ();
test2 (); test2 ();
test3 ();
return 0; return 0;
} }