X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FMPEGDVBBundle%2FGREPacket.test.cc;h=c3481fa876bdaa887db10aa9080b1f06eb959ced;hb=f2f5d59e83863f3b513950173baee1b6da2aee3c;hp=d7dfbf3124de45213635f0b9e8c2925e983f3529;hpb=492646c5461f4cf8975a0b024d044fc1b3dd22b2;p=senf.git diff --git a/Packets/MPEGDVBBundle/GREPacket.test.cc b/Packets/MPEGDVBBundle/GREPacket.test.cc index d7dfbf3..c3481fa 100644 --- a/Packets/MPEGDVBBundle/GREPacket.test.cc +++ b/Packets/MPEGDVBBundle/GREPacket.test.cc @@ -1,9 +1,9 @@ -// $Id$ +// $Id:GREPacket.test.cc 560 2007-12-13 14:39:37Z tho $ // // Copyright (C) 2007 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) -// Joachim Kaeber +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Joachim Kaeber // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -20,13 +20,14 @@ // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// Unit tests +/** \file + \brief GREPacket unit tests */ -//#include "TransportPacket.test.hh" -//#include "TransportPacket.test.ih" +//#include "GREPacket.test.hh" +//#include "GREPacket.test.ih" // Custom includes -#include "TransportPacket.hh" +#include "GREPacket.hh" #include "../../Utils/auto_unit_test.hh" #include @@ -38,45 +39,10 @@ using namespace senf; BOOST_AUTO_UNIT_TEST(GREPacket_packet) { - // TransportStream-Packet containing a ULE encoded IPv6 ping packet, - // captured with dvbsnoop - unsigned char data[] = { - 0x47, 0x41, 0x0f, 0x1e, 0x00, 0x80, 0x4c, 0x86, - 0xdd, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x11, - 0x40, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x48, 0x7c, 0x7e, 0xff, 0xfe, 0x23, 0x68, - 0xaf, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x04 ,0x02, 0x8c, 0x02, 0x8c, 0x00, 0x20, 0x58, - 0xe1, 0x11, 0x05, 0x12, 0x67, 0x06, 0x2f, 0x01, - 0x00, 0x20, 0x01, 0x06, 0x38, 0x04, 0x09, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, - 0x00, 0x1d, 0xc4, 0xe8, 0xc1, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff - }; - - senf::TransportPacket p (senf::TransportPacket::create(data)); + senf::GREPacket p (senf::GREPacket::create()); - BOOST_CHECK_EQUAL( p->sync_byte(), TRANSPORT_PACKET_SYNC_BYTE ); - BOOST_CHECK( ! p->transport_error_indicator() ); - BOOST_CHECK( p->pusi() ); - BOOST_CHECK( ! p->transport_priority() ); - BOOST_CHECK_EQUAL( p->pid(), 0x010fu ); - BOOST_CHECK_EQUAL( p->transport_scrmbl_ctrl(), 0x0u ); - BOOST_CHECK_EQUAL( p->adaptation_field_ctrl(), 0x1u ); - BOOST_CHECK_EQUAL( p->continuity_counter(), 0x0eu ); + BOOST_CHECK_EQUAL( senf::GREPacketParser::init_bytes+0u, 4u ); + //BOOST_CHECK_EQUAL( p->bytes(), 4u ); } ///////////////////////////////cc.e////////////////////////////////////////