From 335565076e9b754d8ef2a5a80b538e0f1d02a640 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 19 Mar 2020 01:16:52 +0100 Subject: [PATCH] Fix event propagation test build for !wxUSE_DOC_VIEW_ARCHITECTURE Avoid compiling the test using wxDocument etc when they're not available. Closes #18700. --- tests/events/propagation.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/events/propagation.cpp b/tests/events/propagation.cpp index 8b22866eda..ba9eb60859 100644 --- a/tests/events/propagation.cpp +++ b/tests/events/propagation.cpp @@ -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