1#include <gdk-pixbuf/gdk-pixbuf.h>
2#include <stdlib.h>
3
4static void
5test_animation (const gchar *filename)
6{
7 GError *error = NULL;
8 GdkPixbufAnimation* result = NULL;
9
10 result = gdk_pixbuf_animation_new_from_file (filename: g_test_get_filename (file_type: G_TEST_DIST, first_path: filename, NULL), error: &error);
11 g_assert_no_error (error);
12 g_assert (result != NULL);
13
14 g_object_unref (object: result);
15}
16
17static void
18test_gif_animation (void)
19{
20 test_animation (filename: "test-animation.gif");
21}
22
23static void
24test_ani_animation (void)
25{
26 test_animation (filename: "test-animation.ani");
27}
28
29int
30main (int argc, char *argv[])
31{
32 g_test_init (argc: &argc, argv: &argv, NULL);
33
34 g_test_add_func (testpath: "/animation/gif", test_func: test_gif_animation);
35 g_test_add_func (testpath: "/animation/ani", test_func: test_ani_animation);
36
37 return g_test_run ();
38}
39

source code of gtk/subprojects/gdk-pixbuf/tests/animation.c