diff options
| author | Stephen D. Huston <shuston@apache.org> | 2009-05-04 20:04:09 +0000 |
|---|---|---|
| committer | Stephen D. Huston <shuston@apache.org> | 2009-05-04 20:04:09 +0000 |
| commit | 3fed8462f07765b7349798de399a950b07b4472a (patch) | |
| tree | 71a4a2ae26ce3cdb6449ffc65757c11e5fff4fb3 /qpid/cpp/src | |
| parent | f5287cdd92c4f32a2baefe06615729fea92bebe1 (diff) | |
| download | qpid-python-3fed8462f07765b7349798de399a950b07b4472a.tar.gz | |
Allow this test to run on Windows as well
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/0.5-release@771420 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/tests/Shlib.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/qpid/cpp/src/tests/Shlib.cpp b/qpid/cpp/src/tests/Shlib.cpp index 426a052c9f..b2857595b6 100644 --- a/qpid/cpp/src/tests/Shlib.cpp +++ b/qpid/cpp/src/tests/Shlib.cpp @@ -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(testShlib) { 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); |
