summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2021-08-30 14:31:48 -0400
committerLinus Groh <mail@linusgroh.de>2021-09-01 14:14:47 +0100
commitd13142f015d1280c3486ee83e9492536c8e80910 (patch)
tree581f5dc188ec24ded7e39a6e58e4a3a7e498fe68 /Tests
parentcaf5b6fa6f8feaba834ad49cc7bdc1f98cba431e (diff)
downloadserenity-d13142f015d1280c3486ee83e9492536c8e80910.zip
LibJS+LibUnicode: Store parsed Unicode locale data as full strings
Originally, it was convenient to store the parsed Unicode locale data as views into the original string being parsed. But to implement locale aliases will require mutating the data that was parsed. To prepare for that, store the parsed data as proper strings.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/LibUnicode/TestUnicodeLocale.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tests/LibUnicode/TestUnicodeLocale.cpp b/Tests/LibUnicode/TestUnicodeLocale.cpp
index 5a14288f1a..52dca55915 100644
--- a/Tests/LibUnicode/TestUnicodeLocale.cpp
+++ b/Tests/LibUnicode/TestUnicodeLocale.cpp
@@ -75,7 +75,7 @@ TEST_CASE(parse_unicode_locale_id)
auto locale_id = Unicode::parse_unicode_locale_id(locale);
EXPECT(!locale_id.has_value());
};
- auto pass = [](StringView locale, Optional<StringView> expected_language, Optional<StringView> expected_script, Optional<StringView> expected_region, Vector<StringView> expected_variants) {
+ auto pass = [](StringView locale, Optional<StringView> expected_language, Optional<StringView> expected_script, Optional<StringView> expected_region, Vector<String> expected_variants) {
auto locale_id = Unicode::parse_unicode_locale_id(locale);
VERIFY(locale_id.has_value());
@@ -252,7 +252,7 @@ TEST_CASE(parse_unicode_locale_id_with_private_use_extension)
auto locale_id = Unicode::parse_unicode_locale_id(locale);
EXPECT(!locale_id.has_value());
};
- auto pass = [](StringView locale, Vector<StringView> const& expected_extension) {
+ auto pass = [](StringView locale, Vector<String> const& expected_extension) {
auto locale_id = Unicode::parse_unicode_locale_id(locale);
VERIFY(locale_id.has_value());
EXPECT_EQ(locale_id->private_use_extensions, expected_extension);