From e0d20d37592d52d672ff89d5838d0e77e7ee580e Mon Sep 17 00:00:00 2001 From: Mitchell Hwang Date: Mon, 20 Jul 2020 15:59:59 -0400 Subject: [PATCH] [wasm] Address System.Text.RegularExpressions.Tests Failures (#39470) Co-authored-by: Mitchell Hwang --- .../tests/Regex.Groups.Tests.cs | 7 +++++-- .../tests/RegexMatchTimeoutExceptionTests.cs | 2 +- .../tests/RegexParserTests.cs | 2 +- src/libraries/tests.proj | 1 - 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/libraries/System.Text.RegularExpressions/tests/Regex.Groups.Tests.cs b/src/libraries/System.Text.RegularExpressions/tests/Regex.Groups.Tests.cs index 2a85402db34..4978a94bdc2 100644 --- a/src/libraries/System.Text.RegularExpressions/tests/Regex.Groups.Tests.cs +++ b/src/libraries/System.Text.RegularExpressions/tests/Regex.Groups.Tests.cs @@ -856,8 +856,11 @@ namespace System.Text.RegularExpressions.Tests public static IEnumerable Groups_CustomCulture_TestData_AzeriLatin() { - yield return new object[] { "az-Latn-AZ", "\u0131", "\u0049", RegexOptions.IgnoreCase, new string[] { "\u0049" } }; - yield return new object[] { "az-Latn-AZ", "\u0130", "\u0069", RegexOptions.IgnoreCase, new string[] { "\u0069" } }; + if (PlatformDetection.IsNotBrowser) + { + yield return new object[] { "az-Latn-AZ", "\u0131", "\u0049", RegexOptions.IgnoreCase, new string[] { "\u0049" } }; + yield return new object[] { "az-Latn-AZ", "\u0130", "\u0069", RegexOptions.IgnoreCase, new string[] { "\u0069" } }; + } } [Theory] diff --git a/src/libraries/System.Text.RegularExpressions/tests/RegexMatchTimeoutExceptionTests.cs b/src/libraries/System.Text.RegularExpressions/tests/RegexMatchTimeoutExceptionTests.cs index 92c1b914fb8..438c7659a46 100644 --- a/src/libraries/System.Text.RegularExpressions/tests/RegexMatchTimeoutExceptionTests.cs +++ b/src/libraries/System.Text.RegularExpressions/tests/RegexMatchTimeoutExceptionTests.cs @@ -43,7 +43,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal(timeout, e.MatchTimeout); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsBinaryFormatterSupported))] public void SerializationRoundtrip() { const string Input = "abcdef"; diff --git a/src/libraries/System.Text.RegularExpressions/tests/RegexParserTests.cs b/src/libraries/System.Text.RegularExpressions/tests/RegexParserTests.cs index 7228d5d4b42..849afb7f404 100644 --- a/src/libraries/System.Text.RegularExpressions/tests/RegexParserTests.cs +++ b/src/libraries/System.Text.RegularExpressions/tests/RegexParserTests.cs @@ -813,7 +813,7 @@ namespace System.Text.RegularExpressions.Tests Parse(pattern, options, error); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsBinaryFormatterSupported))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void RegexParseException_Serializes() { diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 0473fc620c0..7b9b0de3bed 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -46,7 +46,6 @@ - -- 2.34.1