From: Tomek Mrugalski Date: Mon, 14 May 2012 14:58:47 +0000 (+0200) Subject: [1967] ADD_FAILURE() improvements in Dhcpv6SrvTest::DUID X-Git-Tag: trac2351_base~226^2~91^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=edad8ee1e80c5b35c2f5b3eafe82d56cd0d6e5e9;p=thirdparty%2Fkea.git [1967] ADD_FAILURE() improvements in Dhcpv6SrvTest::DUID --- diff --git a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc index f1e2c3e306..f21366dfc7 100644 --- a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc +++ b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc @@ -143,12 +143,18 @@ TEST_F(Dhcpv6SrvTest, DUID) { } case DUID_LL: { // not supported yet - cout << "Test not implemented for DUID-LL yet." << endl; + cout << "Test not implemented for DUID-LL." << endl; + + // No failure here. There's really no way for test LL DUID. It doesn't + // even make sense to check if that Link Layer is actually present on + // a physical interface. RFC3315 says a server should write its DUID + // and keep it despite hardware changes. + break; } case DUID_UUID: // not supported yet default: - cout << "Not supported duid type=" << duid_type << endl; - ADD_FAILURE(); + ADD_FAILURE() << "Not supported duid type=" << duid_type << endl; + break; } delete srv; // destructor will close sockets, causing next test to succeed }