Commit 1adbd6a0 authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2441] Also check the RdataSet for out-of-order records

parent a04f885f
......@@ -451,6 +451,29 @@ TEST_F(MemoryClientTest, loadDuplicateType) {
const ZoneData* zone_data =
EXPECT_NE(static_cast<const ZoneData*>(NULL), zone_data);
/* Check */
const ZoneTree& tree = zone_data->getZoneTree();
const ZoneNode* node;
ZoneTree::Result zresult(tree.find(Name(""), &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);
// and
EXPECT_EQ(2, set->getRdataCount());
set = set->getNext();
EXPECT_EQ(static_cast<const RdataSet*>(NULL), set);
// Teardown checks for memory segment leaks
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment