summaryrefslogtreecommitdiff
path: root/Tests/LibUnicode
diff options
context:
space:
mode:
authorsin-ack <sin-ack@users.noreply.github.com>2022-07-11 17:32:29 +0000
committerAndreas Kling <kling@serenityos.org>2022-07-12 23:11:35 +0200
commit3f3f45580ab7266258e97cb3cecf1e24716d61c5 (patch)
tree152c7a187c98184d58bf91a326357e0af435edcf /Tests/LibUnicode
parente5f09ea1703bacfbb79a4ad3c587a7d5d3d7bb13 (diff)
downloadserenity-3f3f45580ab7266258e97cb3cecf1e24716d61c5.zip
Everywhere: Add sv suffix to strings relying on StringView(char const*)
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
Diffstat (limited to 'Tests/LibUnicode')
-rw-r--r--Tests/LibUnicode/TestUnicodeLocale.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Tests/LibUnicode/TestUnicodeLocale.cpp b/Tests/LibUnicode/TestUnicodeLocale.cpp
index ac4abda8f6..b3fe6d73b4 100644
--- a/Tests/LibUnicode/TestUnicodeLocale.cpp
+++ b/Tests/LibUnicode/TestUnicodeLocale.cpp
@@ -259,9 +259,9 @@ TEST_CASE(parse_unicode_locale_id_with_other_extension)
fail("en-z-aaa-a"sv);
fail("en-0-aaa-a"sv);
- pass("en-z-aa", { 'z', "aa"sv });
- pass("en-z-aa-bbb", { 'z', "aa-bbb"sv });
- pass("en-z-aa-bbb-cccccccc", { 'z', "aa-bbb-cccccccc"sv });
+ pass("en-z-aa"sv, { 'z', "aa"sv });
+ pass("en-z-aa-bbb"sv, { 'z', "aa-bbb"sv });
+ pass("en-z-aa-bbb-cccccccc"sv, { 'z', "aa-bbb-cccccccc"sv });
}
TEST_CASE(parse_unicode_locale_id_with_private_use_extension)
@@ -282,10 +282,10 @@ TEST_CASE(parse_unicode_locale_id_with_private_use_extension)
fail("en-x-aaa-"sv);
fail("en-x-aaa-aaaaaaaaa"sv);
- pass("en-x-a", { "a"sv });
- pass("en-x-aaaaaaaa", { "aaaaaaaa"sv });
- pass("en-x-aaa-bbb", { "aaa"sv, "bbb"sv });
- pass("en-x-aaa-x-bbb", { "aaa"sv, "x"sv, "bbb"sv });
+ pass("en-x-a"sv, { "a"sv });
+ pass("en-x-aaaaaaaa"sv, { "aaaaaaaa"sv });
+ pass("en-x-aaa-bbb"sv, { "aaa"sv, "bbb"sv });
+ pass("en-x-aaa-x-bbb"sv, { "aaa"sv, "x"sv, "bbb"sv });
}
TEST_CASE(canonicalize_unicode_locale_id)