// $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 <g0dil@berlios.de>
//
// This program is free software; you can redistribute it and/or modify
//#include "DebubgModules.test.hh"
//#include "DebubgModules.test.ih"
+
// Custom includes
#include <algorithm>
-#include "Packets/Packets.hh"
+#include <sstream>
+
+#define SENF_LOG_CONF (( (senf)(log)(Debug), (_), VERBOSE ))
+
+#include "../Packets/Packets.hh"
#include "DebugModules.hh"
#include "Setup.hh"
-#include <boost/test/auto_unit_test.hpp>
+#include "../Utils/auto_unit_test.hh"
#include <boost/test/test_tools.hpp>
#define prefix_
debug::PassiveSink sink;
ppi::connect(source,sink);
-
source.submit(senf::DataPacket::create());
-
ppi::run();
BOOST_CHECK( source.empty() );
debug::ActiveFeederSink sink;
ppi::connect(source,sink);
-
source.submit(senf::DataPacket::create());
-
ppi::run();
BOOST_CHECK( ! sink.empty() );
BOOST_CHECK( source.empty() );
}
+BOOST_AUTO_UNIT_TEST(logSink)
+{
+ senf::log::StringTarget logTarget;
+ logTarget.route<senf::log::Debug,senf::log::VERBOSE>();
+
+ debug::ActiveFeederSource source;
+ debug::LogSink<> sink;
+
+ ppi::connect(source,sink);
+ senf::PacketData::byte data[] = { 0x13u, 0x24u, 0x35u };
+ source.submit( senf::DataPacket::create(data) );
+ senf::ppi::run();
+
+ BOOST_CHECK( ! logTarget.str().empty() );
+}
+
///////////////////////////////cc.e////////////////////////////////////////
#undef prefix_