tests: check return value of gst_queue_array_drop_element() too

Was added when the API was made public in git master.

https://bugzilla.gnome.org/show_bug.cgi?id=692691
This commit is contained in:
Tim-Philipp Müller 2013-01-30 11:34:15 +00:00
parent bc397c780c
commit 8ea19a48ce

View file

@ -229,10 +229,13 @@ GST_START_TEST (test_array_drop2)
while (gst_queue_array_get_length (array) > 0) { while (gst_queue_array_get_length (array) > 0) {
for (i = 0; i < NUM_QA_ELEMENTS; i++) { for (i = 0; i < NUM_QA_ELEMENTS; i++) {
gpointer dropped;
if (g_random_boolean () && g_random_boolean () && in_array[i]) { if (g_random_boolean () && g_random_boolean () && in_array[i]) {
idx = gst_queue_array_find (array, compare_pointer_value, idx = gst_queue_array_find (array, compare_pointer_value,
GUINT_TO_POINTER (i)); GUINT_TO_POINTER (i));
gst_queue_array_drop_element (array, idx); dropped = gst_queue_array_drop_element (array, idx);
fail_unless_equals_int (i, GPOINTER_TO_INT (dropped));
in_array[i] = FALSE; in_array[i] = FALSE;
} }
} }