serenity/Tests/AK
Sam Atkins 253a96277e AK: Add FixedMemoryStream methods for reading values "in place"
When working with FixedMemoryStreams, and especially MappedFiles, you
may don't want to copy the underlying data when you read from the
stream. Pointing into that data is perfectly fine as long as you know
the lifetime of it is long enough.

This commit adds a couple of methods for reading either a single value,
or a span of them, in this way. As noted, for single values you sadly
get a raw pointer instead of a reference, but that's the only option
right now.
2023-10-10 14:36:25 +02:00
..
CMakeLists.txt Tests/AK: Add FuzzyMatch tests 2023-10-06 22:09:18 +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 AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestBinarySearch.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestBitCast.cpp Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
TestBitmap.cpp AK+Everywhere: Replace all Bitmap::must_create() uses with ::create() 2022-12-22 15:48:53 +01:00
TestBitStream.cpp AK: Increase LittleEndianOutputBitStream's buffer size and remove loops 2023-04-02 10:54:37 +02:00
TestBuiltinWrappers.cpp AK: Add count_required_bits 2023-05-17 09:08:53 +02:00
TestByteBuffer.cpp AK: Allow Vector<ByteBuffer>::contains_slow to accept (Readonly)Bytes 2023-02-10 22:18:19 +00:00
TestCharacterTypes.cpp
TestChecked.cpp Tests: Add tests for Checked<> decrement operator 2022-12-08 07:20:14 -05:00
TestCircularBuffer.cpp Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
TestCircularDeque.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestCircularQueue.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestComplex.cpp
TestDeprecatedString.cpp AK: Fix DeprecatedString::bijective_base_from for large numbers 2023-02-26 21:06:21 +03:30
TestDisjointChunks.cpp AK: Remove try_ prefix from FixedArray creation functions 2023-01-28 22:41:36 +01:00
TestDistinctNumeric.cpp AK: Fix typo in -= operator of DistinctNumeric 2023-01-06 12:01:46 +01:00
TestDoublyLinkedList.cpp
TestDuration.cpp Tests: Fix TestDuration build with 32-bit time_t 2023-09-06 07:21:07 -06:00
TestEndian.cpp AK: Add tests for LittleEndian<enum class> 2022-12-28 22:27:19 -05:00
TestEnumBits.cpp
TestFind.cpp
TestFixedArray.cpp AK+Tests: Don't double-destroy NoAllocationGuard in TestFixedArray 2022-09-15 23:04:46 +00:00
TestFixedPoint.cpp AK: Add binary and octal mode formatting for FixedPoint 2023-08-29 11:10:45 +02:00
TestFloatingPoint.cpp AK: Add FloatingPoint.h 2022-08-27 12:28:05 +02:00
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: Avoid overflow when passing i64 minimum value to vformat() 2023-10-09 09:39:02 +03:30
TestFuzzyMatch.cpp Tests/AK: Add FuzzyMatch tests 2023-10-06 22:09:18 +02:00
TestGenericLexer.cpp AK+Everywhere: Make GenericLexer::ignore_until() stop before the value 2023-02-28 12:55:10 +00:00
TestHashFunctions.cpp AK: Implement SipHash as the default hash algorithm for most use cases 2023-10-01 11:06:36 +03:30
TestHashMap.cpp Userland: Prefer _string over _short_string 2023-08-08 07:37:21 +02:00
TestHashTable.cpp AK: Implement reverse iterators for OrderedHashTable 2023-09-24 23:36:43 +02:00
TestHex.cpp
TestIndexSequence.cpp
TestInsertionSort.cpp AK: Introduce cutoff to insertion sort for Quicksort 2022-12-12 15:03:57 +00:00
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 Everywhere: Remove NonnullOwnPtr.h includes 2023-03-06 23:46:35 +01:00
TestIPv4Address.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
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 AK: Remove the fallible constructor from FixedMemoryStream 2023-02-08 17:44:32 +00:00
TestLexicalPath.cpp AK: Create relative path even if prefix is not an ancestor of the path 2022-12-14 15:11:03 +00:00
TestMACAddress.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
TestMemory.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestMemoryStream.cpp AK: Add FixedMemoryStream methods for reading values "in place" 2023-10-10 14:36:25 +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 AK+Tests: Add a test for formatting numbers in base 10 units 2023-01-02 20:11:18 +00:00
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 AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestQuickSelect.cpp AK: Testing for AK::quickselect_inline 2023-02-03 19:04:15 +01:00
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 Tests: Fix building TestSIMD on non-SSE ABIs 2023-09-06 07:21:07 -06:00
TestSinglyLinkedList.cpp AK: Combine SinglyLinkedList and SinglyLinkedListWithCount 2023-01-02 20:13:24 +00:00
TestSourceGenerator.cpp AK: Make SourceGenerator::fork() infallible 2023-08-22 13:08:24 +02:00
TestSourceLocation.cpp Everywhere: Explicitly specify the size in StringView constructors 2022-07-12 23:11:35 +02:00
TestSpan.cpp Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
TestStack.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestStatistics.cpp AK: Add thresholds to quickselect_inline and Statistics::Median 2023-02-03 19:04:15 +01:00
TestStdLibExtras.cpp
TestString.cpp AK: Remove the API to explicitly construct short strings 2023-08-08 07:37:21 +02:00
TestStringFloatingPointConversions.cpp AK: Add framework for a unified floating point to string conversion 2022-11-03 20:17:09 -06:00
TestStringUtils.cpp AK: Ensure string types are actually considered hash-compatible 2023-02-02 19:14:00 +00:00
TestStringView.cpp AK: Rename CaseInsensitiveStringViewTraits to reflect intent 2023-03-14 21:34:32 +00:00
TestTrie.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
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 AK: Invalidate overlong UTF-8 code point encodings 2023-03-03 11:46:42 -05:00
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 AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00