From c2ec68f0c7c2ed59668b41d82d7dae2de16f001e Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Wed, 31 Oct 2018 18:24:33 +0000 Subject: [PATCH] glupload-test: Don't use gboolean to store enums The unit test makes mixed usage of ret value. Sometimes its does stores an enum and at other moment a boolean. Also fix test using boolean instead of the correct enum value. https://bugzilla.gnome.org/show_bug.cgi?id=783521 --- tests/check/libs/gstglupload.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/check/libs/gstglupload.c b/tests/check/libs/gstglupload.c index 94320b556..fe3efea5c 100644 --- a/tests/check/libs/gstglupload.c +++ b/tests/check/libs/gstglupload.c @@ -264,7 +264,7 @@ GST_START_TEST (test_upload_data) GstCaps *in_caps, *out_caps; GstBuffer *inbuf, *outbuf; GstMapInfo map_info; - gboolean res; + gint res; gint i = 0; in_caps = gst_caps_from_string ("video/x-raw,format=RGBA," @@ -278,7 +278,7 @@ GST_START_TEST (test_upload_data) 0, WIDTH * HEIGHT * 4, NULL, NULL); res = gst_gl_upload_perform_with_buffer (upload, inbuf, &outbuf); - fail_if (res == FALSE, "Failed to upload buffer"); + fail_unless (res == GST_GL_UPLOAD_DONE, "Failed to upload buffer"); fail_unless (GST_IS_BUFFER (outbuf)); res = gst_buffer_map (outbuf, &map_info, GST_MAP_READ | GST_MAP_GL); @@ -319,7 +319,7 @@ GST_START_TEST (test_upload_gl_memory) GstVideoInfo in_info; GstMapInfo map_info; gint i = 0; - gboolean res; + gint res; base_mem_alloc = GST_GL_BASE_MEMORY_ALLOCATOR (gst_allocator_find -- 2.34.1