From 5d875c119e5ed35293fcb009bc115e1fcf10e540 Mon Sep 17 00:00:00 2001 From: Dimitri Schoolwerth Date: Wed, 5 Jan 2011 11:37:52 +0000 Subject: [PATCH] fixed compilation of image test units when wxUSE_PALETTE is set to 0 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/image/image.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/image/image.cpp b/tests/image/image.cpp index 7cadc7fb32..53d9243199 100644 --- a/tests/image/image.cpp +++ b/tests/image/image.cpp @@ -980,6 +980,7 @@ void ImageTestCase::CompareSavedImage() wxImage expected8 = expected24.ConvertToGreyscale(); numColours = expected8.CountColours(); +#if wxUSE_PALETTE unsigned char greys[256]; for (i = 0; i < 256; ++i) { @@ -987,6 +988,8 @@ void ImageTestCase::CompareSavedImage() } wxPalette palette(256, greys, greys, greys); expected8.SetPalette(palette); +#endif // #if wxUSE_PALETTE + expected8.SetOption(wxIMAGE_OPTION_BMP_FORMAT, wxBMP_8BPP_PALETTE); // Create an image with alpha based on the loaded image @@ -1019,7 +1022,9 @@ void ImageTestCase::CompareSavedImage() expected8.LoadFile("horse.gif"); CPPUNIT_ASSERT( expected8.IsOk() ); +#if wxUSE_PALETTE CPPUNIT_ASSERT( expected8.HasPalette() ); +#endif // #if wxUSE_PALETTE expected8.SetAlpha(); -- 2.50.0