Skip to content

Commit 1964231

Browse files
authored
add(p2): test for deleting the only remaining node (#776)
1 parent 9f8bddd commit 1964231

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/storage/b_plus_tree_delete_test.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ TEST(BPlusTreeTests, DISABLED_DeleteTestNoIterator) {
8181
}
8282
}
8383
EXPECT_EQ(size, 1);
84+
85+
// Remove the remaining key
86+
index_key.SetFromInteger(2);
87+
tree.Remove(index_key);
88+
auto root_page_id = tree.GetRootPageId();
89+
ASSERT_EQ(root_page_id, INVALID_PAGE_ID);
90+
8491
delete bpm;
8592
}
8693

0 commit comments

Comments
 (0)