Improve depth test cases (also check that the level below depth 1 nodes is leaves)

This commit is contained in:
Sebastian Messmer 2015-02-24 16:46:05 +01:00
parent 67dbb96774
commit 96208200f9

View File

@ -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());
}
}
}