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
ISC Open Source Projects
Kea
Commits
1adbd6a0
Commit
1adbd6a0
authored
Mar 04, 2013
by
Mukund Sivaraman
Browse files
[2441] Also check the RdataSet for out-of-order records
parent
a04f885f
Changes
1
Show whitespace changes
Inline
Side-by-side
src/lib/datasrc/tests/memory/memory_client_unittest.cc
View file @
1adbd6a0
...
...
@@ -451,6 +451,29 @@ TEST_F(MemoryClientTest, loadDuplicateType) {
TEST_DATA_DIR
"/example.org-duplicate-type-bad.zone"
);
const
ZoneData
*
zone_data
=
client_
->
findZoneData
(
Name
(
"example.org"
));
EXPECT_NE
(
static_cast
<
const
ZoneData
*>
(
NULL
),
zone_data
);
/* Check ns1.example.org */
const
ZoneTree
&
tree
=
zone_data
->
getZoneTree
();
const
ZoneNode
*
node
;
ZoneTree
::
Result
zresult
(
tree
.
find
(
Name
(
"ns1.example.org"
),
&
node
));
EXPECT_EQ
(
ZoneTree
::
EXACTMATCH
,
zresult
);
const
RdataSet
*
set
=
node
->
getData
();
EXPECT_NE
(
static_cast
<
const
RdataSet
*>
(
NULL
),
set
);
EXPECT_EQ
(
RRType
::
AAAA
(),
set
->
type
);
set
=
set
->
getNext
();
EXPECT_NE
(
static_cast
<
const
RdataSet
*>
(
NULL
),
set
);
EXPECT_EQ
(
RRType
::
A
(),
set
->
type
);
// 192.168.0.1 and 192.168.0.2
EXPECT_EQ
(
2
,
set
->
getRdataCount
());
set
=
set
->
getNext
();
EXPECT_EQ
(
static_cast
<
const
RdataSet
*>
(
NULL
),
set
);
// Teardown checks for memory segment leaks
}
...
...
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