summaryrefslogtreecommitdiff
path: root/AK/Tests/TestVector.cpp
AgeCommit message (Collapse)Author
2020-09-08AK: Remove FixedArray class.asynts
2020-03-06AK: Fix all the warnings in the AK testsAndreas Kling
2020-01-19AK: Teach Vector::insert() to use memmove() for trivial typesAndreas 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-14OwnPtr: Add a way to turn an OwnPtr into a NonnullOwnPtrAndreas Kling
Okay, so, OwnPtr<T>::release_nonnull() returns a NonnullOwnPtr<T>. It assumes that the OwnPtr is non-null to begin with. Note that this removes the value from the OwnPtr, as there can only be a single owner.
2019-08-12Vector: Use memcpy to implement remove() for trivial typesAndreas Kling
This is a lot faster than the generic code path. Also added some unit testing for this.
2019-08-07Vector: Add a test for growing a Vector beyond its inline capacityAndreas Kling
2019-08-07Vector: Use TypedTransfer in more parts of VectorAndreas Kling
Make more Vector-of-trivial-type operations go fast :^)
2019-08-07Vector: Use memcmp for comparing two vectors with trivial elementsAndreas Kling
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-08-02AK: Fix typo in TestVector.cpp, oops.Andreas Kling
2019-08-01AK: Use Vector::empend() a bit in the unit tests, and fix a bug.Andreas Kling
There was a bug in the "prepend_vector_object" test but it was masked by us not printing failures. (The bug was that we were adding three elements to the "objects" vector and then checking that another vector called "more_objects" indeed had three elements. Oops!)
2019-07-21AK: Add a unit test for Vector::prepend(Vector&&) with complex T.Andreas Kling
It's good to verify that complex objects can be moved nicely by Vector.
2019-07-20AK: Add Vector::prepend(Vector&&).Andreas Kling
Also included a good boy unit test.
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-04AK: Add Vector::insert_before_matching(T&&, callback);Andreas Kling
This allows you to do things like: vector.insert_before_matching(value, [](auto& entry) { return value < entry; }); Basically it scans until it finds an element that matches the condition callback and then inserts the new value before the matching element.
2019-06-27AK: Get rid of ConstVectorIterator.Andreas Kling
We can achieve the same with just a VectorIterator<const Vector, const T>.