GitLab will be down for maintenance this Sunday 13th June, from approx 7-11am UTC. This is for a PostgreSQL migration. See the tracker issue for more informations.

Commit 23b43556 authored by Thomas Vander Stichele's avatar Thomas Vander Stichele
Browse files

tests/check/gst/gstbin.c: add a test for adding self

Original commit message from CVS:
* tests/check/gst/gstbin.c: (GST_START_TEST), (gst_bin_suite):
add a test for adding self
parent f8fa84b0
2006-07-03 Thomas Vander Stichele <thomas at apestaart dot org>
* tests/check/gst/gstbin.c: (GST_START_TEST), (gst_bin_suite):
add a test for adding self
2006-07-03 Thomas Vander Stichele <thomas at apestaart dot org> 2006-07-03 Thomas Vander Stichele <thomas at apestaart dot org>
   
* libs/gst/check/gstcheck.h: * libs/gst/check/gstcheck.h:
......
...@@ -471,6 +471,20 @@ GST_START_TEST (test_add_linked) ...@@ -471,6 +471,20 @@ GST_START_TEST (test_add_linked)
GST_END_TEST; GST_END_TEST;
/* adding ourself should fail */
GST_START_TEST (test_add_self)
{
GstElement *bin;
bin = gst_bin_new (NULL);
fail_unless (bin != NULL, "Could not create bin");
ASSERT_WARNING (gst_bin_add (GST_BIN (bin), bin));
}
GST_END_TEST;
/* g_print ("%10s: %4d => %4d\n", GST_OBJECT_NAME (msg->src), old, new); */ /* g_print ("%10s: %4d => %4d\n", GST_OBJECT_NAME (msg->src), old, new); */
#define ASSERT_STATE_CHANGE_MSG(bus,element,old_state,new_state,num) \ #define ASSERT_STATE_CHANGE_MSG(bus,element,old_state,new_state,num) \
...@@ -804,6 +818,7 @@ gst_bin_suite (void) ...@@ -804,6 +818,7 @@ gst_bin_suite (void)
tcase_add_test (tc_chain, test_message_state_changed_children); tcase_add_test (tc_chain, test_message_state_changed_children);
tcase_add_test (tc_chain, test_watch_for_state_change); tcase_add_test (tc_chain, test_watch_for_state_change);
tcase_add_test (tc_chain, test_add_linked); tcase_add_test (tc_chain, test_add_linked);
tcase_add_test (tc_chain, test_add_self);
return s; return s;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment