diff UnitTestsSources/PluginsTests.cpp @ 1026:a13ccd93df28

fix OS X build
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 10 Jul 2014 12:18:40 +0200
parents 9b8298234254
children 57400f233de8
line wrap: on
line diff
--- a/UnitTestsSources/PluginsTests.cpp	Thu Jul 10 11:54:21 2014 +0200
+++ b/UnitTestsSources/PluginsTests.cpp	Thu Jul 10 12:18:40 2014 +0200
@@ -55,6 +55,13 @@
   ASSERT_TRUE(l.HasFunction("dlclose"));
   ASSERT_FALSE(l.HasFunction("world"));
 
+#elif defined(__APPLE__) && defined(__MACH__)
+  SharedLibrary l("libdl.dylib");
+  ASSERT_THROW(l.GetFunction("world"), OrthancException);
+  ASSERT_TRUE(l.GetFunction("dlopen") != NULL);
+  ASSERT_TRUE(l.HasFunction("dlclose"));
+  ASSERT_FALSE(l.HasFunction("world"));
+
 #else
 #error Support your platform here
 #endif