summaryrefslogtreecommitdiff
path: root/qpid/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
commitb2c842c1b7361bc9754a9883e82ae360093f11a8 (patch)
treea1d8d7f84ac53c5857ad964ad500e69704f669e5 /qpid/cpp/src/tests/logging.cpp
parent6a644249ba25e38dfa6852dac3377e62aa7386df (diff)
downloadqpid-python-b2c842c1b7361bc9754a9883e82ae360093f11a8.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@753014 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/logging.cpp')
-rw-r--r--qpid/cpp/src/tests/logging.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/qpid/cpp/src/tests/logging.cpp b/qpid/cpp/src/tests/logging.cpp
index 051722e7c8..1054dc1f7b 100644
--- a/qpid/cpp/src/tests/logging.cpp
+++ b/qpid/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);