mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
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
This commit is contained in:
parent
f8fa84b087
commit
23b4355665
2 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
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>
|
||||
|
||||
* libs/gst/check/gstcheck.h:
|
||||
|
|
|
@ -471,6 +471,20 @@ GST_START_TEST (test_add_linked)
|
|||
|
||||
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); */
|
||||
|
||||
#define ASSERT_STATE_CHANGE_MSG(bus,element,old_state,new_state,num) \
|
||||
|
@ -804,6 +818,7 @@ gst_bin_suite (void)
|
|||
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_add_linked);
|
||||
tcase_add_test (tc_chain, test_add_self);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue