Browse Source

[master] Fixed unit test build issue in user check library

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.
Thomas Markwalder 11 years ago
parent
commit
ea8ba75f55

+ 1 - 1
src/hooks/dhcp/user_chk/tests/user_unittests.cc

@@ -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

+ 2 - 2
src/hooks/dhcp/user_chk/tests/userid_unittests.cc

@@ -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;