]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/misc/dynamiclib.cpp
Ignore empty LC_XXX variables in locale detection code.
[wxWidgets.git] / tests / misc / dynamiclib.cpp
index acd16c4e47a5767d38c5ec7c8ad253b19c47f1b5..55d443c5a97d776b0319b2b0e2eaf2f8c6fd8f6c 100644 (file)
 
 #include "wx/dynlib.h"
 
 
 #include "wx/dynlib.h"
 
+#ifdef __UNIX__
+    #include "wx/filename.h"
+    #include "wx/log.h"
+#endif
+
 // ----------------------------------------------------------------------------
 // test class
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // test class
 // ----------------------------------------------------------------------------
@@ -57,6 +62,13 @@ void DynamicLibraryTestCase::Load()
     static const wxChar *LIB_NAME = wxT("/lib/libc.so.6");
 #endif
     static const wxChar *FUNC_NAME = wxT("strlen");
     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
 #else
     #error "don't know how to test wxDllLoader on this platform"
 #endif