Commit d78dd497 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[2292] Clarify test

And make it slightly stronger (it now checks something that should be
mostly obvious too, but who knows, with software).
parent 3a6ee0d1
...@@ -411,10 +411,11 @@ performCallbackTest(TestDomainTree& dtree, ...@@ -411,10 +411,11 @@ performCallbackTest(TestDomainTree& dtree,
Name("example"), Name("example"),
&parentdtnode)); &parentdtnode));
// the child/parent nodes shouldn't "inherit" the callback flag. // the child/parent nodes shouldn't "inherit" the callback flag.
// "cdtnode" may be invalid due to the insertion, so we need to re-find // "dtnode" should still validly point to "callback.example", but we
// it. // explicitly confirm it.
EXPECT_EQ(TestDomainTree::EXACTMATCH, dtree.find(Name("callback.example"), EXPECT_EQ(TestDomainTree::EXACTMATCH, dtree.find(Name("callback.example"),
&cdtnode)); &cdtnode));
ASSERT_EQ(dtnode, cdtnode);
EXPECT_TRUE(cdtnode->getFlag(TestDomainTreeNode::FLAG_CALLBACK)); EXPECT_TRUE(cdtnode->getFlag(TestDomainTreeNode::FLAG_CALLBACK));
EXPECT_FALSE(subdtnode->getFlag(TestDomainTreeNode::FLAG_CALLBACK)); EXPECT_FALSE(subdtnode->getFlag(TestDomainTreeNode::FLAG_CALLBACK));
EXPECT_FALSE(parentdtnode->getFlag(TestDomainTreeNode::FLAG_CALLBACK)); EXPECT_FALSE(parentdtnode->getFlag(TestDomainTreeNode::FLAG_CALLBACK));
......
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