mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibCore+LibJS+LibUnicode: Port retrieving available time zones to ICU
This required updating some LibJS spec steps to their latest versions, as the data expected by the old steps does not quite match the APIs that are available with the ICU. The new spec steps are much more aligned.
This commit is contained in:
parent
d3e809bcd4
commit
4fc0fba646
Notes:
sideshowbarker
2024-07-17 18:06:52 +09:00
Author: https://github.com/trflynn89
Commit: 4fc0fba646
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/281
15 changed files with 259 additions and 103 deletions
|
@ -41,3 +41,17 @@ TEST_CASE(current_time_zone)
|
|||
EXPECT_EQ(Unicode::current_time_zone(), "UTC"sv);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE(available_time_zones)
|
||||
{
|
||||
auto const& time_zones = Unicode::available_time_zones();
|
||||
EXPECT(time_zones.contains_slow("UTC"sv));
|
||||
EXPECT(!time_zones.contains_slow("EAT"sv));
|
||||
}
|
||||
|
||||
TEST_CASE(resolve_primary_time_zone)
|
||||
{
|
||||
EXPECT_EQ(Unicode::resolve_primary_time_zone("UTC"sv), "Etc/UTC"sv);
|
||||
EXPECT_EQ(Unicode::resolve_primary_time_zone("Asia/Katmandu"sv), "Asia/Kathmandu"sv);
|
||||
EXPECT_EQ(Unicode::resolve_primary_time_zone("Australia/Canberra"sv), "Australia/Sydney"sv);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue