ladybird/Tests/AK
ronak69 352480338e AK: Refactor FixedPoint's formatter
The main change is the simplification of the expression
`(10^precision * fraction) / 2^precision` to `5^precision * fraction`.

Those expressions overflow or not depends on the value of `precision`
and `fraction`. For the maximum value of `fraction`, the following table
shows for which value of `precision` overflow will occur.

            Old   New
    u32      08    10
    u64      15    20
    u128     30    39

As of now `u64` type is used to calculate the result of the expression.
Meaning that before, only FixedPoints with `precision` less than 15
could be accurately rendered (for every value of fraction) in decimal.
Now, this limit gets increased to 20.

This refactor also fixes, broken decimal render for explicitly specified
precision width in format string, and broken hexadecimal render.
2023-08-29 11:10:45 +02:00
..
CMakeLists.txt AK: Rename Time to Duration 2023-05-24 23:18:07 +02:00
TestAllOf.cpp
TestAnyOf.cpp
TestArbitrarySizedEnum.cpp
TestArray.cpp AK: Add Array::contains_slow() and ::first_index_of(), with tests :^) 2023-04-21 20:44:47 +01:00
TestAtomic.cpp
TestBadge.cpp
TestBase64.cpp Tests: Prefer TRY_OR_FAIL() and MUST() over EXPECT(!.is_error()) 2023-05-14 15:39:38 -06:00
TestBinaryHeap.cpp
TestBinarySearch.cpp
TestBitCast.cpp
TestBitmap.cpp
TestBitStream.cpp
TestBuiltinWrappers.cpp AK: Add count_required_bits 2023-05-17 09:08:53 +02:00
TestByteBuffer.cpp
TestCharacterTypes.cpp
TestChecked.cpp
TestCircularBuffer.cpp Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
TestCircularDeque.cpp
TestCircularQueue.cpp
TestComplex.cpp
TestDeprecatedString.cpp
TestDisjointChunks.cpp
TestDistinctNumeric.cpp
TestDoublyLinkedList.cpp
TestDuration.cpp AK+Everywhere: Don't crash on invalid months 2023-05-27 12:17:50 +02:00
TestEndian.cpp
TestEnumBits.cpp
TestFind.cpp
TestFixedArray.cpp
TestFixedPoint.cpp AK: Refactor FixedPoint's formatter 2023-08-29 11:10:45 +02:00
TestFloatingPoint.cpp
TestFloatingPointParsing.cpp AK: Add benchmarks for floating point parsing 2023-04-30 06:05:54 +02:00
TestFlyString.cpp AK: Make "foo"_fly_string infallible 2023-08-07 16:03:27 +02:00
TestFormat.cpp AK: Add option to the string formatter to use a digit separator 2023-04-11 13:03:30 +02:00
TestGenericLexer.cpp
TestHashFunctions.cpp
TestHashMap.cpp Userland: Prefer _string over _short_string 2023-08-08 07:37:21 +02:00
TestHashTable.cpp Everywhere: Run spellcheck on all documentation 2023-05-07 01:05:09 +02:00
TestHex.cpp
TestIndexSequence.cpp
TestInsertionSort.cpp
TestIntegerMath.cpp Kernel/Ext2: Write superblock backups 2023-07-28 14:51:07 +02:00
TestIntrusiveList.cpp AK: Fix crash during teardown of self-owning objects 2023-04-21 18:15:00 +02:00
TestIntrusiveRedBlackTree.cpp
TestIPv4Address.cpp
TestIPv6Address.cpp AK: Migrate IPv6Address::to_deprecated_string() to ::to_string() 2023-06-09 19:38:14 +01:00
TestJSON.cpp Tests: Add more tests for JsonArray 2023-05-08 07:39:49 +01:00
TestLEB128.cpp
TestLexicalPath.cpp
TestMACAddress.cpp
TestMemory.cpp
TestMemoryStream.cpp AK: Correctly calculate size of the last AllocatingMemoryStream chunk 2023-05-29 13:30:46 +02:00
TestNeverDestroyed.cpp
TestNonnullOwnPtr.cpp AK: Make Formatter for NonnullOwnPtr<T> format the T 2023-08-25 20:10:47 +02:00
TestNonnullRefPtr.cpp AK: Fix crash during teardown of self-owning objects 2023-04-21 18:15:00 +02:00
TestNumberFormat.cpp
TestOptional.cpp Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
TestOwnPtr.cpp AK: Fix crash during teardown of self-owning objects 2023-04-21 18:15:00 +02:00
TestPrint.cpp
TestQueue.cpp
TestQuickSelect.cpp
TestQuickSort.cpp Tests: Use AK_MAKE_DEFAULT_MOVABLE to avoid mistakes in default impls 2023-06-18 08:47:51 +01:00
TestRedBlackTree.cpp
TestRefPtr.cpp Everywhere: Make Lagom build with GCC 13 2023-05-02 07:03:57 -04:00
TestSIMD.cpp
TestSinglyLinkedList.cpp
TestSourceGenerator.cpp AK: Make SourceGenerator::fork() infallible 2023-08-22 13:08:24 +02:00
TestSourceLocation.cpp
TestSpan.cpp
TestStack.cpp
TestStatistics.cpp
TestStdLibExtras.cpp
TestString.cpp AK: Remove the API to explicitly construct short strings 2023-08-08 07:37:21 +02:00
TestStringFloatingPointConversions.cpp
TestStringUtils.cpp
TestStringView.cpp
TestTrie.cpp
TestTuple.cpp Tests: Use AK_MAKE_DEFAULT_MOVABLE to avoid mistakes in default impls 2023-06-18 08:47:51 +01:00
TestTypedTransfer.cpp
TestTypeTraits.cpp Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
TestUFixedBigInt.cpp AK: Add support for Little/BigEndian<UFixedBigInteger<M>> 2023-08-21 13:39:32 +03:30
TestURL.cpp AK: Port URL::m_fragment from DeprecatedString to String 2023-08-13 15:03:53 -06:00
TestUtf8.cpp
TestUtf16.cpp AK: Make "foo"_string infallible 2023-08-07 16:03:27 +02:00
TestVariant.cpp AK: Allow testing Empty instances for equality 2023-07-28 20:47:48 +03:30
TestVector.cpp AK+Kernel: Unify Traits<T>::equals()'s argument order on different types 2023-08-23 20:21:09 +02:00
TestWeakPtr.cpp