diff --git a/include/wx/testing.h b/include/wx/testing.h index 9e4335297b..9139e6febd 100644 --- a/include/wx/testing.h +++ b/include/wx/testing.h @@ -288,6 +288,17 @@ protected: // program here. virtual wxString DescribeUnexpectedDialog(wxDialog* dlg) const { + // Message boxes are handled specially here just because they are so + // ubiquitous. + if ( wxMessageDialog *msgdlg = dynamic_cast(dlg) ) + { + return wxString::Format + ( + "A message box \"%s\"", + msgdlg->GetMessage() + ); + } + return wxString::Format ( "A %s with title \"%s\"",