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;
|
int rc;
|
||||||
|
|
||||||
|
#if wxUSE_FILEDLG
|
||||||
|
#define FILE_DIALOG_TEST ,\
|
||||||
|
wxExpectModal<wxFileDialog>(wxGetCwd() + "/test.txt").Optional()
|
||||||
|
#else
|
||||||
|
#define FILE_DIALOG_TEST
|
||||||
|
#endif
|
||||||
|
|
||||||
wxTEST_DIALOG
|
wxTEST_DIALOG
|
||||||
(
|
(
|
||||||
rc = wxMessageBox("Should I fail?", "Question", wxYES|wxNO),
|
rc = wxMessageBox("Should I fail?", "Question", wxYES|wxNO),
|
||||||
wxExpectModal<wxMessageDialog>(wxNO)
|
wxExpectModal<wxMessageDialog>(wxNO)
|
||||||
#if wxUSE_FILEDLG
|
FILE_DIALOG_TEST
|
||||||
,wxExpectModal<wxFileDialog>(wxGetCwd() + "/test.txt").Optional()
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(wxNO, rc);
|
CPPUNIT_ASSERT_EQUAL(wxNO, rc);
|
||||||
|
Reference in New Issue
Block a user