Tests: Remove use of include <kwsys/{ios,stl}> and kwsys_{ios,stl}::

We no longer need this compatibility layer for the compilers we support.
This commit is contained in:
Brad King 2015-08-28 15:07:00 -04:00
parent 51d7a7bb3f
commit 76fa859699
1 changed files with 10 additions and 10 deletions

View File

@ -3,15 +3,15 @@
#include <example_exe.h> #include <example_exe.h>
#include <kwsys/DynamicLoader.hxx> #include <kwsys/DynamicLoader.hxx>
#include <kwsys/ios/iostream> #include <iostream>
#include <kwsys/stl/string> #include <string>
#include <stdio.h> #include <stdio.h>
// Implement the ABI used by plugins. // Implement the ABI used by plugins.
extern "C" int example_exe_function() extern "C" int example_exe_function()
{ {
kwsys_ios::cout << "hello" << kwsys_ios::endl; std::cout << "hello" << std::endl;
return 123; return 123;
} }
@ -23,7 +23,7 @@ extern "C" int example_exe_function()
int main() int main()
{ {
kwsys_stl::string libName = EXAMPLE_EXE_PLUGIN_DIR CONFIG_DIR "/"; std::string libName = EXAMPLE_EXE_PLUGIN_DIR CONFIG_DIR "/";
libName += kwsys::DynamicLoader::LibPrefix(); libName += kwsys::DynamicLoader::LibPrefix();
libName += "example_mod_1"; libName += "example_mod_1";
libName += kwsys::DynamicLoader::LibExtension(); libName += kwsys::DynamicLoader::LibExtension();
@ -31,17 +31,17 @@ int main()
kwsys::DynamicLoader::OpenLibrary(libName.c_str()); kwsys::DynamicLoader::OpenLibrary(libName.c_str());
if(!handle) if(!handle)
{ {
kwsys_ios::cerr << "Could not open plugin \"" std::cerr << "Could not open plugin \""
<< libName << "\"!" << kwsys_ios::endl; << libName << "\"!" << std::endl;
return 1; return 1;
} }
kwsys::DynamicLoader::SymbolPointer sym = kwsys::DynamicLoader::SymbolPointer sym =
kwsys::DynamicLoader::GetSymbolAddress(handle, "example_mod_1_function"); kwsys::DynamicLoader::GetSymbolAddress(handle, "example_mod_1_function");
if(!sym) if(!sym)
{ {
kwsys_ios::cerr std::cerr
<< "Could not get plugin symbol \"example_mod_1_function\"!" << "Could not get plugin symbol \"example_mod_1_function\"!"
<< kwsys_ios::endl; << std::endl;
return 1; return 1;
} }
#ifdef __WATCOMC__ #ifdef __WATCOMC__
@ -51,8 +51,8 @@ int main()
#endif #endif
if(f(456) != (123+456)) if(f(456) != (123+456))
{ {
kwsys_ios::cerr << "Incorrect return value from plugin!" std::cerr << "Incorrect return value from plugin!"
<< kwsys_ios::endl; << std::endl;
return 1; return 1;
} }
kwsys::DynamicLoader::CloseLibrary(handle); kwsys::DynamicLoader::CloseLibrary(handle);