From 8707308d6937d20b1bfbf162c3d8f27eacd4979d Mon Sep 17 00:00:00 2001 From: Mitchell Hwang Date: Tue, 10 Aug 2021 16:07:25 -0400 Subject: [PATCH] [MacCatalyst][libraries] Update MacCatalyst as Case Preserving for tests --- .../System.IO.FileSystem/tests/Directory/Exists.cs | 1 - .../System.IO.FileSystem/tests/DirectoryInfo/Exists.cs | 1 - src/libraries/System.IO.FileSystem/tests/File/Exists.cs | 1 - src/libraries/System.IO.FileSystem/tests/FileInfo/Exists.cs | 1 - src/libraries/System.IO.FileSystem/tests/FileSystemTest.cs | 6 +++--- 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/libraries/System.IO.FileSystem/tests/Directory/Exists.cs b/src/libraries/System.IO.FileSystem/tests/Directory/Exists.cs index c814f88fe9b92c..107472c795059b 100644 --- a/src/libraries/System.IO.FileSystem/tests/Directory/Exists.cs +++ b/src/libraries/System.IO.FileSystem/tests/Directory/Exists.cs @@ -236,7 +236,6 @@ public void DoesCaseInsensitiveInvariantComparisons() [Fact] [PlatformSpecific(CaseSensitivePlatforms)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/52857", TestPlatforms.MacCatalyst)] public void DoesCaseSensitiveComparisons() { DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); diff --git a/src/libraries/System.IO.FileSystem/tests/DirectoryInfo/Exists.cs b/src/libraries/System.IO.FileSystem/tests/DirectoryInfo/Exists.cs index f573ab57dacba0..1be25240b0d6a3 100644 --- a/src/libraries/System.IO.FileSystem/tests/DirectoryInfo/Exists.cs +++ b/src/libraries/System.IO.FileSystem/tests/DirectoryInfo/Exists.cs @@ -77,7 +77,6 @@ public void CaseInsensitivity() [Fact] [PlatformSpecific(CaseSensitivePlatforms)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/52857", TestPlatforms.MacCatalyst)] public void CaseSensitivity() { Assert.False(new DirectoryInfo(TestDirectory.ToUpperInvariant()).Exists); diff --git a/src/libraries/System.IO.FileSystem/tests/File/Exists.cs b/src/libraries/System.IO.FileSystem/tests/File/Exists.cs index f5513ce406ef9d..5e9d658602ed8b 100644 --- a/src/libraries/System.IO.FileSystem/tests/File/Exists.cs +++ b/src/libraries/System.IO.FileSystem/tests/File/Exists.cs @@ -180,7 +180,6 @@ public void DoesCaseInsensitiveInvariantComparions() [Fact] [PlatformSpecific(CaseSensitivePlatforms)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/52857", TestPlatforms.MacCatalyst)] public void DoesCaseSensitiveComparisons() { FileInfo testFile = new FileInfo(GetTestFilePath()); diff --git a/src/libraries/System.IO.FileSystem/tests/FileInfo/Exists.cs b/src/libraries/System.IO.FileSystem/tests/FileInfo/Exists.cs index fefe9a0209d926..72b8ba48ba3ab2 100644 --- a/src/libraries/System.IO.FileSystem/tests/FileInfo/Exists.cs +++ b/src/libraries/System.IO.FileSystem/tests/FileInfo/Exists.cs @@ -63,7 +63,6 @@ public void CaseInsensitivity() [Fact] [PlatformSpecific(CaseSensitivePlatforms)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/52857", TestPlatforms.MacCatalyst)] public void CaseSensitivity() { string path = GetTestFilePath(); diff --git a/src/libraries/System.IO.FileSystem/tests/FileSystemTest.cs b/src/libraries/System.IO.FileSystem/tests/FileSystemTest.cs index fbc82ffeac6454..afc49d5244ece9 100644 --- a/src/libraries/System.IO.FileSystem/tests/FileSystemTest.cs +++ b/src/libraries/System.IO.FileSystem/tests/FileSystemTest.cs @@ -11,8 +11,8 @@ public abstract partial class FileSystemTest : FileCleanupTestBase { public static readonly byte[] TestBuffer = { 0xBA, 0x5E, 0xBA, 0x11, 0xF0, 0x07, 0xBA, 0x11 }; - protected const TestPlatforms CaseInsensitivePlatforms = TestPlatforms.Windows | TestPlatforms.OSX; - protected const TestPlatforms CaseSensitivePlatforms = TestPlatforms.AnyUnix & ~TestPlatforms.OSX; + protected const TestPlatforms CaseInsensitivePlatforms = TestPlatforms.Windows | TestPlatforms.OSX | TestPlatforms.MacCatalyst; + protected const TestPlatforms CaseSensitivePlatforms = TestPlatforms.AnyUnix & ~TestPlatforms.OSX & ~TestPlatforms.MacCatalyst; public static bool AreAllLongPathsAvailable => PathFeatures.AreAllLongPathsAvailable(); @@ -72,7 +72,7 @@ public static string GetNamedPipeServerStreamName() string prefix = Path.Combine(Path.GetTempPath(), "CoreFxPipe_"); int availableLength = MinUdsPathLength - prefix.Length - 1; // 1 - for possible null terminator Assert.True(availableLength >= MinAvailableForSufficientRandomness, $"UDS prefix {prefix} length {prefix.Length} is too long"); - + return string.Create(availableLength, 0, (span, _) => { for (int i = 0; i < span.Length; i++)