X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2F80221Bundle%2FTLVParser.test.cc;h=52705804b019d901c6721c06104f147c872fecee;hb=bea7cfcf3d02688ece159d76890acfe2d0051d71;hp=bea19ddef5c38d8ff7b91aea552703cc8af8d038;hpb=f723d7852a8195072eee387ea9ca77156b58438b;p=senf.git diff --git a/senf/Packets/80221Bundle/TLVParser.test.cc b/senf/Packets/80221Bundle/TLVParser.test.cc index bea19dd..5270580 100644 --- a/senf/Packets/80221Bundle/TLVParser.test.cc +++ b/senf/Packets/80221Bundle/TLVParser.test.cc @@ -101,7 +101,8 @@ BOOST_AUTO_UNIT_TEST(MIHGenericTLVParser_create_with_simple_length) PacketInterpreterBase::byte value[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09 }; - PacketInterpreterBase::ptr p (PacketInterpreter::create(2u)); + PacketInterpreterBase::ptr p (PacketInterpreter::create( + senf::PacketInterpreterBase::size_type(2u))); MIHGenericTLVParser tlvParser( p->data().begin(), &p->data()); tlvParser.type() = 42u; tlvParser.value( value); @@ -124,7 +125,8 @@ BOOST_AUTO_UNIT_TEST(MIHGenericTLVParser_create_with_extended_length) PacketInterpreterBase::byte value[255]; for (unsigned i=0; i::create(2u)); + PacketInterpreterBase::ptr p (PacketInterpreter::create( + senf::PacketInterpreterBase::size_type(2u))); MIHGenericTLVParser tlvParser( p->data().begin(), &p->data()); tlvParser.maxLengthValue( MIHTLVLengthParser::max_value); tlvParser.type() = 42u; @@ -146,7 +148,8 @@ BOOST_AUTO_UNIT_TEST(MIHGenericTLVParser_create_with_extended_length) BOOST_AUTO_UNIT_TEST(MIHGenericTLVParser_create_invalid) { - PacketInterpreterBase::ptr p (PacketInterpreter::create(2u)); + PacketInterpreterBase::ptr p (PacketInterpreter::create( + senf::PacketInterpreterBase::size_type(2u))); MIHGenericTLVParser tlvParser( p->data().begin(), &p->data()); tlvParser.type() = 42u; tlvParser.finalizeLength(); @@ -204,7 +207,8 @@ BOOST_AUTO_UNIT_TEST(TestMacAddressTLVPacket_create) 0x0c, // length 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x01, 0x23, 0x45, 0x67 // value }; - BOOST_CHECK( equal( tlvPacket.data().begin(), tlvPacket.data().end(), data )); + SENF_CHECK_EQUAL_COLLECTIONS( + data, data+sizeof(data), tlvPacket.data().begin(), tlvPacket.data().end() ); }