mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +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:
committed by
Andreas Kling
parent
d3e809bcd4
commit
4fc0fba646
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user