summaryrefslogtreecommitdiff
path: root/cpp/src/tests/logging.cpp
diff options
context:
space:
mode:
authorStephen D. Huston <shuston@apache.org>2009-03-12 20:55:34 +0000
committerStephen D. Huston <shuston@apache.org>2009-03-12 20:55:34 +0000
commit0398410e8894287da530cfb63d6344817445bfc2 (patch)
treee4d789cd965f25c8fb0a51e1cf71df0a5330e73b /cpp/src/tests/logging.cpp
parent47db7ebfc533d2dc8a3dfc3b9d1273730b8779e6 (diff)
downloadqpid-python-0398410e8894287da530cfb63d6344817445bfc2.tar.gz
Changes to build DLLs instead of static libs on Windows; primarily added decorators to exported names. Fixes QPID-1673
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@753014 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/logging.cpp')
-rw-r--r--cpp/src/tests/logging.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/cpp/src/tests/logging.cpp b/cpp/src/tests/logging.cpp
index 051722e7c8..1054dc1f7b 100644
--- a/cpp/src/tests/logging.cpp
+++ b/cpp/src/tests/logging.cpp
@@ -23,6 +23,7 @@
#include "qpid/memory.h"
#include "qpid/Options.h"
#if defined (_WIN32)
+# include "qpid/log/windows/SinkOptions.h"
#else
# include "qpid/log/posix/SinkOptions.h"
#endif
@@ -270,7 +271,11 @@ QPID_AUTO_TEST_CASE(testOptionsParse) {
"--log-function", "YES"
};
qpid::log::Options opts("");
+#ifdef _WIN32
+ qpid::log::windows::SinkOptions sinks("test");
+#else
qpid::log::posix::SinkOptions sinks("test");
+#endif
opts.parse(ARGC(argv), const_cast<char**>(argv));
sinks = *opts.sinkOptions;
vector<string> expect=list_of("error+:foo")("debug:bar")("info");
@@ -286,7 +291,11 @@ QPID_AUTO_TEST_CASE(testOptionsParse) {
QPID_AUTO_TEST_CASE(testOptionsDefault) {
Options opts("");
+#ifdef _WIN32
+ qpid::log::windows::SinkOptions sinks("test");
+#else
qpid::log::posix::SinkOptions sinks("test");
+#endif
sinks = *opts.sinkOptions;
BOOST_CHECK(sinks.logToStderr);
BOOST_CHECK(!sinks.logToStdout);
@@ -345,8 +354,13 @@ QPID_AUTO_TEST_CASE(testQuoteNonPrintable) {
ScopedSuppressLogging ls(l);
Options opts("test");
opts.time=false;
+#ifdef _WIN32
+ qpid::log::windows::SinkOptions *sinks =
+ dynamic_cast<qpid::log::windows::SinkOptions *>(opts.sinkOptions.get());
+#else
qpid::log::posix::SinkOptions *sinks =
dynamic_cast<qpid::log::posix::SinkOptions *>(opts.sinkOptions.get());
+#endif
sinks->logToStderr = false;
sinks->logFile = "logging.tmp";
l.configure(opts);