X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FDebugModules.test.cc;h=854d7fd3f1562f785bc7ac4fcb22220eb4eb6e90;hb=d724177f910255b7e4953b48f29717673e260686;hp=20101981ab48dc9f326dac7b4caea2f9c2613328;hpb=9bfe0b87be0926193b5baf13865cf045f0de0b0d;p=senf.git diff --git a/PPI/DebugModules.test.cc b/PPI/DebugModules.test.cc index 2010198..854d7fd 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) +// Copyright (C) 2007 +// 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 )) #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////////////////////////////////////////