-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix UIA Word movement tests (#11253)
## Summary of the Pull Request Fixes the 24 failing generated tests. 20 of them were fixed by enforcing the following rule: when moving backwards by word... - a degenerate range moves to the beginning of the word, then to the word behind it. - a non-degenerate range outright moves to the word behind it. The fix was simple: if we're a degenerate range, check if we're at the beginning of the word. If not, move there. Otherwise, move to the word before it. See UiaTextRangeBase.cpp changes for implementation details. Along the way, several misauthored tests were found: - 2 generated tests: - Cause: MS Word considers a line break a word delimiter. We don't use line-wrapping to distinguish two separate words. - `MovementAtExclusiveEnd` backwards word movement tests: - `end` will always be `writeTarget` because... - [degenerate range case] both `start` and `end` are moved to the beginning of the word (`writeTarget`) - [non-degenerate range case] from the `UiaTextRangeBase` bugfix, we should be moving to the word behind it. - this misauthored test was explicitly found by fixing the bug first explained here. ## References #10925 Word navigation testing
- Loading branch information
1 parent
168d28b
commit 5deb332
Showing
5 changed files
with
87 additions
and
56 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.