dotnet / dotnet/macios

[introspection] Evaluate using UITextChecker.RequestGrammarChecking in ApiTypoTest

Open
#25,895 0 comments 0 reactions 0 assignees View on GitHub
enhancement tests
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 13h
Merged PRs (30d)
96

Description

## Summary
Investigate whether `UITextChecker.RequestGrammarChecking` would improve the introspection typo test.

## Context
In PR #25889 (`[UIKit] Bind new Xcode 27 (iOS 27) UIKit APIs`), a review question came up about whether the new `UITextChecker.RequestGrammarChecking` API could provide any benefit to `tests/introspection/ApiTypoTest.cs`.

The current typo test collects words from public API names and checks each word individually with the spell checker:
- macOS: `SpellChecker.CheckSpelling`
- UIKit platforms: `UITextChecker.RangeOfMisspelledWordInString`

## Task
Evaluate whether `UITextChecker.RequestGrammarChecking` would improve typo detection in `ApiTypoTest`, and if so, how to integrate it without regressing the current test behavior.

## References
- `src/uikit.cs:24562-24569`
- `tests/introspection/ApiTypoTest.cs:937-969`
- PR #25889 comment thread: https://github.com/dotnet/macios/pull/25889#discussion_r3505015074

Contributor guide

No contributing guide indexed for this repository

Research direction

Read tests/introspection/ApiTypoTest.cs:937-969 and src/uikit.cs:24562-24569, then review the PR #25889 comment thread for the motivation. Compare RequestGrammarChecking with the existing macOS and UIKit spell-check paths, and determine whether it improves detection without changing current behavior; document the conclusion and integration approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.