Fix event propagation test build for !wxUSE_DOC_VIEW_ARCHITECTURE

Avoid compiling the test using wxDocument etc when they're not
available.

Closes #18700.
This commit is contained in:
Vadim Zeitlin 2020-03-19 01:16:52 +01:00
parent 9b36924258
commit 335565076e

View File

@ -251,7 +251,9 @@ private:
#if !defined (__WXX11__)
CPPUNIT_TEST( MenuEvent );
#endif
#if wxUSE_DOC_VIEW_ARCHITECTURE
CPPUNIT_TEST( DocView );
#endif // wxUSE_DOC_VIEW_ARCHITECTURE
WXUISIM_TEST( ContextMenuEvent );
WXUISIM_TEST( PropagationLevel );
CPPUNIT_TEST_SUITE_END();
@ -264,7 +266,9 @@ private:
void ScrollWindowWithoutHandler();
void ScrollWindowWithHandler();
void MenuEvent();
#if wxUSE_DOC_VIEW_ARCHITECTURE
void DocView();
#endif // wxUSE_DOC_VIEW_ARCHITECTURE
#if wxUSE_UIACTIONSIMULATOR
void ContextMenuEvent();
void PropagationLevel();
@ -502,6 +506,8 @@ void EventPropagationTestCase::MenuEvent()
ASSERT_MENU_EVENT_RESULT( menu, "aomobowA" );
}
#if wxUSE_DOC_VIEW_ARCHITECTURE
// Minimal viable implementations of wxDocument and wxView.
class EventTestDocument : public wxDocument
{
@ -613,6 +619,8 @@ void EventPropagationTestCase::DocView()
#endif // wxUSE_TOOLBAR
}
#endif // wxUSE_DOC_VIEW_ARCHITECTURE
#if wxUSE_UIACTIONSIMULATOR
class ContextMenuTestWindow : public wxWindow