From 0398410e8894287da530cfb63d6344817445bfc2 Mon Sep 17 00:00:00 2001 From: "Stephen D. Huston" Date: Thu, 12 Mar 2009 20:55:34 +0000 Subject: 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 --- cpp/src/tests/logging.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'cpp/src/tests/logging.cpp') 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(argv)); sinks = *opts.sinkOptions; vector 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(opts.sinkOptions.get()); +#else qpid::log::posix::SinkOptions *sinks = dynamic_cast(opts.sinkOptions.get()); +#endif sinks->logToStderr = false; sinks->logFile = "logging.tmp"; l.configure(opts); -- cgit v1.2.1