]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2292] Clarify test
authorMichal 'vorner' Vaner <michal.vaner@nic.cz>
Tue, 9 Oct 2012 12:11:25 +0000 (14:11 +0200)
committerMichal 'vorner' Vaner <michal.vaner@nic.cz>
Tue, 9 Oct 2012 12:11:25 +0000 (14:11 +0200)
And make it slightly stronger (it now checks something that should be
mostly obvious too, but who knows, with software).

src/lib/datasrc/tests/memory/domaintree_unittest.cc

index 81fa576b21b4162d2ef430aa99f5453fc5fb6942..45e256a0b4cf04ac11fe7f414009591d9a74114b 100644 (file)
@@ -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));