Improve depth test cases (also check that the level below depth 1 nodes is leaves)
This commit is contained in:
parent
67dbb96774
commit
96208200f9
@ -135,10 +135,8 @@ void DataTreeTest::CHECK_DEPTH(int depth, const Key &key) {
|
||||
} else {
|
||||
auto node = LoadInnerNode(key);
|
||||
EXPECT_EQ(depth, node->depth());
|
||||
if (depth > 1) {
|
||||
for (int i = 0; i < node->numChildren(); ++i) {
|
||||
CHECK_DEPTH(depth-1, node->getChild(i)->key());
|
||||
}
|
||||
for (int i = 0; i < node->numChildren(); ++i) {
|
||||
CHECK_DEPTH(depth-1, node->getChild(i)->key());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user