ladybird/Tests/AK
Sam Atkins 7e98c8eaf6 AK+Tests: Fix StringUtils::contains() being confused by repeating text
Previously, case-insensitively searching the haystack "Go Go Back" for
the needle "Go Back" would return false:

1. Match the first three characters. "Go ".
2. Notice that 'G' and 'B' don't match.
3. Skip ahead 3 characters, plus 1 for the outer for-loop.
4. Now, the haystack is effectively "o Back", so the match fails.

Reducing the skip by 1 fixes this issue. I'm not 100% convinced this
fixes all cases, but I haven't been able to find any cases where it
doesn't work now. :^)
2022-03-18 23:51:56 +00:00
..
CMakeLists.txt Tests: Rename AK/TestMemMem.cpp to AK/TestMemory.cpp 2022-03-13 19:08:58 -07:00
TestAllOf.cpp AK+Everywhere: Stop including Vector.h from StringView.h 2021-11-10 21:58:58 +01:00
TestAnyOf.cpp AK+Everywhere: Stop including Vector.h from StringView.h 2021-11-10 21:58:58 +01:00
TestArray.cpp Everywhere: Fix spelling mistakes 2022-01-07 15:44:42 +01:00
TestAtomic.cpp
TestBadge.cpp
TestBase64.cpp AK: Ignore whitespace while decoding base64 2022-02-25 19:54:13 +01:00
TestBinaryHeap.cpp
TestBinarySearch.cpp AK+Everywhere: Stop including Vector.h from StringView.h 2021-11-10 21:58:58 +01:00
TestBitCast.cpp
TestBitmap.cpp AK: Make Bitmap construction OOM-fallible 2022-02-11 17:49:46 +02:00
TestBuiltinWrappers.cpp AK: Add BuiltinWrappers.h 2021-12-18 23:36:08 +01:00
TestByteBuffer.cpp Everywhere: Convert ByteBuffer factory methods from Optional -> ErrorOr 2022-01-24 22:36:09 +01:00
TestCharacterTypes.cpp
TestChecked.cpp
TestCircularDeque.cpp
TestCircularDuplexStream.cpp
TestCircularQueue.cpp
TestComplex.cpp
TestDisjointChunks.cpp Tests: Test DisjointChunks with FixedArray 2022-02-27 00:11:14 +03:30
TestDistinctNumeric.cpp
TestDoublyLinkedList.cpp
TestEndian.cpp
TestEnumBits.cpp
TestFind.cpp
TestFixedArray.cpp Tests: Test FixedArray completely 2022-01-13 11:17:44 +01:00
TestFixedPoint.cpp AK: Add FixedPoint base 2 logarithm 2022-02-28 13:59:31 +01:00
TestFormat.cpp Tests: Remove some temporary files when finished using them 2022-01-14 00:20:30 +01:00
TestGenericLexer.cpp
TestHashFunctions.cpp AK: Use a full-period xorshift PRNG for double_hash 2022-01-07 12:34:44 +01:00
TestHashMap.cpp AK: Ensure negative predicate in TestHashMap could run unsuccessfully 2022-01-06 22:24:01 +01:00
TestHashTable.cpp AK: Add test for unbounded HashTable capacity leak 2022-03-07 00:08:22 +01:00
TestHex.cpp
TestIndexSequence.cpp AK+Everywhere: Stop including Vector.h from StringView.h 2021-11-10 21:58:58 +01:00
TestIntegerMath.cpp AK: Introduce IntegralMath.h starting with pow<I> 2022-02-06 17:52:33 +00:00
TestIntrusiveList.cpp AK+Everywhere: Reduce the number of template parameters of IntrusiveList 2021-09-10 18:05:46 +03:00
TestIntrusiveRedBlackTree.cpp AK+Kernel: Reduce the number of template parameters of IntrusiveRBTree 2021-09-10 18:05:46 +03:00
TestIPv4Address.cpp
TestIPv6Address.cpp AK: Add IPv6Address class 2022-03-08 23:05:44 +01:00
TestJSON.cpp AK: Fix userland parsing of rounded floating point numbers 2022-02-16 07:22:51 -05:00
TestLEB128.cpp
TestLexicalPath.cpp AK: Implement a way to resolve relative paths lexically 2021-10-10 15:18:55 -07:00
TestMACAddress.cpp
TestMemory.cpp AK: Add naive implementations of AK::timing_safe_compare 2022-03-13 19:08:58 -07:00
TestMemoryStream.cpp
TestNeverDestroyed.cpp
TestNonnullRefPtr.cpp
TestNumberFormat.cpp
TestOptional.cpp AK+Everywhere: Stop including Vector.h from StringView.h 2021-11-10 21:58:58 +01:00
TestQueue.cpp
TestQuickSort.cpp
TestRedBlackTree.cpp AK: Clear minimum when removing last node of RedBlackTree 2022-02-10 14:09:39 +00:00
TestRefPtr.cpp AK+Kernel: Remove one_ref_left() footgun 2022-01-11 01:12:16 +01:00
TestSinglyLinkedList.cpp
TestSourceGenerator.cpp
TestSourceLocation.cpp Tests: Remove Clang workaround from TestSourceLocation 2021-10-17 17:09:58 +01:00
TestSpan.cpp Everywhere: Fix spelling mistakes 2022-01-07 15:44:42 +01:00
TestStack.cpp
TestStdLibExtras.cpp Everywhere: Update copyrights with my new serenityos.org e-mail :^) 2022-01-31 18:23:22 +00:00
TestString.cpp AK+Tests: Make null strings compare less than non-null strings 2022-01-30 17:23:02 +00:00
TestStringUtils.cpp AK+Tests: Fix StringUtils::contains() being confused by repeating text 2022-03-18 23:51:56 +00:00
TestStringView.cpp AK: Define a traits helper for case-insensitive StringView hashing 2022-01-11 00:36:45 +01:00
TestTime.cpp
TestTrie.cpp AK+Kernel: OOM-harden most parts of Trie 2022-02-15 18:03:02 +02:00
TestTuple.cpp
TestTypedTransfer.cpp
TestTypeTraits.cpp Everywhere: Fix spelling mistakes 2022-01-07 15:44:42 +01:00
TestUFixedBigInt.cpp
TestURL.cpp AK: Ignore whitespace while decoding base64 2022-02-25 19:54:13 +01:00
TestUtf8.cpp AK: Make Utf8View constructors inline and remove C string constructor 2021-09-18 19:54:24 +02:00
TestUtf16.cpp Everywhere: Update copyrights with my new serenityos.org e-mail :^) 2022-01-31 18:23:22 +00:00
TestVariant.cpp AK: Make Variant::visit() prefer overloads accepting T const& over T& 2022-01-14 11:35:40 +03:30
TestVector.cpp AK: Add reverse iterator as member 2022-03-09 17:16:28 +01:00
TestWeakPtr.cpp