From: Tomek Mrugalski Date: Tue, 30 Oct 2012 17:56:19 +0000 (+0100) Subject: [2414] dhcp6_srv tests now use defines from dhcp/duid.h X-Git-Tag: trac2487_base~1^2~31^2~29 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ae8d436d86973d85dbf512ca39167b41dcdb6a7c;p=thirdparty%2Fkea.git [2414] dhcp6_srv tests now use defines from dhcp/duid.h --- diff --git a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc index 20287066da..457be1cb4f 100644 --- a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc +++ b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -79,7 +80,7 @@ TEST_F(Dhcpv6SrvTest, DUID) { boost::scoped_ptr srv; ASSERT_NO_THROW( { - srv.reset(new Dhcpv6Srv(DHCP6_SERVER_PORT + 10000)); + srv.reset(new Dhcpv6Srv(0)); }); OptionPtr srvid = srv->getServerID(); @@ -101,7 +102,7 @@ TEST_F(Dhcpv6SrvTest, DUID) { uint16_t duid_type = data.readUint16(); cout << "Duid-type=" << duid_type << endl; switch(duid_type) { - case DUID_LLT: { + case DUID::DUID_LLT: { // DUID must contain at least 6 bytes long MAC // + 8 bytes of fixed header EXPECT_GE(14, len); @@ -125,7 +126,7 @@ TEST_F(Dhcpv6SrvTest, DUID) { EXPECT_TRUE(mac != zeros); break; } - case DUID_EN: { + case DUID::DUID_EN: { // there's not much we can check. Just simple // check if it is not all zeros vector content(len-2); @@ -133,7 +134,7 @@ TEST_F(Dhcpv6SrvTest, DUID) { EXPECT_FALSE(isRangeZero(content.begin(), content.end())); break; } - case DUID_LL: { + case DUID::DUID_LL: { // not supported yet cout << "Test not implemented for DUID-LL." << endl; @@ -143,7 +144,7 @@ TEST_F(Dhcpv6SrvTest, DUID) { // and keep it despite hardware changes. break; } - case DUID_UUID: // not supported yet + case DUID::DUID_UUID: // not supported yet default: ADD_FAILURE() << "Not supported duid type=" << duid_type << endl; break;