From: g0dil Date: Tue, 23 Sep 2008 11:00:27 +0000 (+0000) Subject: Packets: Absolutely rudimentary new finalize() API tests X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=914aedddb62c3ca4fcabc881ad12b398a1c120f3;p=senf.git Packets: Absolutely rudimentary new finalize() API tests git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@915 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Packets/Packet.test.cc b/Packets/Packet.test.cc index 2da754d..70b3e1d 100644 --- a/Packets/Packet.test.cc +++ b/Packets/Packet.test.cc @@ -161,8 +161,11 @@ BOOST_AUTO_UNIT_TEST(packet) packet.finalizeAll(); BOOST_CHECK_EQUAL( packet.last().as()->type(), - BarPacket::type::parser::type_t::value_type(-1) ); + BarPacket::Parser::type_t::value_type(-1) ); packet.last().append(FooPacket::create()); + packet.finalizeThis(); + packet.finalizeTo(); + packet.finalizeTo(packet.find()); packet.finalizeAll(); BOOST_CHECK_EQUAL( packet.find()->type(), 1u ); diff --git a/Utils/Exception.hh b/Utils/Exception.hh index 7abf26c..bb947e2 100644 --- a/Utils/Exception.hh +++ b/Utils/Exception.hh @@ -96,9 +96,9 @@ SENF_WRAP_EXC(std::bad_cast) SENF_WRAP_EXC(somelib::FooException) } - \endcode The re-thrown exception can then be caught as std::bad_cast or as - senf::ExceptionMixin as needed. It is safe, to wrap an exception twice (the macro will detect - this case). + \endcode + The re-thrown exception can then be caught as std::bad_cast or as senf::ExceptionMixin + as needed. It is safe, to wrap an exception twice (the macro will detect this case). \code bar() { try {