X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FDebugModules.test.cc;h=72c43ac72f38b10a5d29047869e3a85a11d841bc;hb=63ae38a98da5740e0638c868cd1c3f2ac73d2eb2;hp=a08801238f3520d34f31c357df9dbbea67976db6;hpb=b52002fa2001e6472d6aa3dde263b85f654c6e8e;p=senf.git diff --git a/PPI/DebugModules.test.cc b/PPI/DebugModules.test.cc index a088012..72c43ac 100644 --- a/PPI/DebugModules.test.cc +++ b/PPI/DebugModules.test.cc @@ -1,8 +1,8 @@ // $Id$ // // Copyright (C) 2007 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -31,18 +31,13 @@ #include #include -#define _senf_LOG_STREAM logstream -namespace { - std::stringstream logstream; -} - -#define SENF_LOG_CONF ((senf::log::Debug)(_)(VERBOSE)) +#define SENF_LOG_CONF (( (senf)(log)(Debug), (_), VERBOSE )) #include "../Packets/Packets.hh" #include "DebugModules.hh" #include "Setup.hh" -#include +#include "../Utils/auto_unit_test.hh" #include #define prefix_ @@ -136,6 +131,9 @@ BOOST_AUTO_UNIT_TEST(activeFeederSink) BOOST_AUTO_UNIT_TEST(logSink) { + senf::log::StringTarget logTarget; + logTarget.route(); + debug::ActiveFeederSource source; debug::LogSink<> sink; @@ -144,8 +142,7 @@ BOOST_AUTO_UNIT_TEST(logSink) source.submit( senf::DataPacket::create(data) ); senf::ppi::run(); - BOOST_CHECK_EQUAL( logstream.str(), - " 0000 13 24 35 .$5\n\n" ); + BOOST_CHECK( ! logTarget.str().empty() ); } ///////////////////////////////cc.e////////////////////////////////////////