Commit 646763a3 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

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

parent dcaf9bfe
......@@ -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");
......
......@@ -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());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment