You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by sh...@apache.org on 2009/05/04 22:04:10 UTC
svn commit: r771420 - /qpid/branches/0.5-release/qpid/cpp/src/tests/Shlib.cpp
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-subscribe@qpid.apache.org