Fix TestNativeDigits for ur-IN on Apple platforms#125934
Merged
Conversation
stephentoub
approved these changes
Mar 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates globalization test expectations to account for an Apple ICU locale-data divergence for ur-IN native digits, ensuring NumberFormatInfoMiscTests.TestNativeDigits passes on Apple platforms now that the theory data is actually executing under the xUnit v3 assert package.
Changes:
- Condition
ur-INexpectedNativeDigitsonPlatformDetection.IsApplePlatform(Latin digits on Apple; Extended Arabic-Indic elsewhere). - Add an explanatory comment describing the CLDR vs Apple ICU difference for
ur-IN.
Contributor
|
Tagging subscribers to 'os-maccatalyst': @vitek-karas, @kotlarmilos, @steveisok, @akoeplinger |
tarekgh
approved these changes
Mar 22, 2026
29d50b5 to
0592f8a
Compare
Apple ICU on macOS 26+ (Tahoe) returns Latin digits (0-9) for ur-IN NativeDigits, diverging from upstream CLDR which specifies arabext (U+06F0-U+06F9). Earlier macOS versions still return arabext. This test was not actually executing under xunit v2 and the xunit v3 upgrade exposed the platform difference. Fixes #125933 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0592f8a to
3b5e611
Compare
3 tasks
eiriktsarpalis
pushed a commit
that referenced
this pull request
Mar 23, 2026
Apple ICU returns Latin digits (`"0"`–`"9"`) for
`CultureInfo.GetCultureInfo("ur-IN").NumberFormat.NativeDigits`,
diverging from upstream CLDR which specifies Extended Arabic-Indic
digits (`arabext`, U+06F0–U+06F9).
This test was not actually executing under xunit v2 — the xunit v3
assert upgrade (`Microsoft.DotNet.XUnitAssert` 2.9.3 → 3.2.2) made
`ConditionalTheory` + `MemberData` work correctly, causing the test to
run for the first time and exposing the Apple platform difference.
The fix conditions expected values on
`PlatformDetection.IsApplePlatform` in `NativeDigitTestData()`,
following the established pattern used elsewhere in the globalization
tests (e.g., `NumberFormatInfoData.cs`, `RegionInfoTests.cs`).
Fixes #125933
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Apple ICU returns Latin digits (
"0"–"9") forCultureInfo.GetCultureInfo("ur-IN").NumberFormat.NativeDigits, diverging from upstream CLDR which specifies Extended Arabic-Indic digits (arabext, U+06F0–U+06F9).This test was not actually executing under xunit v2 — the xunit v3 assert upgrade (
Microsoft.DotNet.XUnitAssert2.9.3 → 3.2.2) madeConditionalTheory+MemberDatawork correctly, causing the test to run for the first time and exposing the Apple platform difference.The fix conditions expected values on
PlatformDetection.IsApplePlatforminNativeDigitTestData(), following the established pattern used elsewhere in the globalization tests (e.g.,NumberFormatInfoData.cs,RegionInfoTests.cs).Fixes #125933