From: Michal 'vorner' Vaner Date: Tue, 9 Oct 2012 12:11:25 +0000 (+0200) Subject: [2292] Clarify test X-Git-Tag: trac2351_base~1^2~9^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d78dd497ecb846ab2545ce1cb7b6e41341ff5995;p=thirdparty%2Fkea.git [2292] Clarify test And make it slightly stronger (it now checks something that should be mostly obvious too, but who knows, with software). --- diff --git a/src/lib/datasrc/tests/memory/domaintree_unittest.cc b/src/lib/datasrc/tests/memory/domaintree_unittest.cc index 81fa576b21..45e256a0b4 100644 --- a/src/lib/datasrc/tests/memory/domaintree_unittest.cc +++ b/src/lib/datasrc/tests/memory/domaintree_unittest.cc @@ -411,10 +411,11 @@ performCallbackTest(TestDomainTree& dtree, Name("example"), &parentdtnode)); // the child/parent nodes shouldn't "inherit" the callback flag. - // "cdtnode" may be invalid due to the insertion, so we need to re-find - // it. + // "dtnode" should still validly point to "callback.example", but we + // explicitly confirm it. EXPECT_EQ(TestDomainTree::EXACTMATCH, dtree.find(Name("callback.example"), &cdtnode)); + ASSERT_EQ(dtnode, cdtnode); EXPECT_TRUE(cdtnode->getFlag(TestDomainTreeNode::FLAG_CALLBACK)); EXPECT_FALSE(subdtnode->getFlag(TestDomainTreeNode::FLAG_CALLBACK)); EXPECT_FALSE(parentdtnode->getFlag(TestDomainTreeNode::FLAG_CALLBACK));