summaryrefslogtreecommitdiff
path: root/Tests/AK/TestByteBuffer.cpp
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2021-09-06 03:29:52 +0430
committerAndreas Kling <kling@serenityos.org>2021-09-06 01:53:26 +0200
commit97e97bccab085823d1365cb54142fd8c41dbcd8c (patch)
tree9008687dbcdfb6f36f6dc6372aa382b15b9d36c8 /Tests/AK/TestByteBuffer.cpp
parent3a9f00c59bad7735970c72cb940d08161fda09b0 (diff)
downloadserenity-97e97bccab085823d1365cb54142fd8c41dbcd8c.zip
Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe
Diffstat (limited to 'Tests/AK/TestByteBuffer.cpp')
-rw-r--r--Tests/AK/TestByteBuffer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Tests/AK/TestByteBuffer.cpp b/Tests/AK/TestByteBuffer.cpp
index a6fabd7085..1e11155809 100644
--- a/Tests/AK/TestByteBuffer.cpp
+++ b/Tests/AK/TestByteBuffer.cpp
@@ -10,10 +10,10 @@
TEST_CASE(equality_operator)
{
- ByteBuffer a = ByteBuffer::copy("Hello, world", 7);
- ByteBuffer b = ByteBuffer::copy("Hello, friend", 7);
+ ByteBuffer a = ByteBuffer::copy("Hello, world", 7).release_value();
+ ByteBuffer b = ByteBuffer::copy("Hello, friend", 7).release_value();
// `a` and `b` are both "Hello, ".
- ByteBuffer c = ByteBuffer::copy("asdf", 4);
+ ByteBuffer c = ByteBuffer::copy("asdf", 4).release_value();
ByteBuffer d;
EXPECT_EQ(a == a, true);
EXPECT_EQ(a == b, true);