Skip to content

Commit bc9f00c

Browse files
authored
Cleanup PlatformSpecific/SkipOnMono attributes that skip a platform (#50907)
We have a bunch of test assemblies that don't make sense on some platforms, e.g. Browser. Right now we're skipping them via `[SkipOnMono("reason", TestPlatforms.Browser)]` but there's nothing that inherently ties this to Mono other than the current implementation. The more generic `SkipOnPlatform` attribute can be used instead. We can also use it in places where we do `[PlatformSpecific(~TestPlatforms....)]` to avoid the double inversion.
1 parent 6902c5a commit bc9f00c

File tree

198 files changed

+372
-348
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+372
-348
lines changed

docs/workflow/testing/libraries/filtering-tests.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,24 @@ This attribute returns the 'failing' category, which is disabled by default.
6868
```
6969
Use this attribute over test methods to skip failing tests only on the specific platforms and the specific target frameworks.
7070

71+
#### SkipOnPlatformAttribute
72+
This attribute is intended to disable a test permanently on a platform where an API is not available or there is an intentional difference in behavior in between the tested platform and the skipped platform.
73+
74+
This attribute can be applied either to a test assembly/class (will disable all the tests in that assembly/class) or to a test method. It allows multiple usages on the same member.
75+
76+
```cs
77+
[SkipOnPlatform(TestPlatforms platforms, string reason)]
78+
```
79+
80+
Use this attribute over test methods to skip tests only on the specific target platforms. The reason parameter doesn't affect the traits but we rather always use it so that when we see this attribute we know why it is being skipped on that platform.
81+
82+
If it needs to be skipped in multiple platforms and the reasons are different please use two attributes on the same test so that you can specify different reasons for each platform.
83+
84+
When you add the attribute on the whole test assembly it's a good idea to also add `<IgnoreForCI Condition="'$(TargetOS)' == '...'">true</IgnoreForCI>` to the test .csproj.
85+
That allows the CI build to skip sending this test assembly to Helix completely since it'd run zero tests anyway.
86+
87+
**Currently these are the [Test Platforms](https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.XUnitExtensions/src/TestPlatforms.cs) that we support through our test execution infrastructure**
88+
7189
#### SkipOnTargetFrameworkAttribute
7290
This attribute is intended to disable a test permanently on a framework where an API is not available or there is an intentional difference in behavior in between the tested framework and the skipped framework.
7391

@@ -80,7 +98,7 @@ Use this attribute over test methods to skip tests only on the specific target f
8098

8199
If it needs to be skipped in multiple frameworks and the reasons are different please use two attributes on the same test so that you can specify different reasons for each framework.
82100

83-
**Currently this are the [Framework Monikers](https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.XUnitExtensions/src/TargetFrameworkMonikers.cs#L23-L26) that we support through our test execution infrastructure**
101+
**Currently these are the [Framework Monikers](https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.XUnitExtensions/src/TargetFrameworkMonikers.cs#L23-L26) that we support through our test execution infrastructure**
84102

85103
#### ConditionalFactAttribute
86104
Use this attribute to run the test only when a condition is `true`. This attribute is used when `ActiveIssueAttribute` or `SkipOnTargetFrameworkAttribute` are not flexible enough due to needing to run a custom logic at test time. This test behaves as a `[Fact]` test that has no test data passed in as a parameter.

src/libraries/Common/tests/StreamConformanceTests/System/IO/StreamConformanceTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
namespace System.IO.Tests
1919
{
2020
/// <summary>Base class providing tests for any Stream-derived type.</summary>
21-
[PlatformSpecific(~TestPlatforms.Browser)] // lots of operations aren't supported on browser
21+
[SkipOnPlatform(TestPlatforms.Browser, "lots of operations aren't supported on browser")]
2222
public abstract class StreamConformanceTests : FileCleanupTestBase
2323
{
2424
/// <summary>Gets the name of the byte[] argument to Read/Write methods.</summary>

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCipherTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace System.Security.Cryptography.Encryption.Aes.Tests
1111
{
1212
using Aes = System.Security.Cryptography.Aes;
1313

14-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
14+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1515
public partial class AesCipherTests
1616
{
1717
[Fact]

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace System.Security.Cryptography.Encryption.Aes.Tests
77
{
88
using Aes = System.Security.Cryptography.Aes;
99

10-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
10+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1111
public class AesContractTests
1212
{
1313
[Fact]

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCornerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace System.Security.Cryptography.Encryption.Aes.Tests
1212
{
1313
using Aes = System.Security.Cryptography.Aes;
1414

15-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
15+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1616
public static class AesCornerTests
1717
{
1818
[Fact]

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesModeTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace System.Security.Cryptography.Encryption.Aes.Tests
77
{
88
using Aes = System.Security.Cryptography.Aes;
99

10-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
10+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1111
public class AesModeTests
1212
{
1313
[Fact]

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/DecryptorReusability.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace System.Security.Cryptography.Encryption.Aes.Tests
77
{
88
using Aes = System.Security.Cryptography.Aes;
99

10-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
10+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1111
public static class DecryptorReusabilty
1212
{
1313
// See https://github.com/dotnet/runtime/issues/21354 for details

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DESCipherTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace System.Security.Cryptography.Encryption.Des.Tests
1111
{
12-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
12+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1313
public static class DesCipherTests
1414
{
1515
// These are the expected output of many decryptions. Changing these values requires re-generating test input.

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DESContractTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace System.Security.Cryptography.Encryption.Des.Tests
1111
{
12-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
12+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1313
public static class DesContractTests
1414
{
1515
// cfb not available on windows 7

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DesTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace System.Security.Cryptography.Encryption.Des.Tests
99
{
10-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
10+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1111
public static partial class DesTests
1212
{
1313
private static readonly byte[] KnownWeakKey = "e0e0e0e0f1f1f1f1".HexToByteArray();

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAImportExport.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace System.Security.Cryptography.Dsa.Tests
77
{
8-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
8+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
99
public partial class DSAImportExport
1010
{
1111
public static bool SupportsFips186_3 => DSAFactory.SupportsFips186_3;

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyFileTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace System.Security.Cryptography.Dsa.Tests
1010
{
11-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
11+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1212
public static class DSAKeyFileTests
1313
{
1414
public static bool SupportsFips186_3 => DSAFactory.SupportsFips186_3;

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyGeneration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace System.Security.Cryptography.Dsa.Tests
77
{
8-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
8+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
99
public partial class DSAKeyGeneration
1010
{
1111
public static bool SupportsKeyGeneration => DSAFactory.SupportsKeyGeneration;

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyPemTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace System.Security.Cryptography.Dsa.Tests
99
{
10-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
10+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1111
public static class DSAKeyPemTests
1212
{
1313
private const string AmbiguousExceptionMarker = "multiple keys";

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignVerify.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace System.Security.Cryptography.Dsa.Tests
99
{
10-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
10+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1111
public sealed class DSASignVerify_Array : DSASignVerify
1212
{
1313
public override byte[] SignData(DSA dsa, byte[] data, HashAlgorithmName hashAlgorithm) =>
@@ -54,7 +54,7 @@ public void InvalidStreamArrayArguments_Throws()
5454
}
5555
}
5656

57-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
57+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
5858
public sealed class DSASignVerify_Stream : DSASignVerify
5959
{
6060
public override byte[] SignData(DSA dsa, byte[] data, HashAlgorithmName hashAlgorithm) =>
@@ -76,7 +76,7 @@ public void InvalidArrayArguments_Throws()
7676
}
7777

7878
#if NETCOREAPP
79-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
79+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
8080
public sealed class DSASignVerify_Span : DSASignVerify
8181
{
8282
public override byte[] SignData(DSA dsa, byte[] data, HashAlgorithmName hashAlgorithm) =>
@@ -109,7 +109,7 @@ private static byte[] TryWithOutputArray(Func<byte[], (bool, int)> func)
109109
}
110110
}
111111
#endif
112-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
112+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
113113
public abstract partial class DSASignVerify
114114
{
115115
public abstract byte[] SignData(DSA dsa, byte[] data, HashAlgorithmName hashAlgorithm);

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignatureFormatTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace System.Security.Cryptography.Dsa.Tests
1010
{
11-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
11+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1212
public abstract class DSASignatureFormatTests : DsaFamilySignatureFormatTests
1313
{
1414
protected override bool SupportsSha2 => DSAFactory.SupportsFips186_3;

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignatureFormatter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace System.Security.Cryptography.Dsa.Tests
88
{
9-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
9+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1010
public partial class DSASignatureFormatterTests : AsymmetricSignatureFormatterTests
1111
{
1212
[Fact]

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAXml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace System.Security.Cryptography.Dsa.Tests
99
{
10-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
10+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1111
public static class DSAXml
1212
{
1313
[Fact]

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DsaFamilySignatureFormatTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace System.Security.Cryptography.Algorithms.Tests
1010
{
11-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
11+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1212
public abstract class DsaFamilySignatureFormatTests
1313
{
1414
protected readonly struct KeyDescription

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyFileTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace System.Security.Cryptography.Tests
1010
{
11-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
11+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1212
public abstract partial class ECKeyFileTests<T> where T : AsymmetricAlgorithm
1313
{
1414
protected abstract T CreateKey();

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyPemTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace System.Security.Cryptography.Tests
99
{
10-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
10+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1111
public abstract class ECKeyPemTests<TAlg> where TAlg : AsymmetricAlgorithm
1212
{
1313
private const string AmbiguousExceptionMarker = "multiple keys";

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDhKeyFileTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace System.Security.Cryptography.EcDiffieHellman.Tests
88
{
9-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
9+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1010
public class ECDhKeyFileTests : ECKeyFileTests<ECDiffieHellman>
1111
{
1212
protected override ECDiffieHellman CreateKey()

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanKeyPemTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace System.Security.Cryptography.EcDsa.Tests
88
{
9-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
9+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1010
public sealed class ECDiffieHellmanKeyPemTests : ECKeyPemTests<ECDiffieHellman>
1111
{
1212
protected override ECDiffieHellman CreateKey() => ECDiffieHellman.Create();

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.ImportExport.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public static void TestKeySizeCreateKey()
154154
}
155155

156156
[Fact]
157-
[PlatformSpecific(~TestPlatforms.Android)] // Android does not validate curve parameters
157+
[SkipOnPlatform(TestPlatforms.Android, "Android does not validate curve parameters")]
158158
public static void TestExplicitImportValidationNegative()
159159
{
160160
if (!ECDiffieHellmanFactory.ExplicitCurvesSupported)

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace System.Security.Cryptography.EcDiffieHellman.Tests
1111
{
12-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
12+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1313
public partial class ECDiffieHellmanTests : EccTestBase
1414
{
1515
private static List<object[]> s_everyKeysize;

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaImportExport.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace System.Security.Cryptography.EcDsa.Tests
99
{
10-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
10+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1111
public class ECDsaImportExportTests : ECDsaTestsBase
1212
{
1313
internal static bool CanDeriveNewPublicKey { get; }
@@ -188,7 +188,7 @@ public static void TestKeySizeCreateKey()
188188
}
189189

190190
[ConditionalFact(nameof(ECExplicitCurvesSupported))]
191-
[PlatformSpecific(~TestPlatforms.Android)] // Android does not validate curve parameters
191+
[SkipOnPlatform(TestPlatforms.Android, "Android does not validate curve parameters")]
192192
public static void TestExplicitImportValidationNegative()
193193
{
194194
unchecked

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaKeyFileTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace System.Security.Cryptography.EcDsa.Tests
88
{
9-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
9+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1010
public class ECDsaKeyFileTests : ECKeyFileTests<ECDsa>
1111
{
1212
protected override ECDsa CreateKey()

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaKeyPemTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace System.Security.Cryptography.EcDsa.Tests
88
{
9-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
9+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1010
public sealed class ECDsaKeyPemTests : ECKeyPemTests<ECDsa>
1111
{
1212
protected override ECDsa CreateKey() => ECDsa.Create();

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaSignatureFormatTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace System.Security.Cryptography.EcDsa.Tests
1111
{
12-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
12+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1313
public abstract class ECDsaSignatureFormatTests : DsaFamilySignatureFormatTests
1414
{
1515
protected override bool SupportsSha2 => true;

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace System.Security.Cryptography.EcDsa.Tests
1313
{
14-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
14+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1515
public sealed class ECDsaTests_Array : ECDsaTests
1616
{
1717
protected override bool VerifyData(ECDsa ecdsa, byte[] data, int offset, int count, byte[] signature, HashAlgorithmName hashAlgorithm) =>
@@ -87,7 +87,7 @@ public void VerifyHash_InvalidArguments_Throws(ECDsa ecdsa)
8787
}
8888
}
8989

90-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
90+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
9191
public sealed class ECDsaTests_Stream : ECDsaTests
9292
{
9393
protected override bool VerifyData(ECDsa ecdsa, byte[] data, int offset, int count, byte[] signature, HashAlgorithmName hashAlgorithm)
@@ -125,7 +125,7 @@ public void VerifyData_InvalidArguments_Throws(ECDsa ecdsa)
125125
}
126126
}
127127

128-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
128+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
129129
public abstract partial class ECDsaTests : ECDsaTestsBase
130130
{
131131
protected bool VerifyData(ECDsa ecdsa, byte[] data, byte[] signature, HashAlgorithmName hashAlgorithm) =>

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.netcoreapp.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace System.Security.Cryptography.EcDsa.Tests
88
{
9-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
9+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1010
public sealed class ECDsaTests_Span : ECDsaTests
1111
{
1212
protected override bool VerifyData(ECDsa ecdsa, byte[] data, int offset, int count, byte[] signature, HashAlgorithmName hashAlgorithm) =>

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTestsBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace System.Security.Cryptography.EcDsa.Tests
1212
/// <summary>
1313
/// Input and helper methods for ECDsa
1414
/// </summary>
15-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
15+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1616
public abstract class ECDsaTestsBase : EccTestBase
1717
{
1818
#if NETCOREAPP

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaXml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace System.Security.Cryptography.EcDsa.Tests
77
{
8-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
8+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
99
public partial class ECDsaXml : ECDsaTestsBase
1010
{
1111
[Fact]

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RC2/RC2CipherTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace System.Security.Cryptography.Encryption.RC2.Tests
1010
{
1111
using RC2 = System.Security.Cryptography.RC2;
1212

13-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
13+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1414
[ConditionalClass(typeof(RC2Factory), nameof(RC2Factory.IsSupported))]
1515
public static class RC2CipherTests
1616
{

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RC2/RC2ContractTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace System.Security.Cryptography.Encryption.RC2.Tests
1111
{
1212
using RC2 = System.Security.Cryptography.RC2;
1313

14-
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
14+
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")]
1515
public static class RC2ContractTests
1616
{
1717
[Theory]

0 commit comments

Comments
 (0)