Skip dynamic library file existence check under Darwin

Under Monterrey (macOS 10.12) we can actually load the file using
wxDynamicLibrary even though it does _not_ exist on the disk, so don't
skip the test just because of this.
This commit is contained in:
Vadim Zeitlin
2022-04-17 18:37:18 +02:00
parent c6b3b4a39c
commit f3b4ee3b5f

View File

@@ -58,12 +58,16 @@ void DynamicLibraryTestCase::Load()
#endif
static const wxChar *FUNC_NAME = wxT("strlen");
// Under macOS 12+ we can actually load the libc dylib even though the
// corresponding file doesn't exist on disk, so skip this check there.
#ifndef __DARWIN__
if ( !wxFileName::Exists(LIB_NAME) )
{
WARN("Shared library \"" << wxString(LIB_NAME) << "\" doesn't exist, "
"skipping DynamicLibraryTestCase::Load() test.");
return;
}
#endif // !__DARWIN__
#else
#error "don't know how to test wxDllLoader on this platform"
#endif