[gtk/image-loading: 18/18] Add tests for the jpeg loader
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/image-loading: 18/18] Add tests for the jpeg loader
- Date: Mon, 13 Sep 2021 02:29:46 +0000 (UTC)
commit 7ed91bb71d8d0d169e7b65ed86331a98646d432b
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Sep 11 23:28:06 2021 -0400
Add tests for the jpeg loader
testsuite/gdk/image-data/image.jpeg | Bin 0 -> 8397 bytes
testsuite/gdk/image.c | 4 ++++
2 files changed, 4 insertions(+)
---
diff --git a/testsuite/gdk/image-data/image.jpeg b/testsuite/gdk/image-data/image.jpeg
new file mode 100644
index 0000000000..53ebb349bc
Binary files /dev/null and b/testsuite/gdk/image-data/image.jpeg differ
diff --git a/testsuite/gdk/image.c b/testsuite/gdk/image.c
index 62e225532a..629fee8ff5 100644
--- a/testsuite/gdk/image.c
+++ b/testsuite/gdk/image.c
@@ -1,6 +1,7 @@
#include <gtk/gtk.h>
#include "gdk/loaders/gdkpngprivate.h"
#include "gdk/loaders/gdktiffprivate.h"
+#include "gdk/loaders/gdkjpegprivate.h"
static void
assert_texture_equal (GdkTexture *t1,
@@ -50,6 +51,8 @@ test_load_image (gconstpointer data)
texture = gdk_load_png (bytes, &error);
else if (g_str_has_suffix (filename, ".tiff"))
texture = gdk_load_tiff (bytes, &error);
+ else if (g_str_has_suffix (filename, ".jpeg"))
+ texture = gdk_load_jpeg (bytes, &error);
else
g_assert_not_reached ();
@@ -117,6 +120,7 @@ main (int argc, char *argv[])
g_test_add_data_func ("/image/load/png", "image.png", test_load_image);
g_test_add_data_func ("/image/load/tiff", "image.tiff", test_load_image);
+ g_test_add_data_func ("/image/load/jpeg", "image.jpeg", test_load_image);
g_test_add_data_func ("/image/save/png", "image.png", test_save_image);
g_test_add_data_func ("/image/save/tiff", "image.tiff", test_save_image);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]