-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add test for position outside string in findWordBoundary #30306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
EWS run on previous version of this PR (hash 41b06a4) Details
|
41b06a4 to
8f6af5a
Compare
|
EWS run on previous version of this PR (hash 8f6af5a) Details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with adding an underflow (“TooSmall”) test and considering adding expected results for the AppKit platform (macOS).
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we provide expected results for the USE(APPKIT) code path, or do they vary on each run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure, but the other implementations seem to use different libary or API calls so I don't think we can guarantee the output here.
https://searchfox.org/wubkat/source/Source/WebCore/platform/text/mac/TextBoundaries.mm#181
https://searchfox.org/wubkat/source/Source/WebCore/platform/text/TextBoundaries.cpp#93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s add an underflow (TooSmall) test as well.
8f6af5a to
f18660f
Compare
|
EWS run on previous version of this PR (hash f18660f) Details
|
f18660f to
74fc8f5
Compare
|
EWS run on previous version of this PR (hash 74fc8f5) Details |
74fc8f5 to
4e43c90
Compare
|
EWS run on previous version of this PR (hash 4e43c90) Details |
https://bugs.webkit.org/show_bug.cgi?id=276002 rdar://130331432 Reviewed by NOBODY (OOPS!). Checks the output to make sure it is in-range, even if the input is nonsense. * Tools/TestWebKitAPI/Tests/WebCore/TextBoundaries.cpp: (TestWebKitAPI::TEST(TextBoundariesTest, FindWordBoundaryEmpty)): (TestWebKitAPI::TEST(TextBoundariesTest, FindWordBoundaryPositionTooBig)): (TestWebKitAPI::TEST(TextBoundariesTest, FindWordBoundaryPositionTooSmall)):
4e43c90 to
3a4912d
Compare
|
EWS run on current version of this PR (hash 3a4912d) Details |
|
Can this land? |
3a4912d
3a4912d