Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Osuchowski
Kea
Commits
814eb8ad
Commit
814eb8ad
authored
Jan 31, 2013
by
Mukund Sivaraman
Browse files
[2390] Check that origin argument is used for relative names
parent
11f5ae7c
Changes
3
Show whitespace changes
Inline
Side-by-side
src/lib/dns/tests/rdata_mx_unittest.cc
View file @
814eb8ad
...
...
@@ -73,6 +73,12 @@ TEST_F(Rdata_MX_Test, createFromLexer) {
*
test
::
createRdataUsingLexer
(
RRType
::
MX
(),
RRClass
::
IN
(),
"10 mx.example.com."
)));
// test::createRdataUsingLexer() constructs relative to
// "example.org." origin.
EXPECT_EQ
(
0
,
generic
::
MX
(
"10 mx2.example.org."
).
compare
(
*
test
::
createRdataUsingLexer
(
RRType
::
MX
(),
RRClass
::
IN
(),
"10 mx2"
)));
// Exceptions cause NULL to be returned.
EXPECT_FALSE
(
test
::
createRdataUsingLexer
(
RRType
::
MX
(),
RRClass
::
IN
(),
"10 mx. example.com."
));
...
...
src/lib/dns/tests/rdata_ns_unittest.cc
View file @
814eb8ad
...
...
@@ -96,6 +96,12 @@ TEST_F(Rdata_NS_Test, createFromLexer) {
*
test
::
createRdataUsingLexer
(
RRType
::
NS
(),
RRClass
::
IN
(),
"ns.example.com."
)));
// test::createRdataUsingLexer() constructs relative to
// "example.org." origin.
EXPECT_EQ
(
0
,
generic
::
NS
(
"ns8.example.org."
).
compare
(
*
test
::
createRdataUsingLexer
(
RRType
::
NS
(),
RRClass
::
IN
(),
"ns8"
)));
// Exceptions cause NULL to be returned.
EXPECT_FALSE
(
test
::
createRdataUsingLexer
(
RRType
::
NS
(),
RRClass
::
IN
(),
""
));
...
...
src/lib/dns/tests/rdata_ptr_unittest.cc
View file @
814eb8ad
...
...
@@ -99,6 +99,13 @@ TEST_F(Rdata_PTR_Test, createFromLexer) {
EXPECT_EQ
(
0
,
rdata_ptr
.
compare
(
*
test
::
createRdataUsingLexer
(
RRType
::
PTR
(),
RRClass
::
IN
(),
"ns.example.com."
)));
// test::createRdataUsingLexer() constructs relative to
// "example.org." origin.
EXPECT_EQ
(
0
,
generic
::
PTR
(
"foo0.example.org."
).
compare
(
*
test
::
createRdataUsingLexer
(
RRType
::
PTR
(),
RRClass
::
IN
(),
"foo0"
)));
// Extra text at end of line
EXPECT_FALSE
(
test
::
createRdataUsingLexer
(
RRType
::
PTR
(),
RRClass
::
IN
(),
"foo.example.com. extra."
));
...
...
Write
Preview
Markdown
is supported
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