X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bb5a951418acd22d69a7f1973319f47190fbac79..339c6c92a276ac6b04dcb5deffaea7ccbd2ee109:/tests/misc/dynamiclib.cpp?ds=sidebyside diff --git a/tests/misc/dynamiclib.cpp b/tests/misc/dynamiclib.cpp index acd16c4e47..af9ca06a00 100644 --- a/tests/misc/dynamiclib.cpp +++ b/tests/misc/dynamiclib.cpp @@ -3,7 +3,6 @@ // Purpose: Test wxDynamicLibrary // Author: Francesco Montorsi (extracted from console sample) // Created: 2010-06-13 -// RCS-ID: $Id$ // Copyright: (c) 2010 wxWidgets team /////////////////////////////////////////////////////////////////////////////// @@ -19,6 +18,11 @@ #include "wx/dynlib.h" +#ifdef __UNIX__ + #include "wx/filename.h" + #include "wx/log.h" +#endif + // ---------------------------------------------------------------------------- // test class // ---------------------------------------------------------------------------- @@ -57,6 +61,13 @@ void DynamicLibraryTestCase::Load() static const wxChar *LIB_NAME = wxT("/lib/libc.so.6"); #endif static const wxChar *FUNC_NAME = wxT("strlen"); + + if ( !wxFileName::Exists(LIB_NAME) ) + { + wxLogWarning("Shared library \"%s\" doesn't exist, " + "skipping DynamicLibraryTestCase::Load() test."); + return; + } #else #error "don't know how to test wxDllLoader on this platform" #endif