From 4a91a45e5bb37f3233e27bf5e43587fe14eea3d2 Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Mon, 2 Nov 2015 05:10:45 +0100 Subject: [PATCH] [master] Fixed 4o6subnetInterfaceId for not 64 bit machines (from hackathon94) --- src/bin/dhcp4/tests/config_parser_unittest.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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())); } - }