From 7816ca6538f1267ac45994f67457ac5c860fa629 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sun, 1 Oct 2017 09:46:03 -0700 Subject: [PATCH] Fix building tests with wxUSE_XRC==0 --- tests/misc/garbage.cpp | 3 +++ tests/xml/xrctest.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/tests/misc/garbage.cpp b/tests/misc/garbage.cpp index f2be8cf10a..e1a3b47cee 100644 --- a/tests/misc/garbage.cpp +++ b/tests/misc/garbage.cpp @@ -18,6 +18,7 @@ #include "wx/filename.h" #include "wx/image.h" +#include "wx/icon.h" #include "wx/animate.h" #include "wx/mstream.h" #include "wx/dynlib.h" @@ -161,7 +162,9 @@ void GarbageTestCase::DoLoadFile(const wxString& fullname) delete htmlwin; */ // test wxXmlResource +#if wxUSE_XRC CPPUNIT_ASSERT( wxXmlResource::Get()->Load(fullname) == false ); +#endif } void GarbageTestCase::DoLoadStream(wxInputStream& stream) diff --git a/tests/xml/xrctest.cpp b/tests/xml/xrctest.cpp index ef98caa76b..a8e72084eb 100644 --- a/tests/xml/xrctest.cpp +++ b/tests/xml/xrctest.cpp @@ -20,6 +20,8 @@ #include "wx/wx.h" #endif // WX_PRECOMP +#if wxUSE_XRC + #include "wx/xml/xml.h" #include "wx/sstream.h" #include "wx/wfstream.h" @@ -226,3 +228,5 @@ void XrcTestCase::IDRanges() CPPUNIT_ASSERT( wxXmlResource::Get()->Unload(TEST_XRC_FILE) ); } } + +#endif // wxUSE_XRC