diff --git a/test/gdkcutter-pixbuf/test-gdkcut-pixbuf.c b/test/gdkcutter-pixbuf/test-gdkcut-pixbuf.c index 1b94d21aa..f7c9e8f79 100644 --- a/test/gdkcutter-pixbuf/test-gdkcut-pixbuf.c +++ b/test/gdkcutter-pixbuf/test-gdkcut-pixbuf.c @@ -1,6 +1,6 @@ /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* - * Copyright (C) 2009-2011 Kouhei Sutou + * Copyright (C) 2009-2015 Kouhei Sutou * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -23,6 +23,11 @@ #include #include "../lib/cuttest-utils.h" +#if (GDK_PIXBUF_MAJOR > 2 || \ + (GDK_PIXBUF_MAJOR == 2 && GDK_PIXBUF_MINOR >= 31)) +# define HAVE_PIXEL_BYTES +#endif + void test_equal_property(void); void test_equal_content(void); void test_equal_content_threshold(void); @@ -136,6 +141,10 @@ test_inspect (void) "height=<100>, " "rowstride=<400>, " "pixels=<((gpointer) %p)>" +#ifdef HAVE_PIXEL_BYTES + ", " + "pixel-bytes=" +#endif ">", pixbuf1, gdk_pixbuf_get_pixels(pixbuf1)); @@ -152,6 +161,10 @@ test_inspect (void) "height=<50>, " "rowstride=<152>, " "pixels=<((gpointer) %p)>" +#ifdef HAVE_PIXEL_BYTES + ", " + "pixel-bytes=" +#endif ">", pixbuf2, gdk_pixbuf_get_pixels(pixbuf2));