diff --git a/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/RangeAttributeTests.cs b/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/RangeAttributeTests.cs index 09d2f298213918..964afae32ae6a0 100644 --- a/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/RangeAttributeTests.cs +++ b/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/RangeAttributeTests.cs @@ -165,7 +165,7 @@ public static IEnumerable CommaDecimalNonStringValidValues() yield return new object[] { typeof(double), "1,0", "3,0", 2.99999999999999 }; } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] [MemberData(nameof(DotDecimalRanges))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")] public static void ParseDotSeparatorExtremaInCommaSeparatorCultures(Type type, string min, string max) @@ -206,7 +206,7 @@ public static void ParseDotSeparatorInvariantExtremaInCommaSeparatorCultures(Typ } } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] [MemberData(nameof(CommaDecimalRanges))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")] public static void ParseCommaSeparatorExtremaInCommaSeparatorCultures(Type type, string min, string max) @@ -223,7 +223,7 @@ public static void ParseCommaSeparatorExtremaInCommaSeparatorCultures(Type type, } } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] [MemberData(nameof(CommaDecimalRanges))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")] public static void ParseCommaSeparatorInvariantExtremaInCommaSeparatorCultures(Type type, string min, string max) @@ -240,7 +240,8 @@ public static void ParseCommaSeparatorInvariantExtremaInCommaSeparatorCultures(T } } - [Theory][MemberData(nameof(DotDecimalValidValues))] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] + [MemberData(nameof(DotDecimalValidValues))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")] public static void DotDecimalExtremaAndValues(Type type, string min, string max, string value) { @@ -256,7 +257,7 @@ public static void DotDecimalExtremaAndValues(Type type, string min, string max, } } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] [MemberData(nameof(DotDecimalValidValues))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")] public static void DotDecimalExtremaAndValuesInvariantParse(Type type, string min, string max, string value) @@ -280,7 +281,7 @@ public static void DotDecimalExtremaAndValuesInvariantParse(Type type, string mi } } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] [MemberData(nameof(DotDecimalValidValues))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")] public static void DotDecimalExtremaAndValuesInvariantConvert(Type type, string min, string max, string value) @@ -329,7 +330,8 @@ public static void DotDecimalExtremaAndValuesInvariantBoth(Type type, string min }.IsValid(value)); } } - [Theory] + + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] [MemberData(nameof(DotDecimalNonStringValidValues))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")] public static void DotDecimalExtremaAndNonStringValues(Type type, string min, string max, object value) @@ -370,7 +372,7 @@ public static void DotDecimalExtremaAndNonStringValuesInvariantParse(Type type, } } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] [MemberData(nameof(DotDecimalNonStringValidValues))][SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")] public static void DotDecimalExtremaAndNonStringValuesInvariantConvert(Type type, string min, string max, object value) { @@ -418,7 +420,7 @@ public static void DotDecimalExtremaAndNonStringValuesInvariantBoth(Type type, s } } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] [MemberData(nameof(CommaDecimalNonStringValidValues))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")] public static void CommaDecimalExtremaAndNonStringValues(Type type, string min, string max, object value) @@ -459,7 +461,7 @@ public static void CommaDecimalExtremaAndNonStringValuesInvariantParse(Type type } } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] [MemberData(nameof(CommaDecimalNonStringValidValues))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")] public static void CommaDecimalExtremaAndNonStringValuesInvariantConvert(Type type, string min, string max, object value) @@ -510,7 +512,7 @@ public static void CommaDecimalExtremaAndNonStringValuesInvariantBoth(Type type, } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] [MemberData(nameof(DotDecimalInvalidValues))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")] public static void DotDecimalExtremaAndInvalidValues(Type type, string min, string max, string value) @@ -527,7 +529,7 @@ public static void DotDecimalExtremaAndInvalidValues(Type type, string min, stri } } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] [MemberData(nameof(DotDecimalInvalidValues))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")] public static void DotDecimalExtremaAndInvalidValuesInvariantParse(Type type, string min, string max, string value) @@ -551,7 +553,7 @@ public static void DotDecimalExtremaAndInvalidValuesInvariantParse(Type type, st } } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] [MemberData(nameof(DotDecimalInvalidValues))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")] public static void DotDecimalExtremaAndInvalidValuesInvariantConvert(Type type, string min, string max, string value) @@ -601,7 +603,7 @@ public static void DotDecimalExtremaAndInvalidValuesInvariantBoth(Type type, str } } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] [MemberData(nameof(CommaDecimalValidValues))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")] public static void CommaDecimalExtremaAndValues(Type type, string min, string max, string value) @@ -692,7 +694,7 @@ public static void CommaDecimalExtremaAndValuesInvariantBoth(Type type, string m } } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] [MemberData(nameof(CommaDecimalInvalidValues))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")] public static void CommaDecimalExtremaAndInvalidValues(Type type, string min, string max, string value) diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index ec074e10721d43..6f8631bc6a9e46 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -24,7 +24,6 @@ -