Fix building GUI tests with MSVC
This was broken by da48b9e45d
(adding an iOS build to travis (#1847),
2020-05-08), as we can't use preprocessor directives inside macro
arguments with MSVC (at least with its traditional preprocessor).
Use a helper macro to make this work again.
This commit is contained in:
@@ -59,13 +59,18 @@ void ModalDialogsTestCase::MessageDialog()
|
||||
{
|
||||
int rc;
|
||||
|
||||
#if wxUSE_FILEDLG
|
||||
#define FILE_DIALOG_TEST ,\
|
||||
wxExpectModal<wxFileDialog>(wxGetCwd() + "/test.txt").Optional()
|
||||
#else
|
||||
#define FILE_DIALOG_TEST
|
||||
#endif
|
||||
|
||||
wxTEST_DIALOG
|
||||
(
|
||||
rc = wxMessageBox("Should I fail?", "Question", wxYES|wxNO),
|
||||
wxExpectModal<wxMessageDialog>(wxNO)
|
||||
#if wxUSE_FILEDLG
|
||||
,wxExpectModal<wxFileDialog>(wxGetCwd() + "/test.txt").Optional()
|
||||
#endif
|
||||
FILE_DIALOG_TEST
|
||||
);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(wxNO, rc);
|
||||
|
Reference in New Issue
Block a user