diff --git a/tests/controls/buttontest.cpp b/tests/controls/buttontest.cpp index ffc4480f8c..0abac1cc05 100644 --- a/tests/controls/buttontest.cpp +++ b/tests/controls/buttontest.cpp @@ -176,12 +176,17 @@ void ButtonTestCase::Bitmap() //We start with no bitmaps CPPUNIT_ASSERT(!m_button->GetBitmap().IsOk()); + // Some bitmap, doesn't really matter which. + const wxBitmap bmp = wxArtProvider::GetBitmap(wxART_INFORMATION); - m_button->SetBitmap(wxArtProvider::GetIcon(wxART_INFORMATION, - wxART_OTHER, - wxSize(32, 32))); + m_button->SetBitmap(bmp); CPPUNIT_ASSERT(m_button->GetBitmap().IsOk()); + + // Check that resetting the button label doesn't result in problems when + // updating the bitmap later, as it used to be the case in wxGTK (#18898). + m_button->SetLabel(wxString()); + CHECK_NOTHROW( m_button->Disable() ); } #endif //wxUSE_BUTTON