summaryrefslogtreecommitdiff
path: root/tests/pixbuf-short-gif-write.c
diff options
context:
space:
mode:
authorTobias Mueller <muelli@cryptobitch.de>2017-08-01 23:01:51 +0100
committerTobias Mueller <muelli@cryptobitch.de>2017-08-22 12:12:47 +0200
commit62c498a3432ef0e161dec04e8af6b398ba3bec4b (patch)
treeb3275c91ba1766917fa82179d5c960b95d0b1547 /tests/pixbuf-short-gif-write.c
parent98ebded2cdcb54ea542b9e04773c59783ea7d82c (diff)
downloadgdk-pixbuf-62c498a3432ef0e161dec04e8af6b398ba3bec4b.tar.gz
tests: Allow a potential error to be shown before failing
When the test fails, let's first give it the chance to print the error message in order to help debugging failures. https://bugzilla.gnome.org/show_bug.cgi?id=786259
Diffstat (limited to 'tests/pixbuf-short-gif-write.c')
-rw-r--r--tests/pixbuf-short-gif-write.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/pixbuf-short-gif-write.c b/tests/pixbuf-short-gif-write.c
index 9e7137ab3..82150d992 100644
--- a/tests/pixbuf-short-gif-write.c
+++ b/tests/pixbuf-short-gif-write.c
@@ -16,6 +16,8 @@ loader_write_from_channel (GdkPixbufLoader *loader,
gsize bytes_read = 0;
GIOStatus read_status;
GError* error = NULL;
+ gboolean ret;
+
if(count_bytes < G_MAXSIZE) {
//read no more than 'count_bytes' bytes
buffer = g_malloc (count_bytes);
@@ -26,8 +28,9 @@ loader_write_from_channel (GdkPixbufLoader *loader,
}
g_assert (read_status == G_IO_STATUS_NORMAL || read_status == G_IO_STATUS_EOF);
- g_assert (gdk_pixbuf_loader_write(loader, buffer, bytes_read, &error));
+ ret = gdk_pixbuf_loader_write(loader, buffer, bytes_read, &error);
g_assert_no_error (error);
+ g_assert (ret);
g_free(buffer);
return bytes_read;
}