summaryrefslogtreecommitdiffstats
path: root/src/hooks/dhcp/user_chk/tests/userid_unittests.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/hooks/dhcp/user_chk/tests/userid_unittests.cc')
-rw-r--r--src/hooks/dhcp/user_chk/tests/userid_unittests.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/hooks/dhcp/user_chk/tests/userid_unittests.cc b/src/hooks/dhcp/user_chk/tests/userid_unittests.cc
index c31c4ae876..10e5d4ea9f 100644
--- a/src/hooks/dhcp/user_chk/tests/userid_unittests.cc
+++ b/src/hooks/dhcp/user_chk/tests/userid_unittests.cc
@@ -77,6 +77,11 @@ TEST(UserIdTest, hwAddress_type) {
EXPECT_FALSE(*id == *id2);
EXPECT_TRUE(*id != *id2);
EXPECT_FALSE(*id < *id2);
+
+ // Verify that colon delimiters are ok.
+ ASSERT_NO_THROW(id2.reset(new UserId(UserId::HW_ADDRESS,
+ "01:FF:02:AC:03:0B:07:07")));
+ EXPECT_FALSE(*id == *id2);
}
/// @brief Test making and using DUID type UserIds
@@ -118,6 +123,11 @@ TEST(UserIdTest, duid_type) {
EXPECT_FALSE(*id == *id2);
EXPECT_TRUE(*id != *id2);
EXPECT_FALSE(*id < *id2);
+
+ // Verify that colon delimiters are ok.
+ ASSERT_NO_THROW(id2.reset(new UserId(UserId::DUID,
+ "01:FF:02:AC:03:0B:07:08")));
+ EXPECT_TRUE(*id == *id2);
}
/// @brief Tests that UserIds of different types compare correctly.
@@ -135,5 +145,4 @@ TEST(UserIdTest, mixed_type_compare) {
EXPECT_TRUE(*hw < *duid);
}
-
} // end of anonymous namespace