mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-16 21:36:35 +00:00
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:
parent
bc397c780c
commit
8ea19a48ce
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue