From: Kouhei S. <nul...@cl...> - 2015-01-15 12:27:03
|
Kouhei Sutou 2015-01-15 21:25:50 +0900 (Thu, 15 Jan 2015) New Revision: 1c1c3e696b69b695449f4fa97d9de249cc46e8e8 https://github.com/clear-code/cutter/commit/1c1c3e696b69b695449f4fa97d9de249cc46e8e8 Message: test: support gdk-pixbuf 2.31.0 or later gdk-pixbuf 2.31.0 introduces pixel-bytes property. GitHub: fix #19 Reported by mtasaka. Thanks!!! Modified files: test/gdkcutter-pixbuf/test-gdkcut-pixbuf.c Modified: test/gdkcutter-pixbuf/test-gdkcut-pixbuf.c (+14 -1) =================================================================== --- test/gdkcutter-pixbuf/test-gdkcut-pixbuf.c 2014-10-30 11:47:55 +0900 (1b94d21) +++ test/gdkcutter-pixbuf/test-gdkcut-pixbuf.c 2015-01-15 21:25:50 +0900 (f7c9e8f) @@ -1,6 +1,6 @@ /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* - * Copyright (C) 2009-2011 Kouhei Sutou <ko...@cl...> + * Copyright (C) 2009-2015 Kouhei Sutou <ko...@cl...> * * 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 <gdkcutter-pixbuf/gdkcut-pixbuf.h> #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=<NULL>" +#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=<NULL>" +#endif ">", pixbuf2, gdk_pixbuf_get_pixels(pixbuf2)); |