Browse Source

[3173] Slight change in the LeaseType::toText() returned text format.

Marcin Siodelski 11 years ago
parent
commit
646763a316

+ 2 - 2
tests/tools/perfdhcp/command_options.cc

@@ -69,9 +69,9 @@ std::string
 CommandOptions::LeaseType::toText() const {
     switch (type_) {
     case ADDRESS_ONLY:
-        return ("address-only: IA_NA option added to the client's request");
+        return ("address-only (IA_NA option added to the client's request)");
     case PREFIX_ONLY:
-        return ("prefix-only: IA_PD option added to the client's request");
+        return ("prefix-only (IA_PD option added to the client's request)");
     default:
         isc_throw(Unexpected, "internal error: undefined lease type code when"
                   " returning textual representation of the lease type");

+ 2 - 2
tests/tools/perfdhcp/tests/command_options_unittest.cc

@@ -71,11 +71,11 @@ TEST(LeaseTypeTest, fromCommandLine) {
 TEST(LeaseTypeTest, toText) {
     CommandOptions::LeaseType lease_type;
     ASSERT_TRUE(lease_type.is(CommandOptions::LeaseType::ADDRESS_ONLY));
-    EXPECT_EQ("address-only: IA_NA option added to the client's request",
+    EXPECT_EQ("address-only (IA_NA option added to the client's request)",
               lease_type.toText());
 
     lease_type.set(CommandOptions::LeaseType::PREFIX_ONLY);
-    EXPECT_EQ("prefix-only: IA_PD option added to the client's request",
+    EXPECT_EQ("prefix-only (IA_PD option added to the client's request)",
               lease_type.toText());
 }