From 95e4a7a335f4bbe53c7e9ce862492adacb9da7f2 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Tue, 27 Jan 2015 00:58:06 +0100 Subject: [PATCH] Added a DataTree test case and some TODOs --- .../onblocks/datatreestore/DataTreeTest.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest.cpp b/src/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest.cpp index a7114d49..c422eae9 100644 --- a/src/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest.cpp +++ b/src/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest.cpp @@ -92,6 +92,14 @@ TEST_F(DataTreeTest, GrowAOneNodeTree_Structure) { EXPECT_IS_LEAF_NODE(root->getChild(1)->key()); } +TEST_F(DataTreeTest, GrowATwoNodeTree_KeyDoesntChange) { + auto tree = CreateLeafOnlyTree(); + auto key = tree->key(); + tree->addDataLeaf(); + tree->addDataLeaf(); + EXPECT_EQ(key, tree->key()); +} + TEST_F(DataTreeTest, GrowATwoNodeTree_Structure) { auto key = CreateTreeAddTwoLeavesReturnRootKey(); @@ -104,6 +112,9 @@ TEST_F(DataTreeTest, GrowATwoNodeTree_Structure) { EXPECT_IS_LEAF_NODE(root->getChild(2)->key()); } +//TODO Grow a full two-level tree +//TODO Grow a three-level tree +//TODO Go through some cases where the right border node chosen is special //TODO Test that when growing, the original leaf retains its data }