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
ad116167
Commit
ad116167
authored
Oct 11, 2011
by
Jelte Jansen
Browse files
[master] fix template issue on clang
parent
b0e43dae
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/dns/tests/rdata_txt_like_unittest.cc
View file @
ad116167
...
...
@@ -129,17 +129,17 @@ makeLargest(vector<uint8_t>& data) {
TYPED_TEST
(
Rdata_TXT_LIKE_Test
,
createFromWire
)
{
EXPECT_EQ
(
0
,
this
->
rdata_txt_like
.
compare
(
*
rdataFactoryFromFile
(
RRTYPE
<
TypeParam
>
(),
RRClass
(
"IN"
),
*
this
->
rdataFactoryFromFile
(
RRTYPE
<
TypeParam
>
(),
RRClass
(
"IN"
),
"rdata_txt_fromWire1"
)));
// Empty character string
EXPECT_EQ
(
0
,
this
->
rdata_txt_like_empty
.
compare
(
*
rdataFactoryFromFile
(
RRTYPE
<
TypeParam
>
(),
RRClass
(
"IN"
),
*
this
->
rdataFactoryFromFile
(
RRTYPE
<
TypeParam
>
(),
RRClass
(
"IN"
),
"rdata_txt_fromWire2.wire"
)));
// Multiple character strings
this
->
obuffer
.
clear
();
rdataFactoryFromFile
(
RRTYPE
<
TypeParam
>
(),
RRClass
(
"IN"
),
this
->
rdataFactoryFromFile
(
RRTYPE
<
TypeParam
>
(),
RRClass
(
"IN"
),
"rdata_txt_fromWire3.wire"
)
->
toWire
(
this
->
obuffer
);
// the result should be 'wiredata_txt' repeated twice
vector
<
uint8_t
>
expected_data
(
wiredata_txt_like
,
wiredata_txt_like
+
...
...
@@ -175,12 +175,12 @@ TYPED_TEST(Rdata_TXT_LIKE_Test, createFromWire) {
EXPECT_THROW
(
TypeParam
(
ibuffer2
,
65536
),
InvalidRdataLength
);
// RDATA is empty, which is invalid for TXT_LIKE.
EXPECT_THROW
(
rdataFactoryFromFile
(
RRTYPE
<
TypeParam
>
(),
RRClass
(
"IN"
),
EXPECT_THROW
(
this
->
rdataFactoryFromFile
(
RRTYPE
<
TypeParam
>
(),
RRClass
(
"IN"
),
"rdata_txt_fromWire4.wire"
),
DNSMessageFORMERR
);
// character-string length is too large, which could cause overrun.
EXPECT_THROW
(
rdataFactoryFromFile
(
RRTYPE
<
TypeParam
>
(),
RRClass
(
"IN"
),
EXPECT_THROW
(
this
->
rdataFactoryFromFile
(
RRTYPE
<
TypeParam
>
(),
RRClass
(
"IN"
),
"rdata_txt_fromWire5.wire"
),
DNSMessageFORMERR
);
}
...
...
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