Packets: Add StringParser ostream operation
[senf.git] / PPI / AnnotationRouter.test.cc
index 8084a7a..7787864 100644 (file)
@@ -21,7 +21,7 @@
 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 /** \file
-    \brief AnnotationRouter.test unit tests */
+    \brief AnnotationRouter unit tests */
 
 //#include "AnnotationRouter.test.hh"
 //#include "AnnotationRouter.test.ih"
@@ -41,6 +41,7 @@ namespace {
         int value;
         bool operator<(IntAnnotation const & other) const { return value < other.value; }
         bool operator==(IntAnnotation const & other) const { return value == other.value; }
+        IntAnnotation() {}
         IntAnnotation(int v) : value(v) {}
         IntAnnotation & operator=(int v) { value=v; return *this; }
         operator int () const { return value; }
@@ -61,6 +62,9 @@ BOOST_AUTO_UNIT_TEST(annotationRouter)
     senf::ppi::connect(source, router);
     senf::ppi::connect(router, sink1, 1);
     senf::ppi::connect(router, sink2, 2);
+    
+    BOOST_CHECK_THROW( senf::ppi::connect(router, sink2, 2), 
+            senf::ppi::module::AnnotationRouter<IntAnnotation>::DuplicateKeyException);
 
     senf::ppi::init();