From: tho Date: Fri, 20 Mar 2009 10:24:21 +0000 (+0000) Subject: added some tests to increase test coverage X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=7f60122e00a4680d39b199a738160eb8a5dea381;p=senf.git added some tests to increase test coverage git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1161 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/PPI/RateFilter.test.cc b/PPI/RateFilter.test.cc index 22a5a1c..923eb86 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 a4f5cf3..1a643b0 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(); target.route(senf::log::Target::REJECT); target.route(senf::log::Target::ACCEPT, 0);