From f62a0a956ccfa8affde48ba3f02282ef36259c49 Mon Sep 17 00:00:00 2001
From: tho <tho@wiback.org>
Date: Fri, 20 Mar 2009 10:24:21 +0000
Subject: [PATCH] added some tests to increase test coverage

---
 PPI/RateFilter.test.cc      | 2 ++
 Utils/Logger/Target.test.cc | 9 +++++++++
 2 files changed, 11 insertions(+)

diff --git a/PPI/RateFilter.test.cc b/PPI/RateFilter.test.cc
index 22a5a1c3d..923eb86af 100644
--- a/PPI/RateFilter.test.cc
+++ b/PPI/RateFilter.test.cc
@@ -64,6 +64,7 @@ BOOST_AUTO_UNIT_TEST(rateFilter)
     
     senf::ppi::run();
 
+    BOOST_CHECK_EQUAL( rateFilter.interval(), senf::ClockService::milliseconds(100) );
     BOOST_CHECK_EQUAL( sink.size(), 2);
 }
 
@@ -104,6 +105,7 @@ BOOST_AUTO_UNIT_TEST(rateFilter_changeInterval)
     
     senf::ppi::run();
 
+    BOOST_CHECK_EQUAL( rateFilter.interval(), senf::ClockService::milliseconds(200) );
     BOOST_CHECK_EQUAL( sink.size(), 4);
 }
 
diff --git a/Utils/Logger/Target.test.cc b/Utils/Logger/Target.test.cc
index a4f5cf369..1a643b059 100644
--- a/Utils/Logger/Target.test.cc
+++ b/Utils/Logger/Target.test.cc
@@ -59,6 +59,15 @@ BOOST_AUTO_UNIT_TEST(target)
 {
     senf::log::StringTarget target;
 
+    BOOST_CHECK_THROW( target.route("senf::log::test::myStream", "invalid_area"), 
+            senf::log::Target::InvalidAreaException );
+    BOOST_CHECK_THROW( target.route("invalid_stream", ""),
+            senf::log::Target::InvalidStreamException );
+    BOOST_CHECK_THROW( target.unroute("senf::log::test::myStream", "invalid_area"), 
+            senf::log::Target::InvalidAreaException );
+    BOOST_CHECK_THROW( target.unroute("invalid_stream", ""),
+            senf::log::Target::InvalidStreamException );
+
     target.route<senf::log::Debug>();
     target.route<senf::log::test::myStream, senf::log::DefaultArea>(senf::log::Target::REJECT);
     target.route<senf::log::test::myStream, senf::log::VERBOSE>(senf::log::Target::ACCEPT, 0);
-- 
GitLab