[webkit-changes] [WebKit/WebKit] 930316: WKAttachmentTests: Return BOOL from helper methods...
Commit Queue
noreply at github.com
Tue Dec 13 08:19:21 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 93031607aa310cd8b552bcd8cd1936bda0e70a1d
https://github.com/WebKit/WebKit/commit/93031607aa310cd8b552bcd8cd1936bda0e70a1d
Author: David Kilzer <ddkilzer at apple.com>
Date: 2022-12-13 (Tue, 13 Dec 2022)
Changed paths:
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm
Log Message:
-----------
WKAttachmentTests: Return BOOL from helper methods that take NSError ** argument
https://bugs.webkit.org/show_bug.cgi?id=249198
<rdar://103280901>
Reviewed by Wenson Hsieh.
Change helper methods that take an `NSError **` argument to
return `BOOL`. This addresses a clang static analyer warning
for the osx.cocoa.NSError checker, and improves the tests since
they all pass `nil` for the `error:` parameter and were not
checking for errors.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(-[_WKAttachment synchronouslySetFileWrapper:newContentType:error:]):
(-[_WKAttachment synchronouslySetData:newContentType:newFilename:error:]):
- Change methods to return BOOL instead of void.
(TestWebKitAPI::TEST):
- Update tests to check return value of these methods since they
all pass `nil` for the `error:` parameter.
Canonical link: https://commits.webkit.org/257790@main
More information about the webkit-changes
mailing list