From 092e772848b1db324cc178770d2829ceed5175d8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 3 Jan 2017 02:50:26 +0100 Subject: [PATCH] Use wxAlphaPixelData for default native bitmaps in the unit test The unit test added in 607b800444193d618158d37a69f08d81ae2de986 didn't work on the systems using 32 bpp screens, i.e. almost all of them, because it tried to use 24 bpp wxNativePixelData with them. Fix this by using wxAlphaPixelData, which won't work on non 32 bpp systems, and so is still not ideal, but at least makes the test work on most systems by default. See #17666. --- tests/graphics/bitmap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/graphics/bitmap.cpp b/tests/graphics/bitmap.cpp index 365fa3f7b4..d1b7ba734f 100644 --- a/tests/graphics/bitmap.cpp +++ b/tests/graphics/bitmap.cpp @@ -110,8 +110,8 @@ void BitmapTestCase::OverlappingBlit() // Now, lines 0 and 1 should be red, lines 2++ should still be white. - wxNativePixelData npd( m_bmp ); - wxNativePixelData::Iterator it( npd ); + wxAlphaPixelData npd( m_bmp ); + wxAlphaPixelData::Iterator it( npd ); ASSERT_EQUAL_RGB( it, 255, 0, 0 ); it.OffsetY( npd, 1 );