mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
added name test
Original commit message from CVS: added name test
This commit is contained in:
parent
130adf2b93
commit
35beb0b388
4 changed files with 62 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
testprogs = tee fake
|
||||
testprogs = tee fake name
|
||||
|
||||
TESTS = $(testprogs)
|
||||
|
||||
|
|
30
tests/old/testsuite/elements/name.c
Normal file
30
tests/old/testsuite/elements/name.c
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* test with names
|
||||
* create a bunch of elements with NULL as name
|
||||
* make sure they get created with a decent name
|
||||
*/
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GstElement *element = NULL;
|
||||
int i = 0;
|
||||
|
||||
/* init */
|
||||
gst_init (&argc, &argv);
|
||||
|
||||
for (i = 0; i < 50; ++i)
|
||||
{
|
||||
/* create element */
|
||||
element = gst_element_factory_make ("identity", NULL);
|
||||
g_assert (GST_IS_ELEMENT (element));
|
||||
g_assert (gst_element_get_name (element) != NULL);
|
||||
g_print ("Created identity element with name %s\n",
|
||||
gst_element_get_name (element));
|
||||
}
|
||||
g_print ("Done !\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
testprogs = tee fake
|
||||
testprogs = tee fake name
|
||||
|
||||
TESTS = $(testprogs)
|
||||
|
||||
|
|
30
testsuite/elements/name.c
Normal file
30
testsuite/elements/name.c
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* test with names
|
||||
* create a bunch of elements with NULL as name
|
||||
* make sure they get created with a decent name
|
||||
*/
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GstElement *element = NULL;
|
||||
int i = 0;
|
||||
|
||||
/* init */
|
||||
gst_init (&argc, &argv);
|
||||
|
||||
for (i = 0; i < 50; ++i)
|
||||
{
|
||||
/* create element */
|
||||
element = gst_element_factory_make ("identity", NULL);
|
||||
g_assert (GST_IS_ELEMENT (element));
|
||||
g_assert (gst_element_get_name (element) != NULL);
|
||||
g_print ("Created identity element with name %s\n",
|
||||
gst_element_get_name (element));
|
||||
}
|
||||
g_print ("Done !\n");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in a new issue