Skip to content
Snippets Groups Projects
Commit e41c6454 authored by g0dil's avatar g0dil
Browse files

Packets: Absolutely rudimentary new finalize() API tests

parent fd2ff2d9
No related branches found
No related tags found
No related merge requests found
......@@ -161,8 +161,11 @@ BOOST_AUTO_UNIT_TEST(packet)
packet.finalizeAll();
BOOST_CHECK_EQUAL( packet.last().as<BarPacket>()->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<BarPacket>();
packet.finalizeTo(packet.find<BarPacket>());
packet.finalizeAll();
BOOST_CHECK_EQUAL( packet.find<BarPacket>()->type(), 1u );
......
......@@ -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 <tt>std::bad_cast</tt> 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 <tt>std::bad_cast</tt> or as senf::ExceptionMixin
as needed. It is safe, to wrap an exception twice (the macro will detect this case).
\code
bar() {
try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment