Skip to content
GitLab
Menu
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
4850c004
Commit
4850c004
authored
Nov 25, 2014
by
Marcin Siodelski
Browse files
[3624] Extend test for DHCPv6 client FQDN to cover multi-label domain name.
parent
0a32f6d8
Changes
1
Show whitespace changes
Inline
Side-by-side
src/lib/dhcp/tests/option6_client_fqdn_unittest.cc
View file @
4850c004
...
...
@@ -791,6 +791,14 @@ TEST(Option6ClientFqdnTest, len) {
// length of the string representation of the domain name + 1).
EXPECT_EQ
(
25
,
option
->
len
());
// Use different domain name to check if the length also changes
// as expected.
ASSERT_NO_THROW
(
option
.
reset
(
new
Option6ClientFqdn
(
0
,
"example.com"
))
);
ASSERT_TRUE
(
option
);
EXPECT_EQ
(
18
,
option
->
len
());
// Let's check that the size will change when domain name of a different
// size is used.
ASSERT_NO_THROW
(
...
...
@@ -805,6 +813,16 @@ TEST(Option6ClientFqdnTest, len) {
);
ASSERT_TRUE
(
option
);
EXPECT_EQ
(
12
,
option
->
len
());
// Another test for partial domain name but this time using
// two labels.
ASSERT_NO_THROW
(
option
.
reset
(
new
Option6ClientFqdn
(
0
,
"myhost.example"
,
Option6ClientFqdn
::
PARTIAL
))
);
ASSERT_TRUE
(
option
);
EXPECT_EQ
(
20
,
option
->
len
());
}
}
// anonymous namespace
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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