diff options
108 files changed, 519 insertions, 521 deletions
diff --git a/src/Common/tests/Tests/System/Runtime/InteropServices/NativeBufferTests.cs b/src/Common/tests/Tests/System/Runtime/InteropServices/NativeBufferTests.cs index b22a63ff57..78a69063f3 100644 --- a/src/Common/tests/Tests/System/Runtime/InteropServices/NativeBufferTests.cs +++ b/src/Common/tests/Tests/System/Runtime/InteropServices/NativeBufferTests.cs @@ -50,7 +50,7 @@ namespace Tests.System.Runtime.InteropServices } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to get the current directory for current process public void NullSafePointerInTest() { using (var buffer = new NativeBuffer(0)) diff --git a/src/Microsoft.Win32.Primitives/tests/Win32Exception.cs b/src/Microsoft.Win32.Primitives/tests/Win32Exception.cs index 439979f7b4..d42dd7d9b2 100644 --- a/src/Microsoft.Win32.Primitives/tests/Win32Exception.cs +++ b/src/Microsoft.Win32.Primitives/tests/Win32Exception.cs @@ -77,7 +77,7 @@ namespace System.ComponentModel.Tests private const int E_FAIL = unchecked((int)0x80004005); [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to check whether the exception resource length >256 chars public static void InstantiateExceptionWithLongErrorString() { // This test checks that Win32Exception supports error strings greater than 256 characters. diff --git a/src/System.Console/tests/CancelKeyPress.cs b/src/System.Console/tests/CancelKeyPress.cs index f90ba5e4b7..f48e7c8910 100644 --- a/src/System.Console/tests/CancelKeyPress.cs +++ b/src/System.Console/tests/CancelKeyPress.cs @@ -38,7 +38,7 @@ public class CancelKeyPressTests : RemoteExecutorTestBase }).Dispose(); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes public void HandlerInvokedForSigInt() { HandlerInvokedForSignal(SIGINT); diff --git a/src/System.Console/tests/TermInfo.cs b/src/System.Console/tests/TermInfo.cs index 29fc346af9..7a36763ddb 100644 --- a/src/System.Console/tests/TermInfo.cs +++ b/src/System.Console/tests/TermInfo.cs @@ -25,7 +25,7 @@ public class TermInfo private const string TerminfoLocationsField = "_terminfoLocations"; [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests TermInfo public void VerifyInstalledTermInfosParse() { bool foundAtLeastOne = false; @@ -59,7 +59,7 @@ public class TermInfo } [Theory] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests TermInfo [InlineData("xterm-256color", "\u001B\u005B\u00330m", "\u001B\u005B\u00340m", 0)] [InlineData("xterm-256color", "\u001B\u005B\u00331m", "\u001B\u005B\u00341m", 1)] [InlineData("xterm-256color", "\u001B\u005B90m", "\u001B\u005B100m", 8)] @@ -87,7 +87,7 @@ public class TermInfo } [Fact] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // Read the comment below public void EmuTermInfoDoesntBreakParser() { // This file (available by default on OS X) is called out specifically since it contains a format where it has %i @@ -96,7 +96,7 @@ public class TermInfo } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests TermInfo public void TryingToLoadTermThatDoesNotExistDoesNotThrow() { const string NonexistentTerm = "foobar____"; diff --git a/src/System.Console/tests/WindowAndCursorProps.cs b/src/System.Console/tests/WindowAndCursorProps.cs index 605790656e..5f25b8f03d 100644 --- a/src/System.Console/tests/WindowAndCursorProps.cs +++ b/src/System.Console/tests/WindowAndCursorProps.cs @@ -12,7 +12,7 @@ using Xunit.NetCore.Extensions; public class WindowAndCursorProps : RemoteExecutorTestBase { [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected behavior specific to Unix public static void BufferSize_SettingNotSupported() { Assert.Throws<PlatformNotSupportedException>(() => Console.BufferWidth = 1); @@ -20,7 +20,7 @@ public class WindowAndCursorProps : RemoteExecutorTestBase } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected behavior specific to Unix public static void BufferSize_GettingSameAsWindowSize() { Assert.Throws<PlatformNotSupportedException>(() => Console.BufferWidth = 1); @@ -47,7 +47,7 @@ public class WindowAndCursorProps : RemoteExecutorTestBase } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected behavior specific to Unix public static void WindowWidth() { Assert.Throws<PlatformNotSupportedException>(() => Console.WindowWidth = 100); @@ -58,7 +58,7 @@ public class WindowAndCursorProps : RemoteExecutorTestBase } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected behavior specific to Unix public static void WindowHeight() { Assert.Throws<PlatformNotSupportedException>(() => Console.WindowHeight = 100); @@ -69,7 +69,7 @@ public class WindowAndCursorProps : RemoteExecutorTestBase } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected behavior specific to Unix public static void WindowLeftTop_AnyUnix() { Assert.Equal(0, Console.WindowLeft); @@ -79,7 +79,7 @@ public class WindowAndCursorProps : RemoteExecutorTestBase } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Expected behavior specific to Windows public static void WindowLeftTop_Windows() { if (Console.IsOutputRedirected) @@ -95,7 +95,7 @@ public class WindowAndCursorProps : RemoteExecutorTestBase } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected behavior specific to Unix [Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] //CI system makes it difficult to run things in a non-redirected environments. public static void NonRedirectedCursorVisible() { @@ -108,7 +108,7 @@ public class WindowAndCursorProps : RemoteExecutorTestBase } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected behavior specific to Unix public static void CursorVisible() { Assert.Throws<PlatformNotSupportedException>(() => { bool unused = Console.CursorVisible; }); @@ -119,7 +119,7 @@ public class WindowAndCursorProps : RemoteExecutorTestBase } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected behavior specific to Unix public static void Title_GetSet_Unix() { Assert.Throws<PlatformNotSupportedException>(() => Console.Title); @@ -131,7 +131,7 @@ public class WindowAndCursorProps : RemoteExecutorTestBase } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Expected behavior specific to Windows public static void Title_Get_Windows() { Assert.NotNull(Console.Title); @@ -141,7 +141,7 @@ public class WindowAndCursorProps : RemoteExecutorTestBase [InlineData(10)] [InlineData(256)] [InlineData(1024)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Expected behavior specific to Windows public static void Title_Set_Windows(int lengthOfTitle) { // Try to set the title to some other value. @@ -155,7 +155,7 @@ public class WindowAndCursorProps : RemoteExecutorTestBase } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Expected behavior specific to Windows public static void Title_Set_Windows_longlength() { RemoteInvoke(() => diff --git a/src/System.Data.SqlClient/tests/FunctionalTests/TcpDefaultForAzureTest.cs b/src/System.Data.SqlClient/tests/FunctionalTests/TcpDefaultForAzureTest.cs index d2ae0323d7..d7f67f79ce 100644 --- a/src/System.Data.SqlClient/tests/FunctionalTests/TcpDefaultForAzureTest.cs +++ b/src/System.Data.SqlClient/tests/FunctionalTests/TcpDefaultForAzureTest.cs @@ -34,7 +34,7 @@ namespace System.Data.SqlClient.Tests [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // NP NonAzure connection with no protocol fails correctly on Windows public static void NonAzureNoProtocolConnectionTestOnWindows() { builder.DataSource = InvalidHostname; @@ -43,7 +43,7 @@ namespace System.Data.SqlClient.Tests [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // TCP NonAzure connection with no protocol fails correctly on Unix public static void NonAzureNoProtocolConnectionTestOnUnix() { builder.DataSource = InvalidHostname; @@ -60,7 +60,7 @@ namespace System.Data.SqlClient.Tests [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // NP NonAzure connection fails correctly on Windows public static void NonAzureNpConnectionTest() { builder.DataSource = "np:\\\\" + InvalidHostname + "\\pipe\\sql\\query"; @@ -92,7 +92,7 @@ namespace System.Data.SqlClient.Tests [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // NP Azure connection fails correctly on Windows public static void AzureNpConnectionTest() { foreach (string extension in AzureExtensions) diff --git a/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs b/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs index 7ba123d542..dacc97a9ca 100644 --- a/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs @@ -247,7 +247,7 @@ namespace System.Diagnostics.Tests Assert.False(psi.UseShellExecute, "UseShellExecute=true is not supported on onecore."); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // UseShellExecute currently not supported on Windows [Fact] public void TestUseShellExecuteProperty_SetAndGet_Unix() { @@ -261,7 +261,7 @@ namespace System.Diagnostics.Tests Assert.False(psi.UseShellExecute); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // UseShellExecute currently not supported on Windows [Theory] [InlineData(0)] [InlineData(1)] @@ -315,7 +315,7 @@ namespace System.Diagnostics.Tests } - [Fact, PlatformSpecific(TestPlatforms.AnyUnix)] + [Fact, PlatformSpecific(TestPlatforms.AnyUnix)] // APIs throw PNSE on Unix public void TestUserCredentialsPropertiesOnUnix() { Assert.Throws<PlatformNotSupportedException>(() => _process.StartInfo.Domain); @@ -348,7 +348,7 @@ namespace System.Diagnostics.Tests } [ActiveIssue(12696)] - [Fact, PlatformSpecific(TestPlatforms.Windows), OuterLoop] // Requires admin privileges + [Fact, PlatformSpecific(TestPlatforms.Windows), OuterLoop] // Uses P/Invokes, Requires admin privileges public void TestUserCredentialsPropertiesOnWindows() { string username = "test", password = "PassWord123!!"; diff --git a/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.netstandard.cs b/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.netstandard.cs index cc26795971..e0334dbc13 100644 --- a/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.netstandard.cs +++ b/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.netstandard.cs @@ -71,7 +71,7 @@ namespace System.Diagnostics.Tests Assert.False(psi.Environment.Contains(new KeyValuePair<string,string>("NewKey3", "NewValue3"))); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Test case is specific to Windows [Fact] public void TestVerbsProperty() { @@ -88,7 +88,7 @@ namespace System.Diagnostics.Tests Assert.DoesNotContain("closed", psi.Verbs, StringComparer.OrdinalIgnoreCase); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Test case is specific to Unix [Fact] public void TestEnvironmentVariablesPropertyUnix(){ ProcessStartInfo psi = new ProcessStartInfo(); diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.cs b/src/System.Diagnostics.Process/tests/ProcessTests.cs index f7d3832251..2887049aef 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.cs @@ -55,7 +55,7 @@ namespace System.Diagnostics.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsNanoServer))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Expected behavior varies on Windows and Unix public void TestBasePriorityOnWindows() { ProcessPriorityClass originalPriority = _process.PriorityClass; @@ -80,7 +80,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected behavior varies on Windows and Unix [OuterLoop] [Trait(XunitConstants.Category, XunitConstants.RequiresElevation)] public void TestBasePriorityOnUnix() @@ -149,7 +149,7 @@ namespace System.Diagnostics.Tests } } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests UseShellExecute with ProcessStartInfo [Fact] public void TestUseShellExecute_Unix_Succeeds() { @@ -453,7 +453,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected behavior varies on Windows and Unix [OuterLoop] [Trait(XunitConstants.Category, XunitConstants.RequiresElevation)] public void TestPriorityClassUnix() @@ -473,7 +473,7 @@ namespace System.Diagnostics.Tests } } - [Fact, PlatformSpecific(TestPlatforms.Windows)] + [Fact, PlatformSpecific(TestPlatforms.Windows)] // Expected behavior varies on Windows and Unix public void TestPriorityClassWindows() { ProcessPriorityClass priorityClass = _process.PriorityClass; @@ -548,7 +548,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes to get process Id public void TestRootGetProcessById() { Process p = Process.GetProcessById(1); @@ -611,7 +611,7 @@ namespace System.Diagnostics.Tests return true; } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Behavior differs on Windows and Unix [ConditionalTheory(nameof(ProcessPeformanceCounterEnabled))] [MemberData(nameof(GetTestProcess))] public void TestProcessOnRemoteMachineWindows(Process currentProcess, Process remoteProcess) @@ -624,7 +624,7 @@ namespace System.Diagnostics.Tests Assert.Throws<NotSupportedException>(() => remoteProcess.MainModule); } - [Fact, PlatformSpecific(TestPlatforms.AnyUnix)] + [Fact, PlatformSpecific(TestPlatforms.AnyUnix)] // Behavior differs on Windows and Unix public void TestProcessOnRemoteMachineUnix() { Process currentProcess = Process.GetCurrentProcess(); @@ -739,7 +739,7 @@ namespace System.Diagnostics.Tests Assert.NotEqual(0, e.NativeErrorCode); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Needs permissions on Unix // NativeErrorCode not 193 on Windows Nano for ERROR_BAD_EXE_FORMAT, issue #10290 [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsNanoServer))] public void TestStartOnWindowsWithBadFileFormat() @@ -751,7 +751,7 @@ namespace System.Diagnostics.Tests Assert.NotEqual(0, e.NativeErrorCode); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes to get permissions [Fact] public void TestStartOnUnixWithBadPermissions() { @@ -763,7 +763,7 @@ namespace System.Diagnostics.Tests Assert.NotEqual(0, e.NativeErrorCode); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes to get permissions [Fact] public void TestStartOnUnixWithBadFormat() { diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.netstandard.cs b/src/System.Diagnostics.Process/tests/ProcessTests.netstandard.cs index a0e8735adf..3fb4e9b9fd 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.netstandard.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.netstandard.cs @@ -13,7 +13,7 @@ namespace System.Diagnostics.Tests public partial class ProcessTests : ProcessTestBase { [Fact] - [PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Windows)] // Expected process HandleCounts differs on OSX public void TestHandleCount() { using (Process p = Process.GetCurrentProcess()) @@ -23,7 +23,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // Expected process HandleCounts differs on OSX public void TestHandleCount_OSX() { using (Process p = Process.GetCurrentProcess()) @@ -33,7 +33,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Windows)] // Expected process HandleCounts differs on OSX public void HandleCountChanges() { RemoteInvoke(() => @@ -56,7 +56,7 @@ namespace System.Diagnostics.Tests }).Dispose(); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to get the process Id [Fact] public void TestRespondingWindows() { @@ -66,7 +66,7 @@ namespace System.Diagnostics.Tests } } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes to get the process Id [Fact] private void TestWindowApisUnix() { @@ -162,7 +162,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Starting process with authentication not supported on Unix public void Process_StartInvalidNamesTest() { Assert.Throws<InvalidOperationException>(() => Process.Start(null, "userName", new SecureString(), "thisDomain")); @@ -171,7 +171,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Starting process with authentication not supported on Unix public void Process_StartWithInvalidUserNamePassword() { SecureString password = AsSecureString("Value"); @@ -180,7 +180,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Starting process with authentication not supported on Unix public void Process_StartTest() { string currentProcessName = GetCurrentProcessName(); @@ -199,7 +199,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Starting process with authentication not supported on Unix public void Process_StartWithArgumentsTest() { string currentProcessName = GetCurrentProcessName(); @@ -220,7 +220,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Starting process with authentication not supported on Unix public void Process_StartWithDuplicatePassword() { ProcessStartInfo psi = new ProcessStartInfo(); diff --git a/src/System.Diagnostics.Process/tests/ProcessThreadTests.cs b/src/System.Diagnostics.Process/tests/ProcessThreadTests.cs index d45bf936e6..45f6215a28 100644 --- a/src/System.Diagnostics.Process/tests/ProcessThreadTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessThreadTests.cs @@ -62,7 +62,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // OSX throws PNSE from StartTime public void TestStartTimeProperty_OSX() { using (Process p = Process.GetCurrentProcess()) diff --git a/src/System.Globalization/tests/CultureInfo/CultureInfoCurrentCulture.cs b/src/System.Globalization/tests/CultureInfo/CultureInfoCurrentCulture.cs index df00cc439e..587e59691e 100644 --- a/src/System.Globalization/tests/CultureInfo/CultureInfoCurrentCulture.cs +++ b/src/System.Globalization/tests/CultureInfo/CultureInfoCurrentCulture.cs @@ -100,7 +100,7 @@ namespace System.Globalization.Tests Assert.Throws<ArgumentNullException>("value", () => CultureInfo.CurrentUICulture = null); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Windows locale support doesn't rely on LANG variable [Theory] [InlineData("en-US.UTF-8", "en-US")] [InlineData("en-US", "en-US")] @@ -128,7 +128,7 @@ namespace System.Globalization.Tests }, expectedCultureName, new RemoteInvokeOptions { StartInfo = psi }).Dispose(); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // When LANG is empty or unset, should default to the invariant culture on Unix. [Theory] [InlineData("")] [InlineData(null)] diff --git a/src/System.IO.Compression.ZipFile/tests/ZipFileInvalidFileTests.cs b/src/System.IO.Compression.ZipFile/tests/ZipFileInvalidFileTests.cs index ae85f5ba7a..45396ec43a 100644 --- a/src/System.IO.Compression.ZipFile/tests/ZipFileInvalidFileTests.cs +++ b/src/System.IO.Compression.ZipFile/tests/ZipFileInvalidFileTests.cs @@ -202,7 +202,7 @@ namespace System.IO.Compression.Tests [Theory] [InlineData("NullCharFileName_FromWindows")] [InlineData("NullCharFileName_FromUnix")] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Checks Unix-specific invalid file path public void Unix_ZipWithInvalidFileNames_ThrowsArgumentException(string zipName) { Assert.Throws<ArgumentException>(() => ZipFile.ExtractToDirectory(compat(zipName) + ".zip", GetTestFilePath())); @@ -213,7 +213,7 @@ namespace System.IO.Compression.Tests [InlineData("backslashes_FromWindows", "aa\\bb\\cc\\dd")] [InlineData("WindowsInvalid_FromUnix", "aa<b>d")] [InlineData("WindowsInvalid_FromWindows", "aa<b>d")] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Checks Unix-specific invalid file path public void Unix_ZipWithOSSpecificFileNames(string zipName, string fileName) { string tempDir = GetTestFilePath(); @@ -232,7 +232,7 @@ namespace System.IO.Compression.Tests [InlineData("WindowsInvalid_FromWindows")] [InlineData("NullCharFileName_FromWindows")] [InlineData("NullCharFileName_FromUnix")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Checks Windows-specific invalid file path public void Windows_ZipWithInvalidFileNames_ThrowsArgumentException(string zipName) { Assert.Throws<ArgumentException>(() => ZipFile.ExtractToDirectory(compat(zipName) + ".zip", GetTestFilePath())); @@ -241,7 +241,7 @@ namespace System.IO.Compression.Tests [Theory] [InlineData("backslashes_FromUnix", "dd")] [InlineData("backslashes_FromWindows", "dd")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Checks Windows-specific invalid file path public void Windows_ZipWithOSSpecificFileNames(string zipName, string fileName) { string tempDir = GetTestFilePath(); diff --git a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.Directory.Move.cs b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.Directory.Move.cs index 2b07e7bfc3..654cec1cf9 100644 --- a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.Directory.Move.cs +++ b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.Directory.Move.cs @@ -9,7 +9,7 @@ namespace System.IO.Tests public class Directory_Move_Tests : FileSystemWatcherTest { [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Expected WatcherChangeTypes are different based on OS public void Directory_Move_To_Same_Directory() { DirectoryMove_SameDirectory(WatcherChangeTypes.Renamed); @@ -22,14 +22,14 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Expected WatcherChangeTypes are different based on OS public void Windows_Directory_Move_To_Different_Watched_Directory() { DirectoryMove_DifferentWatchedDirectory(WatcherChangeTypes.Changed); } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected WatcherChangeTypes are different based on OS public void Unix_Directory_Move_To_Different_Watched_Directory() { DirectoryMove_DifferentWatchedDirectory(0); diff --git a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.Directory.NotifyFilter.cs b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.Directory.NotifyFilter.cs index a4418ae4cd..2dc0eb0cd7 100644 --- a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.Directory.NotifyFilter.cs +++ b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.Directory.NotifyFilter.cs @@ -142,7 +142,7 @@ namespace System.IO.Tests [Theory] [MemberData(nameof(FilterTypes))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to set security info public void FileSystemWatcher_Directory_NotifyFilter_Security(NotifyFilters filter) { using (var testDirectory = new TempDirectory(GetTestFilePath())) diff --git a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.Move.cs b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.Move.cs index e685399df8..f9e37eeb2d 100644 --- a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.Move.cs +++ b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.Move.cs @@ -9,14 +9,14 @@ namespace System.IO.Tests public class File_Move_Tests : FileSystemWatcherTest { [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Expected WatcherChangeTypes are different based on OS public void Windows_File_Move_To_Same_Directory() { FileMove_SameDirectory(WatcherChangeTypes.Renamed); } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected WatcherChangeTypes are different based on OS public void Unix_File_Move_To_Same_Directory() { FileMove_SameDirectory(WatcherChangeTypes.Created | WatcherChangeTypes.Deleted); @@ -29,21 +29,21 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Expected WatcherChangeTypes are different based on OS public void Windows_File_Move_To_Different_Watched_Directory() { FileMove_DifferentWatchedDirectory(WatcherChangeTypes.Changed); } [Fact] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // Expected WatcherChangeTypes are different based on OS public void OSX_File_Move_To_Different_Watched_Directory() { FileMove_DifferentWatchedDirectory(WatcherChangeTypes.Changed); } [Fact] - [PlatformSpecific(TestPlatforms.Linux)] + [PlatformSpecific(TestPlatforms.Linux)] // Expected WatcherChangeTypes are different based on OS public void Linux_File_Move_To_Different_Watched_Directory() { FileMove_DifferentWatchedDirectory(0); @@ -58,7 +58,7 @@ namespace System.IO.Tests [Theory] [InlineData(false)] [InlineData(true)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Expected WatcherChangeTypes are different based on OS public void Windows_File_Move_In_Nested_Directory(bool includeSubdirectories) { FileMove_NestedDirectory(includeSubdirectories ? WatcherChangeTypes.Renamed : 0, includeSubdirectories); @@ -67,21 +67,21 @@ namespace System.IO.Tests [Theory] [InlineData(false)] [InlineData(true)] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected WatcherChangeTypes are different based on OS public void Unix_File_Move_In_Nested_Directory(bool includeSubdirectories) { FileMove_NestedDirectory(includeSubdirectories ? WatcherChangeTypes.Created | WatcherChangeTypes.Deleted : 0, includeSubdirectories); } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Expected WatcherChangeTypes are different based on OS public void Windows_File_Move_With_Set_NotifyFilter() { FileMove_WithNotifyFilter(WatcherChangeTypes.Renamed); } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected WatcherChangeTypes are different based on OS public void Unix_File_Move_With_Set_NotifyFilter() { FileMove_WithNotifyFilter(WatcherChangeTypes.Deleted); diff --git a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.NotifyFilter.cs b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.NotifyFilter.cs index 56e0946008..30789b2546 100644 --- a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.NotifyFilter.cs +++ b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.NotifyFilter.cs @@ -169,7 +169,7 @@ namespace System.IO.Tests [Theory] [MemberData(nameof(FilterTypes))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to set security info public void FileSystemWatcher_File_NotifyFilter_Security(NotifyFilters filter) { using (var testDirectory = new TempDirectory(GetTestFilePath())) diff --git a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.InternalBufferSize.cs b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.InternalBufferSize.cs index fb959bbd52..8de96987b2 100644 --- a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.InternalBufferSize.cs +++ b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.InternalBufferSize.cs @@ -41,7 +41,7 @@ namespace System.IO.Tests [Theory] [InlineData(true)] [InlineData(false)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes public void FileSystemWatcher_InternalBufferSize(bool setToHigherCapacity) { using (var testDirectory = new TempDirectory(GetTestFilePath())) diff --git a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs index 32809e3b36..a37e1fa046 100644 --- a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs +++ b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs @@ -369,7 +369,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.OSX | TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.OSX | TestPlatforms.Windows)] // Casing matters on Linux public void FileSystemWatcher_OnCreatedWithMismatchedCasingGivesExpectedFullPath() { using (var dir = new TempDirectory(GetTestFilePath())) @@ -551,7 +551,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Linux)] + [PlatformSpecific(TestPlatforms.Linux)] // Reads MaxUsersWatches from Linux OS files [OuterLoop("This test has high system resource demands and may cause failures in other concurrent tests")] public void FileSystemWatcher_CreateManyConcurrentWatches() { diff --git a/src/System.IO.FileSystem/tests/Directory/CreateDirectory.cs b/src/System.IO.FileSystem/tests/Directory/CreateDirectory.cs index a460bccaa3..a639d7386c 100644 --- a/src/System.IO.FileSystem/tests/Directory/CreateDirectory.cs +++ b/src/System.IO.FileSystem/tests/Directory/CreateDirectory.cs @@ -128,7 +128,7 @@ namespace System.IO.Tests [ConditionalFact(nameof(UsingNewNormalization))] [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // trailing slash public void ValidExtendedPathWithTrailingSlash() { DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); @@ -223,7 +223,7 @@ namespace System.IO.Tests // This is updated to be correct, need to update CoreCLR path code so this will pass on all platforms [ActiveIssue(15098)] [Theory, MemberData(nameof(PathsWithInvalidColons))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // invalid colons throws ArgumentException public void PathWithInvalidColons_ThrowsArgumentException(string invalidPath) { Assert.Throws<ArgumentException>(() => Create(invalidPath)); @@ -231,7 +231,7 @@ namespace System.IO.Tests [ConditionalFact(nameof(AreAllLongPathsAvailable))] [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // long directory path succeeds public void DirectoryLongerThanMaxPath_Succeeds() { var paths = IOInputs.GetPathsLongerThanMaxPath(GetTestFilePath()); @@ -244,7 +244,7 @@ namespace System.IO.Tests [Fact] [ActiveIssue(11687)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // long directory path throws PathTooLongException public void DirectoryLongerThanMaxLongPath_ThrowsPathTooLongException() { var paths = IOInputs.GetPathsLongerThanMaxLongPath(GetTestFilePath()); @@ -256,7 +256,7 @@ namespace System.IO.Tests [ConditionalFact(nameof(LongPathsAreNotBlocked), nameof(UsingNewNormalization))] [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // long directory path with extended syntax throws PathTooLongException public void DirectoryLongerThanMaxLongPathWithExtendedSyntax_ThrowsPathTooLongException() { var paths = IOInputs.GetPathsLongerThanMaxLongPath(GetTestFilePath(), useExtendedSyntax: true); @@ -268,7 +268,7 @@ namespace System.IO.Tests [ConditionalFact(nameof(LongPathsAreNotBlocked), nameof(UsingNewNormalization))] [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // long directory path with extended syntax succeeds public void ExtendedDirectoryLongerThanLegacyMaxPath_Succeeds() { var paths = IOInputs.GetPathsLongerThanMaxPath(GetTestFilePath(), useExtendedSyntax: true); @@ -280,7 +280,7 @@ namespace System.IO.Tests [ConditionalFact(nameof(AreAllLongPathsAvailable))] [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // long directory path succeeds public void DirectoryLongerThanMaxDirectoryAsPath_Succeeds() { var paths = IOInputs.GetPathsLongerThanMaxDirectory(GetTestFilePath()); @@ -292,7 +292,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // long directory path allowed public void UnixPathLongerThan256_Allowed() { DirectoryInfo testDir = Create(GetTestFilePath()); @@ -303,7 +303,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // deeply nested directories allowed public void UnixPathWithDeeplyNestedDirectories() { DirectoryInfo parent = Create(GetTestFilePath()); @@ -315,7 +315,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // whitespace as path throws ArgumentException on Windows public void WindowsWhiteSpaceAsPath_ThrowsArgumentException() { var paths = IOInputs.GetWhiteSpace(); @@ -326,7 +326,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // whitespace as path allowed public void UnixWhiteSpaceAsPath_Allowed() { var paths = IOInputs.GetWhiteSpace(); @@ -338,7 +338,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // trailing whitespaces in path are removed on Windows public void WindowsTrailingWhiteSpace() { // Windows will remove all non-significant whitespace in a path @@ -357,7 +357,7 @@ namespace System.IO.Tests [ConditionalFact(nameof(UsingNewNormalization))] [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // extended syntax with whitespace public void WindowsExtendedSyntaxWhiteSpace() { var paths = IOInputs.GetSimpleWhiteSpace(); @@ -373,7 +373,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // trailing whitespaces in path treated as significant on Unix public void UnixNonSignificantTrailingWhiteSpace() { // Unix treats trailing/prename whitespace as significant and a part of the name. @@ -455,7 +455,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // drive letters public void DriveLetter_Windows() { // On Windows, DirectoryInfo will replace "<DriveLetter>:" with "." @@ -466,7 +466,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // drive letters casing public void DriveLetter_Unix() { // On Unix, there's no special casing for drive letters. These may or may not be valid names, depending diff --git a/src/System.IO.FileSystem/tests/Directory/Delete.cs b/src/System.IO.FileSystem/tests/Directory/Delete.cs index 9848a24e92..08159070a2 100644 --- a/src/System.IO.FileSystem/tests/Directory/Delete.cs +++ b/src/System.IO.FileSystem/tests/Directory/Delete.cs @@ -114,7 +114,7 @@ namespace System.IO.Tests [ConditionalFact(nameof(UsingNewNormalization))] [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Deleting extended directory with subdirectories throws IOException public void WindowsExtendedDirectoryWithSubdirectories() { DirectoryInfo testDir = Directory.CreateDirectory(IOInputs.ExtendedPrefix + GetTestFilePath()); @@ -125,7 +125,7 @@ namespace System.IO.Tests [ConditionalFact(nameof(LongPathsAreNotBlocked), nameof(UsingNewNormalization))] [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Deleting long path extended directory succeeds public void WindowsLongPathExtendedDirectory() { DirectoryInfo testDir = Directory.CreateDirectory(IOServices.GetPath(IOInputs.ExtendedPrefix + TestDirectory, characterCount: 500).FullPath); @@ -134,7 +134,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Deleting readonly directory throws IOException public void WindowsDeleteReadOnlyDirectory() { DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); @@ -146,7 +146,7 @@ namespace System.IO.Tests [ConditionalFact(nameof(UsingNewNormalization))] [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Deleting extended readonly directory throws IOException public void WindowsDeleteExtendedReadOnlyDirectory() { DirectoryInfo testDir = Directory.CreateDirectory(IOInputs.ExtendedPrefix + GetTestFilePath()); @@ -157,7 +157,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Deleting readOnly directory succeeds public void UnixDeleteReadOnlyDirectory() { DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); @@ -167,7 +167,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Deleting hidden directory succeeds public void WindowsShouldBeAbleToDeleteHiddenDirectory() { DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); @@ -178,7 +178,7 @@ namespace System.IO.Tests [ConditionalFact(nameof(UsingNewNormalization))] [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Deleting extended hidden directory succeeds public void WindowsShouldBeAbleToDeleteExtendedHiddenDirectory() { DirectoryInfo testDir = Directory.CreateDirectory(IOInputs.ExtendedPrefix + GetTestFilePath()); @@ -188,7 +188,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Deleting hidden directory succeeds public void UnixShouldBeAbleToDeleteHiddenDirectory() { string testDir = "." + GetTestFileName(); @@ -236,7 +236,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Recursive delete throws IOException if directory contains in-use file public void RecursiveDelete_ShouldThrowIOExceptionIfContainedFileInUse() { DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); diff --git a/src/System.IO.FileSystem/tests/Directory/Exists.cs b/src/System.IO.FileSystem/tests/Directory/Exists.cs index 4b27b9f28f..b8258bbb00 100644 --- a/src/System.IO.FileSystem/tests/Directory/Exists.cs +++ b/src/System.IO.FileSystem/tests/Directory/Exists.cs @@ -178,7 +178,7 @@ namespace System.IO.Tests [ConditionalFact(nameof(UsingNewNormalization))] [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Extended path exists public void ValidExtendedPathExists_ReturnsTrue() { Assert.All((IOInputs.GetValidPathComponentNames()), (component) => @@ -191,7 +191,7 @@ namespace System.IO.Tests [ConditionalFact(nameof(UsingNewNormalization))] [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Extended path already exists as file public void ExtendedPathAlreadyExistsAsFile() { string path = IOInputs.ExtendedPrefix + GetTestFilePath(); @@ -204,7 +204,7 @@ namespace System.IO.Tests [ConditionalFact(nameof(UsingNewNormalization))] [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Extended path already exists as directory public void ExtendedPathAlreadyExistsAsDirectory() { string path = IOInputs.ExtendedPrefix + GetTestFilePath(); @@ -217,7 +217,7 @@ namespace System.IO.Tests [ConditionalFact(nameof(AreAllLongPathsAvailable))] [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Long directory path doesn't throw on Exists public void DirectoryLongerThanMaxDirectoryAsPath_DoesntThrow() { Assert.All((IOInputs.GetPathsLongerThanMaxDirectory(GetTestFilePath())), (path) => @@ -382,7 +382,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Makes call to native code (libc) public void FalseForNonRegularFile() { string fileName = GetTestFilePath(); diff --git a/src/System.IO.FileSystem/tests/Directory/GetDirectoryRoot.cs b/src/System.IO.FileSystem/tests/Directory/GetDirectoryRoot.cs index e02a5d1675..9f49c922df 100644 --- a/src/System.IO.FileSystem/tests/Directory/GetDirectoryRoot.cs +++ b/src/System.IO.FileSystem/tests/Directory/GetDirectoryRoot.cs @@ -50,7 +50,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // UNC shares public void UNCShares() { string root = Directory.GetDirectoryRoot(new string(Path.DirectorySeparatorChar, 2) + Path.Combine("Test1", "test2", "test3")); diff --git a/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs b/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs index ba8194cd7e..3b329ff5c0 100644 --- a/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs +++ b/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs @@ -182,7 +182,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Windows-only Invalid chars in path public void WindowsInvalidCharsPath() { Assert.All(WindowsInvalidUnixValid, invalid => @@ -190,7 +190,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix-only valid chars in file path public void UnixValidCharsFilePath() { if (TestFiles) @@ -206,7 +206,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Windows-only invalid chars in directory path public void UnixValidCharsDirectoryPath() { if (TestDirectories) diff --git a/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str.cs b/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str.cs index 593c87feb8..eaee5de069 100644 --- a/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str.cs +++ b/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str.cs @@ -209,7 +209,7 @@ namespace System.IO.Tests #region PlatformSpecific [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Long path segment in search pattern throws PathTooLongException public void WindowsSearchPatternLongSegment() { // Create a path segment longer than the normal max of 255 @@ -243,7 +243,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Search pattern with double dots throws ArgumentException public void WindowsSearchPatternWithDoubleDots() { Assert.Throws<ArgumentException>(() => GetEntries(TestDirectory, Path.Combine("..ab ab.. .. abc..d", "abc.."))); @@ -253,7 +253,7 @@ namespace System.IO.Tests [ActiveIssue(11584)] [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Windows-invalid search patterns throw public void WindowsSearchPatternInvalid() { Assert.Throws<ArgumentException>(() => GetEntries(TestDirectory, "\0")); @@ -296,7 +296,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix-invalid sarch patterns throw ArgumentException public void UnixSearchPatternInvalid() { Assert.Throws<ArgumentException>(() => GetEntries(TestDirectory, "\0")); @@ -304,7 +304,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // ? in search pattern returns results public virtual void WindowsSearchPatternQuestionMarks() { string testDir1Str = GetTestFileName(); @@ -323,7 +323,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Whitespace in search pattern returns nothing public void WindowsSearchPatternWhitespace() { Assert.Empty(GetEntries(TestDirectory, " ")); @@ -377,7 +377,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix-valid chars in file search patterns public void UnixSearchPatternFileValidChar() { if (TestFiles) @@ -392,7 +392,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix-valid chars in directory search patterns public void UnixSearchPatternDirectoryValidChar() { if (TestDirectories) @@ -407,7 +407,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Search pattern with DoubleDots on Unix public void UnixSearchPatternWithDoubleDots() { // search pattern is valid but directory doesn't exist diff --git a/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str_so.cs b/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str_so.cs index 138c50a93b..f43e0f25b3 100644 --- a/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str_so.cs +++ b/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str_so.cs @@ -28,7 +28,7 @@ namespace System.IO.Tests #endregion [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // ? in search pattern returns results public override void WindowsSearchPatternQuestionMarks() { string testDir1Str = GetTestFileName(); diff --git a/src/System.IO.FileSystem/tests/Directory/GetLogicalDrives.cs b/src/System.IO.FileSystem/tests/Directory/GetLogicalDrives.cs index fac75152de..8c147c11e9 100644 --- a/src/System.IO.FileSystem/tests/Directory/GetLogicalDrives.cs +++ b/src/System.IO.FileSystem/tests/Directory/GetLogicalDrives.cs @@ -11,7 +11,7 @@ namespace System.IO.Tests public class Directory_GetLogicalDrives { [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Valid drive strings on Unix public void GetsValidDriveStrings_Unix() { string[] drives = Directory.GetLogicalDrives(); @@ -21,7 +21,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Valid drive strings on Windows public void GetsValidDriveStrings_Windows() { string[] drives = Directory.GetLogicalDrives(); diff --git a/src/System.IO.FileSystem/tests/Directory/GetParent.cs b/src/System.IO.FileSystem/tests/Directory/GetParent.cs index 9f4cdbdfb3..dbd4ba3e5a 100644 --- a/src/System.IO.FileSystem/tests/Directory/GetParent.cs +++ b/src/System.IO.FileSystem/tests/Directory/GetParent.cs @@ -39,7 +39,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // UNC shares public void UNCShares() { Assert.Null(GetParent(new string(Path.DirectorySeparatorChar, 2) + Path.Combine("Machine", "Test"))); diff --git a/src/System.IO.FileSystem/tests/Directory/GetSetTimes.cs b/src/System.IO.FileSystem/tests/Directory/GetSetTimes.cs index 3ac8323f0b..c60a1e93a8 100644 --- a/src/System.IO.FileSystem/tests/Directory/GetSetTimes.cs +++ b/src/System.IO.FileSystem/tests/Directory/GetSetTimes.cs @@ -120,7 +120,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Non-existing directory returns default values public void Windows_DirectoryDoesntExist_ReturnDefaultValues() { string path = GetTestFilePath(); @@ -149,7 +149,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Non-exsisting directory causes FileNotFoundException public void Unix_DirectoryDoesntExist_Throws() { string path = GetTestFilePath(); diff --git a/src/System.IO.FileSystem/tests/Directory/Move.cs b/src/System.IO.FileSystem/tests/Directory/Move.cs index cf8f4d5311..b1e3c79a47 100644 --- a/src/System.IO.FileSystem/tests/Directory/Move.cs +++ b/src/System.IO.FileSystem/tests/Directory/Move.cs @@ -145,7 +145,7 @@ namespace System.IO.Tests [ConditionalFact(nameof(AreAllLongPathsAvailable))] [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Long path succeeds public void Path_With_Longer_Than_MaxDirectory_Succeeds() { string testDir = GetTestFilePath(); @@ -170,7 +170,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Wild characters in path cause ArgumentException public void WindowsWildCharacterPath() { Assert.Throws<ArgumentException>(() => Move("*", GetTestFilePath())); @@ -180,7 +180,7 @@ namespace System.IO.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/1008 - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Wild characters in path are allowed public void UnixWildCharacterPath() { // Wildcards are allowed in paths for Unix move commands as literals as well as functional wildcards, @@ -206,7 +206,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Whitespace path causes ArgumentException public void WindowsWhitespacePath() { DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); @@ -220,7 +220,7 @@ namespace System.IO.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/1008 - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Whitespace path allowed public void UnixWhitespacePath() { DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); @@ -235,7 +235,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Moving to existing directory causes IOException public void WindowsExistingDirectory() { DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); @@ -250,7 +250,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // drive labels public void BetweenDriveLabels() { DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); @@ -262,7 +262,7 @@ namespace System.IO.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/1008 - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Moving to existing directory allowed for empty directory, but causes IOException for non-empty directory public void UnixExistingDirectory() { // Moving to an-empty directory is supported on Unix, but moving to a non-empty directory is not diff --git a/src/System.IO.FileSystem/tests/DirectoryInfo/Create.cs b/src/System.IO.FileSystem/tests/DirectoryInfo/Create.cs index f6415ead46..fb2430fd29 100644 --- a/src/System.IO.FileSystem/tests/DirectoryInfo/Create.cs +++ b/src/System.IO.FileSystem/tests/DirectoryInfo/Create.cs @@ -42,7 +42,7 @@ namespace System.IO.Tests [Theory] [InlineData(".")] [InlineData("............")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Windows-invalid extensions are removed public void WindowsInvalidExtensionsAreRemoved(string extension) { string testDir = GetTestFilePath(); @@ -53,7 +53,7 @@ namespace System.IO.Tests [Theory] [InlineData(".s", ".")] [InlineData(".s", ".s....")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Trailing dots in extension are removed public void WindowsCurtailTrailingDots(string extension, string trailing) { string testDir = GetTestFilePath(); @@ -65,7 +65,7 @@ namespace System.IO.Tests [Theory] [InlineData(".s", ".")] [InlineData(".s.s....", ".ls")] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Last dot is extension public void UnixLastDotIsExtension(string extension, string trailing) { string testDir = GetTestFilePath(); diff --git a/src/System.IO.FileSystem/tests/DirectoryInfo/CreateSubdirectory.cs b/src/System.IO.FileSystem/tests/DirectoryInfo/CreateSubdirectory.cs index 031b9f4993..b6d2731659 100644 --- a/src/System.IO.FileSystem/tests/DirectoryInfo/CreateSubdirectory.cs +++ b/src/System.IO.FileSystem/tests/DirectoryInfo/CreateSubdirectory.cs @@ -144,8 +144,8 @@ namespace System.IO.Tests #region PlatformSpecific [Fact] - [PlatformSpecific(TestPlatforms.Windows)] - public void WindowsControWhiteSpace() + [PlatformSpecific(TestPlatforms.Windows)] // Control whitespace in path throws ArgumentException + public void WindowsControlWhiteSpace() { // CreateSubdirectory will throw when passed a path with control whitespace e.g. "\t" var components = IOInputs.GetControlWhiteSpace(); @@ -157,7 +157,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Simple whitespaces are trimmed in path public void WindowsSimpleWhiteSpace() { // CreateSubdirectory trims all simple whitespace, returning us the parent directory @@ -175,7 +175,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Whitespace as path allowed public void UnixWhiteSpaceAsPath_Allowed() { var paths = IOInputs.GetWhiteSpace(); @@ -187,7 +187,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Trailing whitespace in path treated as significant public void UnixNonSignificantTrailingWhiteSpace() { // Unix treats trailing/prename whitespace as significant and a part of the name. @@ -206,7 +206,7 @@ namespace System.IO.Tests [ConditionalFact(nameof(UsingNewNormalization))] [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Extended windows path public void ExtendedPathSubdirectory() { DirectoryInfo testDir = Directory.CreateDirectory(IOInputs.ExtendedPrefix + GetTestFilePath()); diff --git a/src/System.IO.FileSystem/tests/DirectoryInfo/Exists.cs b/src/System.IO.FileSystem/tests/DirectoryInfo/Exists.cs index d65becad5c..e94775c156 100644 --- a/src/System.IO.FileSystem/tests/DirectoryInfo/Exists.cs +++ b/src/System.IO.FileSystem/tests/DirectoryInfo/Exists.cs @@ -98,7 +98,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes public void FalseForNonRegularFile() { string fileName = GetTestFilePath(); diff --git a/src/System.IO.FileSystem/tests/DirectoryInfo/GetSetAttributes.cs b/src/System.IO.FileSystem/tests/DirectoryInfo/GetSetAttributes.cs index a827f0e1a2..07aa2ad608 100644 --- a/src/System.IO.FileSystem/tests/DirectoryInfo/GetSetAttributes.cs +++ b/src/System.IO.FileSystem/tests/DirectoryInfo/GetSetAttributes.cs @@ -48,7 +48,7 @@ namespace System.IO.Tests [Theory] [InlineData(FileAttributes.ReadOnly)] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests Unix file attributes public void UnixAttributeSetting(FileAttributes attr) { var test = new DirectoryInfo(GetTestFilePath()); @@ -64,7 +64,7 @@ namespace System.IO.Tests [InlineData(FileAttributes.System)] [InlineData(FileAttributes.Archive)] [InlineData(FileAttributes.ReadOnly | FileAttributes.Hidden)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows file attributes public void WindowsAttributeSetting(FileAttributes attr) { var test = new DirectoryInfo(GetTestFilePath()); @@ -81,7 +81,7 @@ namespace System.IO.Tests [InlineData(FileAttributes.SparseFile)] [InlineData(FileAttributes.ReparsePoint)] [InlineData(FileAttributes.Compressed)] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix-invalid file attributes that don't get set public void UnixInvalidAttributes(FileAttributes attr) { var path = GetTestFilePath(); @@ -96,7 +96,7 @@ namespace System.IO.Tests [InlineData(FileAttributes.SparseFile)] [InlineData(FileAttributes.ReparsePoint)] [InlineData(FileAttributes.Compressed)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Windows-invalid file attributes that don't get set public void WindowsInvalidAttributes(FileAttributes attr) { var path = GetTestFilePath(); @@ -108,7 +108,7 @@ namespace System.IO.Tests [Theory] [InlineData(~FileAttributes.ReadOnly)] [InlineData(-1)] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix-invalid file attributes that throw public void UnixInvalidAttributes_ThrowArgumentException(FileAttributes attr) { var test = new DirectoryInfo(GetTestFilePath()); @@ -120,7 +120,7 @@ namespace System.IO.Tests [InlineData(FileAttributes.Temporary)] [InlineData(~FileAttributes.ReadOnly)] [InlineData(-1)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Windows-invalid file attributes that throw public void WindowsInvalidAttributes_ThrowArgumentException(FileAttributes attr) { var test = new DirectoryInfo(GetTestFilePath()); diff --git a/src/System.IO.FileSystem/tests/DirectoryInfo/Root.cs b/src/System.IO.FileSystem/tests/DirectoryInfo/Root.cs index cb8d6bef6f..e3941ff5bd 100644 --- a/src/System.IO.FileSystem/tests/DirectoryInfo/Root.cs +++ b/src/System.IO.FileSystem/tests/DirectoryInfo/Root.cs @@ -32,7 +32,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // UNC shares public void UNCShares() { string root = Path.GetPathRoot(Directory.GetCurrentDirectory()); diff --git a/src/System.IO.FileSystem/tests/DirectoryInfo/ToString.cs b/src/System.IO.FileSystem/tests/DirectoryInfo/ToString.cs index dd7b62e84b..732c71ee62 100644 --- a/src/System.IO.FileSystem/tests/DirectoryInfo/ToString.cs +++ b/src/System.IO.FileSystem/tests/DirectoryInfo/ToString.cs @@ -38,7 +38,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Drive letter only public void DriveOnlyReturnsPeriod_Windows() { string path = @"C:"; diff --git a/src/System.IO.FileSystem/tests/File/Copy.cs b/src/System.IO.FileSystem/tests/File/Copy.cs index f2ad612f76..7ef742c784 100644 --- a/src/System.IO.FileSystem/tests/File/Copy.cs +++ b/src/System.IO.FileSystem/tests/File/Copy.cs @@ -169,7 +169,7 @@ namespace System.IO.Tests #region PlatformSpecific [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Whitespace path throws ArgumentException public void WindowsWhitespacePath() { string testFile = GetTestFilePath(); @@ -182,7 +182,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Whitespace path allowed public void UnixWhitespacePath() { string testFile = GetTestFilePath(); diff --git a/src/System.IO.FileSystem/tests/File/Create.cs b/src/System.IO.FileSystem/tests/File/Create.cs index 3a271e78ad..8951785e91 100644 --- a/src/System.IO.FileSystem/tests/File/Create.cs +++ b/src/System.IO.FileSystem/tests/File/Create.cs @@ -57,7 +57,7 @@ namespace System.IO.Tests } [ConditionalFact(nameof(UsingNewNormalization))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Valid Windows path extended prefix [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "dos device path support added in 4.6.2")] public void ValidCreation_ExtendedSyntax() { @@ -73,7 +73,7 @@ namespace System.IO.Tests } [ConditionalFact(nameof(AreAllLongPathsAvailable))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Valid Windows path extended prefix, long path [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] public void ValidCreation_LongPathExtendedSyntax() { @@ -197,7 +197,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Invalid file name with wildcard characters on Windows public void WindowsWildCharacterPath() { DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); @@ -208,7 +208,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Invalid file name with whitespace on Windows public void WindowsWhitespacePath() { Assert.Throws<ArgumentException>(() => Create(" ")); @@ -221,7 +221,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Valid file name with Whitespace on Unix public void UnixWhitespacePath() { DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); diff --git a/src/System.IO.FileSystem/tests/File/Delete.cs b/src/System.IO.FileSystem/tests/File/Delete.cs index 996fd3ddfb..4b1dc41dd5 100644 --- a/src/System.IO.FileSystem/tests/File/Delete.cs +++ b/src/System.IO.FileSystem/tests/File/Delete.cs @@ -108,21 +108,21 @@ namespace System.IO.Tests #region PlatformSpecific [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Deleting non-exsistent path throws public void Windows_NonExistentPath_Throws_DirectoryNotFoundException() { Assert.Throws<DirectoryNotFoundException>(() => Delete(Path.Combine(TestDirectory, GetTestFileName(), "C"))); } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Deleting non-existent path doesn't throw public void Unix_NonExistentPath_Nop() { Delete(Path.Combine(TestDirectory, GetTestFileName(), "C")); } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Deleting already-open file throws public void Windows_File_Already_Open_Throws_IOException() { string path = GetTestFilePath(); @@ -133,7 +133,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Deleting already-open file allowed public void Unix_File_Already_Open_Allowed() { string path = GetTestFilePath(); @@ -146,7 +146,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Deleting readonly file throws public void WindowsDeleteReadOnlyFile() { string path = GetTestFilePath(); @@ -158,7 +158,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Deleting readonly file allowed public void UnixDeleteReadOnlyFile() { FileInfo testFile = Create(GetTestFilePath()); diff --git a/src/System.IO.FileSystem/tests/File/Exists.cs b/src/System.IO.FileSystem/tests/File/Exists.cs index a45c3ab648..49af7104c8 100644 --- a/src/System.IO.FileSystem/tests/File/Exists.cs +++ b/src/System.IO.FileSystem/tests/File/Exists.cs @@ -223,7 +223,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes public void FalseForNonRegularFile() { string fileName = GetTestFilePath(); diff --git a/src/System.IO.FileSystem/tests/File/GetSetAttributes.cs b/src/System.IO.FileSystem/tests/File/GetSetAttributes.cs index b86843eb0b..ca5f06a2d0 100644 --- a/src/System.IO.FileSystem/tests/File/GetSetAttributes.cs +++ b/src/System.IO.FileSystem/tests/File/GetSetAttributes.cs @@ -46,7 +46,7 @@ namespace System.IO.Tests [Theory] [InlineData(FileAttributes.ReadOnly)] [InlineData(FileAttributes.Normal)] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Valid Unix file attribute public void UnixAttributeSetting(FileAttributes attr) { var path = GetTestFilePath(); @@ -64,7 +64,7 @@ namespace System.IO.Tests [InlineData(FileAttributes.Normal)] [InlineData(FileAttributes.Temporary)] [InlineData(FileAttributes.ReadOnly | FileAttributes.Hidden)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Valid Windows file attribute public void WindowsAttributeSetting(FileAttributes attr) { var path = GetTestFilePath(); @@ -80,7 +80,7 @@ namespace System.IO.Tests [InlineData(FileAttributes.ReparsePoint)] [InlineData(FileAttributes.Compressed)] [InlineData(FileAttributes.Encrypted)] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Invalid Unix file attributes public void UnixInvalidAttributes(FileAttributes attr) { var path = GetTestFilePath(); @@ -95,7 +95,7 @@ namespace System.IO.Tests [InlineData(FileAttributes.SparseFile)] [InlineData(FileAttributes.ReparsePoint)] [InlineData(FileAttributes.Compressed)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Invalid Windows file attributes public void WindowsInvalidAttributes(FileAttributes attr) { var path = GetTestFilePath(); diff --git a/src/System.IO.FileSystem/tests/File/GetSetTimes.cs b/src/System.IO.FileSystem/tests/File/GetSetTimes.cs index 5169053ae5..e7700291cb 100644 --- a/src/System.IO.FileSystem/tests/File/GetSetTimes.cs +++ b/src/System.IO.FileSystem/tests/File/GetSetTimes.cs @@ -121,7 +121,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Non-existing file returns default values public void Windows_FileDoesntExist_ReturnDefaultValues() { string path = GetTestFilePath(); @@ -150,7 +150,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Non-exsisting file throws FileNotFoundException public void Unix_FileDoesntExist_Throws_FileNotFoundException() { string path = GetTestFilePath(); diff --git a/src/System.IO.FileSystem/tests/File/Move.cs b/src/System.IO.FileSystem/tests/File/Move.cs index cab6384fe3..09e96ab5a1 100644 --- a/src/System.IO.FileSystem/tests/File/Move.cs +++ b/src/System.IO.FileSystem/tests/File/Move.cs @@ -149,7 +149,7 @@ namespace System.IO.Tests [ConditionalFact(nameof(AreAllLongPathsAvailable))] [SkipOnTargetFramework(Tfm.BelowNet462 | Tfm.Core50, "long path support added in 4.6.2")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Path longer than max path limit public void OverMaxPathWorks_Windows() { // Create a destination path longer than the traditional Windows limit of 256 characters, @@ -178,7 +178,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Path longer than max Windows path limit throws public void LongPath() { //Create a destination path longer than the traditional Windows limit of 256 characters @@ -200,7 +200,7 @@ namespace System.IO.Tests // This is updated to be correct, need to update CoreCLR path code so this will pass on all platforms [ActiveIssue(15098)] [Theory MemberData(nameof(PathsWithInvalidColons))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Illegal colons throws ArgumentException public void WindowsPathWithIllegalColons(string invalidPath) { FileInfo testFile = new FileInfo(GetTestFilePath()); @@ -209,7 +209,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Wild characters in path throw ArgumentException public void WindowsWildCharacterPath() { Assert.Throws<ArgumentException>(() => Move("*", GetTestFilePath())); @@ -219,7 +219,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Wild characters in path are allowed public void UnixWildCharacterPath() { string testDir = GetTestFilePath(); @@ -243,7 +243,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Whitespace in path throws ArgumentException public void WindowsWhitespacePath() { FileInfo testFile = new FileInfo(GetTestFilePath()); @@ -254,7 +254,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Whitespace in path allowed public void UnixWhitespacePath() { FileInfo testFileSource = new FileInfo(GetTestFilePath()); diff --git a/src/System.IO.FileSystem/tests/FileInfo/Directory.cs b/src/System.IO.FileSystem/tests/FileInfo/Directory.cs index e7fbd339cc..2b7d0abd6a 100644 --- a/src/System.IO.FileSystem/tests/FileInfo/Directory.cs +++ b/src/System.IO.FileSystem/tests/FileInfo/Directory.cs @@ -48,7 +48,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // UNC shares public void UNCShares() { var directory = Directory(new string(Path.DirectorySeparatorChar, 2) + Path.Combine("Machine", "Directory", "File")); diff --git a/src/System.IO.FileSystem/tests/FileInfo/Exists.cs b/src/System.IO.FileSystem/tests/FileInfo/Exists.cs index d7b2cd4218..ab075a6e43 100644 --- a/src/System.IO.FileSystem/tests/FileInfo/Exists.cs +++ b/src/System.IO.FileSystem/tests/FileInfo/Exists.cs @@ -83,7 +83,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes public void TrueForNonRegularFile() { string fileName = GetTestFilePath(); diff --git a/src/System.IO.FileSystem/tests/FileInfo/Extension.cs b/src/System.IO.FileSystem/tests/FileInfo/Extension.cs index bda0ddceef..5137924e91 100644 --- a/src/System.IO.FileSystem/tests/FileInfo/Extension.cs +++ b/src/System.IO.FileSystem/tests/FileInfo/Extension.cs @@ -24,7 +24,7 @@ namespace System.IO.Tests [Theory] [InlineData(".")] [InlineData("............")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Windows-invalid extensions should be removed public void WindowsInvalidExtensionsAreRemoved(string extension) { string testFile = GetTestFilePath(); @@ -35,7 +35,7 @@ namespace System.IO.Tests [Theory] [InlineData(".s", ".")] [InlineData(".s", ".s....")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Trailing dots in extension are removed public void WindowsCurtailTrailingDots(string extension, string trailing) { string testFile = GetTestFilePath(); @@ -47,7 +47,7 @@ namespace System.IO.Tests [Theory] [InlineData(".s", ".")] [InlineData(".s.s....", ".ls")] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Last dot is extension public void UnixLastDotIsExtension(string extension, string trailing) { string testFile = GetTestFilePath(); diff --git a/src/System.IO.FileSystem/tests/FileInfo/GetSetAttributes.cs b/src/System.IO.FileSystem/tests/FileInfo/GetSetAttributes.cs index c9ec40b4e1..81eb880cd1 100644 --- a/src/System.IO.FileSystem/tests/FileInfo/GetSetAttributes.cs +++ b/src/System.IO.FileSystem/tests/FileInfo/GetSetAttributes.cs @@ -63,7 +63,7 @@ namespace System.IO.Tests [Theory] [InlineData(FileAttributes.ReadOnly)] [InlineData(FileAttributes.Normal)] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix valid file attributes public void UnixAttributeSetting(FileAttributes attr) { var test = new FileInfo(GetTestFilePath()); @@ -82,7 +82,7 @@ namespace System.IO.Tests [InlineData(FileAttributes.Normal)] [InlineData(FileAttributes.Temporary)] [InlineData(FileAttributes.ReadOnly | FileAttributes.Hidden)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Windows valid file attributes public void WindowsAttributeSetting(FileAttributes attr) { var test = new FileInfo(GetTestFilePath()); @@ -99,7 +99,7 @@ namespace System.IO.Tests [InlineData(FileAttributes.SparseFile)] [InlineData(FileAttributes.ReparsePoint)] [InlineData(FileAttributes.Compressed)] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix invalid file attributes public void UnixInvalidAttributes(FileAttributes attr) { var path = GetTestFilePath(); @@ -114,7 +114,7 @@ namespace System.IO.Tests [InlineData(FileAttributes.SparseFile)] [InlineData(FileAttributes.ReparsePoint)] [InlineData(FileAttributes.Compressed)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Windows invalid file attributes public void WindowsInvalidAttributes(FileAttributes attr) { var path = GetTestFilePath(); diff --git a/src/System.IO.FileSystem/tests/FileStream/Pipes.cs b/src/System.IO.FileSystem/tests/FileStream/Pipes.cs index e7c91dba9f..d03e1dfe64 100644 --- a/src/System.IO.FileSystem/tests/FileStream/Pipes.cs +++ b/src/System.IO.FileSystem/tests/FileStream/Pipes.cs @@ -41,7 +41,7 @@ namespace System.IO.Tests } } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes public async Task FifoReadWriteViaFileStream() { string fifoPath = GetTestFilePath(); diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetCreationTimeTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetCreationTimeTests.cs index 65488a16dc..3dd6d46147 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetCreationTimeTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetCreationTimeTests.cs @@ -59,7 +59,7 @@ namespace System.IO.IsolatedStorage [Fact] [ActiveIssue(12539, TestPlatforms.Linux)] - [PlatformSpecific(TestPlatforms.FreeBSD | TestPlatforms.Linux | TestPlatforms.NetBSD)] + [PlatformSpecific(TestPlatforms.FreeBSD | TestPlatforms.Linux | TestPlatforms.NetBSD)] // Filesystem timestamps vary in granularity public void GetCreationTime_GetsTime_Unix() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) @@ -75,7 +75,7 @@ namespace System.IO.IsolatedStorage [Fact] - [PlatformSpecific(TestPlatforms.Windows | TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.Windows | TestPlatforms.OSX)] // Filesystem timestamps vary in granularity public void GetCreationTime_GetsTime_Windows_OSX() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) diff --git a/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateFromFile.Tests.cs b/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateFromFile.Tests.cs index cf3635a37c..78695a19fb 100644 --- a/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateFromFile.Tests.cs +++ b/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateFromFile.Tests.cs @@ -119,7 +119,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// Tests various values of FileAccess used to construct a FileStream and MemoryMappedFileAccess used /// to construct a map over that stream on Windows. The combinations should all be invalid, resulting in exception. /// </summary> - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // On Windows, permission errors come from CreateFromFile [Theory] [InlineData(FileAccess.Read, MemoryMappedFileAccess.ReadWrite)] [InlineData(FileAccess.Read, MemoryMappedFileAccess.ReadExecute)] @@ -146,7 +146,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// Tests various values of FileAccess used to construct a FileStream and MemoryMappedFileAccess used /// to construct a map over that stream on Unix. The combinations should all be invalid, resulting in exception. /// </summary> - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // On Unix, permission errors come from CreateView* [Theory] [InlineData(FileAccess.Read, MemoryMappedFileAccess.ReadWrite)] [InlineData(FileAccess.Read, MemoryMappedFileAccess.ReadExecute)] @@ -192,7 +192,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// <summary> /// Test to verify that map names are left unsupported on Unix. /// </summary> - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Check map names are unsupported on Unix [Theory] [MemberData(nameof(CreateValidMapNames))] public void MapNamesNotSupported_Unix(string mapName) @@ -836,7 +836,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// Test to verify map names are handled appropriately, causing a conflict when they're active but /// reusable in a sequential manner. /// </summary> - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests reusability of map names on Windows [Theory] [MemberData(nameof(CreateValidMapNames))] public void ReusingNames_Windows(string name) diff --git a/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateNew.Tests.cs b/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateNew.Tests.cs index b4b5c10a5d..f143a3bbb3 100644 --- a/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateNew.Tests.cs +++ b/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateNew.Tests.cs @@ -87,7 +87,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// <summary> /// Test the exceptional behavior when attempting to create a map so large it's not supported. /// </summary> - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // On Windows, too large capacity fails during CreateNew call [Fact] public void TooLargeCapacity_Windows() { @@ -125,7 +125,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// <summary> /// Test to verify that map names are left unsupported on Unix. /// </summary> - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Check map names are unsupported on Unix [Theory] [MemberData(nameof(CreateValidMapNames))] public void MapNamesNotSupported_Unix(string mapName) @@ -138,7 +138,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// <summary> /// Test to verify a variety of map names work correctly on Windows. /// </summary> - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Map names are unsupported on Unix [Theory] [MemberData(nameof(CreateValidMapNames))] [InlineData(null)] @@ -162,7 +162,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// Test to verify map names are handled appropriately, causing a conflict when they're active but /// reusable in a sequential manner. /// </summary> - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests reusability of map names on Windows [Theory] [MemberData(nameof(CreateValidMapNames))] public void ReusingNames_Windows(string name) @@ -254,7 +254,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// <summary> /// Test to verify that two unrelated maps don't share data. /// </summary> - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Map names are unsupported on Unix [Theory] [MemberData(nameof(CreateValidMapNames))] [InlineData(null)] @@ -307,7 +307,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// <summary> /// Test to verify expected capacity with regards to page size and automatically rounding up to the nearest. /// </summary> - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Usable capacity limits with MMF APIs different on Windows and Unix [Fact] public void RoundedUpCapacity_Windows() { @@ -326,7 +326,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// <summary> /// Test to verify expected capacity with regards to page size and automatically rounding up to the nearest. /// </summary> - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Usable capacity limits with MMF APIs different on Windows and Unix [Fact] public void RoundedUpCapacity_Unix() { diff --git a/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateOrOpen.Tests.cs b/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateOrOpen.Tests.cs index fcda65ce22..da65c7e708 100644 --- a/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateOrOpen.Tests.cs +++ b/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateOrOpen.Tests.cs @@ -29,7 +29,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// <summary> /// Test to verify that map names are left unsupported on Unix. /// </summary> - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Map names not supported on Unix [Theory] [MemberData(nameof(CreateValidMapNames))] public void MapNamesNotSupported_Unix(string mapName) @@ -105,7 +105,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// Test various combinations of arguments to CreateOrOpen, validating the created maps each time they're created, /// focusing on accesses that don't involve execute permissions. /// </summary> - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Map names not supported on Unix [Theory] [MemberData(nameof(MemberData_ValidArgumentCombinations), new string[] { "CreateUniqueMapName()" }, @@ -166,7 +166,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// Test various combinations of arguments to CreateOrOpen, validating the created maps each time they're created, /// focusing on accesses that involve execute permissions. /// </summary> - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Map names not supported on Unix [Theory] [MemberData(nameof(MemberData_ValidArgumentCombinations), new string[] { "CreateUniqueMapName()" }, @@ -251,7 +251,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// <summary> /// Test to validate behavior with MemoryMappedFileAccess.Write. /// </summary> - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Map names not supported on Unix [Fact] public void OpenWrite() { @@ -272,7 +272,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// <summary> /// Test the exceptional behavior when attempting to create a map so large it's not supported. /// </summary> - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Map names not supported on Unix [Fact] public void TooLargeCapacity() { @@ -290,7 +290,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// Test that the capacity of a view matches the original capacity, not that specified when opening the new map, /// and that the original capacity doesn't change from opening another map with a different capacity. /// </summary> - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Map names not supported on Unix [Fact] public void OpenedCapacityMatchesOriginal() { @@ -328,7 +328,7 @@ namespace System.IO.MemoryMappedFiles.Tests } } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Map names not supported on Unix [Fact] public void OpenedAccessibilityLimitedToOriginal() { @@ -348,7 +348,7 @@ namespace System.IO.MemoryMappedFiles.Tests } } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Map names not supported on Unix [Fact] public void OpenedAccessibilityLimitedBeyondOriginal() { diff --git a/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.OpenExisting.Tests.cs b/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.OpenExisting.Tests.cs index 03823e6e98..b6b267e6b4 100644 --- a/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.OpenExisting.Tests.cs +++ b/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.OpenExisting.Tests.cs @@ -25,7 +25,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// <summary> /// Test to verify that map names are left unsupported on Unix. /// </summary> - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Map names unsupported on Unix [Theory] [MemberData(nameof(CreateValidMapNames))] public void MapNamesNotSupported_Unix(string mapName) @@ -38,7 +38,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// <summary> /// Test to verify that non-existent map names result in exceptions. /// </summary> - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Map names unsupported on Unix [Fact] public void InvalidArguments_Name_NonExistent() { @@ -73,7 +73,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// <summary> /// Test various combinations of arguments to Open, opening maps created by CreateNew. /// </summary> - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Map names unsupported on Unix [Theory] [MemberData(nameof(MemberData_OpenCreated))] public void OpenCreatedNew(string mapName, MemoryMappedFileRights desiredAccessRights, HandleInheritability inheritability) @@ -106,7 +106,7 @@ namespace System.IO.MemoryMappedFiles.Tests /// <summary> /// Test various combinations of arguments to Open, opening maps created by CreateFromFile. /// </summary> - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Map names unsupported on Unix [Theory] [MemberData(nameof(MemberData_OpenCreated))] public void OpenCreatedFromFile(string name, MemoryMappedFileRights rights, HandleInheritability inheritability) diff --git a/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.Specific.cs b/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.Specific.cs index 45d513a159..36ba7bc590 100644 --- a/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.Specific.cs +++ b/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.Specific.cs @@ -80,7 +80,7 @@ namespace System.IO.Pipes.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/1012 - [PlatformSpecific(TestPlatforms.Linux)] + [PlatformSpecific(TestPlatforms.Linux)] // On Linux, setting the buffer size of the server will also set the buffer size of the client public static void Linux_BufferSizeRoundtrips() { // On Linux, setting the buffer size of the server will also set the buffer size of the @@ -109,7 +109,7 @@ namespace System.IO.Pipes.Tests } [Fact] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // Buffer size not supported on OSX public static void OSX_BufferSizeNotSupported() { int desiredBufferSize = 10; @@ -122,7 +122,7 @@ namespace System.IO.Pipes.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // On Windows, setting the buffer size of the server will only set the buffer size of the client based on the direction of the flow public static void Windows_BufferSizeRoundtripping() { // On Windows, setting the buffer size of the server will only set diff --git a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CreateClient.cs b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CreateClient.cs index b370c0c6fb..87b9baad36 100644 --- a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CreateClient.cs +++ b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CreateClient.cs @@ -67,7 +67,7 @@ namespace System.IO.Pipes.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Not supported pipe path throws PNSE on Unix public static void NotSupportedPipePath_Throws_PlatformNotSupportedException() { string hostName; diff --git a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CreateServer.cs b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CreateServer.cs index 16448e4ac1..db24f0faed 100644 --- a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CreateServer.cs +++ b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CreateServer.cs @@ -205,7 +205,7 @@ namespace System.IO.Pipes.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // accessing SafePipeHandle on Unix fails for a non-connected stream public static void Unix_GetHandleOfNewServerStream_Throws_InvalidOperationException() { using (var pipe = new NamedPipeServerStream(GetUniquePipeName(), PipeDirection.Out, 1, PipeTransmissionMode.Byte)) diff --git a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.cs b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.cs index 2da54922bd..c42de76d3b 100644 --- a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.cs +++ b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.cs @@ -14,7 +14,7 @@ namespace System.IO.Pipes.Tests public class NamedPipeTest_RunAsClient : RemoteExecutorTestBase { [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes public async Task RunAsClient_Windows() { string pipeName = Path.GetRandomFileName(); @@ -44,7 +44,7 @@ namespace System.IO.Pipes.Tests } [ConditionalFact(nameof(IsSuperUser))] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes [ActiveIssue(0)] public void RunAsClient_Unix() { diff --git a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Simple.cs b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Simple.cs index 52b701dc69..e8134b5a2f 100644 --- a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Simple.cs +++ b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Simple.cs @@ -366,7 +366,7 @@ namespace System.IO.Pipes.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/1011 - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix implemented on sockets, where disposal information doesn't propagate public async Task Unix_OperationsOnNamedServerWithDisposedClient() { using (NamedPipePair pair = CreateNamedPipePair()) diff --git a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Specific.cs b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Specific.cs index 50b4226f23..deb3dee55d 100644 --- a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Specific.cs +++ b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Specific.cs @@ -211,7 +211,7 @@ namespace System.IO.Pipes.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/1011 - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invoke to verify the user name public async Task Unix_GetImpersonationUserName_Succeed() { string pipeName = GetUniquePipeName(); @@ -231,7 +231,7 @@ namespace System.IO.Pipes.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix currently doesn't support message mode public void Unix_MessagePipeTransissionMode() { Assert.Throws<PlatformNotSupportedException>(() => new NamedPipeServerStream(GetUniquePipeName(), PipeDirection.InOut, 1, PipeTransmissionMode.Message)); @@ -241,7 +241,7 @@ namespace System.IO.Pipes.Tests [InlineData(PipeDirection.In)] [InlineData(PipeDirection.Out)] [InlineData(PipeDirection.InOut)] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix implementation uses bidirectional sockets public static void Unix_BufferSizeRoundtripping(PipeDirection direction) { int desiredBufferSize = 0; @@ -276,7 +276,7 @@ namespace System.IO.Pipes.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Unix implementation uses bidirectional sockets public static void Windows_BufferSizeRoundtripping() { int desiredBufferSize = 10; @@ -356,7 +356,7 @@ namespace System.IO.Pipes.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix doesn't currently support message mode public void Unix_SetReadModeTo__PipeTransmissionModeByte() { string pipeName = GetUniquePipeName(); @@ -413,7 +413,7 @@ namespace System.IO.Pipes.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Checks MaxLength for PipeName on Unix public void NameTooLong_MaxLengthPerPlatform() { // Increase a name's length until it fails diff --git a/src/System.IO.Pipes/tests/PipeTest.netstandard.cs b/src/System.IO.Pipes/tests/PipeTest.netstandard.cs index 5f3d35c256..9a509b1472 100644 --- a/src/System.IO.Pipes/tests/PipeTest.netstandard.cs +++ b/src/System.IO.Pipes/tests/PipeTest.netstandard.cs @@ -24,7 +24,7 @@ namespace System.IO.Pipes.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Null handle throws on Windows only public void TestCheckPipePropertyOperations_Unix() { // handle is null - throws on Windows but not Unix. @@ -32,7 +32,7 @@ namespace System.IO.Pipes.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Null handle throws on Windows only public void TestCheckPipePropertyOperations_Windows() { // handle is null - throws on Windows but not Unix diff --git a/src/System.Net.NetworkInformation/tests/FunctionalTests/NetworkInterfaceBasicTest.cs b/src/System.Net.NetworkInformation/tests/FunctionalTests/NetworkInterfaceBasicTest.cs index 27dbad7cdf..d368120908 100644 --- a/src/System.Net.NetworkInformation/tests/FunctionalTests/NetworkInterfaceBasicTest.cs +++ b/src/System.Net.NetworkInformation/tests/FunctionalTests/NetworkInterfaceBasicTest.cs @@ -27,7 +27,7 @@ namespace System.Net.NetworkInformation.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Not all APIs are supported on Linux and OSX public void BasicTest_AccessInstanceProperties_NoExceptions() { foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces()) @@ -51,7 +51,7 @@ namespace System.Net.NetworkInformation.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Linux)] + [PlatformSpecific(TestPlatforms.Linux)] // Some APIs are not supported on Linux public void BasicTest_AccessInstanceProperties_NoExceptions_Linux() { foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces()) @@ -85,7 +85,7 @@ namespace System.Net.NetworkInformation.Tests } [Fact] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // Some APIs are not supported on OSX public void BasicTest_AccessInstanceProperties_NoExceptions_Osx() { foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces()) @@ -172,7 +172,7 @@ namespace System.Net.NetworkInformation.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Not all APIs are supported on Linux and OSX public void BasicTest_GetIPInterfaceStatistics_Success() { foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces()) @@ -196,7 +196,7 @@ namespace System.Net.NetworkInformation.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Linux)] + [PlatformSpecific(TestPlatforms.Linux)] // Some APIs are not supported on Linux public void BasicTest_GetIPInterfaceStatistics_Success_Linux() { foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces()) @@ -220,7 +220,7 @@ namespace System.Net.NetworkInformation.Tests } [Fact] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // Some APIs are not supported on OSX public void BasicTest_GetIPInterfaceStatistics_Success_OSX() { foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces()) diff --git a/src/System.Net.NetworkInformation/tests/FunctionalTests/NetworkInterfaceIPv4Statistics.cs b/src/System.Net.NetworkInformation/tests/FunctionalTests/NetworkInterfaceIPv4Statistics.cs index a8bf9e9390..83845e3afd 100644 --- a/src/System.Net.NetworkInformation/tests/FunctionalTests/NetworkInterfaceIPv4Statistics.cs +++ b/src/System.Net.NetworkInformation/tests/FunctionalTests/NetworkInterfaceIPv4Statistics.cs @@ -21,7 +21,7 @@ namespace System.Net.NetworkInformation.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Not all APIs are supported on Linux and OSX public void BasicTest_GetIPv4InterfaceStatistics_Success() { // This API is not actually IPv4 specific. @@ -46,7 +46,7 @@ namespace System.Net.NetworkInformation.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Linux)] + [PlatformSpecific(TestPlatforms.Linux)] // Some APIs are not supported on Linux public void BasicTest_GetIPv4InterfaceStatistics_Success_Linux() { // This API is not actually IPv4 specific. @@ -71,7 +71,7 @@ namespace System.Net.NetworkInformation.Tests } [Fact] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // Some APIs are not supported on OSX public void BasicTest_GetIPv4InterfaceStatistics_Success_OSX() { // This API is not actually IPv4 specific. diff --git a/src/System.Net.Ping/tests/FunctionalTests/PingTest.cs b/src/System.Net.Ping/tests/FunctionalTests/PingTest.cs index 04a12be674..f9232ab3d8 100644 --- a/src/System.Net.Ping/tests/FunctionalTests/PingTest.cs +++ b/src/System.Net.Ping/tests/FunctionalTests/PingTest.cs @@ -122,7 +122,7 @@ namespace System.Net.NetworkInformation.Tests }); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // On Unix, Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply. [Fact] public async Task SendPingAsyncWithIPAddressAndTimeoutAndBuffer() { @@ -140,7 +140,7 @@ namespace System.Net.NetworkInformation.Tests }); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // On Unix, Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply. [Fact] public async Task SendPingAsyncWithIPAddressAndTimeoutAndBuffer_Unix() { @@ -166,7 +166,7 @@ namespace System.Net.NetworkInformation.Tests }); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // On Unix, Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply. [Fact] public async Task SendPingAsyncWithIPAddressAndTimeoutAndBufferAndPingOptions() { @@ -185,7 +185,7 @@ namespace System.Net.NetworkInformation.Tests }); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // On Unix, Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply. [Fact] public async Task SendPingAsyncWithIPAddressAndTimeoutAndBufferAndPingOptions_Unix() { @@ -239,7 +239,7 @@ namespace System.Net.NetworkInformation.Tests }); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // On Unix, Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply. [Fact] public async Task SendPingAsyncWithHostAndTimeoutAndBuffer() { @@ -257,7 +257,7 @@ namespace System.Net.NetworkInformation.Tests }); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // On Unix, Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply. [Fact] public async Task SendPingAsyncWithHostAndTimeoutAndBuffer_Unix() { @@ -283,7 +283,7 @@ namespace System.Net.NetworkInformation.Tests }); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // On Unix, Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply. [Fact] public async Task SendPingAsyncWithHostAndTimeoutAndBufferAndPingOptions() { @@ -301,7 +301,7 @@ namespace System.Net.NetworkInformation.Tests }); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // On Unix, Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply. [Fact] public async Task SendPingAsyncWithHostAndTimeoutAndBufferAndPingOptions_Unix() { diff --git a/src/System.Net.Ping/tests/FunctionalTests/UnixPingUtilityTests.cs b/src/System.Net.Ping/tests/FunctionalTests/UnixPingUtilityTests.cs index 6ff6e656a3..1dde851fb2 100644 --- a/src/System.Net.Ping/tests/FunctionalTests/UnixPingUtilityTests.cs +++ b/src/System.Net.Ping/tests/FunctionalTests/UnixPingUtilityTests.cs @@ -22,7 +22,7 @@ namespace System.Net.NetworkInformation.Tests [InlineData(1)] [InlineData(50)] [InlineData(1000)] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests un-previledged Ping support on Unix public static async Task PacketSizeIsRespected(int payloadSize) { IPAddress localAddress = await TestSettings.GetLocalIPAddress(); diff --git a/src/System.Net.Primitives/tests/FunctionalTests/IPAddressParsing.cs b/src/System.Net.Primitives/tests/FunctionalTests/IPAddressParsing.cs index d526594599..e41eb578d6 100644 --- a/src/System.Net.Primitives/tests/FunctionalTests/IPAddressParsing.cs +++ b/src/System.Net.Primitives/tests/FunctionalTests/IPAddressParsing.cs @@ -248,8 +248,7 @@ namespace System.Net.Primitives.Functional.Tests } [Theory] - [PlatformSpecific(~TestPlatforms.AnyUnix)] - // Linux/OSX don't do the IPv6->IPv4 formatting for these addresses + [PlatformSpecific(~TestPlatforms.AnyUnix)] // Linux/OSX don't do the IPv6->IPv4 formatting for these addresses [InlineData("::FFFF:0:192.168.0.1", "::ffff:0:192.168.0.1")] // SIIT [InlineData("::5EFE:192.168.0.1", "::5efe:192.168.0.1")] // ISATAP [InlineData("1::5EFE:192.168.0.1", "1::5efe:192.168.0.1")] // ISATAP @@ -259,8 +258,7 @@ namespace System.Net.Primitives.Functional.Tests } [Theory] - [PlatformSpecific(TestPlatforms.AnyUnix)] - // Linux/OSX don't do the IPv6->IPv4 formatting for these addresses + [PlatformSpecific(TestPlatforms.AnyUnix)] // Linux/OSX don't do the IPv6->IPv4 formatting for these addresses [InlineData("::FFFF:0:192.168.0.1", "::ffff:0:c0a8:1")] // SIIT [InlineData("::5EFE:192.168.0.1", "::5efe:c0a8:1")] // ISATAP [InlineData("1::5EFE:192.168.0.1", "1::5efe:c0a8:1")] // ISATAP @@ -362,7 +360,7 @@ namespace System.Net.Primitives.Functional.Tests } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // There does't appear to be an OSX API that will fail for this public void ParseIPv6_AlphaNumericScope_Failure() { Assert.Throws<FormatException>(() => { IPAddress.Parse("::%1a"); }); diff --git a/src/System.Net.Sockets/tests/FunctionalTests/AcceptAsync.cs b/src/System.Net.Sockets/tests/FunctionalTests/AcceptAsync.cs index ed11e9cefb..c770e5b081 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/AcceptAsync.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/AcceptAsync.cs @@ -118,7 +118,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Unix platforms don't yet support receiving data with AcceptAsync. public void AcceptAsync_WithReceiveBuffer_Success() { Assert.True(Capability.IPv4Support()); @@ -169,7 +169,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix platforms don't yet support receiving data with AcceptAsync. public void AcceptAsync_WithReceiveBuffer_Failure() { // diff --git a/src/System.Net.Sockets/tests/FunctionalTests/AgnosticListenerTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/AgnosticListenerTest.cs index 1443ba94ad..ea4d60ebd6 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/AgnosticListenerTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/AgnosticListenerTest.cs @@ -114,7 +114,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Theory] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Unix platforms do not support TcpListener.AllowNatTraversal [InlineData(true, IPProtectionLevel.Unrestricted)] [InlineData(false, IPProtectionLevel.EdgeRestricted)] public void AllowNatTraversal_Windows(bool allow, IPProtectionLevel resultLevel) @@ -126,7 +126,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Theory] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix platforms do not support TcpListener.AllowNatTraversal [InlineData(true)] [InlineData(false)] public void AllowNatTraversal_AnyUnix(bool allow) diff --git a/src/System.Net.Sockets/tests/FunctionalTests/ArgumentValidationTests.cs b/src/System.Net.Sockets/tests/FunctionalTests/ArgumentValidationTests.cs index 81d8039c07..9b103b873b 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/ArgumentValidationTests.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/ArgumentValidationTests.cs @@ -698,7 +698,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // API throws PNSE on Unix public void Socket_Connect_DnsEndPoint_NotSupported() { using (Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) @@ -726,7 +726,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // API throws PNSE on Unix public void Socket_Connect_StringHost_NotSupported() { using (Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) @@ -772,7 +772,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // API throws PNSE on Unix public void Socket_Connect_MultipleAddresses_NotSupported() { using (Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) @@ -782,7 +782,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // API throws PNSE on Unix public void Socket_ConnectAsync_DnsEndPoint_NotSupported() { using (Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) @@ -809,7 +809,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // API throws PNSE on Unix public void Socket_ConnectAsync_StringHost_NotSupported() { using (Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) @@ -853,7 +853,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // API throws PNSE on Unix public void Socket_ConnectAsync_MultipleAddresses_NotSupported() { using (Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) @@ -863,7 +863,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // API throws PNSE on Unix public void Connect_ConnectTwice_NotSupported() { using (Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) @@ -882,7 +882,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // API throws PNSE on Unix public void ConnectAsync_ConnectTwice_NotSupported() { AutoResetEvent completed = new AutoResetEvent(false); @@ -1288,7 +1288,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // API throws PNSE on Unix public void TcpClient_ConnectAsync_StringHost_NotSupportedAfterClientAccess() { using (TcpClient client = new TcpClient()) @@ -1299,7 +1299,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // API throws PNSE on Unix public void TcpClient_ConnectAsync_ArrayOfAddresses_NotSupportedAfterClientAccess() { using (TcpClient client = new TcpClient()) diff --git a/src/System.Net.Sockets/tests/FunctionalTests/DisconnectTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/DisconnectTest.cs index 79044ccdf0..a7a6f47f72 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/DisconnectTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/DisconnectTest.cs @@ -27,7 +27,7 @@ namespace System.Net.Sockets.Tests [Fact] [OuterLoop("Issue #11345")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Disconnect only supported on Windows public void Disconnect_Success() { AutoResetEvent completed = new AutoResetEvent(false); @@ -61,7 +61,7 @@ namespace System.Net.Sockets.Tests [Fact] [OuterLoop("Issue #11345")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // DisconnectAsync only supported on Windows public void DisconnectAsync_Success() { AutoResetEvent completed = new AutoResetEvent(false); @@ -97,7 +97,7 @@ namespace System.Net.Sockets.Tests [Fact] [OuterLoop("Issue #11345")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // BeginDisconnect only supported on Windows public void BeginDisconnect_Success() { AutoResetEvent completed = new AutoResetEvent(false); @@ -129,7 +129,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~TestPlatforms.Windows)] + [PlatformSpecific(~TestPlatforms.Windows)] // Disconnect only supported on Windows public void Disconnect_NonWindows_NotSupported() { using (Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) @@ -139,7 +139,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~TestPlatforms.Windows)] + [PlatformSpecific(~TestPlatforms.Windows)] // DisconnectAsync only supported on Windows public void DisconnectAsync_NonWindows_NotSupported() { using (Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) @@ -151,7 +151,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~TestPlatforms.Windows)] + [PlatformSpecific(~TestPlatforms.Windows)] // BeginDisconnect only supported on Windows public void BeginDisconnect_NonWindows_NotSupported() { using (Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) diff --git a/src/System.Net.Sockets/tests/FunctionalTests/DnsEndPointTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/DnsEndPointTest.cs index 171350650b..adbda7e3b0 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/DnsEndPointTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/DnsEndPointTest.cs @@ -32,7 +32,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Connecting sockets to DNS endpoints via the instance Connect and ConnectAsync methods not supported on Unix public void Socket_ConnectDnsEndPoint_Success(SocketImplementationType type) { int port; @@ -47,7 +47,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Connecting sockets to DNS endpoints via the instance Connect and ConnectAsync methods not supported on Unix public void Socket_ConnectDnsEndPoint_Failure() { using (Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) @@ -103,7 +103,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Connecting sockets to DNS endpoints via the instance Connect and ConnectAsync methods not supported on Unix public void Socket_BeginConnectDnsEndPoint_Success(SocketImplementationType type) { int port; @@ -119,7 +119,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Connecting sockets to DNS endpoints via the instance Connect and ConnectAsync methods not supported on Unix public void Socket_BeginConnectDnsEndPoint_Failure() { using (Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) @@ -162,7 +162,7 @@ namespace System.Net.Sockets.Tests [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] [Trait("IPv4", "true")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Connecting sockets to DNS endpoints via the instance Connect and ConnectAsync methods not supported on Unix public void Socket_ConnectAsyncDnsEndPoint_Success(SocketImplementationType type) { Assert.True(Capability.IPv4Support()); @@ -196,7 +196,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Fact] [Trait("IPv4", "true")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Connecting sockets to DNS endpoints via the instance Connect and ConnectAsync methods not supported on Unix public void Socket_ConnectAsyncDnsEndPoint_HostNotFound() { Assert.True(Capability.IPv4Support()); @@ -225,7 +225,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Fact] [Trait("IPv4", "true")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Connecting sockets to DNS endpoints via the instance Connect and ConnectAsync methods not supported on Unix public void Socket_ConnectAsyncDnsEndPoint_ConnectionRefused() { Assert.True(Capability.IPv4Support()); diff --git a/src/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs index 0d763499f2..f285ffe82a 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs @@ -246,7 +246,7 @@ namespace System.Net.Sockets.Tests public class DualModeConnectToIPAddressArray : DualModeBase { [Fact] // Base Case - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Connecting sockets to DNS endpoints via the instance Connect and ConnectAsync methods not supported on Unix // "None of the discovered or specified addresses match the socket address family." public void Socket_ConnectV4IPAddressListToV4Host_Throws() { @@ -265,7 +265,7 @@ namespace System.Net.Sockets.Tests [Theory] [MemberData(nameof(DualMode_IPAddresses_ListenOn_DualMode_Throws_Data))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Connecting sockets to DNS endpoints via the instance Connect and ConnectAsync methods not supported on Unix public void DualModeConnect_IPAddressListToHost_Throws(IPAddress[] connectTo, IPAddress listenOn, bool dualModeServer) { Assert.ThrowsAny<SocketException>(() => DualModeConnect_IPAddressListToHost_Success(connectTo, listenOn, dualModeServer)); @@ -273,7 +273,7 @@ namespace System.Net.Sockets.Tests [Theory] [MemberData(nameof(DualMode_IPAddresses_ListenOn_DualMode_Success_Data))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Connecting sockets to DNS endpoints via the instance Connect and ConnectAsync methods not supported on Unix public void DualModeConnect_IPAddressListToHost_Success(IPAddress[] connectTo, IPAddress listenOn, bool dualModeServer) { int port; @@ -292,7 +292,7 @@ namespace System.Net.Sockets.Tests { [Theory] [MemberData(nameof(DualMode_Connect_IPAddress_DualMode_Data))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Connecting sockets to DNS endpoints via the instance Connect and ConnectAsync methods not supported on Unix public void DualModeConnect_LoopbackDnsToHost_Helper(IPAddress listenOn, bool dualModeServer) { int port; @@ -311,7 +311,7 @@ namespace System.Net.Sockets.Tests { [Theory] [MemberData(nameof(DualMode_Connect_IPAddress_DualMode_Data))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Connecting sockets to DNS endpoints via the instance Connect and ConnectAsync methods not supported on Unix private void DualModeConnect_DnsEndPointToHost_Helper(IPAddress listenOn, bool dualModeServer) { int port; @@ -462,7 +462,7 @@ namespace System.Net.Sockets.Tests { [Theory] [MemberData(nameof(DualMode_IPAddresses_ListenOn_DualMode_Data))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Connecting sockets to DNS endpoints via the instance Connect and ConnectAsync methods not supported on Unix private void DualModeBeginConnect_IPAddressListToHost_Helper(IPAddress[] connectTo, IPAddress listenOn, bool dualModeServer) { int port; @@ -477,7 +477,7 @@ namespace System.Net.Sockets.Tests [Theory] [MemberData(nameof(DualMode_Connect_IPAddress_DualMode_Data))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Connecting sockets to DNS endpoints via the instance Connect and ConnectAsync methods not supported on Unix public void DualModeBeginConnect_LoopbackDnsToHost_Helper(IPAddress listenOn, bool dualModeServer) { int port; @@ -492,7 +492,7 @@ namespace System.Net.Sockets.Tests [Theory] [MemberData(nameof(DualMode_Connect_IPAddress_DualMode_Data))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Connecting sockets to DNS endpoints via the instance Connect and ConnectAsync methods not supported on Unix public void DualModeBeginConnect_DnsEndPointToHost_Helper(IPAddress listenOn, bool dualModeServer) { int port; @@ -597,7 +597,7 @@ namespace System.Net.Sockets.Tests [Theory] [MemberData(nameof(DualMode_Connect_IPAddress_DualMode_Data))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Connecting sockets to DNS endpoints via the instance Connect and ConnectAsync methods not supported on Unix public void DualModeConnectAsync_DnsEndPointToHost_Helper(IPAddress listenOn, bool dualModeServer) { int port; @@ -1381,7 +1381,7 @@ namespace System.Net.Sockets.Tests } [Fact] // Base case - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveFrom not supported on OSX public void Socket_ReceiveFromDnsEndPoint_Throws() { // "The parameter remoteEP must not be of type DnsEndPoint." @@ -1397,35 +1397,35 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveFrom not supported on OSX public void ReceiveFromV4BoundToSpecificV4_Success() { ReceiveFrom_Helper(IPAddress.Loopback, IPAddress.Loopback); } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveFrom not supported on OSX public void ReceiveFromV4BoundToAnyV4_Success() { ReceiveFrom_Helper(IPAddress.Any, IPAddress.Loopback); } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveFrom not supported on OSX public void ReceiveFromV6BoundToSpecificV6_Success() { ReceiveFrom_Helper(IPAddress.IPv6Loopback, IPAddress.IPv6Loopback); } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveFrom not supported on OSX public void ReceiveFromV6BoundToAnyV6_Success() { ReceiveFrom_Helper(IPAddress.IPv6Any, IPAddress.IPv6Loopback); } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveFrom not supported on OSX public void ReceiveFromV6BoundToSpecificV4_NotReceived() { Assert.Throws<SocketException>(() => @@ -1435,7 +1435,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~(TestPlatforms.Linux | TestPlatforms.OSX))] + [PlatformSpecific(~(TestPlatforms.Linux | TestPlatforms.OSX))] // Expected behavior is different on OSX and Linux public void ReceiveFromV4BoundToSpecificV6_NotReceived() { Assert.Throws<SocketException>(() => @@ -1452,7 +1452,7 @@ namespace System.Net.Sockets.Tests // an acceptable difference due to the extra state that would otherwise // be necessary to emulate the Winsock behavior. [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/982 - [PlatformSpecific(TestPlatforms.Linux)] + [PlatformSpecific(TestPlatforms.Linux)] // Read the comment above public void ReceiveFromV4BoundToSpecificV6_NotReceived_Linux() { Assert.Throws<ArgumentException>(() => @@ -1462,7 +1462,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveFrom not supported on OSX public void ReceiveFromV6BoundToAnyV4_NotReceived() { Assert.Throws<SocketException>(() => @@ -1472,7 +1472,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveFrom not supported on OSX public void ReceiveFromV4BoundToAnyV6_Success() { ReceiveFrom_Helper(IPAddress.IPv6Any, IPAddress.Loopback); @@ -1481,7 +1481,7 @@ namespace System.Net.Sockets.Tests #endregion ReceiveFrom Sync [Fact] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // ReceiveFrom not supported on OSX public void ReceiveFrom_NotSupported() { using (Socket sock = new Socket(SocketType.Dgram, ProtocolType.Udp)) @@ -1520,7 +1520,7 @@ namespace System.Net.Sockets.Tests } [Fact] // Base case - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveFrom not supported on OSX // "The parameter remoteEP must not be of type DnsEndPoint." public void Socket_BeginReceiveFromDnsEndPoint_Throws() { @@ -1537,35 +1537,35 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveFrom not supported on OSX public void BeginReceiveFromV4BoundToSpecificV4_Success() { BeginReceiveFrom_Helper(IPAddress.Loopback, IPAddress.Loopback); } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveFrom not supported on OSX public void BeginReceiveFromV4BoundToAnyV4_Success() { BeginReceiveFrom_Helper(IPAddress.Any, IPAddress.Loopback); } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveFrom not supported on OSX public void BeginReceiveFromV6BoundToSpecificV6_Success() { BeginReceiveFrom_Helper(IPAddress.IPv6Loopback, IPAddress.IPv6Loopback); } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveFrom not supported on OSX public void BeginReceiveFromV6BoundToAnyV6_Success() { BeginReceiveFrom_Helper(IPAddress.IPv6Any, IPAddress.IPv6Loopback); } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveFrom not supported on OSX public void BeginReceiveFromV6BoundToSpecificV4_NotReceived() { Assert.Throws<TimeoutException>(() => @@ -1575,7 +1575,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~(TestPlatforms.Linux | TestPlatforms.OSX))] + [PlatformSpecific(~(TestPlatforms.Linux | TestPlatforms.OSX))] // Expected behavior is different on OSX and Linux public void BeginReceiveFromV4BoundToSpecificV6_NotReceived() { Assert.Throws<TimeoutException>(() => @@ -1592,7 +1592,7 @@ namespace System.Net.Sockets.Tests // an acceptable difference due to the extra state that would otherwise // be necessary to emulate the Winsock behavior. [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/982 - [PlatformSpecific(TestPlatforms.Linux)] + [PlatformSpecific(TestPlatforms.Linux)] // Read the comment above public void BeginReceiveFromV4BoundToSpecificV6_NotReceived_Linux() { Assert.Throws<ArgumentException>(() => @@ -1602,7 +1602,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveFrom not supported on OSX public void BeginReceiveFromV6BoundToAnyV4_NotReceived() { Assert.Throws<TimeoutException>(() => @@ -1612,7 +1612,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveFrom not supported on OSX public void BeginReceiveFromV4BoundToAnyV6_Success() { BeginReceiveFrom_Helper(IPAddress.IPv6Any, IPAddress.Loopback); @@ -1678,7 +1678,7 @@ namespace System.Net.Sockets.Tests } [Fact] // Base case - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveFromAsync not supported on OSX // "The parameter remoteEP must not be of type DnsEndPoint." public void Socket_ReceiveFromAsyncDnsEndPoint_Throws() { @@ -1697,35 +1697,35 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveFromAsync not supported on OSX public void ReceiveFromAsyncV4BoundToSpecificV4_Success() { ReceiveFromAsync_Helper(IPAddress.Loopback, IPAddress.Loopback); } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveFromAsync not supported on OSX public void ReceiveFromAsyncV4BoundToAnyV4_Success() { ReceiveFromAsync_Helper(IPAddress.Any, IPAddress.Loopback); } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveFromAsync not supported on OSX public void ReceiveFromAsyncV6BoundToSpecificV6_Success() { ReceiveFromAsync_Helper(IPAddress.IPv6Loopback, IPAddress.IPv6Loopback); } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveFromAsync not supported on OSX public void ReceiveFromAsyncV6BoundToAnyV6_Success() { ReceiveFromAsync_Helper(IPAddress.IPv6Any, IPAddress.IPv6Loopback); } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveFromAsync not supported on OSX public void ReceiveFromAsyncV6BoundToSpecificV4_NotReceived() { Assert.Throws<TimeoutException>(() => @@ -1735,7 +1735,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveFromAsync not supported on OSX public void ReceiveFromAsyncV4BoundToSpecificV6_NotReceived() { Assert.Throws<TimeoutException>(() => @@ -1745,7 +1745,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveFromAsync not supported on OSX public void ReceiveFromAsyncV6BoundToAnyV4_NotReceived() { Assert.Throws<TimeoutException>(() => @@ -1755,7 +1755,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveFromAsync not supported on OSX public void ReceiveFromAsyncV4BoundToAnyV6_Success() { ReceiveFromAsync_Helper(IPAddress.IPv6Any, IPAddress.Loopback); @@ -1798,7 +1798,7 @@ namespace System.Net.Sockets.Tests #endregion ReceiveFrom Async/Event [Fact] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // ReceiveFromAsync not supported on OSX public void ReceiveFromAsync_NotSupported() { using (Socket sock = new Socket(SocketType.Dgram, ProtocolType.Udp)) @@ -1821,7 +1821,7 @@ namespace System.Net.Sockets.Tests public class DualModeConnectionlessReceiveMessageFrom : DualModeBase { [Fact] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // ReceiveMessageFrom not supported on OSX public void ReceiveMessageFrom_NotSupported() { using (Socket sock = new Socket(SocketType.Dgram, ProtocolType.Udp)) @@ -1838,7 +1838,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // ReceiveMessageFromAsync not supported on OSX public void ReceiveMessageFromAsync_NotSupported() { using (Socket sock = new Socket(SocketType.Dgram, ProtocolType.Udp)) @@ -1872,7 +1872,7 @@ namespace System.Net.Sockets.Tests } [Fact] // Base case - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFrom not supported on OSX // "The parameter remoteEP must not be of type DnsEndPoint." public void Socket_ReceiveMessageFromDnsEndPoint_Throws() { @@ -1891,49 +1891,49 @@ namespace System.Net.Sockets.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFrom not supported on OSX public void ReceiveMessageFromV4BoundToSpecificMappedV4_Success() { ReceiveMessageFrom_Helper(IPAddress.Loopback.MapToIPv6(), IPAddress.Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFrom not supported on OSX public void ReceiveMessageFromV4BoundToAnyMappedV4_Success() { ReceiveMessageFrom_Helper(IPAddress.Any.MapToIPv6(), IPAddress.Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFrom not supported on OSX public void ReceiveMessageFromV4BoundToSpecificV4_Success() { ReceiveMessageFrom_Helper(IPAddress.Loopback, IPAddress.Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFrom not supported on OSX public void ReceiveMessageFromV4BoundToAnyV4_Success() { ReceiveMessageFrom_Helper(IPAddress.Any, IPAddress.Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFrom not supported on OSX public void ReceiveMessageFromV6BoundToSpecificV6_Success() { ReceiveMessageFrom_Helper(IPAddress.IPv6Loopback, IPAddress.IPv6Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFrom not supported on OSX public void ReceiveMessageFromV6BoundToAnyV6_Success() { ReceiveMessageFrom_Helper(IPAddress.IPv6Any, IPAddress.IPv6Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFrom not supported on OSX public void ReceiveMessageFromV6BoundToSpecificV4_NotReceived() { Assert.Throws<SocketException>(() => @@ -1943,7 +1943,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~(TestPlatforms.Linux | TestPlatforms.OSX))] + [PlatformSpecific(~(TestPlatforms.Linux | TestPlatforms.OSX))] // Expected behavior is different on OSX and Linux public void ReceiveMessageFromV4BoundToSpecificV6_NotReceived() { Assert.Throws<SocketException>(() => @@ -1960,7 +1960,7 @@ namespace System.Net.Sockets.Tests // an acceptable difference due to the extra state that would otherwise // be necessary to emulate the Winsock behavior. [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(TestPlatforms.Linux)] + [PlatformSpecific(TestPlatforms.Linux)] // Read the comment above public void ReceiveMessageFromV4BoundToSpecificV6_NotReceived_Linux() { Assert.Throws<ArgumentException>(() => @@ -1970,7 +1970,7 @@ namespace System.Net.Sockets.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFrom not supported on OSX public void ReceiveMessageFromV6BoundToAnyV4_NotReceived() { Assert.Throws<SocketException>(() => @@ -1980,7 +1980,7 @@ namespace System.Net.Sockets.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFrom not supported on OSX public void ReceiveMessageFromV4BoundToAnyV6_Success() { ReceiveMessageFrom_Helper(IPAddress.IPv6Any, IPAddress.Loopback); @@ -2062,7 +2062,7 @@ namespace System.Net.Sockets.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveMessageFrom not supported on OSX // "The parameter remoteEP must not be of type DnsEndPoint." public void Socket_BeginReceiveMessageFromDnsEndPoint_Throws() { @@ -2080,49 +2080,49 @@ namespace System.Net.Sockets.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveMessageFrom not supported on OSX public void BeginReceiveMessageFromV4BoundToSpecificMappedV4_Success() { BeginReceiveMessageFrom_Helper(IPAddress.Loopback.MapToIPv6(), IPAddress.Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveMessageFrom not supported on OSX public void BeginReceiveMessageFromV4BoundToAnyMappedV4_Success() { BeginReceiveMessageFrom_Helper(IPAddress.Any.MapToIPv6(), IPAddress.Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveMessageFrom not supported on OSX public void BeginReceiveMessageFromV4BoundToSpecificV4_Success() { BeginReceiveMessageFrom_Helper(IPAddress.Loopback, IPAddress.Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveMessageFrom not supported on OSX public void BeginReceiveMessageFromV4BoundToAnyV4_Success() { BeginReceiveMessageFrom_Helper(IPAddress.Any, IPAddress.Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveMessageFrom not supported on OSX public void BeginReceiveMessageFromV6BoundToSpecificV6_Success() { BeginReceiveMessageFrom_Helper(IPAddress.IPv6Loopback, IPAddress.IPv6Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveMessageFrom not supported on OSX public void BeginReceiveMessageFromV6BoundToAnyV6_Success() { BeginReceiveMessageFrom_Helper(IPAddress.IPv6Any, IPAddress.IPv6Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveMessageFrom not supported on OSX public void BeginReceiveMessageFromV6BoundToSpecificV4_NotReceived() { Assert.Throws<TimeoutException>(() => @@ -2132,7 +2132,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~(TestPlatforms.Linux | TestPlatforms.OSX))] + [PlatformSpecific(~(TestPlatforms.Linux | TestPlatforms.OSX))] // Expected behavior is different on OSX and Linux public void BeginReceiveMessageFromV4BoundToSpecificV6_NotReceived() { Assert.Throws<TimeoutException>(() => @@ -2149,7 +2149,7 @@ namespace System.Net.Sockets.Tests // an acceptable difference due to the extra state that would otherwise // be necessary to emulate the Winsock behavior. [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(TestPlatforms.Linux)] + [PlatformSpecific(TestPlatforms.Linux)] // Read the comment above public void BeginReceiveMessageFromV4BoundToSpecificV6_NotReceived_Linux() { Assert.Throws<ArgumentException>(() => @@ -2159,7 +2159,7 @@ namespace System.Net.Sockets.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveMessageFrom not supported on OSX public void BeginReceiveMessageFromV6BoundToAnyV4_NotReceived() { Assert.Throws<TimeoutException>(() => @@ -2169,7 +2169,7 @@ namespace System.Net.Sockets.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // BeginReceiveMessageFrom not supported on OSX public void BeginReceiveMessageFromV4BoundToAnyV6_Success() { BeginReceiveMessageFrom_Helper(IPAddress.IPv6Any, IPAddress.Loopback); @@ -2233,7 +2233,7 @@ namespace System.Net.Sockets.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFromAsync not supported on OSX // "The parameter remoteEP must not be of type DnsEndPoint." public void Socket_ReceiveMessageFromAsyncDnsEndPoint_Throws() { @@ -2253,49 +2253,49 @@ namespace System.Net.Sockets.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFromAsync not supported on OSX public void ReceiveMessageFromAsyncV4BoundToSpecificMappedV4_Success() { ReceiveMessageFromAsync_Helper(IPAddress.Loopback.MapToIPv6(), IPAddress.Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFromAsync not supported on OSX public void ReceiveMessageFromAsyncV4BoundToAnyMappedV4_Success() { ReceiveMessageFromAsync_Helper(IPAddress.Any.MapToIPv6(), IPAddress.Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFromAsync not supported on OSX public void ReceiveMessageFromAsyncV4BoundToSpecificV4_Success() { ReceiveMessageFromAsync_Helper(IPAddress.Loopback, IPAddress.Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFromAsync not supported on OSX public void ReceiveMessageFromAsyncV4BoundToAnyV4_Success() { ReceiveMessageFromAsync_Helper(IPAddress.Any, IPAddress.Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFromAsync not supported on OSX public void ReceiveMessageFromAsyncV6BoundToSpecificV6_Success() { ReceiveMessageFromAsync_Helper(IPAddress.IPv6Loopback, IPAddress.IPv6Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFromAsync not supported on OSX public void ReceiveMessageFromAsyncV6BoundToAnyV6_Success() { ReceiveMessageFromAsync_Helper(IPAddress.IPv6Any, IPAddress.IPv6Loopback); } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFromAsync not supported on OSX public void ReceiveMessageFromAsyncV6BoundToSpecificV4_NotReceived() { Assert.Throws<TimeoutException>(() => @@ -2305,7 +2305,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(~(TestPlatforms.Linux | TestPlatforms.OSX))] + [PlatformSpecific(~(TestPlatforms.Linux | TestPlatforms.OSX))] // Expected behavior is different on OSX and Linux public void ReceiveMessageFromAsyncV4BoundToSpecificV6_NotReceived() { Assert.Throws<TimeoutException>(() => @@ -2322,7 +2322,7 @@ namespace System.Net.Sockets.Tests // an acceptable difference due to the extra state that would otherwise // be necessary to emulate the Winsock behavior. [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(TestPlatforms.Linux)] + [PlatformSpecific(TestPlatforms.Linux)] // Read the comment above public void ReceiveMessageFromAsyncV4BoundToSpecificV6_NotReceived_Linux() { Assert.Throws<ArgumentException>(() => @@ -2332,7 +2332,7 @@ namespace System.Net.Sockets.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFromAsync not supported on OSX public void ReceiveMessageFromAsyncV6BoundToAnyV4_NotReceived() { Assert.Throws<TimeoutException>(() => @@ -2342,7 +2342,7 @@ namespace System.Net.Sockets.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/Microsoft/BashOnWindows/issues/987 - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // ReceiveMessageFromAsync not supported on OSX public void ReceiveMessageFromAsyncV4BoundToAnyV6_Success() { ReceiveMessageFromAsync_Helper(IPAddress.IPv6Any, IPAddress.Loopback); @@ -2386,7 +2386,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // BeginReceiveFrom not supported on OSX public void BeginReceiveFrom_NotSupported() { using (Socket sock = new Socket(SocketType.Dgram, ProtocolType.Udp)) @@ -2401,7 +2401,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // BeginReceiveMessageFrom not supported on OSX public void BeginReceiveMessageFrom_NotSupported() { using (Socket sock = new Socket(SocketType.Dgram, ProtocolType.Udp)) diff --git a/src/System.Net.Sockets/tests/FunctionalTests/LingerStateTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/LingerStateTest.cs index b663054784..9440a6adc9 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/LingerStateTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/LingerStateTest.cs @@ -44,7 +44,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Fact] - [PlatformSpecific(~TestPlatforms.OSX)] + [PlatformSpecific(~TestPlatforms.OSX)] // The upper bound for linger time is drastically different on OS X. public void Socket_LingerState_Upper_Boundaries_CorrectBehavior() { Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); @@ -56,7 +56,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Fact] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // The upper bound for linger time is drastically different on OS X. public void Socket_LingerState_Upper_Boundaries_CorrectBehavior_OSX() { // The upper bound for linger time is drastically different on OS X. diff --git a/src/System.Net.Sockets/tests/FunctionalTests/SendPacketsAsync.cs b/src/System.Net.Sockets/tests/FunctionalTests/SendPacketsAsync.cs index f2af64f516..31a54f1468 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/SendPacketsAsync.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/SendPacketsAsync.cs @@ -57,7 +57,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // SendPacketAsync not supported on Unix public void Unix_NotSupported_ThrowsPlatformNotSupportedException(SocketImplementationType type) { int port; @@ -146,7 +146,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void NullElement_Ignored(SocketImplementationType type) { SendPackets(type, (SendPacketsElement)null, 0); @@ -156,7 +156,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void EmptyList_Ignored(SocketImplementationType type) { SendPackets(type, new SendPacketsElement[0], SocketError.Success, 0); @@ -177,7 +177,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void NormalBuffer_Success(SocketImplementationType type) { SendPackets(type, new SendPacketsElement(new byte[10]), 10); @@ -186,7 +186,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void NormalBufferRange_Success(SocketImplementationType type) { SendPackets(type, new SendPacketsElement(new byte[10], 5, 5), 5); @@ -195,7 +195,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void EmptyBuffer_Ignored(SocketImplementationType type) { SendPackets(type, new SendPacketsElement(new byte[0]), 0); @@ -204,7 +204,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void BufferZeroCount_Ignored(SocketImplementationType type) { SendPackets(type, new SendPacketsElement(new byte[10], 4, 0), 0); @@ -213,7 +213,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void BufferMixedBuffers_ZeroCountBufferIgnored(SocketImplementationType type) { SendPacketsElement[] elements = new SendPacketsElement[] @@ -228,7 +228,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void BufferZeroCountThenNormal_ZeroCountIgnored(SocketImplementationType type) { Assert.True(Capability.IPv6Support()); @@ -283,7 +283,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void SocketDisconnected_TransmitFileOptionDisconnect(SocketImplementationType type) { SendPackets(type, new SendPacketsElement(new byte[10], 4, 4), TransmitFileOptions.Disconnect, 4); @@ -292,7 +292,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void SocketDisconnectedAndReusable_TransmitFileOptionReuseSocket(SocketImplementationType type) { SendPackets(type, new SendPacketsElement(new byte[10], 4, 4), TransmitFileOptions.Disconnect | TransmitFileOptions.ReuseSocket, 4); @@ -304,7 +304,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void SendPacketsElement_EmptyFileName_Throws(SocketImplementationType type) { Assert.Throws<ArgumentException>(() => @@ -316,7 +316,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void SendPacketsElement_BlankFileName_Throws(SocketImplementationType type) { Assert.Throws<ArgumentException>(() => @@ -329,7 +329,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void SendPacketsElement_BadCharactersFileName_Throws(SocketImplementationType type) { Assert.Throws<ArgumentException>(() => @@ -342,7 +342,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void SendPacketsElement_MissingDirectoryName_Throws(SocketImplementationType type) { Assert.Throws<DirectoryNotFoundException>(() => @@ -355,7 +355,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void SendPacketsElement_MissingFile_Throws(SocketImplementationType type) { Assert.Throws<FileNotFoundException>(() => @@ -368,7 +368,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void SendPacketsElement_File_Success(SocketImplementationType type) { SendPackets(type, new SendPacketsElement(TestFileName), s_testFileSize); // Whole File @@ -377,7 +377,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void SendPacketsElement_FileZeroCount_Success(SocketImplementationType type) { SendPackets(type, new SendPacketsElement(TestFileName, 0, 0), s_testFileSize); // Whole File @@ -386,7 +386,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void SendPacketsElement_FilePart_Success(SocketImplementationType type) { SendPackets(type, new SendPacketsElement(TestFileName, 10, 20), 20); @@ -395,7 +395,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void SendPacketsElement_FileMultiPart_Success(SocketImplementationType type) { SendPacketsElement[] elements = new SendPacketsElement[] @@ -410,7 +410,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void SendPacketsElement_FileLargeOffset_Throws(SocketImplementationType type) { // Length is validated on Send @@ -420,7 +420,7 @@ namespace System.Net.Sockets.Tests [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SendPacketAsync not supported on Unix public void SendPacketsElement_FileLargeCount_Throws(SocketImplementationType type) { // Length is validated on Send diff --git a/src/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs index 6cd41e8752..1e8c2e80fa 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs @@ -281,7 +281,7 @@ namespace System.Net.Sockets.Tests } [Theory] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // ExclusiveAddressUse option is a Windows-specific option (when set to "true," tells Windows not to allow reuse of same local address) [InlineData(false, null, null, true)] [InlineData(false, null, false, true)] [InlineData(false, false, null, true)] @@ -296,7 +296,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Theory] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SetIPProtectionLevel not supported on Unix [InlineData(IPProtectionLevel.EdgeRestricted, AddressFamily.InterNetwork, SocketOptionLevel.IP)] [InlineData(IPProtectionLevel.Restricted, AddressFamily.InterNetwork, SocketOptionLevel.IP)] [InlineData(IPProtectionLevel.Unrestricted, AddressFamily.InterNetwork, SocketOptionLevel.IP)] @@ -316,7 +316,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Theory] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // SetIPProtectionLevel not supported on Unix [InlineData(IPProtectionLevel.EdgeRestricted, AddressFamily.InterNetwork)] [InlineData(IPProtectionLevel.Restricted, AddressFamily.InterNetwork)] [InlineData(IPProtectionLevel.Unrestricted, AddressFamily.InterNetwork)] diff --git a/src/System.Net.Sockets/tests/FunctionalTests/TcpClientTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/TcpClientTest.cs index 0d4fc6dfe4..1165362976 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/TcpClientTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/TcpClientTest.cs @@ -150,7 +150,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // ExclusiveAddressUse=false only supported on Windows public void ExclusiveAddressUse_NullClient_Windows() { using (TcpClient client = new TcpClient()) @@ -163,7 +163,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Fact] - [PlatformSpecific(~TestPlatforms.Windows)] + [PlatformSpecific(~TestPlatforms.Windows)] // ExclusiveAddressUse=false only supported on Windows public void ExclusiveAddressUse_NullClient_NonWindows() { using (TcpClient client = new TcpClient()) @@ -185,7 +185,7 @@ namespace System.Net.Sockets.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // ExclusiveAddressUse=false only supported on Windows public void Roundtrip_ExclusiveAddressUse_GetEqualsSet_False() { using (TcpClient client = new TcpClient()) @@ -197,7 +197,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // ExclusiveAddressUse=false only supported on Windows public void ExclusiveAddressUse_Set_False_NotSupported() { using (TcpClient client = new TcpClient()) diff --git a/src/System.Net.Sockets/tests/FunctionalTests/UdpClientTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/UdpClientTest.cs index fdf29ffefc..43e0cf656d 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/UdpClientTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/UdpClientTest.cs @@ -118,7 +118,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Theory] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Udp.AllowNatTraversal only supported on Windows [InlineData(true, IPProtectionLevel.Unrestricted)] [InlineData(false, IPProtectionLevel.EdgeRestricted)] public void AllowNatTraversal_Windows(bool allow, IPProtectionLevel resultLevel) @@ -132,7 +132,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Theory] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Udp.AllowNatTraversal throws PNSE on Unix [InlineData(true)] [InlineData(false)] public void AllowNatTraversal_AnyUnix(bool allow) diff --git a/src/System.Net.Sockets/tests/FunctionalTests/UnixDomainSocketTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/UnixDomainSocketTest.cs index fe363e15d8..a62d02cd93 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/UnixDomainSocketTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/UnixDomainSocketTest.cs @@ -25,7 +25,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // CreateUnixDomainSocket should throw on Windows public void Socket_CreateUnixDomainSocket_Throws_OnWindows() { SocketException e = Assert.Throws<SocketException>(() => new Socket(AddressFamily.Unix, SocketType.Stream, ProtocolType.Unspecified)); @@ -34,7 +34,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests ConnectAsyncUnixDomainSocketEndPoint seccess on Unix public async Task Socket_ConnectAsyncUnixDomainSocketEndPoint_Success() { string path = null; @@ -91,7 +91,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests ConnectAsyncUnixDomainSocketEndPoint seccess on Unix public async Task Socket_ConnectAsyncUnixDomainSocketEndPoint_NotServer() { string path = GetRandomNonExistingFilePath(); @@ -125,7 +125,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests SendReceive sucess for UnixDomainSocketEndPoint on Unix public void Socket_SendReceive_Success() { string path = GetRandomNonExistingFilePath(); @@ -164,7 +164,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests SendReceiveAsync sucess for UnixDomainSocketEndPoint on Unix public async Task Socket_SendReceiveAsync_Success() { string path = GetRandomNonExistingFilePath(); @@ -203,7 +203,7 @@ namespace System.Net.Sockets.Tests [OuterLoop] // TODO: Issue #11345 [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests ConcurrentSendReceive sucess for UnixDomainSocketEndPoint on Unix public void ConcurrentSendReceive() { using (Socket server = new Socket(AddressFamily.Unix, SocketType.Stream, ProtocolType.Unspecified)) diff --git a/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs b/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs index 201d4a7d97..d42896dee6 100644 --- a/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs +++ b/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs @@ -2902,7 +2902,7 @@ namespace System.Xml.Tests } //[Variation("Output filename is \'\\\\\'")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Invalid path specific to Windows [InlineData(XslInputType.Reader, ReaderType.XmlValidatingReader)] [InlineData(XslInputType.URI, ReaderType.XmlValidatingReader)] [InlineData(XslInputType.Navigator, ReaderType.XmlValidatingReader)] diff --git a/src/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTransform.cs b/src/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTransform.cs index bab4a2c646..18f83a665e 100644 --- a/src/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTransform.cs +++ b/src/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTransform.cs @@ -2670,7 +2670,7 @@ namespace System.Xml.Tests } //[Variation("Output filename is \'\\\\\'")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Invalid path specific to Windows [InlineData(InputType.Reader, ReaderType.XmlValidatingReader)] [InlineData(InputType.URI, ReaderType.XmlValidatingReader)] [InlineData(InputType.Navigator, ReaderType.XmlValidatingReader)] diff --git a/src/System.Reflection.Metadata/tests/PortableExecutable/DebugDirectoryTests.cs b/src/System.Reflection.Metadata/tests/PortableExecutable/DebugDirectoryTests.cs index ed8210702b..2c8514d201 100644 --- a/src/System.Reflection.Metadata/tests/PortableExecutable/DebugDirectoryTests.cs +++ b/src/System.Reflection.Metadata/tests/PortableExecutable/DebugDirectoryTests.cs @@ -36,14 +36,14 @@ namespace System.Reflection.PortableExecutable.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to get module handles public void CodeView_Loaded() { LoaderUtilities.LoadPEAndValidate(Misc.Debug, ValidateCodeView); } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to get module handles public void CodeView_Loaded_FromStream() { LoaderUtilities.LoadPEAndValidate(Misc.Debug, ValidateCodeView, useStream: true); @@ -86,7 +86,7 @@ namespace System.Reflection.PortableExecutable.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to get module handles public void Deterministic_Loaded() { LoaderUtilities.LoadPEAndValidate(Misc.Deterministic, ValidateDeterministic); @@ -134,14 +134,14 @@ namespace System.Reflection.PortableExecutable.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to get module handles public void EmbeddedPortablePdb_Loaded() { LoaderUtilities.LoadPEAndValidate(PortablePdbs.DocumentsEmbeddedDll, ValidateEmbeddedPortablePdb); } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to get module handles public void EmbeddedPortablePdb_Loaded_FromStream() { LoaderUtilities.LoadPEAndValidate(PortablePdbs.DocumentsEmbeddedDll, ValidateEmbeddedPortablePdb, useStream: true); diff --git a/src/System.Reflection.Metadata/tests/PortableExecutable/PEReaderTests.cs b/src/System.Reflection.Metadata/tests/PortableExecutable/PEReaderTests.cs index 9d4e7be1a5..84ca369fab 100644 --- a/src/System.Reflection.Metadata/tests/PortableExecutable/PEReaderTests.cs +++ b/src/System.Reflection.Metadata/tests/PortableExecutable/PEReaderTests.cs @@ -204,7 +204,7 @@ namespace System.Reflection.PortableExecutable.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to get module handles public void GetMethodBody_Loaded() { LoaderUtilities.LoadPEAndValidate(Misc.Members, reader => @@ -228,7 +228,7 @@ namespace System.Reflection.PortableExecutable.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to get module handles public void GetSectionData_Loaded() { LoaderUtilities.LoadPEAndValidate(Misc.Members, ValidateSectionData); diff --git a/src/System.Runtime.Extensions/tests/System/Environment.NewLine.cs b/src/System.Runtime.Extensions/tests/System/Environment.NewLine.cs index a5cdcf83c7..4791c02ff4 100644 --- a/src/System.Runtime.Extensions/tests/System/Environment.NewLine.cs +++ b/src/System.Runtime.Extensions/tests/System/Environment.NewLine.cs @@ -8,14 +8,14 @@ namespace System.Tests { public class EnvironmentNewLine { - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // NewLine character on Windows [Fact] public void Windows_NewLineTest() { Assert.Equal("\r\n", Environment.NewLine); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // NewLine character on Unix [Fact] public void Unix_NewLineTest() { diff --git a/src/System.Runtime.Extensions/tests/System/Environment.ProcessorCount.cs b/src/System.Runtime.Extensions/tests/System/Environment.ProcessorCount.cs index 8e7f0484b0..22e3c4dc5a 100644 --- a/src/System.Runtime.Extensions/tests/System/Environment.ProcessorCount.cs +++ b/src/System.Runtime.Extensions/tests/System/Environment.ProcessorCount.cs @@ -9,7 +9,7 @@ namespace System.Tests { public class EnvironmentProcessorCount { - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to get processor information [Fact] public void Windows_ProcessorCountTest() { @@ -26,7 +26,7 @@ namespace System.Tests Assert.Equal(expected, actual); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes to get processor information [Fact] public void Unix_ProcessorCountTest() { diff --git a/src/System.Runtime.Extensions/tests/System/EnvironmentTests.cs b/src/System.Runtime.Extensions/tests/System/EnvironmentTests.cs index 4825078092..799c2453ef 100644 --- a/src/System.Runtime.Extensions/tests/System/EnvironmentTests.cs +++ b/src/System.Runtime.Extensions/tests/System/EnvironmentTests.cs @@ -98,7 +98,7 @@ namespace System.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests OS-specific environment public void Is64BitOperatingSystem_Unix_TrueIff64BitProcess() { Assert.Equal(Environment.Is64BitProcess, Environment.Is64BitOperatingSystem); @@ -161,7 +161,7 @@ namespace System.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests OS-specific environment public void UserDomainName_Unix_MatchesMachineName() { Assert.Equal(Environment.MachineName, Environment.UserDomainName); @@ -198,7 +198,7 @@ namespace System.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests OS-specific environment public void GetFolderPath_Unix_PersonalIsHomeAndUserProfile() { Assert.Equal(Environment.GetEnvironmentVariable("HOME"), Environment.GetFolderPath(Environment.SpecialFolder.Personal)); @@ -213,7 +213,7 @@ namespace System.Tests } [Theory] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests OS-specific environment [InlineData(Environment.SpecialFolder.UserProfile, Environment.SpecialFolderOption.None)] [InlineData(Environment.SpecialFolder.Personal, Environment.SpecialFolderOption.None)] [InlineData(Environment.SpecialFolder.MyDocuments, Environment.SpecialFolderOption.None)] @@ -240,7 +240,7 @@ namespace System.Tests } [Theory] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // Tests OS-specific environment [InlineData(Environment.SpecialFolder.Favorites, Environment.SpecialFolderOption.DoNotVerify)] [InlineData(Environment.SpecialFolder.InternetCache, Environment.SpecialFolderOption.DoNotVerify)] [InlineData(Environment.SpecialFolder.ProgramFiles, Environment.SpecialFolderOption.None)] @@ -302,7 +302,7 @@ namespace System.Tests // [InlineData(Environment.SpecialFolder.LocalizedResources)] [InlineData(Environment.SpecialFolder.SystemX86)] [InlineData(Environment.SpecialFolder.Windows)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests OS-specific environment public unsafe void GetFolderPath_Windows(Environment.SpecialFolder folder) { string knownFolder = Environment.GetFolderPath(folder); @@ -316,7 +316,7 @@ namespace System.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes public void GetLogicalDrives_Unix_AtLeastOneIsRoot() { string[] drives = Environment.GetLogicalDrives(); @@ -327,7 +327,7 @@ namespace System.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes public void GetLogicalDrives_Windows_MatchesExpectedLetters() { string[] drives = Environment.GetLogicalDrives(); diff --git a/src/System.Runtime.Extensions/tests/System/IO/Path.Combine.cs b/src/System.Runtime.Extensions/tests/System/IO/Path.Combine.cs index 91980393c4..2e2cdc2914 100644 --- a/src/System.Runtime.Extensions/tests/System/IO/Path.Combine.cs +++ b/src/System.Runtime.Extensions/tests/System/IO/Path.Combine.cs @@ -141,7 +141,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific invalid paths public static void ContainsInvalidCharWithoutRootedAfterArgumentNull_Windows() { //any path contains invalid character without rooted after (AE) @@ -159,7 +159,7 @@ namespace System.IO.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific invalid paths public static void ContainsInvalidCharWithRootedAfterArgumentNull_Windows() { //any path contains invalid character with rooted after (AE) diff --git a/src/System.Runtime.Extensions/tests/System/IO/Path.GetRelativePath.cs b/src/System.Runtime.Extensions/tests/System/IO/Path.GetRelativePath.cs index 5f8107c584..36a03d6bfc 100644 --- a/src/System.Runtime.Extensions/tests/System/IO/Path.GetRelativePath.cs +++ b/src/System.Runtime.Extensions/tests/System/IO/Path.GetRelativePath.cs @@ -29,7 +29,7 @@ namespace System.IO.Tests [InlineData(@"C:\a", @"C:\ab", @"..\ab")] [InlineData(@"C:\", @"\\LOCALHOST\Share\b", @"\\LOCALHOST\Share\b")] [InlineData(@"\\LOCALHOST\Share\a", @"\\LOCALHOST\Share\b", @"..\b")] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific paths public static void GetRelativePath_Windows(string relativeTo, string path, string expected) { string result = Path.GetRelativePath(relativeTo, path); @@ -56,7 +56,7 @@ namespace System.IO.Tests [InlineData(@"/a/", @"/a/b", @"b")] [InlineData(@"/ab", @"/a", @"../a")] [InlineData(@"/a", @"/ab", @"../ab")] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests Unix-specific paths public static void GetRelativePath_AnyUnix(string relativeTo, string path, string expected) { string result = Path.GetRelativePath(relativeTo, path); @@ -72,7 +72,7 @@ namespace System.IO.Tests [InlineData(@"/a", @"/A/", @"../A/")] [InlineData(@"/a/", @"/A", @"../A")] [InlineData(@"/a/", @"/A/b", @"../A/b")] - [PlatformSpecific(TestPlatforms.Linux)] + [PlatformSpecific(TestPlatforms.Linux)] // Tests Linux relative path behavior public static void GetRelativePath_Linux(string relativeTo, string path, string expected) { string result = Path.GetRelativePath(relativeTo, path); @@ -88,7 +88,7 @@ namespace System.IO.Tests [InlineData(@"/a", @"/A/", @"../A/")] [InlineData(@"/a/", @"/A", @"../A")] [InlineData(@"/a/", @"/A/b", @"../A/b")] - [PlatformSpecific(TestPlatforms.FreeBSD)] + [PlatformSpecific(TestPlatforms.FreeBSD)] // Tests FreeBSD relative path behavior public static void GetRelativePath_FreeBSD(string relativeTo, string path, string expected) { string result = Path.GetRelativePath(relativeTo, path); @@ -104,7 +104,7 @@ namespace System.IO.Tests [InlineData(@"/a", @"/A/", @"../A/")] [InlineData(@"/a/", @"/A", @"../A")] [InlineData(@"/a/", @"/A/b", @"../A/b")] - [PlatformSpecific(TestPlatforms.NetBSD)] + [PlatformSpecific(TestPlatforms.NetBSD)] // Tests NetBSD relative path behavior public static void GetRelativePath_NetBSD(string relativeTo, string path, string expected) { string result = Path.GetRelativePath(relativeTo, path); @@ -120,7 +120,7 @@ namespace System.IO.Tests [InlineData(@"/a", @"/A/", @".")] [InlineData(@"/a/", @"/A", @".")] [InlineData(@"/a/", @"/A/b", @"b")] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // Tests OSX relative path behavior public static void GetRelativePath_Mac(string relativeTo, string path, string expected) { string result = Path.GetRelativePath(relativeTo, path); diff --git a/src/System.Runtime.Extensions/tests/System/IO/PathTests.cs b/src/System.Runtime.Extensions/tests/System/IO/PathTests.cs index 458f058909..54263aec1b 100644 --- a/src/System.Runtime.Extensions/tests/System/IO/PathTests.cs +++ b/src/System.Runtime.Extensions/tests/System/IO/PathTests.cs @@ -55,7 +55,7 @@ namespace System.IO.Tests [InlineData(@"..\..\files.txt", @"..\..")] [InlineData(@"C:\", null)] [InlineData(@"C:", null)] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific paths public static void GetDirectoryName_Windows(string path, string expected) { Assert.Equal(expected, Path.GetDirectoryName(path)); @@ -68,7 +68,7 @@ namespace System.IO.Tests [InlineData(@"dir/baz/bar", @"dir/baz")] [InlineData(@"../../files.txt", @"../..")] [InlineData(@"/", null)] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests Unix-specific paths public static void GetDirectoryName_Unix(string path, string expected) { Assert.Equal(expected, Path.GetDirectoryName(path)); @@ -82,7 +82,7 @@ namespace System.IO.Tests Assert.Equal(null, Path.GetDirectoryName(Path.GetPathRoot(curDir))); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Checks Unix-specific special characters in directory path [Fact] public static void GetDirectoryName_ControlCharacters_Unix() { @@ -110,7 +110,7 @@ namespace System.IO.Tests Assert.Equal(!string.IsNullOrEmpty(expected), Path.HasExtension(path)); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Checks file extension behavior on Unix [Theory] [InlineData("file.e xe", ".e xe")] [InlineData("file. ", ". ")] @@ -143,7 +143,7 @@ namespace System.IO.Tests Assert.Equal(expected, Path.GetFileName(path)); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests Unix-specific valid file names [Fact] public static void GetFileName_Unix() { @@ -185,7 +185,7 @@ namespace System.IO.Tests Assert.False(Path.IsPathRooted("file.exe")); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests UNC [Theory] [InlineData(@"\\test\unc\path\to\something", @"\\test\unc")] [InlineData(@"\\a\b\c\d\e", @"\\a\b")] @@ -203,7 +203,7 @@ namespace System.IO.Tests Assert.Equal(expected, Path.GetPathRoot(value)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific path convention [Theory] [InlineData(@"C:", @"C:")] [InlineData(@"C:\", @"C:\")] @@ -218,7 +218,7 @@ namespace System.IO.Tests Assert.Equal(expected, Path.GetPathRoot(value)); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests Unix-specific path convention [Fact] public static void GetPathRoot_Unix() { @@ -304,7 +304,7 @@ namespace System.IO.Tests Assert.True(Directory.Exists(tmpPath)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Sets environment vars with Windows-specific paths [Theory] [InlineData(@"C:\Users\someuser\AppData\Local\Temp\", @"C:\Users\someuser\AppData\Local\Temp")] [InlineData(@"C:\Users\someuser\AppData\Local\Temp\", @"C:\Users\someuser\AppData\Local\Temp\")] @@ -316,7 +316,7 @@ namespace System.IO.Tests GetTempPath_SetEnvVar("TMP", expected, newTempPath); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Sets environment vars with Unix-specific paths [Theory] [InlineData("/tmp/", "/tmp")] [InlineData("/tmp/", "/tmp/")] @@ -413,7 +413,7 @@ namespace System.IO.Tests Assert.Equal(expected, Path.GetFullPath(path)); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests whitespaces in paths on Unix [Fact] public static void GetFullPath_Unix_Whitespace() { @@ -423,7 +423,7 @@ namespace System.IO.Tests Assert.Equal(Path.Combine(curDir, "\r\n"), Path.GetFullPath("\r\n")); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests URIs as valid file names [Theory] [InlineData("http://www.microsoft.com")] [InlineData("file://somefile")] @@ -435,7 +435,7 @@ namespace System.IO.Tests Path.GetFullPath(uriAsFileName)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Checks normalized long path (> MaxPath) on Windows [Fact] public static void GetFullPath_Windows_NormalizedLongPathTooLong() { @@ -452,7 +452,7 @@ namespace System.IO.Tests Assert.NotNull(Path.GetFullPath(longPath.ToString())); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific invalid paths [Fact] public static void GetFullPath_Windows_AlternateDataStreamsNotSupported() { @@ -461,7 +461,7 @@ namespace System.IO.Tests Assert.Throws<NotSupportedException>(() => Path.GetFullPath(@"C:\some\bad:path")); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific invalid paths [Fact] public static void GetFullPath_Windows_URIFormatNotSupported() { @@ -470,7 +470,7 @@ namespace System.IO.Tests Assert.Throws<NotSupportedException>(() => Path.GetFullPath("file://www.microsoft.com")); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific invalid paths [Theory] [InlineData(@"bad::$DATA")] [InlineData(@"C :")] @@ -481,7 +481,7 @@ namespace System.IO.Tests Assert.Throws<NotSupportedException>(() => Path.GetFullPath(path)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests legitimate Windows paths that are now allowed [Theory] [InlineData(@"C:...")] [InlineData(@"C:...\somedir")] @@ -495,7 +495,7 @@ namespace System.IO.Tests Path.GetFullPath(path); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests MaxPathNotTooLong on Windows [Fact] public static void GetFullPath_Windows_MaxPathNotTooLong() { @@ -503,14 +503,14 @@ namespace System.IO.Tests Path.GetFullPath(@"C:\" + new string('a', 255) + @"\"); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests PathTooLong on Windows [Fact] public static void GetFullPath_Windows_PathTooLong() { Assert.Throws<PathTooLongException>(() => Path.GetFullPath(@"C:\" + new string('a', short.MaxValue) + @"\")); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific paths [Theory] [InlineData(@"C:\", @"C:\")] [InlineData(@"C:\.", @"C:\")] @@ -523,7 +523,7 @@ namespace System.IO.Tests Assert.Equal(Path.GetFullPath(path), expected); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests legitimate strage windows paths that are now allowed [Fact] public static void GetFullPath_Windows_StrangeButLegalPaths() { @@ -542,7 +542,7 @@ namespace System.IO.Tests Path.GetFullPath(curDir + Path.DirectorySeparatorChar + ".. " + Path.DirectorySeparatorChar)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific paths [Theory] [InlineData(@"\\?\C:\ ")] [InlineData(@"\\?\C:\ \ ")] @@ -599,7 +599,7 @@ namespace System.IO.Tests } } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests valid paths based on UNC [Theory] // https://github.com/dotnet/corefx/issues/11965 [InlineData(@"\\LOCALHOST\share\test.txt.~SS", @"\\LOCALHOST\share\test.txt.~SS")] @@ -630,7 +630,7 @@ namespace System.IO.Tests Assert.Equal(expected, Path.GetFullPath(input)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests invalid paths based on UNC [Theory] [InlineData(@"\\")] [InlineData(@"\\LOCALHOST")] @@ -642,7 +642,7 @@ namespace System.IO.Tests Assert.Throws<ArgumentException>(() => Path.GetFullPath(invalidPath)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to get short path name [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsNanoServer))] public static void GetFullPath_Windows_83Paths() { @@ -687,7 +687,7 @@ namespace System.IO.Tests } } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific invalid paths [Theory] [InlineData('*')] [InlineData('?')] diff --git a/src/System.Runtime.InteropServices.RuntimeInformation/tests/CheckPlatformTests.cs b/src/System.Runtime.InteropServices.RuntimeInformation/tests/CheckPlatformTests.cs index c61ce73322..6c1019065d 100644 --- a/src/System.Runtime.InteropServices.RuntimeInformation/tests/CheckPlatformTests.cs +++ b/src/System.Runtime.InteropServices.RuntimeInformation/tests/CheckPlatformTests.cs @@ -9,7 +9,7 @@ namespace System.Runtime.InteropServices.RuntimeInformationTests { public class CheckPlatformTests { - [Fact, PlatformSpecific(TestPlatforms.Linux)] + [Fact, PlatformSpecific(TestPlatforms.Linux)] // Tests RuntimeInformation OS platform public void CheckLinux() { Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.Linux)); @@ -27,7 +27,7 @@ namespace System.Runtime.InteropServices.RuntimeInformationTests Assert.False(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); } - [Fact, PlatformSpecific(TestPlatforms.NetBSD)] + [Fact, PlatformSpecific(TestPlatforms.NetBSD)] // Tests RuntimeInformation OS platform public void CheckNetBSD() { Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.Create("NETBSD"))); @@ -45,7 +45,7 @@ namespace System.Runtime.InteropServices.RuntimeInformationTests Assert.False(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); } - [Fact, PlatformSpecific(TestPlatforms.OSX)] + [Fact, PlatformSpecific(TestPlatforms.OSX)] // Tests RuntimeInformation OS platform public void CheckOSX() { Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.OSX)); @@ -63,7 +63,7 @@ namespace System.Runtime.InteropServices.RuntimeInformationTests Assert.False(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); } - [Fact, PlatformSpecific(TestPlatforms.Windows)] + [Fact, PlatformSpecific(TestPlatforms.Windows)] // Tests RuntimeInformation OS platform public void CheckWindows() { Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); diff --git a/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs b/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs index 42084ec19a..0de2f44f91 100644 --- a/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs +++ b/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs @@ -46,25 +46,25 @@ namespace System.Runtime.InteropServices.RuntimeInformationTests Assert.Same(RuntimeInformation.OSDescription, RuntimeInformation.OSDescription); } - [Fact, PlatformSpecific(TestPlatforms.Windows)] + [Fact, PlatformSpecific(TestPlatforms.Windows)] // Checks Windows debug name in RuntimeInformation public void VerifyWindowsDebugName() { Assert.Contains("windows", RuntimeInformation.OSDescription, StringComparison.OrdinalIgnoreCase); } - [Fact, PlatformSpecific(TestPlatforms.Linux)] + [Fact, PlatformSpecific(TestPlatforms.Linux)] // Checks Linux debug name in RuntimeInformation public void VerifyLinuxDebugName() { Assert.Contains("linux", RuntimeInformation.OSDescription, StringComparison.OrdinalIgnoreCase); } - [Fact, PlatformSpecific(TestPlatforms.NetBSD)] + [Fact, PlatformSpecific(TestPlatforms.NetBSD)] // Checks NetBSD debug name in RuntimeInformation public void VerifyNetBSDDebugName() { Assert.Contains("netbsd", RuntimeInformation.OSDescription, StringComparison.OrdinalIgnoreCase); } - [Fact, PlatformSpecific(TestPlatforms.OSX)] + [Fact, PlatformSpecific(TestPlatforms.OSX)] // Checks OSX debug name in RuntimeInformation public void VerifyOSXDebugName() { Assert.Contains("darwin", RuntimeInformation.OSDescription, StringComparison.OrdinalIgnoreCase); diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/MarshalTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/MarshalTests.cs index 1a5ecdf37e..fba0b54e25 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/MarshalTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/MarshalTests.cs @@ -31,7 +31,7 @@ namespace System.Runtime.InteropServices [Theory] [MemberData(nameof(StringData))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SecureStringToBSTR not supported on Unix public static void SecureStringToBSTR(string data) { using (SecureString str = ToSecureString(data)) diff --git a/src/System.Runtime/tests/System/Threading/WaitHandleTests.netstandard.cs b/src/System.Runtime/tests/System/Threading/WaitHandleTests.netstandard.cs index 4483929ff5..01e41d4d04 100644 --- a/src/System.Runtime/tests/System/Threading/WaitHandleTests.netstandard.cs +++ b/src/System.Runtime/tests/System/Threading/WaitHandleTests.netstandard.cs @@ -180,7 +180,7 @@ namespace System.Threading.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix doesn't support SignalAndWait public static void SignalAndWait_PlatformNotSupported() { var toSignal = new ManualResetEvent(false); diff --git a/src/System.Runtime/tests/System/TimeZoneInfoTests.cs b/src/System.Runtime/tests/System/TimeZoneInfoTests.cs index 2e9546bab0..f04561aa72 100644 --- a/src/System.Runtime/tests/System/TimeZoneInfoTests.cs +++ b/src/System.Runtime/tests/System/TimeZoneInfoTests.cs @@ -1672,7 +1672,7 @@ namespace System.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix and Windows rules differ in this case public static void IsDaylightSavingTime_CatamarcaMultiYearDaylightSavings() { // America/Catamarca had DST from @@ -1695,7 +1695,7 @@ namespace System.Tests } [Theory] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Linux will use local mean time for DateTimes before standard time came into effect. [InlineData("1940-02-24T23:59:59.0000000Z", false, "0:00:00")] [InlineData("1940-02-25T00:00:00.0000000Z", true, "1:00:00")] [InlineData("1940-11-20T00:00:00.0000000Z", true, "1:00:00")] @@ -1719,7 +1719,7 @@ namespace System.Tests } [Theory] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Linux will use local mean time for DateTimes before standard time came into effect. // in 1996 Europe/Lisbon changed from standard time to DST without changing the UTC offset [InlineData("1995-09-30T17:00:00.0000000Z", false, "1:00:00")] [InlineData("1996-03-31T00:59:59.0000000Z", false, "1:00:00")] @@ -1836,7 +1836,7 @@ namespace System.Tests /// See https://github.com/dotnet/coreclr/issues/2185 /// </summary> [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Linux and Windows rules differ in this case public static void DaylightTransitionsExactTime_Johannesburg() { DateTimeOffset transition = new DateTimeOffset(1943, 3, 20, 23, 0, 0, TimeSpan.Zero); diff --git a/src/System.Runtime/tests/TimeZoneInfoTests.netstandard.cs b/src/System.Runtime/tests/TimeZoneInfoTests.netstandard.cs index 48911a7bb9..3f341ac1ca 100644 --- a/src/System.Runtime/tests/TimeZoneInfoTests.netstandard.cs +++ b/src/System.Runtime/tests/TimeZoneInfoTests.netstandard.cs @@ -112,7 +112,7 @@ namespace System.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected behavior specific to Unix public static void ConvertTimeFromToUtc_UnixOnly() { // DateTime Kind is Local @@ -220,7 +220,7 @@ namespace System.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // TimeZone not found on Windows public static void HasSameRules_RomeAndVatican() { TimeZoneInfo rome = TimeZoneInfo.FindSystemTimeZoneById("Europe/Rome"); diff --git a/src/System.Security.Cryptography.Algorithms/tests/SignatureDescriptionTests.cs b/src/System.Security.Cryptography.Algorithms/tests/SignatureDescriptionTests.cs index cb8464146e..2fd89c8a97 100644 --- a/src/System.Security.Cryptography.Algorithms/tests/SignatureDescriptionTests.cs +++ b/src/System.Security.Cryptography.Algorithms/tests/SignatureDescriptionTests.cs @@ -127,7 +127,7 @@ namespace System.Security.Cryptography.Algorithms.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Operation is not supported on Unix public void Digest() { bool rightClass = false; diff --git a/src/System.Security.Cryptography.Encoding/tests/Oid.cs b/src/System.Security.Cryptography.Encoding/tests/Oid.cs index a0b85ce295..476ed2ba65 100644 --- a/src/System.Security.Cryptography.Encoding/tests/Oid.cs +++ b/src/System.Security.Cryptography.Encoding/tests/Oid.cs @@ -181,7 +181,7 @@ namespace System.Security.Cryptography.Encoding.Tests [Theory] [MemberData(nameof(ValidOidFriendlyNameHashAlgorithmPairs))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to get the Oid lookup table public static void LookupOidByValue_Method_WrongGroup(string oidValue, string friendlyName) { // Oid group is implemented strictly - no fallback to OidGroup.All as with many other parts of Crypto. @@ -237,7 +237,7 @@ namespace System.Security.Cryptography.Encoding.Tests [Theory] [MemberData(nameof(ValidOidFriendlyNameHashAlgorithmPairs))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to get the Oid lookup table public static void LookupOidByFriendlyName_Method_WrongGroup(string oidValue, string friendlyName) { // Oid group is implemented strictly - no fallback to OidGroup.All as with many other parts of Crypto. @@ -259,7 +259,7 @@ namespace System.Security.Cryptography.Encoding.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes to search Oid in the lookup table public static void LookupOidByValue_Method_UnixOnly() { // This needs to be an OID not in the static lookup table. The purpose is to verify the @@ -273,7 +273,7 @@ namespace System.Security.Cryptography.Encoding.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes to search Oid in the lookup table public static void LookupOidByFriendlyName_Method_UnixOnly() { // This needs to be a name not in the static lookup table. The purpose is to verify the diff --git a/src/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs index 59cfd6a97b..c90a9030c9 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs @@ -511,7 +511,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // StoreSavedAsSerializedCerData not supported on Unix public static void ImportStoreSavedAsSerializedCerData_Windows() { using (var pfxCer = new X509Certificate2(TestData.PfxData, TestData.PfxDataPassword, Cert.EphemeralIfPossible)) @@ -535,7 +535,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // StoreSavedAsSerializedCerData not supported on Unix public static void ImportStoreSavedAsSerializedCerData_Unix() { X509Certificate2Collection cc2 = new X509Certificate2Collection(); @@ -545,7 +545,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests [Theory] [MemberData(nameof(StorageFlags))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // StoreSavedAsSerializedStoreData not supported on Unix public static void ImportStoreSavedAsSerializedStoreData_Windows(X509KeyStorageFlags keyStorageFlags) { using (var msCer = new X509Certificate2(TestData.MsCertificate)) @@ -570,7 +570,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // StoreSavedAsSerializedStoreData not supported on Unix public static void ImportStoreSavedAsSerializedStoreData_Unix() { X509Certificate2Collection cc2 = new X509Certificate2Collection(); @@ -663,14 +663,14 @@ namespace System.Security.Cryptography.X509Certificates.Tests #endif [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SerializedCert not supported on Unix public static void ExportSerializedCert_Windows() { TestExportSingleCert(X509ContentType.SerializedCert); } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // SerializedCert not supported on Unix public static void ExportSerializedCert_Unix() { using (var msCer = new X509Certificate2(TestData.MsCertificate)) @@ -682,14 +682,14 @@ namespace System.Security.Cryptography.X509Certificates.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SerializedStore not supported on Unix public static void ExportSerializedStore_Windows() { TestExportStore(X509ContentType.SerializedStore); } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // SerializedStore not supported on Unix public static void ExportSerializedStore_Unix() { using (var msCer = new X509Certificate2(TestData.MsCertificate)) diff --git a/src/System.Security.Cryptography.X509Certificates/tests/CtorTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/CtorTests.cs index f3e6e6895e..06a0947e76 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/CtorTests.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/CtorTests.cs @@ -293,7 +293,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests #endif [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // StoreSavedAsSerializedCerData not supported on Unix public static void TestConstructor_SerializedCert_Windows() { const string ExpectedThumbPrint = "71CB4E2B02738AD44F8B382C93BD17BA665F9914"; @@ -318,7 +318,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // StoreSavedAsSerializedCerData not supported on Unix public static void TestByteArrayConstructor_SerializedCert_Unix() { Assert.ThrowsAny<CryptographicException>(() => new X509Certificate2(TestData.StoreSavedAsSerializedCerData)); diff --git a/src/System.Security.Cryptography.X509Certificates/tests/ExportTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/ExportTests.cs index b9d944dd4e..3df884afe3 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/ExportTests.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/ExportTests.cs @@ -20,7 +20,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // SerializedCert not supported on Unix public static void ExportAsSerializedCert_Windows() { using (X509Certificate2 c1 = new X509Certificate2(TestData.MsCertificate)) @@ -38,7 +38,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // SerializedCert not supported on Unix public static void ExportAsSerializedCert_Unix() { using (X509Certificate2 c1 = new X509Certificate2(TestData.MsCertificate)) diff --git a/src/System.Security.Cryptography.X509Certificates/tests/InteropTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/InteropTests.cs index 93173df223..f06cc3dce9 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/InteropTests.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/InteropTests.cs @@ -11,7 +11,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests public static class InteropTests { [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes public static void TestHandle() { // @@ -42,7 +42,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes public static void TestHandleCtor() { IntPtr pCertContext = IntPtr.Zero; diff --git a/src/System.Security.Cryptography.X509Certificates/tests/PfxTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/PfxTests.cs index bc5d18f7cc..b7482306b5 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/PfxTests.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/PfxTests.cs @@ -268,7 +268,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests #if netcoreapp11 [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes public static void EphemeralImport_HasNoKeyName() { using (var cert = new X509Certificate2(TestData.PfxData, TestData.PfxDataPassword, X509KeyStorageFlags.EphemeralKeySet)) @@ -290,7 +290,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes public static void CollectionEphemeralImport_HasNoKeyName() { using (var importedCollection = Cert.Import(TestData.PfxData, TestData.PfxDataPassword, X509KeyStorageFlags.EphemeralKeySet)) @@ -317,7 +317,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests #endif [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes public static void PerphemeralImport_HasKeyName() { using (var cert = new X509Certificate2(TestData.PfxData, TestData.PfxDataPassword, X509KeyStorageFlags.DefaultKeySet)) @@ -339,7 +339,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes public static void CollectionPerphemeralImport_HasKeyName() { using (var importedCollection = Cert.Import(TestData.PfxData, TestData.PfxDataPassword, X509KeyStorageFlags.DefaultKeySet)) diff --git a/src/System.Security.Cryptography.X509Certificates/tests/PropsTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/PropsTests.cs index 8a7ebf3227..c4ff283196 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/PropsTests.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/PropsTests.cs @@ -269,7 +269,7 @@ Wry5FNNo } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // MsCertificate not supported on Unix public static void TestArchive_Windows() { using (var c = new X509Certificate2(TestData.MsCertificate)) @@ -285,7 +285,7 @@ Wry5FNNo } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // MsCertificate not supported on Unix public static void TestArchive_Unix() { using (var c = new X509Certificate2(TestData.MsCertificate)) @@ -301,7 +301,7 @@ Wry5FNNo } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // MsCertificate not supported on Unix public static void TestFriendlyName_Windows() { using (var c = new X509Certificate2(TestData.MsCertificate)) @@ -317,7 +317,7 @@ Wry5FNNo } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // MsCertificate not supported on Unix public static void TestFriendlyName_Unix() { using (var c = new X509Certificate2(TestData.MsCertificate)) diff --git a/src/System.Security.Cryptography.X509Certificates/tests/PublicKeyTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/PublicKeyTests.cs index b5b9ec1958..3e259066bd 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/PublicKeyTests.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/PublicKeyTests.cs @@ -452,28 +452,28 @@ namespace System.Security.Cryptography.X509Certificates.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes public static void TestKey_ECDsaCng256() { TestKey_ECDsaCng(TestData.ECDsa256Certificate, TestData.ECDsaCng256PublicKey); } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes public static void TestKey_ECDsaCng384() { TestKey_ECDsaCng(TestData.ECDsa384Certificate, TestData.ECDsaCng384PublicKey); } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes public static void TestKey_ECDsaCng521() { TestKey_ECDsaCng(TestData.ECDsa521Certificate, TestData.ECDsaCng521PublicKey); } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes public static void TestKey_BrainpoolP160r1() { if (PlatformDetection.WindowsVersion >= 10) diff --git a/src/System.Security.Cryptography.X509Certificates/tests/X509StoreTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/X509StoreTests.cs index f1698da594..bed934884b 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/X509StoreTests.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/X509StoreTests.cs @@ -42,7 +42,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests } } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Not supported on Unix [Fact] public static void Constructor_StoreHandle() { @@ -68,7 +68,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests } } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // API not supported on Unix [Fact] public static void Constructor_StoreHandle_Unix() { @@ -81,7 +81,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests Assert.Throws<PlatformNotSupportedException>(() => new X509Chain(IntPtr.Zero)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Not supported on Unix [Fact] public static void TestDispose() { diff --git a/src/System.Threading.AccessControl/tests/ThreadingAclExtensionsTests.cs b/src/System.Threading.AccessControl/tests/ThreadingAclExtensionsTests.cs index 703cf889fd..066b246fcd 100644 --- a/src/System.Threading.AccessControl/tests/ThreadingAclExtensionsTests.cs +++ b/src/System.Threading.AccessControl/tests/ThreadingAclExtensionsTests.cs @@ -10,7 +10,7 @@ namespace System.Threading.Tests public static class ThreadingAclExtensionsTests { [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // APIs not supported on Unix public static void ExistenceTest_Windows() { var e = new ManualResetEvent(true); @@ -31,7 +31,7 @@ namespace System.Threading.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // APIs not supported on Unix public static void ExistenceTest_Unix() { var e = new ManualResetEvent(true); diff --git a/src/System.Threading.Thread/tests/ThreadTests.netstandard.cs b/src/System.Threading.Thread/tests/ThreadTests.netstandard.cs index e62292dc7b..4829237467 100644 --- a/src/System.Threading.Thread/tests/ThreadTests.netstandard.cs +++ b/src/System.Threading.Thread/tests/ThreadTests.netstandard.cs @@ -140,7 +140,7 @@ namespace System.Threading.Threads.Tests [Theory] [MemberData(nameof(ApartmentStateTest_MemberData))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Expected behavior differs on Unix and Windows public static void GetSetApartmentStateTest_ChangeAfterThreadStarted_Windows( Func<Thread, ApartmentState> getApartmentState, Func<Thread, ApartmentState, int> setApartmentState, @@ -162,7 +162,7 @@ namespace System.Threading.Threads.Tests [Theory] [MemberData(nameof(ApartmentStateTest_MemberData))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Expected behavior differs on Unix and Windows public static void ApartmentStateTest_ChangeBeforeThreadStarted_Windows( Func<Thread, ApartmentState> getApartmentState, Func<Thread, ApartmentState, int> setApartmentState, @@ -183,7 +183,7 @@ namespace System.Threading.Threads.Tests [Theory] [MemberData(nameof(ApartmentStateTest_MemberData))] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected behavior differs on Unix and Windows public static void ApartmentStateTest_Unix( Func<Thread, ApartmentState> getApartmentState, Func<Thread, ApartmentState, int> setApartmentState, diff --git a/src/System.Threading/tests/EventWaitHandleTests.cs b/src/System.Threading/tests/EventWaitHandleTests.cs index 8c7617caf8..d983099563 100644 --- a/src/System.Threading/tests/EventWaitHandleTests.cs +++ b/src/System.Threading/tests/EventWaitHandleTests.cs @@ -26,14 +26,14 @@ namespace System.Threading.Tests Assert.Throws<ArgumentException>(() => new EventWaitHandle(true, (EventResetMode)12345)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // names aren't supported on Unix [Fact] public void Ctor_InvalidNames() { Assert.Throws<ArgumentException>(() => new EventWaitHandle(true, EventResetMode.AutoReset, new string('a', 1000))); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // names aren't supported on Unix [Fact] public void Ctor_NamesArentSupported_Unix() { @@ -42,7 +42,7 @@ namespace System.Threading.Tests Assert.Throws<PlatformNotSupportedException>(() => new EventWaitHandle(false, EventResetMode.AutoReset, "anything", out createdNew)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // names aren't supported on Unix [Theory] [InlineData(false, EventResetMode.AutoReset)] [InlineData(false, EventResetMode.ManualReset)] @@ -100,7 +100,7 @@ namespace System.Threading.Tests } } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // OpenExisting not supported on Unix [Fact] public void OpenExisting_Windows() { @@ -131,7 +131,7 @@ namespace System.Threading.Tests } } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // OpenExisting not supported on Unix [Fact] public void OpenExisting_NotSupported_Unix() { @@ -140,7 +140,7 @@ namespace System.Threading.Tests Assert.Throws<PlatformNotSupportedException>(() => EventWaitHandle.TryOpenExisting("anything", out ewh)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // OpenExisting not supported on Unix [Fact] public void OpenExisting_InvalidNames_Windows() { @@ -149,7 +149,7 @@ namespace System.Threading.Tests Assert.Throws<ArgumentException>(() => EventWaitHandle.OpenExisting(new string('a', 10000))); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // OpenExisting not supported on Unix [Fact] public void OpenExisting_UnavailableName_Windows() { @@ -159,7 +159,7 @@ namespace System.Threading.Tests Assert.False(EventWaitHandle.TryOpenExisting(name, out ignored)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // OpenExisting not supported on Unix [Fact] public void OpenExisting_NameUsedByOtherSynchronizationPrimitive_Windows() { diff --git a/src/System.Threading/tests/MutexTests.cs b/src/System.Threading/tests/MutexTests.cs index 77cdc42c50..5d9761d9fe 100644 --- a/src/System.Threading/tests/MutexTests.cs +++ b/src/System.Threading/tests/MutexTests.cs @@ -58,7 +58,7 @@ namespace System.Threading.Tests } } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // named semaphores aren't supported on Unix [Fact] public void Ctor_NameUsedByOtherSynchronizationPrimitive_Windows() { @@ -113,7 +113,7 @@ namespace System.Threading.Tests Assert.False(Mutex.TryOpenExisting(name, out ignored)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // named semaphores aren't supported on Unix [Fact] public void OpenExisting_NameUsedByOtherSynchronizationPrimitive_Windows() { diff --git a/src/System.Threading/tests/SemaphoreTests.cs b/src/System.Threading/tests/SemaphoreTests.cs index ab1b0af668..8344b65458 100644 --- a/src/System.Threading/tests/SemaphoreTests.cs +++ b/src/System.Threading/tests/SemaphoreTests.cs @@ -24,7 +24,7 @@ namespace System.Threading.Tests new Semaphore(initialCount, maximumCount, null).Dispose(); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // named semaphores aren't supported on Unix [Fact] public void Ctor_ValidName_Windows() { @@ -37,7 +37,7 @@ namespace System.Threading.Tests Assert.True(createdNew); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // named semaphores aren't supported on Unix [Fact] public void Ctor_NamesArentSupported_Unix() { @@ -73,7 +73,7 @@ namespace System.Threading.Tests Assert.Throws<ArgumentException>(() => new Semaphore(2, 1, "CtorSemaphoreTest", out createdNew)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // named semaphores aren't supported on Unix [Fact] public void Ctor_InvalidNames() { @@ -196,7 +196,7 @@ namespace System.Threading.Tests }, CancellationToken.None, TaskCreationOptions.LongRunning, TaskScheduler.Default)); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // named semaphores aren't supported on Unix [Fact] public void OpenExisting_NotSupported_Unix() { @@ -207,7 +207,7 @@ namespace System.Threading.Tests Assert.Throws<PlatformNotSupportedException>(() => Semaphore.TryOpenExisting("anything", out semaphore)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // named semaphores aren't supported on Unix [Fact] public void OpenExisting_InvalidNames_Windows() { |