]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Fixed unit test build issue in user check library
authorThomas Markwalder <tmark@isc.org>
Wed, 23 Oct 2013 23:22:19 +0000 (19:22 -0400)
committerThomas Markwalder <tmark@isc.org>
Wed, 23 Oct 2013 23:22:19 +0000 (19:22 -0400)
trac3186 added the user_chk hook library which had a couple of
uses of EXPECT_EQ on stl containers. Gtest 1.5 does not like this.

src/hooks/dhcp/user_chk/tests/user_unittests.cc
src/hooks/dhcp/user_chk/tests/userid_unittests.cc

index 70497113d6ed31b6b7d17b06ffb06eab66abecb3..2ca156cbc130bcef0149dc05d0a38f5310553ebf 100644 (file)
@@ -90,7 +90,7 @@ TEST(UserTest, properties) {
     EXPECT_EQ("2.0", value);
 
     const PropertyMap& map2 = user->getProperties();
-    EXPECT_EQ(map2, map);
+    EXPECT_TRUE(map2 == map);
 }
 
 } // end of anonymous namespace
index 817e0113a2f2ad3bc8b80ce4d9e918952d098ad8..c31c4ae876247ebc9a96c0fa5756a9dcb1206ae8 100644 (file)
@@ -55,7 +55,7 @@ TEST(UserIdTest, hwAddress_type) {
     ASSERT_NO_THROW(id.reset(new UserId(UserId::HW_ADDRESS, bytes)));
     // Verify that the id can be fetched.
     EXPECT_EQ(id->getType(), UserId::HW_ADDRESS);
-    EXPECT_EQ(bytes, id->getId());
+    EXPECT_TRUE(bytes == id->getId());
 
     // Check relational oeprators when a == b.
     UserIdPtr id2;
@@ -98,7 +98,7 @@ TEST(UserIdTest, duid_type) {
     ASSERT_NO_THROW(id.reset(new UserId(UserId::DUID, bytes)));
     // Verify that the id can be fetched.
     EXPECT_EQ(id->getType(), UserId::DUID);
-    EXPECT_EQ(bytes, id->getId());
+    EXPECT_TRUE(bytes == id->getId());
 
     // Check relational oeprators when a == b.
     UserIdPtr id2;