Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[Libraries] Fix TimeZoneInfoTests IsIanaIdTest for iOS/MacCatalyst/tvOS
  • Loading branch information
Mitchell Hwang committed Sep 2, 2021
commit d7ee4e7d75556e9c0896da527b1d586992cd41a1
Original file line number Diff line number Diff line change
Expand Up @@ -2664,7 +2664,7 @@ public static void IsIanaIdTest()
{
bool expected = !s_isWindows;

Assert.Equal((expected || TimeZoneInfo.Local.Id.Equals("Utc", StringComparison.OrdinalIgnoreCase)), TimeZoneInfo.Local.HasIanaId);
Assert.Equal((expected || PlatformDetection.IsiOS || PlatformDetection.IstvOS || TimeZoneInfo.Local.Id.Equals("Utc", StringComparison.OrdinalIgnoreCase)), TimeZoneInfo.Local.HasIanaId);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't make sense to me. I'd assume that !s_isWindows is true thus expected == true and this condition would not need the change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah oops, I got the order wrong when I checked the failure


foreach (TimeZoneInfo tzi in TimeZoneInfo.GetSystemTimeZones())
{
Expand Down