Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void KeySizeProp()
}
}

[ActiveIssue(10206, Xunit.PlatformID.AnyUnix)]
[ActiveIssue(10206, TestPlatforms.AnyUnix)]
[Theory, MemberData(nameof(TestNewCurves))]
public void TestRegenKeyExplicit(CurveDef curveDef)
{
Expand Down Expand Up @@ -135,7 +135,7 @@ public void TestRegenKeyExplicit(CurveDef curveDef)
}
}

[ActiveIssue(10206, Xunit.PlatformID.AnyUnix)]
[ActiveIssue(10206, TestPlatforms.AnyUnix)]
[Theory, MemberData(nameof(TestCurves))]
public void TestRegenKeyNamed(CurveDef curveDef)
{
Expand All @@ -159,7 +159,7 @@ public void TestRegenKeyNamed(CurveDef curveDef)
}
}

[ActiveIssue(10206, Xunit.PlatformID.AnyUnix)]
[ActiveIssue(10206, TestPlatforms.AnyUnix)]
[ConditionalFact(nameof(ECExplicitCurvesSupported))]
public void TestRegenKeyNistP256()
{
Expand Down
18 changes: 9 additions & 9 deletions src/Common/tests/Tests/System/IO/PathInternal.Windows.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class PathInternal_Windows_Tests
InlineData(@"C:\<", true)
InlineData("\"MyFile\"", true)
]
[PlatformSpecific(PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public void HasWildcardCharacters(string path, bool expected)
{
Assert.Equal(expected, PathInternal.HasWildCardCharacters(path));
Expand All @@ -35,7 +35,7 @@ public void HasWildcardCharacters(string path, bool expected)
InlineData(@"//?/Foo", @"//?/Foo")
InlineData(@"\\Server\Share", PathInternal.UncExtendedPathPrefix + @"Server\Share")
]
[PlatformSpecific(PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public void EnsureExtendedPrefixTest(string path, string expected)
{
Assert.Equal(expected, PathInternal.EnsureExtendedPrefix(path));
Expand All @@ -51,7 +51,7 @@ public void EnsureExtendedPrefixTest(string path, string expected)
InlineData(@"//?/", false)
InlineData(@"/??/", false)
]
[PlatformSpecific(PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public void IsExtendedTest(string path, bool expected)
{
StringBuffer sb = new StringBuffer();
Expand All @@ -71,7 +71,7 @@ public void IsExtendedTest(string path, bool expected)
InlineData(@"//?/", true)
InlineData(@"/??/", false)
]
[PlatformSpecific(PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public void IsDeviceTest(string path, bool expected)
{
StringBuffer sb = new StringBuffer();
Expand Down Expand Up @@ -104,7 +104,7 @@ public void IsDeviceTest(string path, bool expected)
InlineData(@"Path", true)
InlineData(@"X", true)
]
[PlatformSpecific(PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public void IsPartiallyQualifiedTest(string path, bool expected)
{
StringBuffer sb = new StringBuffer();
Expand All @@ -126,7 +126,7 @@ public void IsPartiallyQualifiedTest(string path, bool expected)
InlineData(@" \\", 4),
InlineData(@"\\", 0),
]
[PlatformSpecific(PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public void PathStartSkipTest(string path, int expected)
{
Assert.Equal(expected, PathInternal.PathStartSkip(path));
Expand Down Expand Up @@ -169,7 +169,7 @@ public void PathStartSkipTest(string path, int expected)
InlineData(@" \\", @"\\"),
InlineData(@" //", @"\\"),
]
[PlatformSpecific(PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public void NormalizeDirectorySeparatorTests(string path, string expected)
{
string result = PathInternal.NormalizeDirectorySeparators(path);
Expand All @@ -187,7 +187,7 @@ public void NormalizeDirectorySeparatorTests(string path, string expected)
[InlineData(@"Foo\/\/\", 8)]
[InlineData("Foo:Bar", 4)]
[InlineData(@"C:\Users\Foobar\", 16)]
[PlatformSpecific(PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public void FindFileNameIndexTests(string path, int expected)
{
Assert.Equal(expected, PathInternal.FindFileNameIndex(path));
Expand All @@ -201,7 +201,7 @@ public void FindFileNameIndexTests(string path, int expected)
InlineData(@"C:\", @"c:\", StringComparison.OrdinalIgnoreCase, true)
InlineData(@"C:\", @"c:\", StringComparison.Ordinal, false)
]
[PlatformSpecific(PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public void AreRootsEqual(string first, string second, StringComparison comparisonType, bool expected)
{
Assert.Equal(expected, PathInternal.AreRootsEqual(first, second, comparisonType));
Expand Down
4 changes: 2 additions & 2 deletions src/Common/tests/Tests/System/IO/PathInternal_Unix_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class PathInternal_Unix_Tests
InlineData(@"a//", @"a/"),
InlineData(@"a\\", @"a\\"),
]
[PlatformSpecific(PlatformID.AnyUnix)]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public void NormalizeDirectorySeparatorTests(string path, string expected)
{
string result = PathInternal.NormalizeDirectorySeparators(path);
Expand All @@ -50,7 +50,7 @@ public void NormalizeDirectorySeparatorTests(string path, string expected)
[InlineData("Foo:Bar", 0)]
[InlineData("/usr/foo/", 9)]
[InlineData("/home/bar", 6)]
[PlatformSpecific(PlatformID.AnyUnix)]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public void FindFileNameIndexTests(string path, int expected)
{
Assert.Equal(expected, PathInternal.FindFileNameIndex(path));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void CanGetSetBytes()
}

[Fact]
[PlatformSpecific(PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public void NullSafePointerInTest()
{
using (var buffer = new NativeBuffer(0))
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Win32.Primitives/tests/Win32Exception.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static void InstantiateException()
private const int E_FAIL = unchecked((int)0x80004005);

[Fact]
[PlatformSpecific(PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public static void InstantiateExceptionWithLongErrorString()
{
// This test checks that Win32Exception supports error strings greater than 256 characters.
Expand Down
4 changes: 2 additions & 2 deletions src/System.Console/tests/CancelKeyPress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ public void CanAddAndRemoveHandler_Remote()
}).Dispose();
}

[PlatformSpecific(PlatformID.AnyUnix)]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public void HandlerInvokedForSigInt()
{
HandlerInvokedForSignal(SIGINT);
}

[PlatformSpecific(PlatformID.AnyUnix & ~PlatformID.OSX)] // Jenkins blocks SIGQUIT on OS X, causing the test to fail in CI
[PlatformSpecific(TestPlatforms.AnyUnix & ~TestPlatforms.OSX)] // Jenkins blocks SIGQUIT on OS X, causing the test to fail in CI
public void HandlerInvokedForSigQuit()
{
HandlerInvokedForSignal(SIGQUIT);
Expand Down
4 changes: 2 additions & 2 deletions src/System.Console/tests/Color.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static void RoundtrippingColor()
}

[Fact]
[PlatformSpecific(PlatformID.AnyUnix)]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public static void RedirectedOutputDoesNotUseAnsiSequences()
{
// Make sure that redirecting to a memory stream causes Console not to write out the ANSI sequences
Expand All @@ -53,7 +53,7 @@ public static void RedirectedOutputDoesNotUseAnsiSequences()
}

//[Fact] // the CI system redirects stdout, so we can't easily test non-redirected behavior
[PlatformSpecific(PlatformID.AnyUnix)]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public static void NonRedirectedOutputDoesUseAnsiSequences()
{
// Make sure that when writing out to a UnixConsoleStream, the ANSI escape sequences are properly
Expand Down
8 changes: 4 additions & 4 deletions src/System.Console/tests/TermInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class TermInfo
private const string TerminfoLocationsField = "_terminfoLocations";

[Fact]
[PlatformSpecific(PlatformID.AnyUnix)]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public void VerifyInstalledTermInfosParse()
{
bool foundAtLeastOne = false;
Expand Down Expand Up @@ -59,7 +59,7 @@ public void VerifyInstalledTermInfosParse()
}

[Theory]
[PlatformSpecific(PlatformID.AnyUnix)]
[PlatformSpecific(TestPlatforms.AnyUnix)]
[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)]
Expand Down Expand Up @@ -87,7 +87,7 @@ public void TermInfoVerification(string termToTest, string expectedForeground, s
}

[Fact]
[PlatformSpecific(PlatformID.OSX)]
[PlatformSpecific(TestPlatforms.OSX)]
public void EmuTermInfoDoesntBreakParser()
{
// This file (available by default on OS X) is called out specifically since it contains a format where it has %i
Expand All @@ -96,7 +96,7 @@ public void EmuTermInfoDoesntBreakParser()
}

[Fact]
[PlatformSpecific(PlatformID.AnyUnix)]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public void TryingToLoadTermThatDoesNotExistDoesNotThrow()
{
const string NonexistentTerm = "foobar____";
Expand Down
24 changes: 12 additions & 12 deletions src/System.Console/tests/WindowAndCursorProps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
public class WindowAndCursorProps : RemoteExecutorTestBase
{
[Fact]
[PlatformSpecific(PlatformID.AnyUnix)]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public static void BufferSize_SettingNotSupported()
{
Assert.Throws<PlatformNotSupportedException>(() => Console.BufferWidth = 1);
Assert.Throws<PlatformNotSupportedException>(() => Console.BufferHeight = 1);
}

[Fact]
[PlatformSpecific(PlatformID.AnyUnix)]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public static void BufferSize_GettingSameAsWindowSize()
{
Assert.Throws<PlatformNotSupportedException>(() => Console.BufferWidth = 1);
Expand All @@ -38,7 +38,7 @@ public static void WindowWidth_WindowHeight_InvalidSize()
}

[Fact]
[PlatformSpecific(PlatformID.AnyUnix)]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public static void WindowWidth()
{
Assert.Throws<PlatformNotSupportedException>(() => Console.WindowWidth = 100);
Expand All @@ -49,7 +49,7 @@ public static void WindowWidth()
}

[Fact]
[PlatformSpecific(PlatformID.AnyUnix)]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public static void WindowHeight()
{
Assert.Throws<PlatformNotSupportedException>(() => Console.WindowHeight = 100);
Expand All @@ -60,7 +60,7 @@ public static void WindowHeight()
}

[Fact]
[PlatformSpecific(PlatformID.AnyUnix)]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public static void WindowLeftTop_AnyUnix()
{
Assert.Equal(0, Console.WindowLeft);
Expand All @@ -70,7 +70,7 @@ public static void WindowLeftTop_AnyUnix()
}

[Fact]
[PlatformSpecific(PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public static void WindowLeftTop_Windows()
{
if (Console.IsOutputRedirected)
Expand All @@ -86,7 +86,7 @@ public static void WindowLeftTop_Windows()
}

[Fact]
[PlatformSpecific(PlatformID.AnyUnix)]
[PlatformSpecific(TestPlatforms.AnyUnix)]
[Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] //CI system makes it difficult to run things in a non-redirected environments.
public static void NonRedirectedCursorVisible()
{
Expand All @@ -99,7 +99,7 @@ public static void NonRedirectedCursorVisible()
}

[Fact]
[PlatformSpecific(PlatformID.AnyUnix)]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public static void CursorVisible()
{
Assert.Throws<PlatformNotSupportedException>(() => { bool unused = Console.CursorVisible; });
Expand All @@ -110,7 +110,7 @@ public static void CursorVisible()
}

[Fact]
[PlatformSpecific(PlatformID.AnyUnix)]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public static void Title_GetSet_Unix()
{
Assert.Throws<PlatformNotSupportedException>(() => Console.Title);
Expand All @@ -122,7 +122,7 @@ public static void Title_GetSet_Unix()
}

[Fact]
[PlatformSpecific(PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public static void Title_Get_Windows()
{
Assert.NotNull(Console.Title);
Expand All @@ -132,7 +132,7 @@ public static void Title_Get_Windows()
[InlineData(10)]
[InlineData(256)]
[InlineData(1024)]
[PlatformSpecific(PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public static void Title_Set_Windows(int lengthOfTitle)
{
// Try to set the title to some other value.
Expand All @@ -146,7 +146,7 @@ public static void Title_Set_Windows(int lengthOfTitle)
}

[Fact]
[PlatformSpecific(PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public static void Title_Set_Windows_longlength()
{
RemoteInvoke(() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static TcpDefaultForAzureTest()


[Fact]
[PlatformSpecific(Xunit.PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public static void NonAzureNoProtocolConnectionTestOnWindows()
{
builder.DataSource = InvalidHostname;
Expand All @@ -38,7 +38,7 @@ public static void NonAzureNoProtocolConnectionTestOnWindows()


[Fact]
[PlatformSpecific(Xunit.PlatformID.AnyUnix)]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public static void NonAzureNoProtocolConnectionTestOnUnix()
{
builder.DataSource = InvalidHostname;
Expand All @@ -55,7 +55,7 @@ public static void NonAzureTcpConnectionTest()


[Fact]
[PlatformSpecific(Xunit.PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public static void NonAzureNpConnectionTest()
{
builder.DataSource = "np:\\\\" + InvalidHostname + "\\pipe\\sql\\query";
Expand Down Expand Up @@ -86,7 +86,7 @@ public static void AzureTcpConnectionTest()


[Fact]
[PlatformSpecific(Xunit.PlatformID.Windows)]
[PlatformSpecific(TestPlatforms.Windows)]
public static void AzureNpConnectionTest()
{
foreach (string extension in AzureExtensions)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class FileVersionInfoTest
private const string TestNotFoundFileName = "notfound.dll";

[Fact]
[PlatformSpecific(PlatformID.Windows)] // native PE files only supported on Windows
[PlatformSpecific(TestPlatforms.Windows)] // native PE files only supported on Windows
public void FileVersionInfo_Normal()
{
// NativeConsoleApp (English)
Expand Down Expand Up @@ -59,7 +59,7 @@ public void FileVersionInfo_Normal()
}

[Fact]
[PlatformSpecific(PlatformID.Windows)] // native PE files only supported on Windows
[PlatformSpecific(TestPlatforms.Windows)] // native PE files only supported on Windows
public void FileVersionInfo_Chinese()
{
// NativeLibrary.dll (Chinese)
Expand Down Expand Up @@ -97,7 +97,7 @@ public void FileVersionInfo_Chinese()
}

[Fact]
[PlatformSpecific(PlatformID.Windows)] // native PE files only supported on Windows
[PlatformSpecific(TestPlatforms.Windows)] // native PE files only supported on Windows
public void FileVersionInfo_DifferentFileVersionAndProductVersion()
{
// Mtxex.dll
Expand Down
Loading