From: pug Date: Thu, 10 Sep 2009 15:28:35 +0000 (+0000) Subject: finished Unittest IPv6 hopByHop Packet with optionTypes X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=dc92fc89c7e2d5eedcaadaebef0a196acd39c07f;p=senf.git finished Unittest IPv6 hopByHop Packet with optionTypes git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1411 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Packets/DefaultBundle/IPv6Extensions.test.cc b/senf/Packets/DefaultBundle/IPv6Extensions.test.cc index 55563a4..0b3d740 100644 --- a/senf/Packets/DefaultBundle/IPv6Extensions.test.cc +++ b/senf/Packets/DefaultBundle/IPv6Extensions.test.cc @@ -197,16 +197,21 @@ BOOST_AUTO_UNIT_TEST(ipv6Extensions_hopByHop) BOOST_CHECK_EQUAL( pHop_extension->headerLength(), 0x00 ); SENF_CHECK_NO_THROW( pHop_extension.dump( oss )); - pHop_extension.dump(std::cout); + pHop_extension.dump(oss); senf::IPv6Extension_HopByHop::Parser::options_t::container optC(pHop_extension->options() ); senf::IPv6Extension_HopByHop::Parser::options_t::container::iterator listIter (optC.begin()); BOOST_CHECK_EQUAL( listIter->optionType(), 5u); BOOST_CHECK_EQUAL( listIter->optionLength(), 2u); - std::cout << listIter->value() << std::endl; ++listIter; BOOST_CHECK_EQUAL( listIter->optionType(), 2u); BOOST_CHECK_EQUAL( listIter->optionLength(), 0); -// pHop_extension.dump(std::cout); //( no optiontype output ... sth wrong here! ) + pHop_extension.dump(oss); + + BOOST_REQUIRE( pHop_extension.next().is() ); + senf::ICMPv6Packet pICMPv6 (pHop_extension.next().as()); + BOOST_CHECK_EQUAL( pICMPv6->type(), 0x8f); + BOOST_CHECK_EQUAL( pICMPv6->code(), 0u); + BOOST_CHECK_EQUAL( pICMPv6->checksum(), 0x50cc); } ///////////////////////////////cc.e////////////////////////////////////////