diff --git a/unittests/CppInterOp/DynamicLibraryManagerTest.cpp b/unittests/CppInterOp/DynamicLibraryManagerTest.cpp index 45021f00d..87a21548b 100644 --- a/unittests/CppInterOp/DynamicLibraryManagerTest.cpp +++ b/unittests/CppInterOp/DynamicLibraryManagerTest.cpp @@ -7,7 +7,7 @@ #include "../../lib/Interpreter/Paths.h" -#include +#include "../../lib/Interpreter/DynamicLibraryManager.h" // This function isn't referenced outside its translation unit, but it // can't use the "static" keyword because its address is used for @@ -61,27 +61,11 @@ TEST(DynamicLibraryManagerTest, Sanity) { TEST(UtilsPlatform, DLTest) { std::string err = ""; - std::string path = ""; - for (auto const& dir_entry : std::filesystem::recursive_directory_iterator( - std::filesystem::current_path())) { - if (std::string(dir_entry.path()).find("libTestSharedLib.") != - std::string::npos) { - path = dir_entry.path(); - break; - } - } + std::string path = + (new Cpp::DynamicLibraryManager)->lookupLibrary("libTestSharedLib"); EXPECT_FALSE(path.empty()); std::cout<