summaryrefslogtreecommitdiff
path: root/tests/animation.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-06-07 14:56:12 -0400
committerMatthias Clasen <mclasen@redhat.com>2013-06-07 14:56:12 -0400
commit298eaf9ab48fc66bb3c143417cecd664ef4973fc (patch)
tree38acb38206f10179355f64b633a5750d3a753b06 /tests/animation.c
parent570a8f967cb7c315c4f9746a9094b4b1fc9c8611 (diff)
downloadgdk-pixbuf-298eaf9ab48fc66bb3c143417cecd664ef4973fc.tar.gz
Add an animation loading test
Diffstat (limited to 'tests/animation.c')
-rw-r--r--tests/animation.c25
1 files changed, 25 insertions, 0 deletions
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 ();
+}