1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:47:34 +00:00

AK: Make "foo"_string infallible

Stop worrying about tiny OOMs.

Work towards #20405.
This commit is contained in:
Andreas Kling 2023-08-07 11:12:38 +02:00
parent db2a8725c6
commit 34344120f2
181 changed files with 626 additions and 630 deletions

View file

@ -53,7 +53,7 @@ TEST_CASE(decode_utf8)
TEST_CASE(encode_utf8)
{
{
auto utf8_string = MUST("Привет, мир! 😀 γειά σου κόσμος こんにちは世界"_string);
auto utf8_string = "Привет, мир! 😀 γειά σου κόσμος こんにちは世界"_string;
auto string = MUST(AK::utf8_to_utf16(utf8_string));
Utf16View view { string };
EXPECT_EQ(MUST(view.to_utf8(Utf16View::AllowInvalidCodeUnits::Yes)), utf8_string);