]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/image/image.cpp
fixed compilation of image test units when wxUSE_PALETTE is set to 0
[wxWidgets.git] / tests / image / image.cpp
index 7cadc7fb324b3f6e0d1ae8cf447d0bdcd40000a8..53d9243199a5b781e75633ce359784f355f6dc2f 100644 (file)
@@ -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();