Skip to content

Commit 45f58f9

Browse files
authored
Delete Ubuntu 14.04 conditions (dotnet#34361)
Ubuntu 14.04 is no longer supported.
1 parent e98c471 commit 45f58f9

9 files changed

Lines changed: 15 additions & 18 deletions

File tree

src/libraries/Common/tests/CoreFx.Private.TestUtilities/System/PlatformDetection.Unix.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@ public static partial class PlatformDetection
1717
//
1818

1919
private static bool IsLinux => RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
20-
public static bool IsCentos6 => IsDistroAndVersion("centos", 6);
2120
public static bool IsOpenSUSE => IsDistroAndVersion("opensuse");
2221
public static bool IsUbuntu => IsDistroAndVersion("ubuntu");
2322
public static bool IsDebian => IsDistroAndVersion("debian");
2423
public static bool IsAlpine => IsDistroAndVersion("alpine");
2524
public static bool IsDebian8 => IsDistroAndVersion("debian", 8);
2625
public static bool IsDebian10 => IsDistroAndVersion("debian", 10);
27-
public static bool IsUbuntu1404 => IsDistroAndVersion("ubuntu", 14, 4);
2826
public static bool IsUbuntu1604 => IsDistroAndVersion("ubuntu", 16, 4);
2927
public static bool IsUbuntu1704 => IsDistroAndVersion("ubuntu", 17, 4);
3028
public static bool IsUbuntu1710 => IsDistroAndVersion("ubuntu", 17, 10);

src/libraries/Common/tests/System/Drawing/Helpers.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public static bool GetIsWindowsOrAtLeastLibgdiplus6()
5959

6060
public static bool GetRecentGdiPlusIsAvailable2()
6161
{
62-
// RedHat and Ubuntu 14.04, as well as Fedora 25 and OpenSUSE 4.22 are running outdated versions of libgdiplus
63-
if (PlatformDetection.IsRedHatFamily || PlatformDetection.IsUbuntu1404 || PlatformDetection.IsFedora || PlatformDetection.IsOpenSUSE)
62+
// RedHat as well as Fedora 25 and OpenSUSE 4.22 are running outdated versions of libgdiplus
63+
if (PlatformDetection.IsRedHatFamily || PlatformDetection.IsFedora || PlatformDetection.IsOpenSUSE)
6464
{
6565
return false;
6666
}
@@ -90,8 +90,8 @@ public static bool GetGdiPlusIsAvailableNotWindows7()
9090

9191
public static bool GetRecentGdiPlusIsAvailable()
9292
{
93-
// RedHat and Ubuntu 14.04 are running outdated versions of libgdiplus
94-
if (PlatformDetection.IsRedHatFamily || PlatformDetection.IsUbuntu1404)
93+
// RedHat is running outdated versions of libgdiplus
94+
if (PlatformDetection.IsRedHatFamily)
9595
{
9696
return false;
9797
}

src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoGetAbbreviatedDayName.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static IEnumerable<object[]> GetAbbreviatedDayName_TestData()
1616
yield return new object[] { new CultureInfo("en-US").DateTimeFormat, englishAbbreviatedDayNames };
1717
yield return new object[] { new DateTimeFormatInfo(), englishAbbreviatedDayNames };
1818

19-
if (!PlatformDetection.IsUbuntu || PlatformDetection.IsUbuntu1404)
19+
if (!PlatformDetection.IsUbuntu)
2020
{
2121
yield return new object[] { new CultureInfo("fr-FR").DateTimeFormat, DateTimeFormatInfoData.FrFRAbbreviatedDayNames() };
2222
}

src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoGetAbbreviatedMonthName.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public static IEnumerable<object[]> GetAbbreviatedMonthName_TestData()
1919
yield return new object[] { new CultureInfo("en-US").DateTimeFormat, englishAbbreviatedMonthNames };
2020
yield return new object[] { new DateTimeFormatInfo(), englishAbbreviatedMonthNames };
2121

22-
if (!PlatformDetection.IsUbuntu || PlatformDetection.IsUbuntu1404)
22+
if (!PlatformDetection.IsUbuntu)
2323
{
2424
yield return new object[] { new CultureInfo("fr-FR").DateTimeFormat, new string[] { "", "janv.", "f\u00E9vr.", "mars", "avr.", "mai", "juin", "juil.", "ao\u00FBt", "sept.", "oct.", "nov.", "d\u00E9c.", "" } };
2525
}

src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoGetDayName.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static IEnumerable<object[]> GetDayName_TestData()
1717
yield return new object[] { new CultureInfo("en-US").DateTimeFormat, englishDayNames };
1818
yield return new object[] { new DateTimeFormatInfo(), englishDayNames };
1919

20-
if (!PlatformDetection.IsUbuntu || PlatformDetection.IsUbuntu1404)
20+
if (!PlatformDetection.IsUbuntu)
2121
{
2222
yield return new object[] { new CultureInfo("fr-FR").DateTimeFormat, DateTimeFormatInfoData.FrFRDayNames() };
2323
}

src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoGetMonthName.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public static IEnumerable<object[]> GetMonthName_TestData()
1919
yield return new object[] { new DateTimeFormatInfo(), englishMonthNames };
2020
yield return new object[] { new CultureInfo("en-US").DateTimeFormat, englishMonthNames };
2121

22-
if (!PlatformDetection.IsUbuntu || PlatformDetection.IsUbuntu1404)
22+
if (!PlatformDetection.IsUbuntu)
2323
{
2424
yield return new object[] { new CultureInfo("fr-FR").DateTimeFormat, new string[] { "", "janvier", "f\u00E9vrier", "mars", "avril", "mai", "juin", "juillet", "ao\u00FBt", "septembre", "octobre", "novembre", "d\u00E9cembre", "" } };
2525
}

src/libraries/System.Globalization/tests/NumberFormatInfo/NumberFormatInfoCurrencyGroupSizes.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ public static IEnumerable<object[]> CurrencyGroupSizes_TestData()
1414
yield return new object[] { NumberFormatInfo.InvariantInfo, new int[] { 3 } };
1515
yield return new object[] { CultureInfo.GetCultureInfo("en-US").NumberFormat, new int[] { 3 } };
1616

17-
if ((!PlatformDetection.IsUbuntu || PlatformDetection.IsUbuntu1404)
18-
&& !PlatformDetection.IsWindows7 && !PlatformDetection.IsWindows8x && !PlatformDetection.IsFedora)
17+
if (!PlatformDetection.IsUbuntu && !PlatformDetection.IsWindows7 && !PlatformDetection.IsWindows8x && !PlatformDetection.IsFedora)
1918
{
2019
yield return new object[] { CultureInfo.GetCultureInfo("ur-IN").NumberFormat, new int[] { 3, 2 } };
2120
}

src/libraries/System.Security.Cryptography.X509Certificates/tests/PfxTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ public static void ReadECDsaPrivateKey_BrainpoolP160r1_Pfx(byte[] pfxData)
249249
}
250250
catch (CryptographicException)
251251
{
252-
// Windows 7, Windows 8, Ubuntu 14, CentOS, macOS can fail. Verify known good platforms don't fail.
252+
// Windows 7, Windows 8, CentOS, macOS can fail. Verify known good platforms don't fail.
253253
Assert.False(PlatformDetection.IsWindows && PlatformDetection.WindowsVersion >= 10, "Is Windows 10");
254-
Assert.False(PlatformDetection.IsUbuntu && !PlatformDetection.IsUbuntu1404, "Is Ubuntu 16.04 or up");
254+
Assert.False(PlatformDetection.IsUbuntu, "Is Ubuntu");
255255
}
256256
}
257257

src/libraries/System.Security.Cryptography.X509Certificates/tests/PublicKeyTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,9 @@ public static void TestKey_ECDsabrainpool_PublicKey(byte[] curveData, byte[] not
330330
}
331331
catch (CryptographicException)
332332
{
333-
// Windows 7, Windows 8, Ubuntu 14, CentOS can fail. Verify known good platforms don't fail.
333+
// Windows 7, Windows 8, CentOS can fail. Verify known good platforms don't fail.
334334
Assert.False(PlatformDetection.IsWindows && PlatformDetection.WindowsVersion >= 10);
335-
Assert.False(PlatformDetection.IsUbuntu && !PlatformDetection.IsUbuntu1404);
335+
Assert.False(PlatformDetection.IsUbuntu);
336336
}
337337
}
338338

@@ -420,9 +420,9 @@ public static void TestECDsaPublicKey_BrainpoolP160r1_ValidatesSignature(byte[]
420420
}
421421
catch (CryptographicException)
422422
{
423-
// Windows 7, Windows 8, Ubuntu 14, CentOS can fail. Verify known good platforms don't fail.
423+
// Windows 7, Windows 8, CentOS can fail. Verify known good platforms don't fail.
424424
Assert.False(PlatformDetection.IsWindows && PlatformDetection.WindowsVersion >= 10);
425-
Assert.False(PlatformDetection.IsUbuntu && !PlatformDetection.IsUbuntu1404);
425+
Assert.False(PlatformDetection.IsUbuntu);
426426
}
427427
}
428428

0 commit comments

Comments
 (0)