From 8ea19a48ceb35440dacc91b947afe95ccce11df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 30 Jan 2013 11:34:15 +0000 Subject: [PATCH] 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 --- tests/check/libs/queuearray.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/check/libs/queuearray.c b/tests/check/libs/queuearray.c index 8844e69cea..0141a11337 100644 --- a/tests/check/libs/queuearray.c +++ b/tests/check/libs/queuearray.c @@ -229,10 +229,13 @@ GST_START_TEST (test_array_drop2) while (gst_queue_array_get_length (array) > 0) { for (i = 0; i < NUM_QA_ELEMENTS; i++) { + gpointer dropped; + if (g_random_boolean () && g_random_boolean () && in_array[i]) { idx = gst_queue_array_find (array, compare_pointer_value, 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; } }