-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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!!!
- Loading branch information
Showing
1 changed file
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ | ||
/* | ||
* Copyright (C) 2009-2011 Kouhei Sutou <[email protected]> | ||
* Copyright (C) 2009-2015 Kouhei Sutou <[email protected]> | ||
* | ||
* 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)); | ||
|