mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:37:36 +00:00
AK+Everywhere: Change AK::fill_with_random to accept a Bytes object
Rather than the very C-like API we currently have, accepting a void* and a length, let's take a Bytes object instead. In almost all existing cases, the compiler figures out the length.
This commit is contained in:
parent
5c045b6934
commit
15532df83d
20 changed files with 37 additions and 39 deletions
|
@ -88,7 +88,7 @@ TEST_CASE(gzip_decompress_repeat_around_buffer)
|
|||
TEST_CASE(gzip_round_trip)
|
||||
{
|
||||
auto original = ByteBuffer::create_uninitialized(1024).release_value();
|
||||
fill_with_random(original.data(), 1024);
|
||||
fill_with_random(original);
|
||||
auto compressed = Compress::GzipCompressor::compress_all(original);
|
||||
EXPECT(!compressed.is_error());
|
||||
auto uncompressed = Compress::GzipDecompressor::decompress_all(compressed.value());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue