Author: shuston Date: Mon May 4 20:04:09 2009 New Revision: 771420 URL: http://svn.apache.org/viewvc?rev=771420&view=rev Log: Allow this test to run on Windows as well
Modified: qpid/branches/0.5-release/qpid/cpp/src/tests/Shlib.cpp Modified: qpid/branches/0.5-release/qpid/cpp/src/tests/Shlib.cpp URL: http://svn.apache.org/viewvc/qpid/branches/0.5-release/qpid/cpp/src/tests/Shlib.cpp?rev=771420&r1=771419&r2=771420&view=diff ============================================================================== --- qpid/branches/0.5-release/qpid/cpp/src/tests/Shlib.cpp (original) +++ qpid/branches/0.5-release/qpid/cpp/src/tests/Shlib.cpp Mon May 4 20:04:09 2009 @@ -24,13 +24,21 @@ #include "unit_test.h" +namespace { +#ifdef _WIN32 + const char *libName = "shlibtestd.dll"; +#else + const char *libName = ".libs/libshlibtest.so"; +#endif +} + QPID_AUTO_TEST_SUITE(ShlibTestSuite) using namespace qpid::sys; typedef void (*CallMe)(int*); QPID_AUTO_TEST_CASE(testShlib) { - Shlib sh(".libs/libshlibtest.so"); + Shlib sh(libName); // Double cast to avoid ISO warning. CallMe callMe=sh.getSymbol<CallMe>("callMe"); BOOST_REQUIRE(callMe != 0); @@ -48,7 +56,7 @@ QPID_AUTO_TEST_CASE(testAutoShlib) { int unloaded = 0; { - AutoShlib sh(".libs/libshlibtest.so"); + AutoShlib sh(libName); CallMe callMe=sh.getSymbol<CallMe>("callMe"); BOOST_REQUIRE(callMe != 0); callMe(&unloaded); --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org