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
Summary
Investigate whether
UITextChecker.RequestGrammarCheckingwould 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 newUITextChecker.RequestGrammarCheckingAPI could provide any benefit totests/introspection/ApiTypoTest.cs.The current typo test collects words from public API names and checks each word individually with the spell checker:
SpellChecker.CheckSpellingUITextChecker.RangeOfMisspelledWordInStringTask
Evaluate whether
UITextChecker.RequestGrammarCheckingwould improve typo detection inApiTypoTest, and if so, how to integrate it without regressing the current test behavior.References
src/uikit.cs:24562-24569tests/introspection/ApiTypoTest.cs:937-969