diff options
author | Linus Groh <mail@linusgroh.de> | 2023-02-25 16:40:37 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-25 20:51:49 +0100 |
commit | 09d40bfbb24588b5659f17e2701b5c367a447110 (patch) | |
tree | 8a5612e3251e504ab41d0ff5c7a1a7f70c2593b0 /Tests/AK/TestHashMap.cpp | |
parent | 85414d9338f5b4a25f46f519c07af161c48af45d (diff) | |
download | serenity-09d40bfbb24588b5659f17e2701b5c367a447110.zip |
Everywhere: Use _{short_,}string to create Strings from literals
Diffstat (limited to 'Tests/AK/TestHashMap.cpp')
-rw-r--r-- | Tests/AK/TestHashMap.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Tests/AK/TestHashMap.cpp b/Tests/AK/TestHashMap.cpp index 6e70540a9f..3ca4dbe71b 100644 --- a/Tests/AK/TestHashMap.cpp +++ b/Tests/AK/TestHashMap.cpp @@ -227,11 +227,11 @@ TEST_CASE(take) EXPECT(!map.take("foo"sv).has_value()); EXPECT(!map.take("bar"sv).has_value()); - EXPECT(!map.take(String::from_utf8_short_string("baz"sv)).has_value()); + EXPECT(!map.take("baz"_short_string).has_value()); - map.set(String::from_utf8_short_string("foo"sv), 1); - map.set(String::from_utf8_short_string("bar"sv), 2); - map.set(String::from_utf8_short_string("baz"sv), 3); + map.set("foo"_short_string, 1); + map.set("bar"_short_string, 2); + map.set("baz"_short_string, 3); auto foo = map.take("foo"sv); EXPECT_EQ(foo, 1); @@ -245,9 +245,9 @@ TEST_CASE(take) bar = map.take("bar"sv); EXPECT(!bar.has_value()); - auto baz = map.take(String::from_utf8_short_string("baz"sv)); + auto baz = map.take("baz"_short_string); EXPECT_EQ(baz, 3); - baz = map.take(String::from_utf8_short_string("baz"sv)); + baz = map.take("baz"_short_string); EXPECT(!baz.has_value()); } |