BIND 10 trac2150_2, updated. 4e25ff76b698c04d2aa9f0e2ed391a3b6922b8f7 [2150] Find a relative label sequence that's more than 1 node away from chain.top()
BIND 10 source code commits
bind10-changes at lists.isc.org
Sun Sep 16 19:43:11 UTC 2012
The branch, trac2150_2 has been updated
via 4e25ff76b698c04d2aa9f0e2ed391a3b6922b8f7 (commit)
via 65ef86855e3fc12b765ba3af403e92af112578da (commit)
via 0ccc72ed6a2a8298af79e19c4b13935471652947 (commit)
from 0b66c1db1a3016532fca5e8ff4be11299646aaf7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4e25ff76b698c04d2aa9f0e2ed391a3b6922b8f7
Author: Mukund Sivaraman <muks at isc.org>
Date: Mon Sep 17 01:12:32 2012 +0530
[2150] Find a relative label sequence that's more than 1 node away from chain.top()
commit 65ef86855e3fc12b765ba3af403e92af112578da
Author: Mukund Sivaraman <muks at isc.org>
Date: Mon Sep 17 01:12:04 2012 +0530
[2150] Check label sequence to see that it's correct
commit 0ccc72ed6a2a8298af79e19c4b13935471652947
Author: Mukund Sivaraman <muks at isc.org>
Date: Mon Sep 17 01:11:22 2012 +0530
[2150] Clear chain before re-use
-----------------------------------------------------------------------
Summary of changes:
.../datasrc/memory/tests/domaintree_unittest.cc | 26 +++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/tests/domaintree_unittest.cc b/src/lib/datasrc/memory/tests/domaintree_unittest.cc
index 4c23cc4..58a3f4d 100644
--- a/src/lib/datasrc/memory/tests/domaintree_unittest.cc
+++ b/src/lib/datasrc/memory/tests/domaintree_unittest.cc
@@ -469,6 +469,7 @@ TEST_F(DomainTreeTest, findInSubTree) {
isc::BadValue);
// First, find a sub-tree node
+ chain.clear();
const LabelSequence ls1(n0);
DomainTree<int>::Result result =
dtree_expose_empty_node.find(ls1, &cdtnode, chain,
@@ -485,15 +486,38 @@ TEST_F(DomainTreeTest, findInSubTree) {
isc::BadValue);
// Now, find "o.w.y.d.e.f." by right-stripping the "w.y.d.e.f."
- // suffix.
+ // suffix to "o" (non-absolute).
const Name n2("o.w.y.d.e.f");
LabelSequence ls2(n2);
ls2.stripRight(6);
+ EXPECT_EQ("o", ls2.toText());
result = dtree_expose_empty_node.find(ls2, &cdtnode, chain,
testCallback, &flag);
EXPECT_EQ(DomainTree<int>::EXACTMATCH, result);
EXPECT_EQ(n2, chain.getAbsoluteName());
+
+ // Another test. Start with "d.e.f." node.
+ chain.clear();
+ const Name n3("d.e.f");
+ const LabelSequence ls3(n3);
+ result =
+ dtree_expose_empty_node.find(ls3, &cdtnode, chain,
+ testCallback, &flag);
+ EXPECT_EQ(DomainTree<int>::EXACTMATCH, result);
+ EXPECT_EQ(n3, chain.getAbsoluteName());
+
+ // Now, find "o.w.y.d.e.f." by right-stripping the "w.y.d.e.f."
+ // suffix to "o.w.y" (non-absolute).
+ const Name n4("o.w.y.d.e.f");
+ LabelSequence ls4(n2);
+ ls4.stripRight(4);
+ EXPECT_EQ("o.w.y", ls4.toText());
+
+ result = dtree_expose_empty_node.find(ls4, &cdtnode, chain,
+ testCallback, &flag);
+ EXPECT_EQ(DomainTree<int>::EXACTMATCH, result);
+ EXPECT_EQ(n4, chain.getAbsoluteName());
}
TEST_F(DomainTreeTest, chainLevel) {
More information about the bind10-changes
mailing list