summaryrefslogtreecommitdiff
path: root/AK/Tests/TestHashMap.cpp
AgeCommit message (Collapse)Author
2020-08-22AK: Remove test case that doesn't test anything.asynts
Currently, there is no way to check that an assert fails. This test passes regardless of the assert. (AK/HashTable.h:93)
2020-03-06AK: Fix all the warnings in the AK testsAndreas Kling
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2019-09-06AK: Rename <AK/AKString.h> to <AK/String.h>Andreas Kling
This was a workaround to be able to build on case-insensitive file systems where it might get confused about <string.h> vs <String.h>. Let's just not support building that way, so String.h can have an objectively nicer name. :^)
2019-08-14AK: Make it possible to use HashMap<K, NonnullOwnPtr>::get()Andreas Kling
Add the concept of a PeekType to Traits<T>. This is the type we'll return (wrapped in an Optional) from HashMap::get(). The PeekType for OwnPtr<T> and NonnullOwnPtr<T> is const T*, which means that HashMap::get() will return an Optional<const T*> for maps-of-those.
2019-08-02AK: Add a test for iterating a HashTable during clear (should assert)Andreas Kling
Ideally we should also verify that the assertion actually happens, but we need some support in the TestSuite framework for that.
2019-08-02TestSuite: Hijack the ASSERT macros during unit tests.Andreas Kling
Instead of aborting the program when we hit an assertion, just print a message and keep going. This allows us to write tests that provoke assertions on purpose.
2019-07-16AK: Add a new TestSuite.h from my own work, adapted to match the existing ↵Robin Burchell
one a bit This gives a few new features: * benchmarks * the ability to run individual testcases easily * timing of tests
2019-07-13AK: Support case-insensitive HashMap<String, T>.Andreas Kling
We achieve this by allowing you to specify custom traits for the key type. For convenience, we also provide a CaseInsensitiveStringTraits for String.
2019-06-27AK: Use a SinglyLinkedList<T> as HashTable's bucket chain storage.Andreas Kling
We were using a DoublyLinkedList<T> simply because it supported remove(). This patch consolidates the SinglyLinkedList iterators and adds remove().
2019-06-27AK: Consolidate iterators for HashTable and DoublyLinkedList respectively.Andreas Kling
Get rid of the ConstIterator classes for these containers and use templated FooIterator<T, ...> and FooIterator<const T, ...> helpers. This makes the HashTable class a lot easier to read.