2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00

[2292] Update tests

They don't need the mutable versions to work, but they used them anyway.
This commit is contained in:
Michal 'vorner' Vaner
2012-10-07 17:19:12 +02:00
parent 73900f62a7
commit 00d3de1af8
2 changed files with 15 additions and 15 deletions

View File

@@ -256,8 +256,8 @@ TEST_F(DomainTreeTest, subTreeRoot) {
// "g.h" is not a subtree root
EXPECT_EQ(TestDomainTree::EXACTMATCH,
dtree_expose_empty_node.find(Name("g.h"), &dtnode));
EXPECT_FALSE(dtnode->getFlag(TestDomainTreeNode::FLAG_SUBTREE_ROOT));
dtree_expose_empty_node.find(Name("g.h"), &cdtnode));
EXPECT_FALSE(cdtnode->getFlag(TestDomainTreeNode::FLAG_SUBTREE_ROOT));
// fission the node "g.h"
EXPECT_EQ(TestDomainTree::ALREADYEXISTS,
@@ -270,8 +270,8 @@ TEST_F(DomainTreeTest, subTreeRoot) {
// "g.h" should be a subtree root now.
EXPECT_EQ(TestDomainTree::EXACTMATCH,
dtree_expose_empty_node.find(Name("g.h"), &dtnode));
EXPECT_TRUE(dtnode->getFlag(TestDomainTreeNode::FLAG_SUBTREE_ROOT));
dtree_expose_empty_node.find(Name("g.h"), &cdtnode));
EXPECT_TRUE(cdtnode->getFlag(TestDomainTreeNode::FLAG_SUBTREE_ROOT));
}
TEST_F(DomainTreeTest, additionalNodeFission) {
@@ -286,8 +286,8 @@ TEST_F(DomainTreeTest, additionalNodeFission) {
// "t.0" is not a subtree root
EXPECT_EQ(TestDomainTree::EXACTMATCH,
dtree_expose_empty_node.find(Name("t.0"), &dtnode));
EXPECT_FALSE(dtnode->getFlag(TestDomainTreeNode::FLAG_SUBTREE_ROOT));
dtree_expose_empty_node.find(Name("t.0"), &cdtnode));
EXPECT_FALSE(cdtnode->getFlag(TestDomainTreeNode::FLAG_SUBTREE_ROOT));
// fission the node "t.0"
EXPECT_EQ(TestDomainTree::ALREADYEXISTS,
@@ -300,8 +300,8 @@ TEST_F(DomainTreeTest, additionalNodeFission) {
// "t.0" should be a subtree root now.
EXPECT_EQ(TestDomainTree::EXACTMATCH,
dtree_expose_empty_node.find(Name("t.0"), &dtnode));
EXPECT_TRUE(dtnode->getFlag(TestDomainTreeNode::FLAG_SUBTREE_ROOT));
dtree_expose_empty_node.find(Name("t.0"), &cdtnode));
EXPECT_TRUE(cdtnode->getFlag(TestDomainTreeNode::FLAG_SUBTREE_ROOT));
}
TEST_F(DomainTreeTest, findName) {
@@ -328,10 +328,10 @@ TEST_F(DomainTreeTest, findName) {
EXPECT_EQ(TestDomainTree::PARTIALMATCH,
dtree_expose_empty_node.find(Name("m.d.e.f"), &cdtnode));
// find dtnode
// find cdtnode
EXPECT_EQ(TestDomainTree::EXACTMATCH, dtree.find(Name("q.w.y.d.e.f"),
&dtnode));
EXPECT_EQ(Name("q"), dtnode->getName());
&cdtnode));
EXPECT_EQ(Name("q"), cdtnode->getName());
}
TEST_F(DomainTreeTest, findError) {
@@ -411,11 +411,11 @@ performCallbackTest(TestDomainTree& dtree,
Name("example"),
&parentdtnode));
// the child/parent nodes shouldn't "inherit" the callback flag.
// "dtnode" may be invalid due to the insertion, so we need to re-find
// "cdtnode" may be invalid due to the insertion, so we need to re-find
// it.
EXPECT_EQ(TestDomainTree::EXACTMATCH, dtree.find(Name("callback.example"),
&dtnode));
EXPECT_TRUE(dtnode->getFlag(TestDomainTreeNode::FLAG_CALLBACK));
&cdtnode));
EXPECT_TRUE(cdtnode->getFlag(TestDomainTreeNode::FLAG_CALLBACK));
EXPECT_FALSE(subdtnode->getFlag(TestDomainTreeNode::FLAG_CALLBACK));
EXPECT_FALSE(parentdtnode->getFlag(TestDomainTreeNode::FLAG_CALLBACK));

View File

@@ -108,7 +108,7 @@ void
checkFindRdataSet(const ZoneTree& tree, const Name& name, RRType type,
const RdataSet* expected_set)
{
ZoneNode* node = NULL;
const ZoneNode* node = NULL;
tree.find(name, &node);
ASSERT_NE(static_cast<ZoneNode*>(NULL), node);
EXPECT_EQ(expected_set, RdataSet::find(node->getData(), type));