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
Prev Previous commit
Next Next commit
[Libraries] Fix TimeZoneInfoTests IsIanaIdTest for iOS/MacCatalyst/tv…
…OS (#58562)

* [Libraries] Fix TimeZoneInfoTests IsIanaIdTest for iOS/MacCatalyst/tvOS

* [Libraries] Fix IsIanaIdTest to assert throw for iOS/MacCatalyst/tvOS

* Readd new line

* [Mobile][Libraries] System.Runtime.Tests TimeZoneInfoTests remove mobile from iana conversion support

* [libraries] System.Runtime.Tests revert IsIanaIdTest iOS tvOS special casing

* Remove active issue added in recently merged PR

Co-authored-by: Mitchell Hwang <[email protected]>
  • Loading branch information
mdh1418 and Mitchell Hwang committed Sep 8, 2021
commit 4e2986d0ae44295739c747e6ae83087314e2ec81
Original file line number Diff line number Diff line change
Expand Up @@ -2641,7 +2641,7 @@ public static void UsingAlternativeTimeZoneIdsTest(string windowsId, string iana
}
}

public static bool SupportIanaNamesConversion => PlatformDetection.IsNotBrowser && PlatformDetection.ICUVersion.Major >= 52;
public static bool SupportIanaNamesConversion => PlatformDetection.IsNotMobile && PlatformDetection.ICUVersion.Major >= 52;
public static bool SupportIanaNamesConversionAndRemoteExecution => SupportIanaNamesConversion && RemoteExecutor.IsSupported;

// This test is executed using the remote execution because it needs to run before creating the time zone cache to ensure testing with that state.
Expand All @@ -2662,7 +2662,6 @@ public static void IsIanaIdWithNotCacheTest()
}

[ConditionalFact(nameof(SupportIanaNamesConversion))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/58440", TestPlatforms.iOS | TestPlatforms.MacCatalyst | TestPlatforms.tvOS)]
public static void IsIanaIdTest()
{
bool expected = !s_isWindows;
Expand Down Expand Up @@ -2694,7 +2693,6 @@ public static void IsIanaIdTest()
[InlineData("Argentina Standard Time", "America/Buenos_Aires")]
[InlineData("Newfoundland Standard Time", "America/St_Johns")]
[InlineData("Iran Standard Time", "Asia/Tehran")]
[ActiveIssue("https://github.com/dotnet/runtime/issues/52072", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public static void IdsConversionsTest(string windowsId, string ianaId)
{
Assert.True(TimeZoneInfo.TryConvertIanaIdToWindowsId(ianaId, out string winId));
Expand Down Expand Up @@ -2729,7 +2727,6 @@ public static void IdsConversionsTest(string windowsId, string ianaId)
[InlineData("GMT Standard Time", "Europe/Dublin", "ie")]
[InlineData("W. Europe Standard Time", "Europe/Rome", "it")]
[InlineData("New Zealand Standard Time", "Pacific/Auckland", "nz")]
[ActiveIssue("https://github.com/dotnet/runtime/issues/52072", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public static void IdsConversionsWithRegionTest(string windowsId, string ianaId, string region)
{
Assert.True(TimeZoneInfo.TryConvertWindowsIdToIanaId(windowsId, region, out string ianaConvertedId));
Expand Down