summaryrefslogtreecommitdiff
path: root/Tests/AK/TestHashTable.cpp
diff options
context:
space:
mode:
authorHendiadyoin1 <leon.a@serenityos.org>2022-06-23 17:00:41 +0200
committerIdan Horowitz <idan.horowitz@gmail.com>2022-06-23 20:25:12 +0300
commit5bf84a5b0e243d0fa53aeb2069f8f691d9371cbc (patch)
treeb4cc943f5f0d00de3ab22c2d61076e46a41aadf7 /Tests/AK/TestHashTable.cpp
parentf03838fac8ae3e256fa9a67dd0291a2dfdbed280 (diff)
downloadserenity-5bf84a5b0e243d0fa53aeb2069f8f691d9371cbc.zip
AK: Zero previous pointer *after* fixing the insertion list in HashTable
Diffstat (limited to 'Tests/AK/TestHashTable.cpp')
-rw-r--r--Tests/AK/TestHashTable.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/AK/TestHashTable.cpp b/Tests/AK/TestHashTable.cpp
index fc1e512045..410681a352 100644
--- a/Tests/AK/TestHashTable.cpp
+++ b/Tests/AK/TestHashTable.cpp
@@ -300,3 +300,12 @@ BENCHMARK_CASE(benchmark_thrashing)
table.remove(i);
}
}
+
+TEST_CASE(reinsertion)
+{
+ OrderedHashTable<String> map;
+ map.set("ytidb::LAST_RESULT_ENTRY_KEY");
+ map.set("__sak");
+ map.remove("__sak");
+ map.set("__sak");
+}