Commit f43740c
authored
Link Swift Testing documentation in its test template (#9368)
Link Swift Testing documentation in its test template
### Motivation:
This hopefully makes it easier for new users to find relevant
documentation for our test framework!
It also matches the existing pattern where XCTest documentation is
linked in its respective test template.
### Modifications:
- Add a link to Swift Testing documentation in the test template.
- Trims some trailing whitespace. Realistically, I don't have much
control over this since my editor is respecting the project's
.editorconfig's `trim_trailing_whitespace = true` directive. I can
manually put them back if that would be better.
### Result:
Default Swift Testing template will include a comment linking to the
developer docs.
Testing it locally:
```
~/scraps/autogen/xx.ZtJsA ❯ /Users/jerrychen/workspace/opensource/swift-package-manager/.build/arm64-apple-macosx/debug/swift-package init
Creating library package: xx.ZtJsA
Creating Package.swift
Creating .gitignore
Creating Sources
Creating Sources/xx.ZtJsA/xx_ZtJsA.swift
Creating Tests/
Creating Tests/xx.ZtJsATests/
Creating Tests/xx.ZtJsATests/xx_ZtJsATests.swift
~/scraps/autogen/xx.ZtJsA ❯ /bin/cat Tests/xx.ZtJsATests/xx_ZtJsATests.swift
import Testing
@testable import xx_ZtJsA
@test func example() async throws {
// Write your test here and use APIs like `#expect(...)` to check expected conditions.
// Swift Testing Documentation
// https://developer.apple.com/documentation/testing
}
```1 parent f13f2a4 commit f43740c
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
552 | | - | |
| 552 | + | |
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
| |||
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
647 | | - | |
| 647 | + | |
648 | 648 | | |
649 | 649 | | |
650 | 650 | | |
| |||
731 | 731 | | |
732 | 732 | | |
733 | 733 | | |
| 734 | + | |
| 735 | + | |
734 | 736 | | |
735 | 737 | | |
736 | 738 | | |
| |||
0 commit comments