Skip to content

Fix TestNativeDigits for ur-IN on Apple platforms#125934

Merged
lewing merged 1 commit intomainfrom
fix-testnativedigits-apple
Mar 23, 2026
Merged

Fix TestNativeDigits for ur-IN on Apple platforms#125934
lewing merged 1 commit intomainfrom
fix-testnativedigits-apple

Conversation

@lewing
Copy link
Copy Markdown
Member

@lewing lewing commented Mar 22, 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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-IN expected NativeDigits on PlatformDetection.IsApplePlatform (Latin digits on Apple; Extended Arabic-Indic elsewhere).
  • Add an explanatory comment describing the CLDR vs Apple ICU difference for ur-IN.

@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to 'os-maccatalyst': @vitek-karas, @kotlarmilos, @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.

@tarekgh tarekgh added this to the 11.0.0 milestone Mar 22, 2026
Copilot AI review requested due to automatic review settings March 22, 2026 23:25
@lewing lewing force-pushed the fix-testnativedigits-apple branch from 29d50b5 to 0592f8a Compare March 22, 2026 23:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

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>
@lewing lewing force-pushed the fix-testnativedigits-apple branch from 0592f8a to 3b5e611 Compare March 22, 2026 23:35
@lewing lewing merged commit 162722d into main Mar 23, 2026
82 of 84 checks passed
@lewing lewing deleted the fix-testnativedigits-apple branch March 23, 2026 02:07
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TestNativeDigits fails for ur-IN on Apple platforms (xunit v3 exposed previously non-running test)

4 participants