#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
}
-BOOST_AUTO_UNIT_TEST(one_section_to_one_transportpacket)
+SENF_AUTO_UNIT_TEST(one_section_to_one_transportpacket)
{
senf::ppi::module::debug::ActiveSource source;
senf::ppi::module::debug::PassiveSink sink;
0xffu));
}
-BOOST_AUTO_UNIT_TEST(one_section_to_two_transportpackets)
+SENF_AUTO_UNIT_TEST(one_section_to_two_transportpackets)
{
senf::ppi::module::debug::ActiveSource source;
senf::ppi::module::debug::PassiveSink sink;
0xffu));
}
-BOOST_AUTO_UNIT_TEST(many_sections_to_many_transportpackets)
+SENF_AUTO_UNIT_TEST(many_sections_to_many_transportpackets)
{
senf::ppi::module::debug::ActiveSource source;
senf::ppi::module::debug::PassiveSink sink;
}
}
-BOOST_AUTO_UNIT_TEST(activeFeeder)
+SENF_AUTO_UNIT_TEST(activeFeeder)
{
senf::PacketData::byte data[] = { 0xab };
senf::Packet p (senf::DataPacket::create(data));
};
}
-BOOST_AUTO_UNIT_TEST(annotationRouter)
+SENF_AUTO_UNIT_TEST(annotationRouter)
{
debug::ActiveSource source;
debug::PassiveSink sink1;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(cloneSource)
+SENF_AUTO_UNIT_TEST(cloneSource)
{
senf::PacketData::byte data[] = { 0xab };
senf::Packet p (senf::DataPacket::create(data));
// the corresponding connected module since otherwise the connectors cannot be connected anywhere
// and will be unusable.
-BOOST_AUTO_UNIT_TEST(connector)
+SENF_AUTO_UNIT_TEST(connector)
{
// It doesn't matter, which type of connectors we use here since they are all based on
// Connector.
BOOST_CHECK_EQUAL( & target.input.peer(), & source.output );
}
-BOOST_AUTO_UNIT_TEST(passiveConnector)
+SENF_AUTO_UNIT_TEST(passiveConnector)
{
debug::ActiveSource source;
debug::PassiveSink target;
void handler() { called = true; }
}
-BOOST_AUTO_UNIT_TEST(activeConnector)
+SENF_AUTO_UNIT_TEST(activeConnector)
{
debug::ActiveSource source;
debug::PassiveSink target;
BOOST_CHECK_EQUAL( & source.output.peer(), & target.input );
}
-BOOST_AUTO_UNIT_TEST(inputConnector)
+SENF_AUTO_UNIT_TEST(inputConnector)
{
debug::ActiveSource source;
debug::PassiveSink target;
BOOST_CHECK( target.input.empty() );
}
-BOOST_AUTO_UNIT_TEST(outputConnector)
+SENF_AUTO_UNIT_TEST(outputConnector)
{
debug::ActiveSource source;
debug::PassiveSink target;
};
}
-BOOST_AUTO_UNIT_TEST(passiveInput)
+SENF_AUTO_UNIT_TEST(passiveInput)
{
debug::ActiveSource source;
PassiveInputTest target;
BOOST_CHECK( ! target.input.throttled() );
}
-BOOST_AUTO_UNIT_TEST(passiveOutput)
+SENF_AUTO_UNIT_TEST(passiveOutput)
{
debug::PassiveSource source;
debug::ActiveSink target;
// connect() is tested indirectly via ppi::connect
}
-BOOST_AUTO_UNIT_TEST(activeInput)
+SENF_AUTO_UNIT_TEST(activeInput)
{
debug::PassiveSource source;
debug::ActiveSink target;
BOOST_CHECK( target.request() == p );
}
-BOOST_AUTO_UNIT_TEST(activeOutput)
+SENF_AUTO_UNIT_TEST(activeOutput)
{
debug::ActiveSource source;
debug::PassiveSink target;
}
-BOOST_AUTO_UNIT_TEST(typedInput)
+SENF_AUTO_UNIT_TEST(typedInput)
{
debug::ActiveSource source;
TypedPassiveInput<> target;
source.submit(p);
}
-BOOST_AUTO_UNIT_TEST(tyepdOutput)
+SENF_AUTO_UNIT_TEST(tyepdOutput)
{
TypedPassiveOutput<> source;
debug::ActiveSink target;
(void) target.request();
}
-BOOST_AUTO_UNIT_TEST(connectorTest)
+SENF_AUTO_UNIT_TEST(connectorTest)
{
{
TypedPassiveInput<> input;
}
}
-BOOST_AUTO_UNIT_TEST(delayedConnect)
+SENF_AUTO_UNIT_TEST(delayedConnect)
{
{
debug::PassiveSource source;
}
}
-BOOST_AUTO_UNIT_TEST(disconnect)
+SENF_AUTO_UNIT_TEST(disconnect)
{
{
debug::PassiveSource source;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(debugEvent)
+SENF_AUTO_UNIT_TEST(debugEvent)
{
// Tested in Module.test.cc
}
namespace debug = senf::ppi::module::debug;
namespace ppi = senf::ppi;
-BOOST_AUTO_UNIT_TEST(debugModules)
+SENF_AUTO_UNIT_TEST(debugModules)
{
{
debug::ActiveSource source;
}
}
-BOOST_AUTO_UNIT_TEST(activeFeederSource)
+SENF_AUTO_UNIT_TEST(activeFeederSource)
{
debug::ActiveFeederSource source;
debug::PassiveSink sink;
BOOST_CHECK_EQUAL( sink.size(), 1u );
}
-BOOST_AUTO_UNIT_TEST(activeFeederSink)
+SENF_AUTO_UNIT_TEST(activeFeederSink)
{
debug::PassiveSource source;
debug::ActiveFeederSink sink;
BOOST_CHECK( source.empty() );
}
-BOOST_AUTO_UNIT_TEST(logSink)
+SENF_AUTO_UNIT_TEST(logSink)
{
senf::log::StringTarget logTarget;
logTarget.route<senf::log::Debug,senf::log::VERBOSE>();
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(discardSink)
+SENF_AUTO_UNIT_TEST(discardSink)
{
// here we really can just validate that everything compiles ...
namespace module = ppi::module;
namespace debug = module::debug;
-BOOST_AUTO_UNIT_TEST(activeDuplicator)
+SENF_AUTO_UNIT_TEST(activeDuplicator)
{
debug::ActiveSource source;
module::ActiveDuplicator duplicator;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(eventManager)
+SENF_AUTO_UNIT_TEST(eventManager)
{
// Tested indirectly by Route.test.cc and Module.test.cc
}
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(events)
+SENF_AUTO_UNIT_TEST(events)
{
// Tested in Route.test.cc
}
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(ioEvent)
+SENF_AUTO_UNIT_TEST(ioEvent)
{
// Tested in SocketSource.test.cc and SocketSink.test.cc
}
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(idleEvent)
+SENF_AUTO_UNIT_TEST(idleEvent)
{
// Tested by ActiveFeeder.test.cc
}
}
}
-BOOST_AUTO_UNIT_TEST(intervalTimer)
+SENF_AUTO_UNIT_TEST(intervalTimer)
{
char const * enabled (getenv("SENF_TIMING_CRITICAL_TESTS"));
BOOST_WARN_MESSAGE(enabled, "Set SENF_TIMING_CRITICAL_TESTS to not skip timing critical tests");
}
-BOOST_AUTO_UNIT_TEST(jacks)
+SENF_AUTO_UNIT_TEST(jacks)
{
{
ActiveGroup group;
}
-BOOST_AUTO_UNIT_TEST(passiveJoin)
+SENF_AUTO_UNIT_TEST(passiveJoin)
{
debug::ActiveSource source1;
debug::ActiveSource source2;
BOOST_CHECK_EQUAL( join.connectors().size(), 2u);
}
-BOOST_AUTO_UNIT_TEST(priorityJoin)
+SENF_AUTO_UNIT_TEST(priorityJoin)
{
debug::PassiveSource source1;
debug::PassiveSource source2;
};
}
-BOOST_AUTO_UNIT_TEST(module)
+SENF_AUTO_UNIT_TEST(module)
{
// route and registerEvent are tested in Route.test.cc
}
-BOOST_AUTO_UNIT_TEST(delayedInit)
+SENF_AUTO_UNIT_TEST(delayedInit)
{
MakeInit maker;
senf::scheduler::TimerEvent timer (
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(moduleManager)
+SENF_AUTO_UNIT_TEST(moduleManager)
{
// Tested in Module.test.cc
}
}
-BOOST_AUTO_UNIT_TEST(monitorModulePassthrough)
+SENF_AUTO_UNIT_TEST(monitorModulePassthrough)
{
senf::ppi::module::debug::ActiveSource source;
senf::ppi::module::debug::PassiveSink sink;
BOOST_CHECK( source );
}
-BOOST_AUTO_UNIT_TEST(monitorModuleNoPassthrough)
+SENF_AUTO_UNIT_TEST(monitorModuleNoPassthrough)
{
senf::ppi::module::debug::ActiveSource source;
PacketCounter counter;
BOOST_CHECK( source );
}
-BOOST_AUTO_UNIT_TEST(monitorModuleDynamicConnect)
+SENF_AUTO_UNIT_TEST(monitorModuleDynamicConnect)
{
senf::ppi::module::debug::ActiveSource source;
PacketCounter counter;
{ os << value.value; return os; }
}
-BOOST_AUTO_UNIT_TEST(multiConnectorMixin_sequenceContainer)
+SENF_AUTO_UNIT_TEST(multiConnectorMixin_sequenceContainer)
{
debug::ActiveSource source1;
debug::ActiveSource source2;
BOOST_CHECK_EQUAL( module.count, 1u );
}
-BOOST_AUTO_UNIT_TEST(multiConnectorMixin_userContainer)
+SENF_AUTO_UNIT_TEST(multiConnectorMixin_userContainer)
{
debug::ActiveSource source;
UserContainerModule module;
BOOST_CHECK_EQUAL( module.connectors().size(), 1u );
}
-BOOST_AUTO_UNIT_TEST(multiConnectorMixin_multipleModules)
+SENF_AUTO_UNIT_TEST(multiConnectorMixin_multipleModules)
{
debug::ActiveSource source;
debug::PassiveSink sink;
namespace module = ppi::module;
namespace debug = module::debug;
-BOOST_AUTO_UNIT_TEST(passiveQueue)
+SENF_AUTO_UNIT_TEST(passiveQueue)
{
debug::ActiveSource source;
module::PassiveQueue queue;
};
}
-BOOST_AUTO_UNIT_TEST(thresholdQueueing)
+SENF_AUTO_UNIT_TEST(thresholdQueueing)
{
debug::ActiveSource source;
QueueTester tester;
}
}
-BOOST_AUTO_UNIT_TEST(rateAnalyzer)
+SENF_AUTO_UNIT_TEST(rateAnalyzer)
{
char const * enabled (getenv("SENF_TIMING_CRITICAL_TESTS"));
if (! enabled) {
}
}
-BOOST_AUTO_UNIT_TEST(rateFilter)
+SENF_AUTO_UNIT_TEST(rateFilter)
{
module::RateFilter rateFilter ( senf::ClockService::milliseconds(100) );
debug::PassiveSource source;
};
}
-BOOST_AUTO_UNIT_TEST(rateFilter_changeInterval)
+SENF_AUTO_UNIT_TEST(rateFilter_changeInterval)
{
char const * enabled (getenv("SENF_TIMING_CRITICAL_TESTS"));
if (! enabled) {
};
}
-BOOST_AUTO_UNIT_TEST(route)
+SENF_AUTO_UNIT_TEST(route)
{
debug::PassiveSource passiveSource;
debug::ActiveSource activeSource;
};
}
-BOOST_AUTO_UNIT_TEST(connect_runtime)
+SENF_AUTO_UNIT_TEST(connect_runtime)
{
TestSink sink;
module::ActiveFeeder feeder;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(setup)
+SENF_AUTO_UNIT_TEST(setup)
{
// Tested in nearly all other modules ...
}
}
}
-BOOST_AUTO_UNIT_TEST(passiveSocketSink)
+SENF_AUTO_UNIT_TEST(passiveSocketSink)
{
senf::ConnectedUDPv4ClientSocketHandle outputSocket (
senf::INet4SocketAddress(localhost4str(0)));
BOOST_CHECK_EQUAL( data, input );
}
-BOOST_AUTO_UNIT_TEST(activeSocketSink)
+SENF_AUTO_UNIT_TEST(activeSocketSink)
{
senf::ConnectedUDPv4ClientSocketHandle outputSocket (
senf::INet4SocketAddress(localhost4str(0)));
}
}
-BOOST_AUTO_UNIT_TEST(socketSource)
+SENF_AUTO_UNIT_TEST(socketSource)
{
senf::UDPv4ClientSocketHandle inputSocket;
inputSocket.bind(senf::INet4SocketAddress(localhost4str(0)));
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(throttleBarrier)
+SENF_AUTO_UNIT_TEST(throttleBarrier)
{
senf::ppi::module::debug::ActiveSource source;
senf::ppi::module::ThrottleBarrier barrier;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
#include <boost/test/test_tools.hpp>
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(RadiotapPacket_packet)
+SENF_AUTO_UNIT_TEST(RadiotapPacket_packet)
{
/* used madwifi 0.9.4 */
unsigned char data[] = {
SENF_CHECK_NO_THROW( p.dump( oss));
}
-BOOST_AUTO_UNIT_TEST(RadiotapPacket_create)
+SENF_AUTO_UNIT_TEST(RadiotapPacket_create)
{
unsigned char data[] = {
0x00 ,0x00 ,0x1a ,0x00, 0x6f, 0x18, 0x00, 0x00,
data, data+sizeof(data)/sizeof(data[0]) );
}
-BOOST_AUTO_UNIT_TEST(RadiotapPacket_packet_ath9k)
+SENF_AUTO_UNIT_TEST(RadiotapPacket_packet_ath9k)
{
/* radiotap packet from ath9k with atheros card*/
unsigned char data[] = {
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(WLANBeaconPacket_parse)
+SENF_AUTO_UNIT_TEST(WLANBeaconPacket_parse)
{
unsigned char data[] = {
0x3a, 0x30, 0xaa, 0x4c, 0x9c, 0x00, 0x00, 0x00, //timestamp
SENF_CHECK_NO_THROW( p.dump( oss ));
}
-BOOST_AUTO_UNIT_TEST(WLANBeaconPacket_create)
+SENF_AUTO_UNIT_TEST(WLANBeaconPacket_create)
{
senf::WLANBeaconPacket p (senf::WLANBeaconPacket::create());
p->timestamp() << 0x0000009C4CAA303AuLL;
///////////////////////////////cc.p////////////////////////////////////////
/* test parser with a data frame */
-BOOST_AUTO_UNIT_TEST(WLANPacket_dataFrame_packet)
+SENF_AUTO_UNIT_TEST(WLANPacket_dataFrame_packet)
{
unsigned char data[] = {
0x88, 0x01, 0x00, 0x00, 0x00, 0x1a, //header
/* test parser with creating a data frame*/
-BOOST_AUTO_UNIT_TEST(WLANPacket_dataFrame_create)
+SENF_AUTO_UNIT_TEST(WLANPacket_dataFrame_create)
{
senf::WLANPacket_DataFrame p (senf::WLANPacket_DataFrame::create());
/* test parser with a beacon frame */
-BOOST_AUTO_UNIT_TEST(WLANPacket_beaconFrame_packet)
+SENF_AUTO_UNIT_TEST(WLANPacket_beaconFrame_packet)
{
unsigned char data[] = {
0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
/* test parser with creating a beacon frame*/
-BOOST_AUTO_UNIT_TEST(WLANPacket_mgtFrame_create)
+SENF_AUTO_UNIT_TEST(WLANPacket_mgtFrame_create)
{
senf::WLANPacket_MgtFrame p (senf::WLANPacket_MgtFrame::create());
/* test parser with an ACK frame*/
-BOOST_AUTO_UNIT_TEST(WLANPacket_ctrlFrame_packet)
+SENF_AUTO_UNIT_TEST(WLANPacket_ctrlFrame_packet)
{
unsigned char data[] = {
0xd4, 0x00, 0x00, 0x00,
}
/* test parser with creating an ACK frame*/
-BOOST_AUTO_UNIT_TEST(WLANPacket_ctrlFrame_create)
+SENF_AUTO_UNIT_TEST(WLANPacket_ctrlFrame_create)
{
senf::WLANPacket_CtrlFrame p (senf::WLANPacket_CtrlFrame::create()) ;
p->receiverAddress() = senf::MACAddress::from_string("00:1a:4d:3e:c7:5c");
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
///////////////////////////////cc.p////////////////////////////////////////
using namespace senf;
-BOOST_AUTO_UNIT_TEST(MIHPacket_msgId)
+SENF_AUTO_UNIT_TEST(MIHPacket_msgId)
{
MIHPacket mihPacket (MIHPacket::create());
mihPacket->sid() = 4;
BOOST_CHECK_EQUAL( mihPacket->messageId(), 0x4c2a );
}
-BOOST_AUTO_UNIT_TEST(MIHPacket_create_eth)
+SENF_AUTO_UNIT_TEST(MIHPacket_create_eth)
{
EthernetPacket eth (EthernetPacket::create());
MIHPacket mihPacket (MIHPacket::createAfter(eth));
SENF_CHECK_NO_THROW( eth.dump( oss));
}
-BOOST_AUTO_UNIT_TEST(MIHPacket_create_string)
+SENF_AUTO_UNIT_TEST(MIHPacket_create_string)
{
MIHPacket mihPacket (MIHPacket::create());
// set some fields
}
-BOOST_AUTO_UNIT_TEST(MIHPacket_create_mac)
+SENF_AUTO_UNIT_TEST(MIHPacket_create_mac)
{
MACAddress srcMac ( MACAddress::from_string("01:02:03:04:05:06"));
MACAddress dstMac ( MACAddress::from_string("07:08:09:0a:0b:0c"));
}
-BOOST_AUTO_UNIT_TEST(MIHPacket_create_inet4)
+SENF_AUTO_UNIT_TEST(MIHPacket_create_inet4)
{
MIHPacket mihPacket (MIHPacket::create());
// set some fields
}
-BOOST_AUTO_UNIT_TEST(MIHPacket_create_inet6)
+SENF_AUTO_UNIT_TEST(MIHPacket_create_inet6)
{
MIHPacket mihPacket (MIHPacket::create());
// set some fields
}
-BOOST_AUTO_UNIT_TEST(MIHPayload_parse)
+SENF_AUTO_UNIT_TEST(MIHPayload_parse)
{
unsigned char data[] = {
// MIH header
}
-BOOST_AUTO_UNIT_TEST(MIHPayload_create)
+SENF_AUTO_UNIT_TEST(MIHPayload_create)
{
MIHPacket mihPacket (MIHPacket::create());
mihPacket->fragmentNr() = 42;
///////////////////////////////cc.p////////////////////////////////////////
using namespace senf;
-BOOST_AUTO_UNIT_TEST(mihfId)
+SENF_AUTO_UNIT_TEST(mihfId)
{
MIHFId id ( MACAddress::from_string("01:02:03:04:05:06"));
BOOST_CHECK_EQUAL( id.type(), MIHFId::MACAddress);
}
-BOOST_AUTO_UNIT_TEST(MIHGenericTLVParser_parse_with_simple_length)
+SENF_AUTO_UNIT_TEST(MIHGenericTLVParser_parse_with_simple_length)
{
PacketInterpreterBase::byte data[] = {
0x01, // type
}
-BOOST_AUTO_UNIT_TEST(MIHGenericTLVParser_parse_with_extended_length)
+SENF_AUTO_UNIT_TEST(MIHGenericTLVParser_parse_with_extended_length)
{
PacketInterpreterBase::byte data[] = {
0x01, // type
}
-BOOST_AUTO_UNIT_TEST(MIHGenericTLVParser_create_with_simple_length)
+SENF_AUTO_UNIT_TEST(MIHGenericTLVParser_create_with_simple_length)
{
PacketInterpreterBase::byte value[] = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09
}
-BOOST_AUTO_UNIT_TEST(MIHGenericTLVParser_create_with_extended_length)
+SENF_AUTO_UNIT_TEST(MIHGenericTLVParser_create_with_extended_length)
{
PacketInterpreterBase::byte value[255];
for (unsigned i=0; i<sizeof(value); i++)
}
-BOOST_AUTO_UNIT_TEST(MIHGenericTLVParser_create_invalid)
+SENF_AUTO_UNIT_TEST(MIHGenericTLVParser_create_invalid)
{
PacketInterpreterBase::ptr p (PacketInterpreter<VoidPacket>::create(
senf::PacketInterpreterBase::size_type(2u)));
typedef ConcretePacket<TestMacAddressTLVPacketType> TestMacAddressTLVPacket;
}
-BOOST_AUTO_UNIT_TEST(TestMacAddressTLVPacket_create)
+SENF_AUTO_UNIT_TEST(TestMacAddressTLVPacket_create)
{
TestMacAddressTLVPacket tlvPacket (TestMacAddressTLVPacket::create());
tlvPacket->type() = 42;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
};
}
-BOOST_AUTO_UNIT_TEST(ArrayParser_test)
+SENF_AUTO_UNIT_TEST(ArrayParser_test)
{
senf::PacketParserBase::byte data[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 };
senf::PacketInterpreterBase::ptr p (senf::PacketInterpreter<VoidPacket>::create(data));
// The other aux policies are tested with the corresponding container classes
-BOOST_AUTO_UNIT_TEST(vectorPacketSizeAuxPolicy)
+SENF_AUTO_UNIT_TEST(vectorPacketSizeAuxPolicy)
{
unsigned char data[] = { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15,
0x20, 0x21, 0x22, 0x23, 0x24, 0x25 };
}
}
-BOOST_AUTO_UNIT_TEST(vectorPacketSizeAuxPolicy_transformed)
+SENF_AUTO_UNIT_TEST(vectorPacketSizeAuxPolicy_transformed)
{
unsigned char data[] = { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15,
0x20, 0x21, 0x22, 0x23, 0x24, 0x25 };
}
}
-BOOST_AUTO_UNIT_TEST(listPacketSizeAuxPolicy)
+SENF_AUTO_UNIT_TEST(listPacketSizeAuxPolicy)
{
unsigned char data[] = { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15,
0x20, 0x21, 0x22, 0x23, 0x24, 0x25 };
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(ethernetPacket_parse)
+SENF_AUTO_UNIT_TEST(ethernetPacket_parse)
{
senf::PacketData::byte data[] = {
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, // destination MAC
SENF_CHECK_NO_THROW( p.dump( oss));
}
-BOOST_AUTO_UNIT_TEST(ethernetPacket_parse_chain)
+SENF_AUTO_UNIT_TEST(ethernetPacket_parse_chain)
{
unsigned char data[] = {
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, // destination MAC
BOOST_CHECK_EQUAL( *v.next().data().begin(), 0xf0 );
}
-BOOST_AUTO_UNIT_TEST(ethernetPacket_create)
+SENF_AUTO_UNIT_TEST(ethernetPacket_create)
{
senf::EthernetPacket eth (senf::EthernetPacket::create());
eth->source() = senf::MACAddress::from_string("01:02:03:04:05:06");
BOOST_CHECK_EQUAL(vlan->type(), 0x0800u);
}
-BOOST_AUTO_UNIT_TEST(ethernetPacket_llcsnap)
+SENF_AUTO_UNIT_TEST(ethernetPacket_llcsnap)
{
senf::EthernetPacket eth (senf::EthernetPacket::create());
eth->source() = senf::MACAddress::from_string("01:02:03:04:05:06");
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(ICMPv6Packet_packet)
+SENF_AUTO_UNIT_TEST(ICMPv6Packet_packet)
{
unsigned char dataListenerReport[] = {
0x8f, 0x00, 0x8d, 0x54, 0x00, 0x00, 0x00, 0x01,
}
-BOOST_AUTO_UNIT_TEST(ICMPv6Packet_create)
+SENF_AUTO_UNIT_TEST(ICMPv6Packet_create)
{
std::ostringstream oss (std::ostringstream::out);
using namespace senf;
-BOOST_AUTO_UNIT_TEST(ipV4Packet_parse)
+SENF_AUTO_UNIT_TEST(ipV4Packet_parse)
{
unsigned char data[] = {
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
SENF_CHECK_NO_THROW( p.dump( oss));
}
-BOOST_AUTO_UNIT_TEST(ipV4Packet_create)
+SENF_AUTO_UNIT_TEST(ipV4Packet_create)
{
senf::IPv4Packet ip (senf::IPv4Packet::create());
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(ipv6Extensions_fragment)
+SENF_AUTO_UNIT_TEST(ipv6Extensions_fragment)
{
// Just for the fun of it, we test a nice chain: A fragment of a fragmented UDP packet
unsigned char Fragment_packetData[] = {
}
-BOOST_AUTO_UNIT_TEST(ipv6Extensions_routing)
+SENF_AUTO_UNIT_TEST(ipv6Extensions_routing)
{
unsigned char Routing_packetData[] = {
// IP header
}
-BOOST_AUTO_UNIT_TEST(ipv6Extensions_hopByHop_parse)
+SENF_AUTO_UNIT_TEST(ipv6Extensions_hopByHop_parse)
{
unsigned char HopByHop_packetData[] = {
0x60, 0x00, 0x00, 0x00, // IP version, class, flow label
}
-BOOST_AUTO_UNIT_TEST(ipv6Extensions_hopByHop_create)
+SENF_AUTO_UNIT_TEST(ipv6Extensions_hopByHop_create)
{
std::ostringstream oss (std::ostringstream::out);
unsigned char HopByHop_packetData[] = {
};
}
-BOOST_AUTO_UNIT_TEST(ipv6Extensions_hopByHop_create_SN)
+SENF_AUTO_UNIT_TEST(ipv6Extensions_hopByHop_create_SN)
{
senf::IPv6HopByHopOptionsPacket p ( senf::IPv6HopByHopOptionsPacket::create() );
p->nextHeader() = 0x3a;
}
-BOOST_AUTO_UNIT_TEST(ipv6Extensions_hopByHop_parse_SN)
+SENF_AUTO_UNIT_TEST(ipv6Extensions_hopByHop_parse_SN)
{
unsigned char data[] = {
0x3a, 0x01, // Hop-By-Hop Header (nextHeader, length)
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(ipV6Packet_parse)
+SENF_AUTO_UNIT_TEST(ipV6Packet_parse)
{
unsigned char data[] = {
0x60, 0x12, 0x20, 0x30,
SENF_CHECK_NO_THROW( p.dump( oss));
}
-BOOST_AUTO_UNIT_TEST(ipV6Packet_create)
+SENF_AUTO_UNIT_TEST(ipV6Packet_create)
{
senf::IPv6Packet ip (senf::IPv6Packet::create());
};
}
-BOOST_AUTO_UNIT_TEST(ListOptionTypeParser)
+SENF_AUTO_UNIT_TEST(ListOptionTypeParser)
{
senf::PacketInterpreterBase::ptr pi (senf::PacketInterpreter<VoidPacket>::create(
OptionParser::init_bytes));
BOOST_CHECK_EQUAL( p.list().empty(), false );
}
-BOOST_AUTO_UNIT_TEST(ListOptionTypeParser_container)
+SENF_AUTO_UNIT_TEST(ListOptionTypeParser_container)
{
senf::PacketInterpreterBase::ptr pi (senf::PacketInterpreter<VoidPacket>::create(
OptionParser::init_bytes));
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(llcsnap_parse)
+SENF_AUTO_UNIT_TEST(llcsnap_parse)
{
senf::PacketData::byte data[] = {
0xaa, // DSAP
SENF_CHECK_NO_THROW( p.dump( oss));
}
-BOOST_AUTO_UNIT_TEST(llcSnapPacket_ethernet)
+SENF_AUTO_UNIT_TEST(llcSnapPacket_ethernet)
{
senf::LlcSnapPacket llcsnap (senf::LlcSnapPacket::create());
senf::EthernetPacket eth (senf::EthernetPacket::createAfter(llcsnap));
#include <boost/test/test_tools.hpp>
-BOOST_AUTO_UNIT_TEST(ICMPv6_MLDv2_Packet_packet)
+SENF_AUTO_UNIT_TEST(ICMPv6_MLDv2_Packet_packet)
{
unsigned char data[] = {
0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00,
#include <boost/test/test_tools.hpp>
-BOOST_AUTO_UNIT_TEST(RTPPacket_packet)
+SENF_AUTO_UNIT_TEST(RTPPacket_packet)
{
unsigned char data[] = {0x80 , 0x08 , 0x1b , 0xbb , 0x02 , 0xcb , 0xad , 0x80 , 0x50 , 0x48 , 0xa7, 0x8c };
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(tcpPacket_parse)
+SENF_AUTO_UNIT_TEST(tcpPacket_parse)
{
unsigned char data[] = {
SENF_CHECK_NO_THROW( p.dump( oss));
}
-BOOST_AUTO_UNIT_TEST(tcpPacket_in_ipv4_parse)
+SENF_AUTO_UNIT_TEST(tcpPacket_in_ipv4_parse)
{
unsigned char data[] = {
//20 Byte IPv4-Header
}
-BOOST_AUTO_UNIT_TEST(tcpPacket_in_ipv6_parse)
+SENF_AUTO_UNIT_TEST(tcpPacket_in_ipv6_parse)
{
unsigned char data[] = {
// IPv6-Header
BOOST_CHECK( tcp->validateChecksum() );
}
-BOOST_AUTO_UNIT_TEST(tcpPacket_in_ipv6_create)
+SENF_AUTO_UNIT_TEST(tcpPacket_in_ipv6_create)
{
unsigned char data[] = {
// IPv6-Header
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(udpPacket_parse)
+SENF_AUTO_UNIT_TEST(udpPacket_parse)
{
unsigned char data[] = {
SENF_CHECK_NO_THROW( p.dump( oss));
}
-BOOST_AUTO_UNIT_TEST(udpPacket_in_ipv4_create)
+SENF_AUTO_UNIT_TEST(udpPacket_in_ipv4_create)
{
unsigned char data[] = {
0x45, 0x00, 0x00, 0x26, 0x00, 0x00, 0x40, 0x00,
BOOST_CHECK( udp->validateChecksum() );
}
-BOOST_AUTO_UNIT_TEST(udpPacket_in_ipv6_parse)
+SENF_AUTO_UNIT_TEST(udpPacket_in_ipv6_parse)
{
// captured udp packet generated with mgen send over ipv6
unsigned char data[] = {
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(packetLink)
+SENF_AUTO_UNIT_TEST(packetLink)
{
// This test shall test, whether referencing a packet (in this case IPv6Packet) as template
// argument correctly includes the corresponding object file when linking
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(dumpFormat)
+SENF_AUTO_UNIT_TEST(dumpFormat)
{
BOOST_CHECK_EQUAL( senf::fieldName("test"), " test : " );
BOOST_CHECK_EQUAL( senf::fieldName("xxxxxxxxxxxxxxxxxxxxxxx"), " xxxxxxxxxxxxxxxxxxxxxxx : " );
}
-BOOST_AUTO_UNIT_TEST(GenericTLV_parser)
+SENF_AUTO_UNIT_TEST(GenericTLV_parser)
{
BOOST_CHECK_EQUAL( senf::init_bytes<MyGenericTLVParser>::value,
senf::init_bytes<MyTLVParserBase>::value) ;
BOOST_CHECK_EQUAL( concreteTLVParser.myValue(), 0xabababab );
}
-BOOST_AUTO_UNIT_TEST(GenericTLV_packet)
+SENF_AUTO_UNIT_TEST(GenericTLV_packet)
{
MyTestPacket p ( MyTestPacket::create());
MyTestPacket::Parser::tlv_list_t::container tlvContainer (p->tlv_list() );
}
-BOOST_AUTO_UNIT_TEST(GenericTLV_registry)
+SENF_AUTO_UNIT_TEST(GenericTLV_registry)
{
MyTestPacket p ( MyTestPacket::create());
MyTestPacket::Parser::tlv_list_t::container tlvContainer (p->tlv_list() );
BOOST_CHECK_EQUAL( ss.str().substr(0,21), " MyConcreteTLVParser" );
}
-BOOST_AUTO_UNIT_TEST(GenericTLV_predicate)
+SENF_AUTO_UNIT_TEST(GenericTLV_predicate)
{
MyTestPacket p ( MyTestPacket::create() );
MyTestPacket::Parser::tlv_list_t::container tlvContainer (p->tlv_list() );
{};
}
-BOOST_AUTO_UNIT_TEST(parseInt_fixedSizes)
+SENF_AUTO_UNIT_TEST(parseInt_fixedSizes)
{
PacketInterpreterBase::byte data[] = { 0x8e, 0x2f, 0x57, 0x12, 0xd1 };
PacketInterpreterBase::ptr p (PacketInterpreter<VoidPacket>::create(data));
BOOST_CHECK_EQUAL(UInt32Parser(p->data().begin(),&p->data()).value(), 2385467154u);
}
-BOOST_AUTO_UNIT_TEST(parseInt_bits)
+SENF_AUTO_UNIT_TEST(parseInt_bits)
{
// 0 1 2 3 4
// 012345678901234567890123456789012345678901234567
BOOST_CHECK_EQUAL((FlagParser<12>(p->data().begin(),&p->data()).value()), false);
}
-BOOST_AUTO_UNIT_TEST(parseInt_assign)
+SENF_AUTO_UNIT_TEST(parseInt_assign)
{
PacketInterpreterBase::byte data[] = { 0x00, 0x00, 0x00, 0x00, 0x00 };
PacketInterpreterBase::ptr p (PacketInterpreter<VoidPacket>::create(data));
BOOST_CHECK_EQUAL( (UIntFieldParser<4,34>(p->data().begin(),&p->data()).value()), 0x268ad497u );
}
-BOOST_AUTO_UNIT_TEST(parseInt_operators)
+SENF_AUTO_UNIT_TEST(parseInt_operators)
{
PacketInterpreterBase::byte data[] = { 0x63, 0xd7, 0x5a, 0x31, 0xa4, 0x46 };
PacketInterpreterBase::ptr p (PacketInterpreter<VoidPacket>::create(data));
senf::detail::PrefixAuxParserPolicy<senf::UInt16Parser> > > MyListBParser;
}
-BOOST_AUTO_UNIT_TEST(ListBParser)
+SENF_AUTO_UNIT_TEST(ListBParser)
{
senf::PacketInterpreterBase::ptr pi (senf::PacketInterpreter<VoidPacket>::create(
MyListBParser::init_bytes));
BOOST_CHECK( ! p.empty() );
}
-BOOST_AUTO_UNIT_TEST(ListBParser_container)
+SENF_AUTO_UNIT_TEST(ListBParser_container)
{
senf::PacketInterpreterBase::ptr pi (senf::PacketInterpreter<VoidPacket>::create(
MyListBParser::init_bytes));
}
-BOOST_AUTO_UNIT_TEST(listBytesMacro)
+SENF_AUTO_UNIT_TEST(listBytesMacro)
{
unsigned char data[] = { 8, // size1
18, // size2
}
-BOOST_AUTO_UNIT_TEST(listBytesParser_packetSize)
+SENF_AUTO_UNIT_TEST(listBytesParser_packetSize)
{
unsigned char data[] = { 0x01, // list()[0].vec().size()
0x05, 0x06, // list()[0].vec()[0]
senf::UInt16Parser> > > MyListNParser;
}
-BOOST_AUTO_UNIT_TEST(ListNParser_container)
+SENF_AUTO_UNIT_TEST(ListNParser_container)
{
VoidPacket vp (VoidPacket::create(MyListNParser::init_bytes));
MyListNParser(vp.data().begin(),&vp.data()).init();
}
}
-BOOST_AUTO_UNIT_TEST(ListNParser)
+SENF_AUTO_UNIT_TEST(ListNParser)
{
VoidPacket vp (VoidPacket::create(MyListNParser::init_bytes));
}
-BOOST_AUTO_UNIT_TEST(listMacro)
+SENF_AUTO_UNIT_TEST(listMacro)
{
unsigned char data[] = { 0x04, // size1
0x03, // size2
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(dtcpPacket)
+SENF_AUTO_UNIT_TEST(dtcpPacket)
{
unsigned char data[] = {
0x11, // versionNumber = 1, command = JOIN
using namespace senf;
-BOOST_AUTO_UNIT_TEST(GREPacket_packet)
+SENF_AUTO_UNIT_TEST(GREPacket_packet)
{
senf::GREPacket p (senf::GREPacket::create());
using namespace senf;
-BOOST_AUTO_UNIT_TEST(MPESection_parse_chain)
+SENF_AUTO_UNIT_TEST(MPESection_parse_chain)
{
// MPE section captured with dvbsnoop
unsigned char data[] = {
}
-BOOST_AUTO_UNIT_TEST(MPESection_create)
+SENF_AUTO_UNIT_TEST(MPESection_create)
{
senf::MPESection sec (senf::MPESection::create());
sec->real_time_parameters().delta_t() = 0x027u;
using namespace senf;
-BOOST_AUTO_UNIT_TEST(transportPacket_parse)
+SENF_AUTO_UNIT_TEST(transportPacket_parse)
{
// TransportStream-Packet containing a ULE encoded IPv6 ping packet,
// captured with dvbsnoop
}
-BOOST_AUTO_UNIT_TEST(transportPacket_create_with_pusi)
+SENF_AUTO_UNIT_TEST(transportPacket_create_with_pusi)
{
TransportPacket ts_packet (TransportPacket::create());
ts_packet->setPUSI(true);
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
}
-BOOST_AUTO_UNIT_TEST(packet)
+SENF_AUTO_UNIT_TEST(packet)
{
senf::Packet packet (FooPacket::create());
BarPacket::createAfter(packet);
SENF_CHECK_NO_THROW( BarPacket::create(senf::noinit).dump(s));
}
-BOOST_AUTO_UNIT_TEST(concretePacket)
+SENF_AUTO_UNIT_TEST(concretePacket)
{
senf::PacketData::byte data[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 };
BOOST_CHECK_EQUAL( BarPacket::create()->reserved(), 0xA0A0u );
}
-BOOST_AUTO_UNIT_TEST(packetAssign)
+SENF_AUTO_UNIT_TEST(packetAssign)
{
BarPacket bar1 (BarPacket::create());
BarPacket bar2 (BarPacket::create());
BOOST_CHECK_EQUAL( bar1->type(), 0x2A2Bu );
}
-BOOST_AUTO_UNIT_TEST(packetAnnotation)
+SENF_AUTO_UNIT_TEST(packetAnnotation)
{
senf::Packet packet (FooPacket::create());
BarPacket::createAfter(packet);
struct VoidPacket : public senf::PacketTypeBase {};
}
-BOOST_AUTO_UNIT_TEST(packetData)
+SENF_AUTO_UNIT_TEST(packetData)
{
// We cannot simply allocate a packetData instance .. we must go through PacketInterpreterBase
// and PacketImpl.
BOOST_CHECK( d.empty() );
}
-BOOST_AUTO_UNIT_TEST(safePacketIterator)
+SENF_AUTO_UNIT_TEST(safePacketIterator)
{
// We cannot simply allocate a packetData instance .. we must go through PacketInterpreterBase
// and PacketImpl.
// only validate PacketInterpreterBase as far as to ensure that a failure of one test is not due to
// an error in PacketInterpreterbase
-BOOST_AUTO_UNIT_TEST(packetImpl_mem)
+SENF_AUTO_UNIT_TEST(packetImpl_mem)
{
senf::detail::PacketImpl * p (new senf::detail::PacketImpl());
BOOST_CHECK_EQUAL(p->refcount(), 0);
#endif
}
-BOOST_AUTO_UNIT_TEST(packetImpl_data)
+SENF_AUTO_UNIT_TEST(packetImpl_data)
{
senf::PacketInterpreterBase::ptr pi (senf::PacketInterpreter<VoidPacket>::create());
senf::detail::PacketImpl * p (senf::detail::packet::test::TestDriver::impl(pi));
BOOST_CHECK(pi->data().begin() == p->begin());
}
-BOOST_AUTO_UNIT_TEST(packetImpl_interpreters)
+SENF_AUTO_UNIT_TEST(packetImpl_interpreters)
{
senf::detail::PacketImpl * p (new senf::detail::PacketImpl());
p->add_ref();
};
}
-BOOST_AUTO_UNIT_TEST(packetInterpreterBase)
+SENF_AUTO_UNIT_TEST(packetInterpreterBase)
{
{
senf::PacketInterpreter<VoidPacket>::ptr pi2 (senf::PacketInterpreter<VoidPacket>::create());
};
}
-BOOST_AUTO_UNIT_TEST(packetInterpreter)
+SENF_AUTO_UNIT_TEST(packetInterpreter)
{
typedef senf::PacketInterpreterBase::size_type size_type;
{
// fields() is tested in DefaultBundle/EthernetPacket.test.cc
// initSize() and initHeadSize() are already tested indirectly above
-BOOST_AUTO_UNIT_TEST(packetInterpreter_factory)
+SENF_AUTO_UNIT_TEST(packetInterpreter_factory)
{
typedef senf::PacketInterpreterBase::size_type size_type;
};
}
-BOOST_AUTO_UNIT_TEST(packetParserBase)
+SENF_AUTO_UNIT_TEST(packetParserBase)
{
senf::PacketInterpreter<VoidPacket>::ptr pi (senf::PacketInterpreter<VoidPacket>::create(
senf::PacketInterpreterBase::size_type(6u)));
SENF_PACKET_REGISTRY_REGISTER(StringTag, "foo", FooPacket);
SENF_PACKET_REGISTRY_REGISTER(StringTag, "bar", BarPacket);
-BOOST_AUTO_UNIT_TEST(packetRegistry_test)
+SENF_AUTO_UNIT_TEST(packetRegistry_test)
{
PacketRegistry<BaseTag>::registerPacket<FooPacket>(1u);
PacketRegistry<BaseTag>::registerPacket<BarPacket>(2u);
};
}
-BOOST_AUTO_UNIT_TEST(fixedParser)
+SENF_AUTO_UNIT_TEST(fixedParser)
{
unsigned char data[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x83, 0x84, 0x07, 0x08 };
};
}
-BOOST_AUTO_UNIT_TEST(variableParser)
+SENF_AUTO_UNIT_TEST(variableParser)
{
unsigned char data[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x83, 0x84, 0x07, 0x08 };
struct VoidPacket : public senf::PacketTypeBase {};
}
-BOOST_AUTO_UNIT_TEST(safePacketParser)
+SENF_AUTO_UNIT_TEST(safePacketParser)
{
senf::PacketInterpreter<VoidPacket>::ptr pi (senf::PacketInterpreter<VoidPacket>::create(
senf::PacketInterpreterBase::size_type(6u)));
typedef senf::StringParser<senf::UInt16Parser> MyStringParser;
}
-BOOST_AUTO_UNIT_TEST(stringParser)
+SENF_AUTO_UNIT_TEST(stringParser)
{
senf::PacketInterpreterBase::byte data[] = { 0x00, 0x04, 'T', 'E', 'S', 'T' };
senf::PacketInterpreterBase::ptr p (senf::PacketInterpreter<VoidPacket>::create(data));
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(VariantParser)
+SENF_AUTO_UNIT_TEST(VariantParser)
{
typedef senf::ArrayParser<10, senf::UInt8Parser> Array10;
typedef senf::VariantParser< senf::detail::FixedAuxParserPolicy<senf::UInt8Parser, 1>,
}
using namespace VariantParser_test_cc_anon_namespace;
-BOOST_AUTO_UNIT_TEST(VariantParserMacro)
+SENF_AUTO_UNIT_TEST(VariantParserMacro)
{
senf::DataPacket p (senf::DataPacket::create(senf::init_bytes<TestParser>::value));
{};
}
-BOOST_AUTO_UNIT_TEST(VectorParser)
+SENF_AUTO_UNIT_TEST(VectorParser)
{
unsigned char data[] = { 0x03, // size
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, // data
}
}
-BOOST_AUTO_UNIT_TEST(VectorParser_wrapper)
+SENF_AUTO_UNIT_TEST(VectorParser_wrapper)
{
unsigned char data[] = { 0x03, // size
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, // data
BOOST_CHECK_EQUAL( w.parser().size(), 0u );
}
-BOOST_AUTO_UNIT_TEST(dynamicPolicyVector)
+SENF_AUTO_UNIT_TEST(dynamicPolicyVector)
{
unsigned char data[] = { 0x03, // size
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, // data
}
-BOOST_AUTO_UNIT_TEST(vectorMacro_parse)
+SENF_AUTO_UNIT_TEST(vectorMacro_parse)
{
unsigned char data[] = { 0x05, // size1
0x04, // size2
BOOST_CHECK_EQUAL( parser.vec2()[1], 0x0D0Eu );
}
-BOOST_AUTO_UNIT_TEST(vectorMacro_create)
+SENF_AUTO_UNIT_TEST(vectorMacro_create)
{
TestVectorPacket p (TestVectorPacket::create());
p->dummy() = 0x01020304u;
}
-BOOST_AUTO_UNIT_TEST(vectorMacro_inherit)
+SENF_AUTO_UNIT_TEST(vectorMacro_inherit)
{
unsigned char data[] = { 0x05, // size1
0x04, // size2
}
-BOOST_AUTO_UNIT_TEST(vectorMacro_packetSize)
+SENF_AUTO_UNIT_TEST(vectorMacro_packetSize)
{
unsigned char data[] = { 0x11, 0x12, 0x13, 0x14, 0x15, 0x16,
0x21, 0x22, 0x23, 0x24, 0x25, 0x26 };
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(packetLink)
+SENF_AUTO_UNIT_TEST(packetLink)
{
// This test shall test, if there is now duplicated packet registration in AllBundles.
// The test will fail at the start with an assertion error in this case.
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
}
-BOOST_AUTO_UNIT_TEST(clockService)
+SENF_AUTO_UNIT_TEST(clockService)
{
char const * enabled (getenv("SENF_TIMING_CRITICAL_TESTS"));
BOOST_WARN_MESSAGE(enabled, "Set SENF_TIMING_CRITICAL_TESTS to not skip timing critical tests");
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(eventManager)
+SENF_AUTO_UNIT_TEST(eventManager)
{
senf::scheduler::FdEvent fdEvent ("fdEvent", 0);
senf::scheduler::TimerEvent timer ("timer", 0);
}
-BOOST_AUTO_UNIT_TEST(fdDispatcher)
+SENF_AUTO_UNIT_TEST(fdDispatcher)
{
senf::scheduler::detail::FdManager::instance().timeout(1000);
}
}
-BOOST_AUTO_UNIT_TEST(fileDispatcher)
+SENF_AUTO_UNIT_TEST(fileDispatcher)
{
char const * enabled (getenv("SENF_TIMING_CRITICAL_TESTS"));
BOOST_WARN_MESSAGE(enabled, "Set SENF_TIMING_CRITICAL_TESTS to not skip timing critical tests");
}
-BOOST_AUTO_UNIT_TEST(idleEvent)
+SENF_AUTO_UNIT_TEST(idleEvent)
{
senf::scheduler::IdleEvent idle ("idle event unit test", &cb);
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(poller)
+SENF_AUTO_UNIT_TEST(poller)
{
BOOST_CHECK( true );
}
BOOST_CHECK (stop_server(pid));
}
-BOOST_AUTO_UNIT_TEST(testSchedulerPollTimers)
+SENF_AUTO_UNIT_TEST(testSchedulerPollTimers)
{
BOOST_CHECK( ! senf::scheduler::usingHiresTimers() );
schedulerTest();
}
-BOOST_AUTO_UNIT_TEST(testSchedulerHiresTimers)
+SENF_AUTO_UNIT_TEST(testSchedulerHiresTimers)
{
if (senf::scheduler::haveScalableHiresTimers())
BOOST_MESSAGE( "Using timerfd() hires timers" );
BOOST_CHECK( ! senf::scheduler::usingHiresTimers() );
}
-BOOST_AUTO_UNIT_TEST(testSchedulerPOSIXTimers)
+SENF_AUTO_UNIT_TEST(testSchedulerPOSIXTimers)
{
if (senf::scheduler::haveScalableHiresTimers()) {
SENF_CHECK_NO_THROW( senf::scheduler::detail::TimerDispatcher::instance().timerSource(
}
-BOOST_AUTO_UNIT_TEST(blockSignals)
+SENF_AUTO_UNIT_TEST(blockSignals)
{
char const * enabled (getenv("SENF_TIMING_CRITICAL_TESTS"));
BOOST_WARN_MESSAGE(enabled, "Set SENF_TIMING_CRITICAL_TESTS to not skip timing critical tests");
}
}
-BOOST_AUTO_UNIT_TEST(signalDispatcher)
+SENF_AUTO_UNIT_TEST(signalDispatcher)
{
senf::scheduler::detail::FdManager::instance().timeout(1000);
senf::scheduler::SignalEvent sig (SIGUSR1, &handler);
}
-BOOST_AUTO_UNIT_TEST(timerDispatcher)
+SENF_AUTO_UNIT_TEST(timerDispatcher)
{
char const * enabled (getenv("SENF_TIMING_CRITICAL_TESTS"));
BOOST_WARN_MESSAGE(enabled, "Set SENF_TIMING_CRITICAL_TESTS to not skip timing critical tests");
}
-BOOST_AUTO_UNIT_TEST(timerJitter)
+SENF_AUTO_UNIT_TEST(timerJitter)
{
senf::scheduler::watchdogTimeout(0);
std::cerr << "Epoll timers\n";
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
}
-BOOST_AUTO_UNIT_TEST(clientSocketHandle)
+SENF_AUTO_UNIT_TEST(clientSocketHandle)
{
BOOST_CHECKPOINT("Constructing socket handle");
MySocketHandle myh;
};
}
-BOOST_AUTO_UNIT_TEST(fileHandle)
+SENF_AUTO_UNIT_TEST(fileHandle)
{
try {
{
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(NetdeviceController) {
+SENF_AUTO_UNIT_TEST(NetdeviceController) {
std::string ifname ("lo");
senf::NetdeviceController ctrl (ifname);
};
}
-BOOST_AUTO_UNIT_TEST(protocolClientSocketHandle)
+SENF_AUTO_UNIT_TEST(protocolClientSocketHandle)
{
typedef senf::ProtocolClientSocketHandle<MySocketProtocol> MySocketHandle;
};
}
-BOOST_AUTO_UNIT_TEST(protocolServerSocketHandle)
+SENF_AUTO_UNIT_TEST(protocolServerSocketHandle)
{
typedef senf::ProtocolServerSocketHandle<MySocketProtocol> MySocketHandle;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(bsdAddressingPolicy)
+SENF_AUTO_UNIT_TEST(bsdAddressingPolicy)
{
typedef senf::ClientSocketHandle<senf::MakeSocketPolicy<
senf::BSDAddressingPolicy>::policy> BSDHandle;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(bsdSocketAddress)
+SENF_AUTO_UNIT_TEST(bsdSocketAddress)
{
senf::GenericBSDSocketAddress g1;
senf::GenericBSDSocketAddress g2 (senf::INet4SocketAddress("1.2.3.4:5678"));
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(inet4Address)
+SENF_AUTO_UNIT_TEST(inet4Address)
{
using senf::INet4Address;
using senf::AddressSyntaxException;
}
}
-BOOST_AUTO_UNIT_TEST(inet4Network)
+SENF_AUTO_UNIT_TEST(inet4Network)
{
senf::INet4Network net (senf::INet4Address::Loopback,8);
BOOST_CHECK_EQUAL( net.address().address(), 0x7F000000u );
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(inet6Address)
+SENF_AUTO_UNIT_TEST(inet6Address)
{
using senf::INet6Address;
using senf::INet4Address;
}
}
-BOOST_AUTO_UNIT_TEST(inet6Network)
+SENF_AUTO_UNIT_TEST(inet6Network)
{
using senf::INet6Address;
using senf::INet6Network;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(inet4SocketAddress)
+SENF_AUTO_UNIT_TEST(inet4SocketAddress)
{
using senf::INet4SocketAddress;
using senf::INet4Address;
}
}
-BOOST_AUTO_UNIT_TEST(inet6SocketAddress)
+SENF_AUTO_UNIT_TEST(inet6SocketAddress)
{
using senf::INet6Address;
using senf::INet6SocketAddress;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(multicastSocketProtocol)
+SENF_AUTO_UNIT_TEST(multicastSocketProtocol)
{
senf::UDPv4ClientSocketHandle sock;
}
-BOOST_AUTO_UNIT_TEST(RawV4ClientSocketHandle)
+SENF_AUTO_UNIT_TEST(RawV4ClientSocketHandle)
{
if (getuid() != 0) {
BOOST_WARN_MESSAGE(false, "Cannot test senf::RawV4SocketHandle as non-root user");
}
}
-BOOST_AUTO_UNIT_TEST(RawV6ClientSocketHandle)
+SENF_AUTO_UNIT_TEST(RawV6ClientSocketHandle)
{
if (getuid() != 0) {
BOOST_WARN_MESSAGE(false, "Cannot test senf::RawV6SocketHandle as non-root user");
}
-BOOST_AUTO_UNIT_TEST(tcpv4ClientSocketHandle)
+SENF_AUTO_UNIT_TEST(tcpv4ClientSocketHandle)
{
{
senf::TCPv4ClientSocketHandle sock;
}
}
-BOOST_AUTO_UNIT_TEST(tcpv6ClientSocketHandle)
+SENF_AUTO_UNIT_TEST(tcpv6ClientSocketHandle)
{
{
senf::TCPv6ClientSocketHandle sock;
}
-BOOST_AUTO_UNIT_TEST(tcpv4ServerSocketHandle)
+SENF_AUTO_UNIT_TEST(tcpv4ServerSocketHandle)
{
try {
alarm(10);
}
}
-BOOST_AUTO_UNIT_TEST(tcpv6ServerSocketHandle)
+SENF_AUTO_UNIT_TEST(tcpv6ServerSocketHandle)
{
try {
alarm(10);
}
-BOOST_AUTO_UNIT_TEST(udpv4ClientSocketHandle)
+SENF_AUTO_UNIT_TEST(udpv4ClientSocketHandle)
{
try {
alarm(10);
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(eui64)
+SENF_AUTO_UNIT_TEST(eui64)
{
senf::EUI64 eui;
BOOST_CHECK( !eui );
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(llAddress)
+SENF_AUTO_UNIT_TEST(llAddress)
{
using senf::LLSocketAddress;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(macAddress)
+SENF_AUTO_UNIT_TEST(macAddress)
{
using senf::MACAddress;
using senf::AddressSyntaxException;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(packetSocketHandle)
+SENF_AUTO_UNIT_TEST(packetSocketHandle)
{
// We have a Problem here .. packet sockets are only allowed for root
if (getuid() != 0) {
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(tapSocketHandle)
+SENF_AUTO_UNIT_TEST(tapSocketHandle)
{
if (getuid() != 0) {
BOOST_WARN_MESSAGE(false, "Cannot test senf::TunTapSocketHandle as non-root user");
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(UNSocketAddress)
+SENF_AUTO_UNIT_TEST(UNSocketAddress)
{
senf::UNSocketAddress addr;
BOOST_CHECK( ! addr);
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(unDatagramSocketHandle)
+SENF_AUTO_UNIT_TEST(unDatagramSocketHandle)
{
std::string testString ("Hallo Welt.");
std::string socketPath (".socket-UNDatagramSocketHandle.test");
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(unProtocol)
+SENF_AUTO_UNIT_TEST(unProtocol)
{
//zZ leer
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
}
-BOOST_AUTO_UNIT_TEST(serverSocketHandle)
+SENF_AUTO_UNIT_TEST(serverSocketHandle)
{
typedef senf::MakeSocketPolicy<
senf::test::SomeFramingPolicy,
}
-BOOST_AUTO_UNIT_TEST(socketHandle)
+SENF_AUTO_UNIT_TEST(socketHandle)
{
typedef senf::MakeSocketPolicy<
senf::test::SomeCommunicationPolicy,
}
-BOOST_AUTO_UNIT_TEST(socketPolicy)
+SENF_AUTO_UNIT_TEST(socketPolicy)
{
// Most of these checks are really compile-time checks ...
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(socketProtocol)
+SENF_AUTO_UNIT_TEST(socketProtocol)
{
senf::test::SomeSocketProtocol protocol;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(buffer)
+SENF_AUTO_UNIT_TEST(buffer)
{
int size (128);
};
}
-BOOST_AUTO_UNIT_TEST(configBundle)
+SENF_AUTO_UNIT_TEST(configBundle)
{
senf::console::ScopedDirectory<> root;
senf::console::root().add("root", root);
}
-BOOST_AUTO_UNIT_TEST(configFile)
+SENF_AUTO_UNIT_TEST(configFile)
{
TempFile cfgf ("test.cfg");
cfgf << "dir1/fun1 10;\n"
}
}
-BOOST_AUTO_UNIT_TEST(configFileRestrict)
+SENF_AUTO_UNIT_TEST(configFileRestrict)
{
TempFile cfgf ("test.cfg");
cfgf << "dir1/fun1 10;\n"
}
}
-BOOST_AUTO_UNIT_TEST(configFileSkipGroup)
+SENF_AUTO_UNIT_TEST(configFileSkipGroup)
{
TempFile cfgf ("test.cfg");
cfgf << "dir1/fun1 10;\n"
}
}
-BOOST_AUTO_UNIT_TEST(configRestrictAndLink)
+SENF_AUTO_UNIT_TEST(configRestrictAndLink)
{
TempFile cfgf ("test.cfg");
cfgf << "dir1/fun1 10;\n"
}
}
-BOOST_AUTO_UNIT_TEST(executor)
+SENF_AUTO_UNIT_TEST(executor)
{
senf::console::root().mkdir("dir1").mkdir("dir3");
senf::console::root().mkdir("dir2").doc("Helptext").add("test",&testCommand);
senf::console::root().remove("dir2");
}
-BOOST_AUTO_UNIT_TEST(executorChroot)
+SENF_AUTO_UNIT_TEST(executorChroot)
{
senf::console::root().mkdir("dir1").mkdir("dir3");
senf::console::root().mkdir("dir2").doc("Helptext").add("test",&testCommand);
}
}
-BOOST_AUTO_UNIT_TEST(executorPolicy)
+SENF_AUTO_UNIT_TEST(executorPolicy)
{
senf::console::root().mkdir("dir1").mkdir("dir3");
senf::console::root().mkdir("dir2").doc("Helptext").add("test",&testCommand);
senf::console::root().remove("dir2");
}
-BOOST_AUTO_UNIT_TEST(executorAuto)
+SENF_AUTO_UNIT_TEST(executorAuto)
{
senf::console::root().mkdir("tdir1").mkdir("dir3");
senf::console::root().mkdir("dir2").doc("Helptext").add("test",&testCommand);
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(genericNode)
+SENF_AUTO_UNIT_TEST(genericNode)
{
senf::console::GenericNode & node (
senf::console::root().mkdir("dir1").mkdir("dir2").doc("help info"));
};
}
-BOOST_AUTO_UNIT_TEST(directoryNode)
+SENF_AUTO_UNIT_TEST(directoryNode)
{
senf::console::DirectoryNode::ptr p (senf::console::DirectoryNode::create());
senf::console::root().children().end()), 1 );
}
-BOOST_AUTO_UNIT_TEST(linkNode)
+SENF_AUTO_UNIT_TEST(linkNode)
{
senf::console::root().mkdir("dir1");
senf::console::root().link("link1", senf::console::root()["dir1"]);
};
}
-BOOST_AUTO_UNIT_TEST(senfConsoleAddNode)
+SENF_AUTO_UNIT_TEST(senfConsoleAddNode)
{
senf::console::root().add("fn1", &callback);
senf::console::root().add("fn2", boost::function<void(std::ostream&,senf::console::ParseCommandInfo const &)>(Functor()));
senf::console::root().remove("fn2");
}
-BOOST_AUTO_UNIT_TEST(simpleCommandNode)
+SENF_AUTO_UNIT_TEST(simpleCommandNode)
{
senf::console::root().add("fn", senf::console::SimpleCommandNode::create(&callback))
.doc("help text");
}
-BOOST_AUTO_UNIT_TEST(overladedCommand)
+SENF_AUTO_UNIT_TEST(overladedCommand)
{
senf::console::OverloadedCommandNode & cmd (
senf::console::root()
};
}
-BOOST_AUTO_UNIT_TEST(commandGrammar)
+SENF_AUTO_UNIT_TEST(commandGrammar)
{
senf::console::detail::CommandGrammar<TestParseDispatcher>::Context context;
std::stringstream ss;
{ commands.push_back(i); }
}
-BOOST_AUTO_UNIT_TEST(commandParser)
+SENF_AUTO_UNIT_TEST(commandParser)
{
senf::console::CommandParser parser;
}
}
-BOOST_AUTO_UNIT_TEST(checkedArgumentIterator)
+SENF_AUTO_UNIT_TEST(checkedArgumentIterator)
{
senf::console::CommandParser parser;
commands.clear();
}
-BOOST_AUTO_UNIT_TEST(parseIncremental)
+SENF_AUTO_UNIT_TEST(parseIncremental)
{
senf::console::CommandParser parser;
}
}
-BOOST_AUTO_UNIT_TEST(parseExceptions)
+SENF_AUTO_UNIT_TEST(parseExceptions)
{
senf::console::CommandParser parser;
std::string msg;
{ os << "formatter"; }
}
-BOOST_AUTO_UNIT_TEST(parsedCommand)
+SENF_AUTO_UNIT_TEST(parsedCommand)
{
senf::console::Executor executor;
senf::console::CommandParser parser;
}
-BOOST_AUTO_UNIT_TEST(memberParsedCommand)
+SENF_AUTO_UNIT_TEST(memberParsedCommand)
{
senf::console::Executor executor;
senf::console::CommandParser parser;
}
-BOOST_AUTO_UNIT_TEST(directoryReturn)
+SENF_AUTO_UNIT_TEST(directoryReturn)
{
senf::console::Executor executor;
senf::console::CommandParser parser;
{ val2 = true; }
}
-BOOST_AUTO_UNIT_TEST(programOptions)
+SENF_AUTO_UNIT_TEST(programOptions)
{
senf::console::ScopedDirectory<> root;
senf::console::root().add("root", root);
}
-BOOST_AUTO_UNIT_TEST(vectorSupport)
+SENF_AUTO_UNIT_TEST(vectorSupport)
{
senf::console::Executor executor;
senf::console::CommandParser parser;
" default: (7 2)\n" );
}
-BOOST_AUTO_UNIT_TEST(listSupport)
+SENF_AUTO_UNIT_TEST(listSupport)
{
senf::console::Executor executor;
senf::console::CommandParser parser;
" default: (7 2)\n" );
}
-BOOST_AUTO_UNIT_TEST(setSupport)
+SENF_AUTO_UNIT_TEST(setSupport)
{
senf::console::Executor executor;
senf::console::CommandParser parser;
" default: (2 7)\n" );
}
-BOOST_AUTO_UNIT_TEST(mapSupport)
+SENF_AUTO_UNIT_TEST(mapSupport)
{
senf::console::Executor executor;
senf::console::CommandParser parser;
};
}
-BOOST_AUTO_UNIT_TEST(scopedDirectory)
+SENF_AUTO_UNIT_TEST(scopedDirectory)
{
{
TestObject ob;
}
}
-BOOST_AUTO_UNIT_TEST(scopedDirectoryVoid)
+SENF_AUTO_UNIT_TEST(scopedDirectoryVoid)
{
{
senf::console::ScopedDirectory<> dir;
};
}
-BOOST_AUTO_UNIT_TEST(scopedDirectoryBase)
+SENF_AUTO_UNIT_TEST(scopedDirectoryBase)
{
{
senf::console::ScopedDirectory<> dir;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(server)
+SENF_AUTO_UNIT_TEST(server)
{}
///////////////////////////////cc.e////////////////////////////////////////
SENF_CONSOLE_REGISTER_ENUM_MEMBER( TestClass, MemberEnum, (MemberFoo)(MemberBar) );
}
-BOOST_AUTO_UNIT_TEST(charTraits)
+SENF_AUTO_UNIT_TEST(charTraits)
{
senf::console::Executor executor;
senf::console::CommandParser parser;
ss.str("");
}
-BOOST_AUTO_UNIT_TEST(boolTraits)
+SENF_AUTO_UNIT_TEST(boolTraits)
{
senf::console::Executor executor;
senf::console::CommandParser parser;
BOOST_CHECK_EQUAL( ss.str(), "disabled\n" "enabled\n" );
}
-BOOST_AUTO_UNIT_TEST(stringTraits)
+SENF_AUTO_UNIT_TEST(stringTraits)
{
BOOST_CHECK_EQUAL(
senf::console::ArgumentTraits<std::string>::str("Test\nOf\nA \"String\"\x01\x7f\xa0\xff"),
"\"Test\\x0aOf\\x0aA \\\"String\\\"\\x01\\x7f\\xa0\\xff\"" );
}
-BOOST_AUTO_UNIT_TEST(enumSupport)
+SENF_AUTO_UNIT_TEST(enumSupport)
{
senf::console::Executor executor;
senf::console::CommandParser parser;
BOOST_CHECK_EQUAL( ss.str(), "Foo\n" );
}
-BOOST_AUTO_UNIT_TEST(singleToken)
+SENF_AUTO_UNIT_TEST(singleToken)
{
BOOST_CHECK( senf::console::ArgumentTraits<std::string>::singleToken );
BOOST_CHECK( senf::console::ArgumentTraits<int>::singleToken );
}
-BOOST_AUTO_UNIT_TEST(udpServer)
+SENF_AUTO_UNIT_TEST(udpServer)
{
senf::console::UDPServer server (senf::INet4SocketAddress(localhost4str(0)));
senf::ConnectedUDPv4ClientSocketHandle socket (senf::INet4SocketAddress(localhost4str(0)));
}
-BOOST_AUTO_UNIT_TEST(charAsString)
+SENF_AUTO_UNIT_TEST(charAsString)
{
senf::console::Executor executor;
senf::console::CommandParser parser;
BOOST_CHECK_EQUAL( ss.str(), "\x01\n" );
}
-BOOST_AUTO_UNIT_TEST(flagCollection)
+SENF_AUTO_UNIT_TEST(flagCollection)
{
senf::console::Executor executor;
senf::console::CommandParser parser;
{ changed_ = true; }
}
-BOOST_AUTO_UNIT_TEST(variables)
+SENF_AUTO_UNIT_TEST(variables)
{
senf::console::Executor executor;
senf::console::CommandParser parser;
}
-BOOST_AUTO_UNIT_TEST(memberVariables)
+SENF_AUTO_UNIT_TEST(memberVariables)
{
Test2 test2ob;
}
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
}
-BOOST_AUTO_UNIT_TEST(testDaemon)
+SENF_AUTO_UNIT_TEST(testDaemon)
{
char const * args[] = { "run",
"--console-log=testDaemon.log",
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(discardStream)
+SENF_AUTO_UNIT_TEST(discardStream)
{
senf::DiscardStream stream;
SENF_CHECK_NO_THROW( stream << "discard me" );
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(wrapException)
+SENF_AUTO_UNIT_TEST(wrapException)
{
bool bad_cast (false);
BOOST_CHECK( bad_cast );
}
-BOOST_AUTO_UNIT_TEST(errnoException)
+SENF_AUTO_UNIT_TEST(errnoException)
{
try {
try {
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(formatEng)
+SENF_AUTO_UNIT_TEST(formatEng)
{
std::stringstream ss;
" 12.35+-067.00E+00" );
}
-BOOST_AUTO_UNIT_TEST(dumpint)
+SENF_AUTO_UNIT_TEST(dumpint)
{
std::stringstream ss;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(ipChecksum)
+SENF_AUTO_UNIT_TEST(ipChecksum)
{
char data[] = { 0x45, 0x00, 0x00, 0x28, 0x49, 0x44, 0x40, 0x00,
0x40, 0x06, 0x00, 0x00, 0x0a, 0xc1, 0x01, 0x06,
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(iteratorTraits)
+SENF_AUTO_UNIT_TEST(iteratorTraits)
{
BOOST_CHECK_EQUAL( senf::contiguous_storage_iterator<int*>::value, true );
BOOST_CHECK_EQUAL( senf::contiguous_storage_iterator<void>::value, false );
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(areaRegistry)
+SENF_AUTO_UNIT_TEST(areaRegistry)
{
#if 0
// Need to rewrite this test ...
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(logConfig)
+SENF_AUTO_UNIT_TEST(logConfig)
{
BOOST_CHECK(( senf::log::Enabled< senf::log::Debug,
senf::log::DefaultArea,
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(fileTarget)
+SENF_AUTO_UNIT_TEST(fileTarget)
{
std::string filename ("/tmp/senf_fileTarget_test.log");
senf::log::FileTarget target (filename);
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(logger)
+SENF_AUTO_UNIT_TEST(logger)
{
senf::log::StringTarget target;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(streamRegistry)
+SENF_AUTO_UNIT_TEST(streamRegistry)
{
char const * streams[] =
{ "senf::SenfLog", "senf::log::Debug", "senf::log::test::myStream" };
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(syslogTarget)
+SENF_AUTO_UNIT_TEST(syslogTarget)
{
senf::log::SyslogTarget syslog;
}
-BOOST_AUTO_UNIT_TEST(syslogUDPTarget)
+SENF_AUTO_UNIT_TEST(syslogUDPTarget)
{
senf::log::SyslogUDPTarget udplog (
senf::INet4SocketAddress(senf::INet4Address::Loopback, port(0)));
}
-BOOST_AUTO_UNIT_TEST(target)
+SENF_AUTO_UNIT_TEST(target)
{
senf::log::StringTarget target;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
}
}
-BOOST_AUTO_UNIT_TEST(statistics)
+SENF_AUTO_UNIT_TEST(statistics)
{
senf::Statistics stats;
senf::log::StringTarget statslog;
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(stringJoin)
+SENF_AUTO_UNIT_TEST(stringJoin)
{
char const * seq[] = { "foo", "bar", "baz" };
BOOST_CHECK_EQUAL( senf::stringJoin(std::make_pair(seq, seq+sizeof(seq)/sizeof(seq[0])), "::"),
"foo::bar::baz" );
}
-BOOST_AUTO_UNIT_TEST(lexicalCast)
+SENF_AUTO_UNIT_TEST(lexicalCast)
{
SENF_CHECK_NO_THROW(
BOOST_CHECK_EQUAL(
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(telnet)
+SENF_AUTO_UNIT_TEST(telnet)
{
BOOST_CHECK( true );
}
}
}
-BOOST_AUTO_UNIT_TEST(terminfo)
+SENF_AUTO_UNIT_TEST(terminfo)
{
senf::term::Terminfo ifo ("vt220");
senf::term::KeyParser kp (ifo);
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(typeIdValue)
+SENF_AUTO_UNIT_TEST(typeIdValue)
{
// We don't care for the ordering, just that the following compiles
(void) ( senf::typeIdValue<int>() < senf::typeIdValue<float>() );
enum Blub { A, B, C };
}
-BOOST_AUTO_UNIT_TEST(prettyName)
+SENF_AUTO_UNIT_TEST(prettyName)
{
typedef test::Foo< test::Foo<test::Blub, 1>, 10> TestType;
TestType ob;
\ingroup unittest
*/
-#define SENF_CHECK_NO_THROW(expr) \
- BOOST_CHECK_NO_THROW( \
- try { expr ; } \
+#define SENF_CHECK_NO_THROW(expr) \
+ BOOST_CHECK_NO_THROW( \
+ try { expr ; } \
catch (std::exception & e) { std::cerr << e.what() << std::endl; throw; } )
namespace senf {
numeric form (and not as single characters) if the elements are of any char type. Other types
are not affected.
+ \hideinitializer
\ingroup unittest
*/
-#define SENF_CHECK_EQUAL_COLLECTIONS(a,b,c,d) \
- BOOST_CHECK_EQUAL_COLLECTIONS(senf::test::nocharIterator(a), senf::test::nocharIterator(b), \
- senf::test::nocharIterator(c), senf::test::nocharIterator(d))
+#define SENF_CHECK_EQUAL_COLLECTIONS(left_begin, left_end, right_begin, right_end) \
+ BOOST_CHECK_EQUAL_COLLECTIONS( \
+ senf::test::nocharIterator(left_begin), senf::test::nocharIterator(left_end), \
+ senf::test::nocharIterator(right_begin), senf::test::nocharIterator(right_end))
+
+/** \brief Define new test case
+
+ \ref SENF_AUTO_UNIT_TEST() is like \c BOOST_AUTO_UNIT_TEST(). The only difference is, that
+ if an exception is thrown in the test case \ref SENF_AUTO_UNIT_TEST() will write out the
+ complete what-message of the exception.
+
+ \hideinitializer
+ \ingroup unittest
+ */
+#define SENF_AUTO_UNIT_TEST(name) \
+ void senf_test_body_##name(); \
+ BOOST_AUTO_UNIT_TEST(name) \
+ { \
+ try { \
+ senf_test_body_##name(); \
+ } \
+ catch (std::exception & e) { \
+ std::cerr << e.what() << std::endl; \
+ throw; \
+ } \
+ } \
+ void senf_test_body_##name()
///////////////////////////////hh.e////////////////////////////////////////
//#include "auto_unit_test.cci"
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(hExDuMp)
+SENF_AUTO_UNIT_TEST(hExDuMp)
{
char data[] = { 0x18, 0x19, 0x20, 0x21, 0x7c, 0x7d, 0x7e, 0x7f };
std::stringstream s;
unsigned TesterCustom::refs = 0;
}
-BOOST_AUTO_UNIT_TEST(intrusive_refcount)
+SENF_AUTO_UNIT_TEST(intrusive_refcount)
{
BOOST_CHECK_EQUAL(Tester::counter,0u);
BOOST_CHECK_EQUAL(Tester::counter,0u);
}
-BOOST_AUTO_UNIT_TEST(intrusive_refcount_t)
+SENF_AUTO_UNIT_TEST(intrusive_refcount_t)
{
BOOST_CHECK_EQUAL(TesterCustom::counter,0u);
BOOST_CHECK_EQUAL(TesterCustom::refs,0u);
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(testMain)
+SENF_AUTO_UNIT_TEST(testMain)
{
BOOST_CHECK( true );
}
}
-BOOST_AUTO_UNIT_TEST(membind)
+SENF_AUTO_UNIT_TEST(membind)
{
Test instance;
boost::function<char const * ()> f1 (senf::membind(&Test::meth1,instance));
struct C {};
}
-BOOST_AUTO_UNIT_TEST(senfmpl)
+SENF_AUTO_UNIT_TEST(senfmpl)
{
BOOST_CHECK( choice<A>::has_int_value );
BOOST_CHECK( ! choice<A>::has_class_value );
}
-BOOST_AUTO_UNIT_TEST(mplSlot)
+SENF_AUTO_UNIT_TEST(mplSlot)
{
BOOST_CHECK_EQUAL( unsigned(Test::total), 8u );
}
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-BOOST_AUTO_UNIT_TEST(parameter)
+SENF_AUTO_UNIT_TEST(parameter)
{}
///////////////////////////////cc.e////////////////////////////////////////
{};
}
-BOOST_AUTO_UNIT_TEST(poolAllocMixin)
+SENF_AUTO_UNIT_TEST(poolAllocMixin)
{
#ifdef SENF_DEBUG
BOOST_CHECK_EQUAL( Test::allocCounter(), 0u );
};
}
-BOOST_AUTO_UNIT_TEST(safeBool)
+SENF_AUTO_UNIT_TEST(safeBool)
{
BOOST_CHECK( TestTrue() );
BOOST_CHECK( ! TestFalse() );
};
}
-BOOST_AUTO_UNIT_TEST(sInGlEtOn)
+SENF_AUTO_UNIT_TEST(sInGlEtOn)
{
BOOST_CHECK_EQUAL( Test::instance().foo(), 1234 );
BOOST_CHECK( Test::alive() );
}
-BOOST_AUTO_UNIT_TEST(singletonAlive)
+SENF_AUTO_UNIT_TEST(singletonAlive)
{
(void) AliveTest1::instance();
(void) AliveTest2::instance();
struct Class;
}
-BOOST_AUTO_UNIT_TEST(typeTraits)
+SENF_AUTO_UNIT_TEST(typeTraits)
{
typedef boost::function_traits<void (int, double)> traits;