diff --git a/tests/misc/dynamiclib.cpp b/tests/misc/dynamiclib.cpp index 8db9f254ba..99aca1bf74 100644 --- a/tests/misc/dynamiclib.cpp +++ b/tests/misc/dynamiclib.cpp @@ -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