Skip to content

Commit

Permalink
fix(test): add check in COW test where root value is written then rem…
Browse files Browse the repository at this point in the history
…oved (#590) (#592)

[mod] add check in COW test where root value is written then removed

Co-authored-by: NetWilliam <[email protected]>
  • Loading branch information
skyzh and NetWilliam committed Aug 26, 2023
1 parent 438d855 commit 599044a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/primer/trie_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,15 @@ TEST(TrieTest, BasicRemoveTest2) {
ASSERT_EQ(*trie.Get<uint32_t>("te"), 23);
trie = trie.Put<uint32_t>("tes", 233);
ASSERT_EQ(*trie.Get<uint32_t>("tes"), 233);
trie = trie.Put<uint32_t>("", 123);
ASSERT_EQ(*trie.Get<uint32_t>(""), 123);
// Delete something
trie = trie.Remove("");
trie = trie.Remove("te");
trie = trie.Remove("tes");
trie = trie.Remove("test");

ASSERT_EQ(trie.Get<uint32_t>(""), nullptr);
ASSERT_EQ(trie.Get<uint32_t>("te"), nullptr);
ASSERT_EQ(trie.Get<uint32_t>("tes"), nullptr);
ASSERT_EQ(trie.Get<uint32_t>("test"), nullptr);
Expand Down

0 comments on commit 599044a

Please sign in to comment.