<div id="footer">
<span>
<a href="mailto:senf-dev@lists.berlios.de">Contact: senf-dev@lists.berlios.de</a> |
- © 2006-2009 <a href="http://www.fokus.fraunhofer.de/en/net/index.html">
+ © 2006-2010 <a href="http://www.fokus.fraunhofer.de/en/net/index.html">
Fraunhofer Institute for Open Communication Systems, Network Research</a>
</span>
</div>
MIHFId id ( MACAddress::from_string("01:02:03:04:05:06"));
BOOST_CHECK_EQUAL( id.type(), MIHFId::MACAddress);
BOOST_CHECK_EQUAL( id, MIHFId( MACAddress::from_string("01:02:03:04:05:06")));
- BOOST_CHECK( id != MIHFId( MACAddress::from_string("01:02:03:04:05:07")));
- BOOST_CHECK( id != MIHFId( INet4Address::from_string("128.129.130.131")));
+ SENF_CHECK_NOT_EQUAL( id, MIHFId( MACAddress::from_string("01:02:03:04:05:07")));
+ SENF_CHECK_NOT_EQUAL( id, MIHFId( INet4Address::from_string("128.129.130.131")));
BOOST_CHECK( id < MIHFId( MACAddress::from_string("01:02:03:04:05:07")));
BOOST_CHECK( id < MIHFId( INet4Address::from_string("128.129.130.131")));
}
BOOST_CHECK( ! packet.next().next(senf::nothrow) );
BOOST_CHECK( ! packet.prev(senf::nothrow) );
BOOST_CHECK( packet.next().prev() == packet );
- BOOST_CHECK( packet.next() != packet );
+ SENF_CHECK_NOT_EQUAL( packet.next(), packet );
BOOST_CHECK_EQUAL( std::distance(packet.data().begin(), packet.next().data().begin()), 4 );
BOOST_CHECK_EQUAL( std::distance(packet.data().begin(), packet.data().end()), 12 );
BOOST_CHECK_EQUAL( std::distance(packet.next().data().begin(), packet.next().data().end()), 8 );
BOOST_CHECK_EQUAL( FooPacket::createBefore(packet,senf::noinit).size(), 10u );
BOOST_CHECK_EQUAL( packet.size(), 10u );
- BOOST_CHECK( packet.clone() != packet );
+ SENF_CHECK_NOT_EQUAL( packet.clone(), packet );
BOOST_CHECK_EQUAL( BarPacket::create()->reserved(), 0xA0A0u );
}
BOOST_CHECK_THROW( senf::sockaddr_cast<senf::INet6SocketAddress>(g2), std::bad_cast );
BOOST_CHECK( g2 );
BOOST_CHECK( ! g1 );
- BOOST_CHECK( g1 != g2 );
+ SENF_CHECK_NOT_EQUAL( g1, g2 );
g1 = g2;
BOOST_CHECK( g1 == g2 );
}
INet4Address addr (INet4Address::from_string("127.0.0.1"));
BOOST_CHECK_EQUAL( addr, INet4Address::Loopback );
- BOOST_CHECK( addr != INet4Address::Broadcast );
+ SENF_CHECK_NOT_EQUAL( addr, INet4Address::Broadcast );
addr = INet4Address::from_string("localhost");
BOOST_CHECK_EQUAL( addr, INet4Address::Loopback );
BOOST_CHECK( addr );
BOOST_CHECK( ! INet4Address() );
BOOST_CHECK_THROW( INet4Address::from_string(""), AddressSyntaxException );
- BOOST_CHECK( INet4Address::from_string("www.go6.net") != INet4Address::None );
+ SENF_CHECK_NOT_EQUAL( INet4Address::from_string("www.go6.net"), INet4Address::None );
BOOST_CHECK_THROW( INet4Address::from_string("invalid.host.fhg.de"), UnknownHostnameException);
{
BOOST_CHECK_EQUAL( net2.address(), senf::INet4Address::from_string("192.0.0.0") );
BOOST_CHECK_EQUAL( net2.prefix_len(), 16u );
- BOOST_CHECK( net != net2 );
+ SENF_CHECK_NOT_EQUAL( net, net2 );
BOOST_CHECK( net.match(senf::INet4Address::from_string("127.0.0.1")) );
BOOST_CHECK( ! net2.match(senf::INet4Address::from_string("127.0.0.1")) );
BOOST_CHECK( ! net.match(net2) );
BOOST_CHECK_EQUAL( addr1[13], 14 );
BOOST_CHECK_EQUAL( addr1[14], 15 );
BOOST_CHECK_EQUAL( addr1[15], 0 );
- BOOST_CHECK( INet6Address::from_string("www.go6.net") != INet6Address::None );
+ SENF_CHECK_NOT_EQUAL( INet6Address::from_string("www.go6.net"), INet6Address::None );
INet6Address addr2;
BOOST_CHECK_EQUAL( senf::str(addr2), "::" );
addr2 = INet6Address::from_string("::1");
- BOOST_CHECK( addr1 != addr2 );
- addr1 =INet6Address::from_string("::1");
+ SENF_CHECK_NOT_EQUAL( addr1, addr2 );
+ addr1 = INet6Address::from_string("::1");
BOOST_CHECK_EQUAL( addr1, addr2 );
addr1 = INet6Address::None;
addr2 = INet6Address::from_string("::");
BOOST_CHECK_EQUAL( net2.address(), INet6Address::from_string("2001:db8:1230::") );
BOOST_CHECK_EQUAL( net2.prefix_len(), 44u );
- BOOST_CHECK( net != net2 );
+ SENF_CHECK_NOT_EQUAL( net, net2 );
BOOST_CHECK( net.match(INet6Address::from_string("ff14:1234::1")) );
BOOST_CHECK( ! net2.match(INet6Address::from_string("ff13:1234::1")) );
BOOST_CHECK( ! net.match(net2) );
addr = INet6SocketAddress("[12::21]:12345");
BOOST_CHECK( addr == INet6SocketAddress("[12::21]:12345") );
BOOST_CHECK_EQUAL( addr, INet6SocketAddress(addr) );
- BOOST_CHECK( addr != INet6SocketAddress("[12::21%lo]:12345") );
+ SENF_CHECK_NOT_EQUAL( addr, INet6SocketAddress("[12::21%lo]:12345") );
BOOST_CHECK( addr );
BOOST_CHECK_EQUAL( addr.address(), INet6Address::from_string("12::21") );
BOOST_CHECK_EQUAL( addr.port(), 12345u );
char data[] = { 0x01,0x02,0x03,0x04,0x05,0x06 };
mac2 = MACAddress::from_data(data);
BOOST_CHECK_EQUAL( senf::str(mac2), "01:02:03:04:05:06" );
- BOOST_CHECK( mac != mac2 );
+ SENF_CHECK_NOT_EQUAL( mac, mac2 );
mac2 = mac;
BOOST_CHECK( mac == mac2 );
BOOST_CHECK_EQUAL( senf::str(mac2), "a1:b2:c3:d4:e5:f6" );
std::type_info const * p_;
};
+ /**
+ \related TypeIdValue
+ */
TypeIdValue const typeIdValue();
+ /**
+ \related TypeIdValue
+ */
template <class Type>
TypeIdValue const typeIdValue();
+ /**
+ \related TypeIdValue
+ */
template <class Type>
TypeIdValue const typeidValue(Type const & ob);
+ /**
+ \related TypeIdValue
+ */
std::ostream & operator<<(std::ostream & os, TypeIdValue const & v);
}
/** \brief Check for compile failure
- COMPILE_FAIL() is used to check, that a certain piece of code will produce a compile time
- failure.
+ \c COMPILE_FAIL() is used to check, that a certain piece of code will produce a compile
+ time failure.
\code
#ifdef COMPILE_CHECK
/** \brief Show exception information
- \ref SENF_CHECK_NO_THROW() is an extension to \c BOOST_CHECK_NO_THROW() which will write out the
+ \c SENF_CHECK_NO_THROW() is an extension to \c BOOST_CHECK_NO_THROW() which will write out the
unabridged exception information when an exception is thrown in addition to signaling an error.
\ingroup unittest
/** \brief Check ranges for equality, writing char's as int's
- \ref SENF_CHECK_EQUAL_COLLECTIONS() is like \c BOOST_CHECK_EQUAL_COLLECTIONS(). The only
- difference is, that \ref SENF_CHECK_EQUAL_COLLECTIONS() will write out collection values in
+ \c SENF_CHECK_EQUAL_COLLECTIONS() is like \c BOOST_CHECK_EQUAL_COLLECTIONS(). The only
+ difference is, that \c SENF_CHECK_EQUAL_COLLECTIONS() will write out collection values in
numeric form (and not as single characters) if the elements are of any char type. Other types
are not affected.
/** \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
+ \c 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 \c SENF_AUTO_UNIT_TEST() will write out the
complete what-message of the exception.
\hideinitializer
} \
void senf_test_body_##name()
+
+#ifdef DOXYGEN
+ /** \brief Check for non-equality
+
+ \c SENF_CHECK_NOT_EQUAL() is the opposite of \c BOOST_CHECK_EQUAL.
+ \hideinitializer
+ \ingroup unittest
+ */
+ #define SENF_CHECK_NOT_EQUAL( Left, Rigth)
+#else
+#ifdef BOOST_CHECK_NE
+ #define SENF_CHECK_NOT_EQUAL( Left, Right) BOOST_CHECK_NE( Left, Right)
+#else
+ #define SENF_CHECK_NOT_EQUAL( Left, Right) BOOST_CHECK( Left != Right)
+#endif
+#endif
+
///////////////////////////////hh.e////////////////////////////////////////
//#include "auto_unit_test.cci"
//#include "auto_unit_test.ct"