From: Alexander Köplinger Date: Tue, 14 Jul 2020 09:55:39 +0000 (+0200) Subject: WASM: Disable tests in System.ComponentModel.Annotations that rely on globalization... X-Git-Tag: submit/tizen/20210909.063632~6734 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=186256657003d534dc3053bd783934e9afe18132;p=platform%2Fupstream%2Fdotnet%2Fruntime.git WASM: Disable tests in System.ComponentModel.Annotations that rely on globalization (#39228) Allows the test suite to pass on WebAssembly: `Tests run: 692, Errors: 0, Failures: 0, Skipped: 15. Time: 1.237011s` --- 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 09d2f29..964afae 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 @@ namespace System.ComponentModel.DataAnnotations.Tests 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 @@ namespace System.ComponentModel.DataAnnotations.Tests } } - [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 @@ namespace System.ComponentModel.DataAnnotations.Tests } } - [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 @@ namespace System.ComponentModel.DataAnnotations.Tests } } - [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 @@ namespace System.ComponentModel.DataAnnotations.Tests } } - [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 @@ namespace System.ComponentModel.DataAnnotations.Tests } } - [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 @@ namespace System.ComponentModel.DataAnnotations.Tests }.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 @@ namespace System.ComponentModel.DataAnnotations.Tests } } - [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 @@ namespace System.ComponentModel.DataAnnotations.Tests } } - [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 @@ namespace System.ComponentModel.DataAnnotations.Tests } } - [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 @@ namespace System.ComponentModel.DataAnnotations.Tests } - [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 @@ namespace System.ComponentModel.DataAnnotations.Tests } } - [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 @@ namespace System.ComponentModel.DataAnnotations.Tests } } - [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 @@ namespace System.ComponentModel.DataAnnotations.Tests } } - [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 @@ namespace System.ComponentModel.DataAnnotations.Tests } } - [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 96eb0ae..8b4271b 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -24,7 +24,6 @@ -