X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FDebugModules.test.cc;h=fa198bd07e457447654f8e46b78894255fcdbd69;hb=5443435c4c2b6e4386c5334b5b8358273f2bae93;hp=20101981ab48dc9f326dac7b4caea2f9c2613328;hpb=9bfe0b87be0926193b5baf13865cf045f0de0b0d;p=senf.git diff --git a/PPI/DebugModules.test.cc b/PPI/DebugModules.test.cc index 2010198..fa198bd 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 @@ -21,28 +21,22 @@ // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** \file - \brief DebubgModules.test unit tests */ + \brief DebubgModules unit tests */ //#include "DebubgModules.test.hh" //#include "DebubgModules.test.ih" - // Custom includes #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 +130,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 +141,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////////////////////////////////////////