From: Francis Dupont Date: Mon, 2 Nov 2015 04:10:45 +0000 (+0100) Subject: [master] Fixed 4o6subnetInterfaceId for not 64 bit machines (from hackathon94) X-Git-Tag: trac4113_base X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a91a45e5bb37f3233e27bf5e43587fe14eea3d2;p=thirdparty%2Fkea.git [master] Fixed 4o6subnetInterfaceId for not 64 bit machines (from hackathon94) --- diff --git a/src/bin/dhcp4/tests/config_parser_unittest.cc b/src/bin/dhcp4/tests/config_parser_unittest.cc index 99a41334bf..18123e380f 100644 --- a/src/bin/dhcp4/tests/config_parser_unittest.cc +++ b/src/bin/dhcp4/tests/config_parser_unittest.cc @@ -4014,13 +4014,9 @@ TEST_F(Dhcp4ParserTest, 4o6subnetInterfaceId) { ASSERT_TRUE(ifaceid); vector data = ifaceid->getData(); - const char *exp_data = "vlan123"; - // Let's convert vlan123 to vector format. - // We need to skip the last \0 byte, thuse sizeof() - 1. - vector exp(exp_data, exp_data + sizeof(exp_data) - 1); - - EXPECT_TRUE(exp == data); + EXPECT_EQ(7, data.size()); + const char *exp = "vlan123"; + EXPECT_EQ(0, memcmp(&data[0], exp, data.size())); } - }