diff options
author | Matthias Clasen <mclasen@redhat.com> | 2013-06-07 14:56:12 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2013-06-07 14:56:12 -0400 |
commit | 298eaf9ab48fc66bb3c143417cecd664ef4973fc (patch) | |
tree | 38acb38206f10179355f64b633a5750d3a753b06 | |
parent | 570a8f967cb7c315c4f9746a9094b4b1fc9c8611 (diff) | |
download | gdk-pixbuf-298eaf9ab48fc66bb3c143417cecd664ef4973fc.tar.gz |
Add an animation loading test
-rw-r--r-- | tests/Makefile.am | 7 | ||||
-rw-r--r-- | tests/animation.c | 25 | ||||
-rw-r--r-- | tests/test-animation.gif | bin | 0 -> 2177 bytes |
3 files changed, 31 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 196ce79fb..639289e85 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -18,6 +18,7 @@ LDADDS = \ $(GDK_PIXBUF_DEP_LIBS) noinst_PROGRAMS = \ + animation \ pixbuf-read \ pixbuf-lowmem \ pixbuf-randomly-modified \ @@ -25,6 +26,7 @@ noinst_PROGRAMS = \ pixbuf-threads \ pixbuf-icon-serialize +animation_LDADD = $(LDADDS) pixbuf_read_LDADD = $(LDADDS) pixbuf_lowmem_LDADD = $(LDADDS) pixbuf_randomly_modified_LDADD = $(LDADDS) @@ -40,7 +42,10 @@ insttest_PROGRAMS = \ pixbuf-threads \ $(NULL) -insttest_DATA = test-image.png +insttest_DATA = \ + test-image.png \ + test-animation.gif \ + $(NULL) testimagedir = $(insttestdir)/test-images testimage_DATA = $(wildcard $(srcdir)/test-images/*) diff --git a/tests/animation.c b/tests/animation.c new file mode 100644 index 000000000..523559480 --- /dev/null +++ b/tests/animation.c @@ -0,0 +1,25 @@ +#include <gdk-pixbuf/gdk-pixbuf.h> +#include <stdlib.h> + +static void +test_animation (void) +{ + GError *error = NULL; + GdkPixbufAnimation* result = NULL; + + result = gdk_pixbuf_animation_new_from_file (g_test_get_filename (G_TEST_DIST, "test-animation.gif", NULL), &error); + g_assert_no_error (error); + g_assert (result != NULL); + + g_object_unref (result); +} + +int +main (int argc, char *argv[]) +{ + g_test_init (&argc, &argv, NULL); + + g_test_add_func ("/animation/load", test_animation); + + return g_test_run (); +} diff --git a/tests/test-animation.gif b/tests/test-animation.gif Binary files differnew file mode 100644 index 000000000..26f461484 --- /dev/null +++ b/tests/test-animation.gif |