//#include "MIHPacket.test.hh"
//#include "MIHPacket.test.ih"
-#include "../../Utils/auto_unit_test.hh"
-#include <boost/test/test_tools.hpp>
-
+// Custom includes
#include "MIHPacket.hh"
-using namespace senf;
+#include "../../Utils/auto_unit_test.hh"
+#include <boost/test/test_tools.hpp>
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
+using namespace senf;
BOOST_AUTO_UNIT_TEST(MIHPacket_create_string)
{
BOOST_CHECK_EQUAL( mihPacket->src_mihfId().asString(), "senf@berlios.de");
BOOST_CHECK_EQUAL( mihPacket->dst_mihfId().asString(), "test");
+ // the maximum length of a MIHF_ID is 253 octets
+ BOOST_CHECK_THROW( mihPacket->dst_mihfId().setString( std::string(254, 'x')), std::length_error);
+
// now expand a MIHF_ID
mihPacket->dst_mihfId().maxLengthValue(253);
mihPacket->dst_mihfId().setString( std::string(200, 'x'));