mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 12:57:35 +00:00
AK: Use a SinglyLinkedList<T> as HashTable's bucket chain storage.
We were using a DoublyLinkedList<T> simply because it supported remove(). This patch consolidates the SinglyLinkedList iterators and adds remove().
This commit is contained in:
parent
7f613c79cd
commit
2282e89d3f
3 changed files with 80 additions and 54 deletions
|
@ -23,6 +23,14 @@ int main()
|
|||
++loop_counter;
|
||||
}
|
||||
|
||||
number_to_string.remove(1);
|
||||
EXPECT_EQ(number_to_string.size(), 2);
|
||||
EXPECT(number_to_string.find(1) == number_to_string.end());
|
||||
|
||||
number_to_string.remove(3);
|
||||
EXPECT_EQ(number_to_string.size(), 1);
|
||||
EXPECT(number_to_string.find(3) == number_to_string.end());
|
||||
|
||||
EXPECT_EQ(loop_counter, 3);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue