diff --git a/src/libraries/System.Resources.Extensions/tests/BinaryResourceWriterUnitTest.cs b/src/libraries/System.Resources.Extensions/tests/BinaryResourceWriterUnitTest.cs index a98ccea1bc2dd7..c6061a82de2b86 100644 --- a/src/libraries/System.Resources.Extensions/tests/BinaryResourceWriterUnitTest.cs +++ b/src/libraries/System.Resources.Extensions/tests/BinaryResourceWriterUnitTest.cs @@ -262,7 +262,7 @@ public static void PrimitiveResourcesAsStrings() } } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsBinaryFormatterSupported))] [ActiveIssue("https://github.com/dotnet/runtime/issues/34495", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] [ActiveIssue("https://github.com/dotnet/runtime/issues/34008", TestPlatforms.Linux, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] public static void BinaryFormattedResources() @@ -300,7 +300,7 @@ public static void BinaryFormattedResources() } } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsBinaryFormatterSupported))] [ActiveIssue("https://github.com/dotnet/runtime/issues/34495", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] [ActiveIssue("https://github.com/dotnet/runtime/issues/34008", TestPlatforms.Linux, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] public static void BinaryFormattedResourcesWithoutTypeName() @@ -436,7 +436,7 @@ public static void StreamResources() } } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsBinaryFormatterSupported))] public static void CanReadViaResourceManager() { ResourceManager resourceManager = new ResourceManager(typeof(TestData)); @@ -474,7 +474,7 @@ public static void ResourceManagerLoadsCorrectReader() Assert.IsType(reader); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsBinaryFormatterSupported))] public static void EmbeddedResourcesAreUpToDate() { // this is meant to catch a case where our embedded test resources are out of date with respect to the current writer. diff --git a/src/libraries/System.Resources.ResourceManager/tests/ResourceManagerTests.cs b/src/libraries/System.Resources.ResourceManager/tests/ResourceManagerTests.cs index ba15e0990a4930..9c038b540e12a2 100644 --- a/src/libraries/System.Resources.ResourceManager/tests/ResourceManagerTests.cs +++ b/src/libraries/System.Resources.ResourceManager/tests/ResourceManagerTests.cs @@ -228,7 +228,7 @@ public static IEnumerable EnglishNonStringResourceData() yield return new object[] { "Size", new Size(20, 30), true }; } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsBinaryFormatterSupported))] [MemberData(nameof(EnglishNonStringResourceData))] public static void GetObject(string key, object expectedValue, bool requiresBinaryFormatter) { @@ -299,7 +299,7 @@ public static void GetResourceSet_Strings(string key, string expectedValue) Assert.Equal(expectedValue, set.GetString(key)); } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsBinaryFormatterSupported))] [MemberData(nameof(EnglishNonStringResourceData))] public static void GetResourceSet_NonStrings(string key, object expectedValue, bool requiresBinaryFormatter) { diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index a84779ea525fb8..b11eb01f25d850 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -46,8 +46,6 @@ - -