Skip to content

Commit

Permalink
Two System.Globalization.Tests fails for "ur-IN" culture on Windows S…
Browse files Browse the repository at this point in the history
…erver 2012 (dotnet/corefx#13846)

* Two System.Globalization.Tests fail for "ur-IN" culture on Windows Server 2012

* Fix IsWindows8

* Renamed to IsWindows8x


Commit migrated from dotnet/corefx@75f5e77
  • Loading branch information
AlexRadch authored and tarekgh committed Nov 22, 2016
1 parent c1922b8 commit aa0d2b2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/libraries/Common/tests/System/PlatformDetection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public static class PlatformDetection
{
public static bool IsWindows { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
public static bool IsWindows7 { get; } = IsWindows && GetWindowsVersion() == 6 && GetWindowsMinorVersion() == 1;
public static bool IsWindows8x { get; } = IsWindows && GetWindowsVersion() == 6 && (GetWindowsMinorVersion() == 2 || GetWindowsMinorVersion() == 3);
public static bool IsOSX { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
public static bool IsNetBSD { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Create("NETBSD"));
public static bool IsOpenSUSE { get; } = IsDistroAndVersion("opensuse");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ public static IEnumerable<object[]> CurrencyGroupSizes_TestData()
{
yield return new object[] { NumberFormatInfo.InvariantInfo, new int[] { 3 } };
yield return new object[] { new CultureInfo("en-US").NumberFormat, new int[] { 3 } };

if (!PlatformDetection.IsWindows7)

// TODO: when dotnet/corefx#2103 is addressed, we should also check fr-FR
if (!PlatformDetection.IsUbuntu1510 && !PlatformDetection.IsUbuntu1604 && !PlatformDetection.IsUbuntu1610
&& !PlatformDetection.IsWindows7 && !PlatformDetection.IsWindows8x && !PlatformDetection.IsFedora24)
{
yield return new object[] { new CultureInfo("ur-IN").NumberFormat, new int[] { 3, 2 } };
}
}

[Theory]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public static IEnumerable<object[]> NumberGroupSizes_TestData()
yield return new object[] { new CultureInfo("en-US").NumberFormat, new int[] { 3 } };

// TODO: when dotnet/corefx#2103 is addressed, we should also check fr-FR
if (!PlatformDetection.IsUbuntu1510 && !PlatformDetection.IsUbuntu1604
&& !PlatformDetection.IsUbuntu1610 && !PlatformDetection.IsWindows7 && !PlatformDetection.IsFedora24)
if (!PlatformDetection.IsUbuntu1510 && !PlatformDetection.IsUbuntu1604 && !PlatformDetection.IsUbuntu1610
&& !PlatformDetection.IsWindows7 && !PlatformDetection.IsWindows8x && !PlatformDetection.IsFedora24)
{
yield return new object[] { new CultureInfo("ur-IN").NumberFormat, NumberFormatInfoData.UrINNumberGroupSizes() };
}
Expand Down

0 comments on commit aa0d2b2

Please sign in to comment.