From: tho Date: Fri, 5 Feb 2010 10:59:43 +0000 (+0000) Subject: Unit Tests: added BOOST_CHECK(true) to tests without any assertions to avoid warnings X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=18d987b03ac188adf6e1a82ebce2666738f0ff65;p=senf.git Unit Tests: added BOOST_CHECK(true) to tests without any assertions to avoid warnings git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1570 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/PPI/Connectors.test.cc b/senf/PPI/Connectors.test.cc index 0e06053..521f476 100644 --- a/senf/PPI/Connectors.test.cc +++ b/senf/PPI/Connectors.test.cc @@ -372,6 +372,8 @@ SENF_AUTO_UNIT_TEST(typedInput) senf::Packet p (senf::DataPacket::create()); source.submit(p); + + BOOST_CHECK( true ); } SENF_AUTO_UNIT_TEST(tyepdOutput) @@ -383,6 +385,8 @@ SENF_AUTO_UNIT_TEST(tyepdOutput) ppi::init(); (void) target.request(); + + BOOST_CHECK( true ); } SENF_AUTO_UNIT_TEST(connectorTest) diff --git a/senf/PPI/DebugEvent.test.cc b/senf/PPI/DebugEvent.test.cc index a46e176..1b17df4 100644 --- a/senf/PPI/DebugEvent.test.cc +++ b/senf/PPI/DebugEvent.test.cc @@ -38,6 +38,7 @@ SENF_AUTO_UNIT_TEST(debugEvent) { // Tested in Module.test.cc + BOOST_CHECK( true ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/senf/PPI/DiscardSink.test.cc b/senf/PPI/DiscardSink.test.cc index c57664b..bb8569b 100644 --- a/senf/PPI/DiscardSink.test.cc +++ b/senf/PPI/DiscardSink.test.cc @@ -51,6 +51,8 @@ SENF_AUTO_UNIT_TEST(discardSink) source.submit(p); source.submit(p); + + BOOST_CHECK( true ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/senf/PPI/EventManager.test.cc b/senf/PPI/EventManager.test.cc index 7a4d07b..b0fa4c1 100644 --- a/senf/PPI/EventManager.test.cc +++ b/senf/PPI/EventManager.test.cc @@ -38,6 +38,7 @@ SENF_AUTO_UNIT_TEST(eventManager) { // Tested indirectly by Route.test.cc and Module.test.cc + BOOST_CHECK( true ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/senf/PPI/Events.test.cc b/senf/PPI/Events.test.cc index d07660a..c30c451 100644 --- a/senf/PPI/Events.test.cc +++ b/senf/PPI/Events.test.cc @@ -38,6 +38,7 @@ SENF_AUTO_UNIT_TEST(events) { // Tested in Route.test.cc + BOOST_CHECK( true ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/senf/PPI/IOEvent.test.cc b/senf/PPI/IOEvent.test.cc index cb7b654..07b7d81 100644 --- a/senf/PPI/IOEvent.test.cc +++ b/senf/PPI/IOEvent.test.cc @@ -38,6 +38,7 @@ SENF_AUTO_UNIT_TEST(ioEvent) { // Tested in SocketSource.test.cc and SocketSink.test.cc + BOOST_CHECK( true ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/senf/PPI/IdleEvent.test.cc b/senf/PPI/IdleEvent.test.cc index 443e29d..3001db2 100644 --- a/senf/PPI/IdleEvent.test.cc +++ b/senf/PPI/IdleEvent.test.cc @@ -38,6 +38,7 @@ SENF_AUTO_UNIT_TEST(idleEvent) { // Tested by ActiveFeeder.test.cc + BOOST_CHECK( true ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/senf/PPI/IntervalTimer.test.cc b/senf/PPI/IntervalTimer.test.cc index 66c0da6..949d3a3 100644 --- a/senf/PPI/IntervalTimer.test.cc +++ b/senf/PPI/IntervalTimer.test.cc @@ -84,6 +84,8 @@ SENF_AUTO_UNIT_TEST(intervalTimer) (senf::ClockService::now()) (start+senf::ClockService::milliseconds(300)) (senf::ClockService::milliseconds(50)) ); + else + BOOST_CHECK( true ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/senf/PPI/ModuleManager.test.cc b/senf/PPI/ModuleManager.test.cc index 60fe353..92a8b13 100644 --- a/senf/PPI/ModuleManager.test.cc +++ b/senf/PPI/ModuleManager.test.cc @@ -38,6 +38,7 @@ SENF_AUTO_UNIT_TEST(moduleManager) { // Tested in Module.test.cc + BOOST_CHECK( true ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/senf/PPI/Route.test.cc b/senf/PPI/Route.test.cc index 6130159..c0f7407 100644 --- a/senf/PPI/Route.test.cc +++ b/senf/PPI/Route.test.cc @@ -236,6 +236,8 @@ SENF_AUTO_UNIT_TEST(connect_runtime) senf::ClockService::now() + senf::ClockService::milliseconds(500)); senf::ppi::run(); + + BOOST_CHECK( true ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/senf/PPI/Setup.test.cc b/senf/PPI/Setup.test.cc index f8975da..dac7976 100644 --- a/senf/PPI/Setup.test.cc +++ b/senf/PPI/Setup.test.cc @@ -38,6 +38,7 @@ SENF_AUTO_UNIT_TEST(setup) { // Tested in nearly all other modules ... + BOOST_CHECK( true ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/senf/Packets/DefaultBundle/TCPPacket.test.cc b/senf/Packets/DefaultBundle/TCPPacket.test.cc index 70afb0c..702088d 100644 --- a/senf/Packets/DefaultBundle/TCPPacket.test.cc +++ b/senf/Packets/DefaultBundle/TCPPacket.test.cc @@ -39,7 +39,6 @@ SENF_AUTO_UNIT_TEST(tcpPacket_parse) { - unsigned char data[] = { 0x80, 0xA6, 0x00, 0x50, 0x2E, 0x93, 0x31, 0xB8, 0x66, 0xF9, 0xB7, 0xA1, 0x80, 0x18, 0x00, 0x2E, 0xCF, 0x65, 0x00, 0x00 diff --git a/senf/Packets/MPEGDVBBundle/TransportPacket.test.cc b/senf/Packets/MPEGDVBBundle/TransportPacket.test.cc index 1978000..aff8bec 100644 --- a/senf/Packets/MPEGDVBBundle/TransportPacket.test.cc +++ b/senf/Packets/MPEGDVBBundle/TransportPacket.test.cc @@ -119,6 +119,7 @@ SENF_AUTO_UNIT_TEST(transportPacket_create_with_pusi) senf::DataPacket payload (senf::DataPacket::createAfter( ts_packet, payload_data)); // TODO: add method for stuffing + BOOST_CHECK( true ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/senf/Scheduler/TimerEvent.test.cc b/senf/Scheduler/TimerEvent.test.cc index 04a2e43..4b1f481 100644 --- a/senf/Scheduler/TimerEvent.test.cc +++ b/senf/Scheduler/TimerEvent.test.cc @@ -169,6 +169,7 @@ SENF_AUTO_UNIT_TEST(timerJitter) jitterTest(); senf::scheduler::loresTimers(); senf::scheduler::watchdogTimeout(1000); + BOOST_CHECK( true ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/senf/Socket/ProtocolClientSocketHandle.test.cc b/senf/Socket/ProtocolClientSocketHandle.test.cc index d520990..15d0a12 100644 --- a/senf/Socket/ProtocolClientSocketHandle.test.cc +++ b/senf/Socket/ProtocolClientSocketHandle.test.cc @@ -66,6 +66,7 @@ SENF_AUTO_UNIT_TEST(protocolClientSocketHandle) { MySocketHandle hh("foo.bar.c",1234); } + BOOST_CHECK( true ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/senf/Socket/ProtocolServerSocketHandle.test.cc b/senf/Socket/ProtocolServerSocketHandle.test.cc index a9e0047..a7abd67 100644 --- a/senf/Socket/ProtocolServerSocketHandle.test.cc +++ b/senf/Socket/ProtocolServerSocketHandle.test.cc @@ -74,6 +74,7 @@ SENF_AUTO_UNIT_TEST(protocolServerSocketHandle) { MySocketHandle h("foo.bar.c",1234); } + BOOST_CHECK( true ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/senf/Socket/Protocols/Raw/PacketSocketHandle.test.cc b/senf/Socket/Protocols/Raw/PacketSocketHandle.test.cc index 29951fe..1a256c5 100644 --- a/senf/Socket/Protocols/Raw/PacketSocketHandle.test.cc +++ b/senf/Socket/Protocols/Raw/PacketSocketHandle.test.cc @@ -42,6 +42,7 @@ SENF_AUTO_UNIT_TEST(packetSocketHandle) // We have a Problem here .. packet sockets are only allowed for root if (getuid() != 0) { BOOST_WARN_MESSAGE(false, "Cannot test senf::PacketSocketHandle as non-root user"); + BOOST_CHECK( true ); return; } diff --git a/senf/Socket/Protocols/Raw/TunTapSocketHandle.test.cc b/senf/Socket/Protocols/Raw/TunTapSocketHandle.test.cc index 6946fac..f80f375 100644 --- a/senf/Socket/Protocols/Raw/TunTapSocketHandle.test.cc +++ b/senf/Socket/Protocols/Raw/TunTapSocketHandle.test.cc @@ -44,6 +44,7 @@ SENF_AUTO_UNIT_TEST(tapSocketHandle) { if (getuid() != 0) { BOOST_WARN_MESSAGE(false, "Cannot test senf::TunTapSocketHandle as non-root user"); + BOOST_CHECK( true ); return; } diff --git a/senf/Socket/Protocols/UN/UNSocketProtocol.test.cc b/senf/Socket/Protocols/UN/UNSocketProtocol.test.cc index a9c6247..5ab4477 100644 --- a/senf/Socket/Protocols/UN/UNSocketProtocol.test.cc +++ b/senf/Socket/Protocols/UN/UNSocketProtocol.test.cc @@ -37,8 +37,8 @@ SENF_AUTO_UNIT_TEST(unProtocol) { - //zZ leer + BOOST_CHECK( true ); } diff --git a/senf/Socket/SocketProtocol.test.cc b/senf/Socket/SocketProtocol.test.cc index 0864eeb..f774dca 100644 --- a/senf/Socket/SocketProtocol.test.cc +++ b/senf/Socket/SocketProtocol.test.cc @@ -44,6 +44,8 @@ SENF_AUTO_UNIT_TEST(socketProtocol) // BOOST_CHECK( protocol.body() == 0 ); protocol.policy(); + + BOOST_CHECK( true ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/senf/Utils/Buffer.test.cc b/senf/Utils/Buffer.test.cc index 7026244..3a66891 100644 --- a/senf/Utils/Buffer.test.cc +++ b/senf/Utils/Buffer.test.cc @@ -42,6 +42,8 @@ SENF_AUTO_UNIT_TEST(buffer) // Just check for compile errors, the rest can't be checked SENF_SCOPED_BUFFER(char, buf, size); (void) buf; + + BOOST_CHECK( true ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/senf/Utils/Console/Server.test.cc b/senf/Utils/Console/Server.test.cc index 36108c5..9d0ba65 100644 --- a/senf/Utils/Console/Server.test.cc +++ b/senf/Utils/Console/Server.test.cc @@ -36,7 +36,9 @@ ///////////////////////////////cc.p//////////////////////////////////////// SENF_AUTO_UNIT_TEST(server) -{} +{ + BOOST_CHECK( true ); +} ///////////////////////////////cc.e//////////////////////////////////////// #undef prefix_ diff --git a/senf/Utils/Console/Variables.test.cc b/senf/Utils/Console/Variables.test.cc index fc782b7..c93ba20 100644 --- a/senf/Utils/Console/Variables.test.cc +++ b/senf/Utils/Console/Variables.test.cc @@ -116,6 +116,7 @@ namespace { SENF_AUTO_UNIT_TEST(memberVariables) { Test2 test2ob; + BOOST_CHECK( true ); } #ifdef COMPILE_CHECK diff --git a/senf/Utils/Logger/AreaRegistry.test.cc b/senf/Utils/Logger/AreaRegistry.test.cc index b01e55a..d49f7cb 100644 --- a/senf/Utils/Logger/AreaRegistry.test.cc +++ b/senf/Utils/Logger/AreaRegistry.test.cc @@ -37,6 +37,7 @@ SENF_AUTO_UNIT_TEST(areaRegistry) { + BOOST_CHECK( true ); #if 0 // Need to rewrite this test ... char const * areas[] = { "GlobalTestArea", diff --git a/senf/Utils/Logger/SyslogTarget.test.cc b/senf/Utils/Logger/SyslogTarget.test.cc index 5459aeb..4ae4535 100644 --- a/senf/Utils/Logger/SyslogTarget.test.cc +++ b/senf/Utils/Logger/SyslogTarget.test.cc @@ -42,6 +42,7 @@ SENF_AUTO_UNIT_TEST(syslogTarget) syslog.route(); BOOST_WARN_MESSAGE( false, "Check the system log for the test message" ); SENF_LOG(("SENF syslog test message")); + BOOST_CHECK( true ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/senf/Utils/parameter.test.cc b/senf/Utils/parameter.test.cc index 4781cbf..7af4e1f 100644 --- a/senf/Utils/parameter.test.cc +++ b/senf/Utils/parameter.test.cc @@ -36,7 +36,9 @@ ///////////////////////////////cc.p//////////////////////////////////////// SENF_AUTO_UNIT_TEST(parameter) -{} +{ + BOOST_CHECK( true ); +} ///////////////////////////////cc.e//////////////////////////////////////// #undef prefix_ diff --git a/senf/Utils/pool_alloc_mixin.test.cc b/senf/Utils/pool_alloc_mixin.test.cc index 439a837..d258a8d 100644 --- a/senf/Utils/pool_alloc_mixin.test.cc +++ b/senf/Utils/pool_alloc_mixin.test.cc @@ -52,6 +52,8 @@ SENF_AUTO_UNIT_TEST(poolAllocMixin) } BOOST_CHECK_EQUAL( Test::allocCounter(), 0u ); +#else + BOOST_CHECK( true ); #endif } diff --git a/senf/Utils/type_traits.test.cc b/senf/Utils/type_traits.test.cc index 0040416..1e1706b 100644 --- a/senf/Utils/type_traits.test.cc +++ b/senf/Utils/type_traits.test.cc @@ -140,6 +140,8 @@ SENF_AUTO_UNIT_TEST(typeTraits) BOOST_STATIC_ASSERT(( senf::is_pair< std::pair >::value )); BOOST_STATIC_ASSERT(( ! senf::is_pair< void () >::value )); + + BOOST_CHECK( true ); } ///////////////////////////////cc.e////////////////////////////////////////