summaryrefslogtreecommitdiffstats
path: root/Tests/Complex/Executable
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-12-23 19:50:21 (GMT)
committerBrad King <brad.king@kitware.com>2011-12-23 21:16:49 (GMT)
commit137e5974bcde960cf408eb4027d35defa9a93217 (patch)
treed3d7baa2906c235ae965099ac49ffb6a06f98646 /Tests/Complex/Executable
parent63379207e189688d7e266e6b27420300c9761caf (diff)
downloadCMake-137e5974bcde960cf408eb4027d35defa9a93217.zip
CMake-137e5974bcde960cf408eb4027d35defa9a93217.tar.gz
CMake-137e5974bcde960cf408eb4027d35defa9a93217.tar.bz2
complex: Remove dynamic loader tests
Everything covered by these tests is now covered by the KWSys DynamicLoader test and the Plugin test.
Diffstat (limited to 'Tests/Complex/Executable')
-rw-r--r--Tests/Complex/Executable/complex.cxx62
1 files changed, 1 insertions, 61 deletions
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index bd7d6fd..b44a43e 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -11,10 +11,8 @@ extern "C" {
#ifdef COMPLEX_TEST_CMAKELIB
#include "cmStandardIncludes.h"
#include "cmSystemTools.h"
-#include "cmDynamicLoader.h"
#include "cmSystemTools.h"
#include "cmGeneratedFileStream.h"
-#include <cmsys/DynamicLoader.hxx>
#else
#include <vector>
#include <string>
@@ -232,12 +230,6 @@ extern "C" int NameConflictTest2();
int main()
{
- std::string lib = BINARY_DIR;
- lib += "/lib/";
-#ifdef CMAKE_INTDIR
- lib += CMAKE_INTDIR;
- lib += "/";
-#endif
std::string exe = BINARY_DIR;
exe += "/bin/";
#ifdef CMAKE_INTDIR
@@ -273,59 +265,7 @@ int main()
{
cmPassed("run Single Character executable A returned 10 as expected.");
}
-
- lib += CMAKE_SHARED_MODULE_PREFIX;
- lib += "CMakeTestModule";
- lib += CMAKE_SHARED_MODULE_SUFFIX;
- cmsys::DynamicLoader::LibraryHandle handle = cmDynamicLoader::OpenLibrary(lib.c_str());
- if(!handle)
- {
- std::string err = "Can not open CMakeTestModule:\n";
- err += lib;
- cmFailed(err.c_str());
- }
- else
- {
- cmsys::DynamicLoader::SymbolPointer fun =
- cmsys::DynamicLoader::GetSymbolAddress(handle, "ModuleFunction");
- if(!fun)
- {
- fun = cmsys::DynamicLoader::GetSymbolAddress(handle, "_ModuleFunction");
- }
- typedef int (*TEST_FUNCTION)();
- TEST_FUNCTION testFun = (TEST_FUNCTION)fun;
- if(!testFun)
- {
- cmFailed("Could not find symbol ModuleFunction in library ");
- }
- else
- {
- int ret = (*testFun)();
- if(!ret)
- {
- cmFailed("ModuleFunction call did not return valid return.");
- }
- cmPassed("Module loaded and ModuleFunction called correctly.");
- }
- }
- cmDynamicLoader::FlushCache(); // fix memory leaks
- if(sharedFunction() != 1)
- {
- cmFailed("Call to sharedFunction from shared library failed.");
- }
- else
- {
- cmPassed("Call to sharedFunction from shared library worked.");
- }
- if(CsharedFunction() != 1)
- {
- cmFailed("Call to C sharedFunction from shared library failed.");
- }
- else
- {
- cmPassed("Call to C sharedFunction from shared library worked.");
- }
-
+
// ----------------------------------------------------------------------
// Test cmSystemTools::UpperCase
std::string str = "abc";