Skip to content

Commit

Permalink
[Libraries] Fix TimeZoneInfoTests IsIanaIdTest for iOS/MacCatalyst/tv…
Browse files Browse the repository at this point in the history
…OS (dotnet#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
1 parent 675d340 commit 4e2986d
Showing 1 changed file with 1 addition and 4 deletions.
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

0 comments on commit 4e2986d

Please sign in to comment.