X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FCloneSource.test.cc;h=d2f459c1d08571a4d31c947917207864ae603d9a;hb=f2f5d59e83863f3b513950173baee1b6da2aee3c;hp=a4ea055a3ab5d7e67b2522f020f51b0b7baf4915;hpb=f73fa16ed5abdce272ac77f8b8b9ef2b9922c266;p=senf.git diff --git a/PPI/CloneSource.test.cc b/PPI/CloneSource.test.cc index a4ea055..d2f459c 100644 --- a/PPI/CloneSource.test.cc +++ b/PPI/CloneSource.test.cc @@ -1,8 +1,8 @@ // $Id$ // -// Copyright (C) 2007 -// Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY +// 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,7 +21,7 @@ // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** \file - \brief CloneSource.test unit tests */ + \brief CloneSource unit tests */ //#include "CloneSource.test.hh" //#include "CloneSource.test.ih" @@ -40,7 +40,7 @@ BOOST_AUTO_UNIT_TEST(cloneSource) { - senf::PacketData::byte data[] = { 0xAB }; + senf::PacketData::byte data[] = { 0xab }; senf::Packet p (senf::DataPacket::create(data)); senf::ppi::module::CloneSource source (p); @@ -48,10 +48,15 @@ BOOST_AUTO_UNIT_TEST(cloneSource) senf::ppi::connect(source,sink); senf::ppi::init(); - + BOOST_CHECK( sink.request() != p ); BOOST_CHECK( sink.request().data()[0] == p.data()[0] ); BOOST_CHECK( sink.request().data()[0] == p.data()[0] ); + + data[0] = 0xcd; + senf::Packet p2 (senf::DataPacket::create(data)); + source.replacePacket( p2); + BOOST_CHECK( sink.request().data()[0] == p2.data()[0] ); }