]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed failing image test.
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Sun, 3 Apr 2011 22:41:58 +0000 (22:41 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Sun, 3 Apr 2011 22:41:58 +0000 (22:41 +0000)
ImageTestCase::DibPadding was always failing due to differences in pixel data between the decoded GIF and encoded ICO image. Instead of comparing image content just check if the saving of the ICO succeeds (prior to r67296 it would crash).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/image/image.cpp

index 810b56d069243e756f6be792a412a9e6cce01fd1..98487b0f856c8271a1afdf7cb8ecc634cf4cad9e 100644 (file)
@@ -1267,8 +1267,8 @@ void ImageTestCase::DibPadding()
 
     image = image.Scale(99, 99);
 
-    CompareImage(*wxImage::FindHandler(wxBITMAP_TYPE_ICO),
-        image, wxIMAGE_HAVE_PALETTE);
+    wxMemoryOutputStream memOut;
+    CPPUNIT_ASSERT( image.SaveFile(memOut, wxBITMAP_TYPE_ICO) );
 }
 
 #endif //wxUSE_IMAGE