dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.36k stars 4.75k forks source link

[Android] System.Tests.StringTests failures for hu-HU and tr-TR cultures #60568

Closed steveisok closed 2 years ago

steveisok commented 3 years ago

For exact reasons unknown, we're seeing failures in certain StringTests tests when using hu-HU and tr-TR cultures. We should see if the tests can be tweaked for Android or if they should be skipped outright. I suspect it's platform specific.

1.) System.Tests.StringTests.Contains_StringComparison_TurkishI

https://github.com/dotnet/runtime/blob/dfd618dc648ba9b11dd0f8034f78113d69f223cd/src/libraries/System.Runtime/tests/System/StringTests.cs#L324-L325

Exception messages: Assert.True() Failure
Expected: True

2.) System.Tests.StringTests.IndexOf_HungarianDoubleCompression_HungarianCulture

https://github.com/dotnet/runtime/blob/293c7f6baa40f67920ff64101d440f1ae6014dd9/src/libraries/Common/tests/Tests/System/StringTests.cs#L3018-L3031

Exception messages: Assert.Equal() Failure
    Expected: 0
    Actual: -1

3.) System.Tests.StringTests.ToUpper_TurkishI_TurkishCulture

https://github.com/dotnet/runtime/blob/293c7f6baa40f67920ff64101d440f1ae6014dd9/src/libraries/Common/tests/Tests/System/StringTests.cs#L5690

Exception messages: Actual: I
    Expected: True
    Actual:   False

4.) System.Tests.StringTests.Replace_StringComparison_TurkishI

https://github.com/dotnet/runtime/blob/dfd618dc648ba9b11dd0f8034f78113d69f223cd/src/libraries/System.Runtime/tests/System/StringTests.cs#L791

Exception messages: Assert.True() Failure
    Expected: True
    Actual:   False

5.) System.Tests.StringTests.IndexOf_TurkishI_TurkishCulture

https://github.com/dotnet/runtime/blob/dfd618dc648ba9b11dd0f8034f78113d69f223cd/src/libraries/System.Runtime/tests/System/StringTests.cs#L1115

Assert.Equal() Failure
    Expected: 4
    Actual:   19
dotnet-issue-labeler[bot] commented 3 years ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

ghost commented 3 years ago

Tagging subscribers to this area: @tarekgh, @safern See info in area-owners.md if you want to be subscribed.

Issue Details
For exact reasons unknown, we're seeing failures in certain StringTests tests when using hu-HU and tr-TR cultures. We should see if the tests can be tweaked for Android or if they should be skipped outright. 1.) System.Tests.StringTests.Contains_StringComparison_TurkishI https://github.com/dotnet/runtime/blob/dfd618dc648ba9b11dd0f8034f78113d69f223cd/src/libraries/System.Runtime/tests/System/StringTests.cs#L324-L325 ``` Exception messages: Assert.True() Failure Expected: True ``` 2.) System.Tests.StringTests.IndexOf_HungarianDoubleCompression_HungarianCulture https://github.com/dotnet/runtime/blob/293c7f6baa40f67920ff64101d440f1ae6014dd9/src/libraries/Common/tests/Tests/System/StringTests.cs#L3018-L3031 ``` Exception messages: Assert.Equal() Failure Expected: 0 Actual: -1 ``` 3.) System.Tests.StringTests.ToUpper_TurkishI_TurkishCulture https://github.com/dotnet/runtime/blob/293c7f6baa40f67920ff64101d440f1ae6014dd9/src/libraries/Common/tests/Tests/System/StringTests.cs#L5690 ``` Exception messages: Actual: I Expected: True Actual: False ``` 4.) System.Tests.StringTests.Replace_StringComparison_TurkishI https://github.com/dotnet/runtime/blob/dfd618dc648ba9b11dd0f8034f78113d69f223cd/src/libraries/System.Runtime/tests/System/StringTests.cs#L791 ``` Exception messages: Assert.True() Failure Expected: True Actual: False ``` 5.) System.Tests.StringTests.IndexOf_TurkishI_TurkishCulture https://github.com/dotnet/runtime/blob/dfd618dc648ba9b11dd0f8034f78113d69f223cd/src/libraries/System.Runtime/tests/System/StringTests.cs#L1115 ``` Assert.Equal() Failure Expected: 4 Actual: 19 ```
Author: steveisok
Assignees: -
Labels: `area-System.Globalization`, `os-android`, `untriaged`
Milestone: -
steveisok commented 2 years ago

Closing as this is specific to Android's version of ICU and there does not appear to be much we can do.