diff options
author | Hendiadyoin1 <leon.a@serenityos.org> | 2022-06-23 17:00:41 +0200 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2022-06-23 20:25:12 +0300 |
commit | 5bf84a5b0e243d0fa53aeb2069f8f691d9371cbc (patch) | |
tree | b4cc943f5f0d00de3ab22c2d61076e46a41aadf7 /Tests/AK | |
parent | f03838fac8ae3e256fa9a67dd0291a2dfdbed280 (diff) | |
download | serenity-5bf84a5b0e243d0fa53aeb2069f8f691d9371cbc.zip |
AK: Zero previous pointer *after* fixing the insertion list in HashTable
Diffstat (limited to 'Tests/AK')
-rw-r--r-- | Tests/AK/TestHashTable.cpp | 9 |
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"); +} |