Utils/Logger: Implement more flexible routing parameter parsing in console commands
[senf.git] / Packets / Packet.test.cc
index e61d67a..35b3214 100644 (file)
@@ -257,6 +257,17 @@ BOOST_AUTO_UNIT_TEST(concretePacket)
     BOOST_CHECK_EQUAL( BarPacket::create()->reserved(), 0xA0A0u );
 }
 
+BOOST_AUTO_UNIT_TEST(packetAssign)
+{
+    BarPacket bar1 (BarPacket::create());
+    BarPacket bar2 (BarPacket::create());
+
+    bar2->type() << 0x2A2Bu;
+    bar1.parser() << bar2;
+    
+    BOOST_CHECK_EQUAL( bar1->type(), 0x2A2Bu );
+}
+
 BOOST_AUTO_UNIT_TEST(packetAnnotation)
 {
     senf::Packet packet (FooPacket::create());
@@ -283,16 +294,18 @@ BOOST_AUTO_UNIT_TEST(packetAnnotation)
 
 COMPILE_FAIL(invalidAnnotation)
 {
+#if 0 // The traits check fails for user defined but trivial constructors so ...
 #   ifdef BOOST_HAS_TYPE_TRAITS_INTRINSICS
 
     senf::Packet packet (FooPacket::create());
     (void) packet.annotation<InvalidAnnotation>();
 
 #   else
+#   endif
+#endif
 
     invalid_annotation_check_disabled();
 
-#   endif
 }
 
 #endif