X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FDefaultBundle%2FMldv2Packet.test.cc;h=f42a48fe872627dbcfae15fd041fff91fb17c2b2;hb=a1fdb7bb122f0b05be809a922d4b7ef5e125fa67;hp=b26eabe68015e890666c5c34da38a29011878e9e;hpb=f7dcc6267c7637efaba2ebe5a20df5f849a68d39;p=senf.git diff --git a/Packets/DefaultBundle/Mldv2Packet.test.cc b/Packets/DefaultBundle/Mldv2Packet.test.cc index b26eabe..f42a48f 100644 --- a/Packets/DefaultBundle/Mldv2Packet.test.cc +++ b/Packets/DefaultBundle/Mldv2Packet.test.cc @@ -25,14 +25,21 @@ // Custom includes #include "ICMPv6Packet.hh" +#include "ICMPv6TypePacket.hh" #include "../../Packets/DataPacket.hh" +#include "../../Utils/String.hh" + #include "../../Utils/auto_unit_test.hh" #include -#include "ICMPv6TypePacket.hh" + BOOST_AUTO_UNIT_TEST(ICMPv6_MLDv2_Packet_packet) { - unsigned char data[] = {0x00 ,0x00 ,0x00 ,0x01 ,0x04 ,0x00 ,0x00 ,0x00 ,0xff ,0x15 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x16}; + unsigned char data[] = { + 0x00 ,0x00 ,0x00 ,0x01 ,0x04 ,0x00 ,0x00 ,0x00 , + 0xff ,0x15 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , + 0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x16 + }; senf::MLDv2ListenerReport p ( senf::MLDv2ListenerReport::create(data) ); @@ -40,5 +47,5 @@ BOOST_AUTO_UNIT_TEST(ICMPv6_MLDv2_Packet_packet) senf::MLDv2ListenerReport::Parser::mcastAddrRecords_t::container mcastAddrRecords (p->mcastAddrRecords()); senf::MLDv2ListenerReport::Parser::mcastAddrRecords_t::container::iterator mcAddrIt (mcastAddrRecords.begin() ); BOOST_CHECK_EQUAL(mcAddrIt->recordType(), 0x04); - BOOST_CHECK_EQUAL(boost::lexical_cast(mcAddrIt->mcAddress() ), "ff15::16"); + BOOST_CHECK_EQUAL(senf::str(mcAddrIt->mcAddress() ), "ff15::16"); }