From e895e3c5850fcae62eb029849bc7172f941e6612 Mon Sep 17 00:00:00 2001 From: Meri Khamoyan Date: Fri, 26 Jan 2024 14:19:28 +0100 Subject: [PATCH 1/2] Exclude tests for Apple platforms on hybrid mode --- .../CompareInfo/CompareInfoTests.HashCode.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Runtime/tests/System.Globalization.Tests/CompareInfo/CompareInfoTests.HashCode.cs b/src/libraries/System.Runtime/tests/System.Globalization.Tests/CompareInfo/CompareInfoTests.HashCode.cs index 1ad0639711d96..41f90345a01a6 100644 --- a/src/libraries/System.Runtime/tests/System.Globalization.Tests/CompareInfo/CompareInfoTests.HashCode.cs +++ b/src/libraries/System.Runtime/tests/System.Globalization.Tests/CompareInfo/CompareInfoTests.HashCode.cs @@ -25,7 +25,8 @@ public static IEnumerable HashCodeLocalized_TestData() if (!PlatformDetection.IsHybridGlobalizationOnBrowser) { - yield return new object[] { new CultureInfo("en-GB").CompareInfo, "100", "100!", CompareOptions.IgnoreSymbols }; // HG: equal: True, hashCodesEqual: False + if (PlatformDetection.IsNotHybridGlobalizationOnApplePlatform) + yield return new object[] { new CultureInfo("en-GB").CompareInfo, "100", "100!", CompareOptions.IgnoreSymbols }; // HG: equal: True, hashCodesEqual: False yield return new object[] { new CultureInfo("ja-JP").CompareInfo, "\u30A2", "\u3042", CompareOptions.IgnoreKanaType }; // HG: equal: True, hashCodesEqual: False yield return new object[] { new CultureInfo("en-GB").CompareInfo, "caf\u00E9", "cafe\u0301", CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreKanaType }; // HG: equal: True, hashCodesEqual: False } @@ -97,7 +98,7 @@ public static IEnumerable CheckHashingOfSkippedChars_TestData() yield return new object[] { '\u2029', thaiCmpInfo }; // ParagraphSeparator: PARAGRAPH SEPARATOR } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsIcuGlobalization))] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsIcuGlobalization), nameof(PlatformDetection.IsNotHybridGlobalizationOnApplePlatform))] [MemberData(nameof(CheckHashingOfSkippedChars_TestData))] public void CheckHashingOfSkippedChars(char character, CompareInfo cmpInfo) { From 98dc765f3714df8baeb3eae4eff71b8c91dbdd29 Mon Sep 17 00:00:00 2001 From: Meri Khamoyan Date: Fri, 26 Jan 2024 14:44:06 +0100 Subject: [PATCH 2/2] Mark as activeissue --- .../CompareInfo/CompareInfoTests.HashCode.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libraries/System.Runtime/tests/System.Globalization.Tests/CompareInfo/CompareInfoTests.HashCode.cs b/src/libraries/System.Runtime/tests/System.Globalization.Tests/CompareInfo/CompareInfoTests.HashCode.cs index 41f90345a01a6..9ee808a6282e4 100644 --- a/src/libraries/System.Runtime/tests/System.Globalization.Tests/CompareInfo/CompareInfoTests.HashCode.cs +++ b/src/libraries/System.Runtime/tests/System.Globalization.Tests/CompareInfo/CompareInfoTests.HashCode.cs @@ -98,8 +98,9 @@ public static IEnumerable CheckHashingOfSkippedChars_TestData() yield return new object[] { '\u2029', thaiCmpInfo }; // ParagraphSeparator: PARAGRAPH SEPARATOR } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsIcuGlobalization), nameof(PlatformDetection.IsNotHybridGlobalizationOnApplePlatform))] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsIcuGlobalization))] [MemberData(nameof(CheckHashingOfSkippedChars_TestData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/95338", typeof(PlatformDetection), nameof(PlatformDetection.IsHybridGlobalizationOnApplePlatform))] public void CheckHashingOfSkippedChars(char character, CompareInfo cmpInfo) { string str1 = $"a{character}b";