-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix new package XCTest file formatting and include throws keyword #3448
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
Fix new package XCTest file formatting and include throws keyword #3448
Conversation
Motivation: Fix formatting of the XCTest source file in newly `init`'ed packages, and include the `throws` keyword on the example XCTest method as a convenience to users and to promote use of throwing test methods in XCTests. Changes: - Fix a bug in the formatting of XCTest source files in `InitPackage`, where the closing `"""` string terminator was outdented one level too far, which resulted in the file contents being indented unnecessarily. - Include the `throws` keyword on `func testExample()` in the new Library type package template. - Modify an existing test to validate these improvements. rdar://77209458 rdar://77209464
@swift-ci please test |
@swift-ci please smoke test |
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.
LGTM, thanks!
Looks like there's something broken in swift-driver?
cc @artemcm |
@swift-ci please smoke test macOS platform |
Sorry, this was due to compiler version mismatch between swift-driver CI and self-hosted SwiftPM CI. |
@stmontgomery thanks for this! please note we would need another cherry-pick PR into release/5.5 if you want to include this in 5.5 |
…iftlang#3448) Motivation: Fix formatting of the XCTest source file in newly `init`'ed packages, and include the `throws` keyword on the example XCTest method as a convenience to users and to promote use of throwing test methods in XCTests. Changes: - Fix a bug in the formatting of XCTest source files in `InitPackage`, where the closing `"""` string terminator was outdented one level too far, which resulted in the file contents being indented unnecessarily. - Include the `throws` keyword on `func testExample()` in the new Library type package template. - Modify an existing test to validate these improvements. rdar://77209458 rdar://77209464
) (#3449) Motivation: Fix formatting of the XCTest source file in newly `init`'ed packages, and include the `throws` keyword on the example XCTest method as a convenience to users and to promote use of throwing test methods in XCTests. Changes: - Fix a bug in the formatting of XCTest source files in `InitPackage`, where the closing `"""` string terminator was outdented one level too far, which resulted in the file contents being indented unnecessarily. - Include the `throws` keyword on `func testExample()` in the new Library type package template. - Modify an existing test to validate these improvements. rdar://77209458 rdar://77209464
Motivation: Fix formatting of the XCTest source file in newly
init
'ed library packages, and include thethrows
keyword on the example XCTest method as a convenience to users and to promote use of throwingXCTest methods.
Changes:
InitPackage
, where the closing"""
stringterminator was outdented one level too far, which resulted in the file contents being indented unnecessarily.
throws
keyword onfunc testExample()
in the new Library type package template.rdar://77209458
rdar://77209464