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
ISC Open Source Projects
Kea
Commits
d71f7e9f
Commit
d71f7e9f
authored
Jul 26, 2012
by
Mukund Sivaraman
Browse files
[2124] Add another toWire() test
parent
73080d99
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/dns/tests/rdata_sshfp_unittest.cc
View file @
d71f7e9f
...
...
@@ -196,6 +196,13 @@ TEST_F(Rdata_SSHFP_Test, getFingerprintLen) {
}
TEST_F
(
Rdata_SSHFP_Test
,
emptyFingerprintFromWire
)
{
const
uint8_t
rdf_wiredata
[]
=
{
// algorithm
0x04
,
// fingerprint type
0x09
};
const
generic
::
SSHFP
rdf
=
dynamic_cast
<
const
generic
::
SSHFP
&>
(
*
rdataFactoryFromFile
(
RRType
(
"SSHFP"
),
RRClass
(
"IN"
),
...
...
@@ -204,6 +211,16 @@ TEST_F(Rdata_SSHFP_Test, emptyFingerprintFromWire) {
EXPECT_EQ
(
4
,
rdf
.
getSSHFPAlgorithmNumber
());
EXPECT_EQ
(
9
,
rdf
.
getSSHFPFingerprintType
());
EXPECT_EQ
(
0
,
rdf
.
getFingerprintLen
());
this
->
obuffer
.
clear
();
rdf
.
toWire
(
this
->
obuffer
);
EXPECT_EQ
(
2
,
this
->
obuffer
.
getLength
());
EXPECT_PRED_FORMAT4
(
UnitTestUtil
::
matchWireData
,
this
->
obuffer
.
getData
(),
this
->
obuffer
.
getLength
(),
rdf_wiredata
,
sizeof
(
rdf_wiredata
));
}
TEST_F
(
Rdata_SSHFP_Test
,
emptyFingerprintFromString
)
{
...
...
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