Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
646763a3
Commit
646763a3
authored
Sep 23, 2013
by
Marcin Siodelski
Browse files
[3173] Slight change in the LeaseType::toText() returned text format.
parent
dcaf9bfe
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/tools/perfdhcp/command_options.cc
View file @
646763a3
...
...
@@ -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"
);
...
...
tests/tools/perfdhcp/tests/command_options_unittest.cc
View file @
646763a3
...
...
@@ -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
());
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment