Skip to content

Commit dd6e12b

Browse files
authored
Update README and other documentation files (#466)
This updates several project documentation files, including `README`, `CONTRIBUTING`, and DocC articles, to better describe the package and explain how to use it with recently updated tools. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated. Resolves rdar://129024698
1 parent 74a3401 commit dd6e12b

File tree

14 files changed

+215
-1080
lines changed

14 files changed

+215
-1080
lines changed

CONTRIBUTING.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Contributing to `swift-testing`
1+
# Contributing to Swift Testing
22

33
There are many ways to contribute to this project. If you are making changes
4-
that do not materially affect the user-facing semantics of `swift-testing`, such
4+
that don't materially affect the user-facing semantics of Swift Testing, such
55
as fixing bugs or writing documentation, feel free to open a pull request (PR)
66
directly.
77

8-
Larger changes that _do_ materially change the semantics of `swift-testing`,
8+
Larger changes that _do_ materially change the semantics of Swift Testing,
99
such as new APIs or modifications to existing APIs, must undergo community
1010
discussion prior to being accepted.
1111

@@ -33,17 +33,17 @@ hosting service.
3333

3434
## Setting up the development environment
3535

36-
First, clone the `swift-testing` repository from
36+
First, clone the Swift Testing repository from
3737
[https://github.com/apple/swift-testing](https://github.com/apple/swift-testing).
3838

39-
If you are preparing to make a contribution, you should fork the repository first
39+
If you're preparing to make a contribution, you should fork the repository first
4040
and clone the fork which will make opening PRs easier.
4141

4242
### Using Xcode (easiest)
4343

44-
1. Install the latest beta or release Xcode from
45-
[https://developer.apple.com/xcode](https://developer.apple.com/xcode).
46-
1. Open the `Package.swift` file from the cloned `swift-testing` repository in
44+
1. Install the latest beta version of
45+
[Xcode](https://developer.apple.com/xcode).
46+
1. Open the `Package.swift` file from the cloned Swift Testing repository in
4747
Xcode.
4848
1. Select the `swift-testing-Package` scheme (if not already selected) and the
4949
"My Mac" run destination.
@@ -54,18 +54,18 @@ and clone the fork which will make opening PRs easier.
5454
If you are using macOS and have Xcode installed, you can use Swift from the
5555
command line immediately.
5656

57-
If you are not using macOS or do not have Xcode installed, you need to download
57+
If you aren't using macOS or do not have Xcode installed, you need to download
5858
and install a toolchain.
5959

6060
#### Installing a toolchain
6161

62-
1. Download a toolchain. A recent **trunk development snapshot** toolchain is
62+
1. Download a toolchain. A recent **6.0 development snapshot** toolchain is
6363
required to build the testing library. Visit
64-
[swift.org](https://www.swift.org/download/#trunk-development-main) and
65-
download the most recent toolchain from the section titled
66-
**Snapshots — Trunk Development (main)**.
64+
[swift.org](http://swift.org/install) and download the most recent toolchain
65+
from the section titled **release/6.0** under **Development Snapshots** on
66+
the page for your platform.
6767

68-
Be aware that development snapshot toolchains are not intended for day-to-day
68+
Be aware that development snapshot toolchains aren't intended for day-to-day
6969
development and may contain defects that affect the programs built with them.
7070
1. Install the toolchain and confirm it can be located successfully:
7171

@@ -87,7 +87,7 @@ and install a toolchain.
8787

8888
## Local development
8989

90-
With a Swift toolchain installed and the `swift-testing` repository cloned, you
90+
With a Swift toolchain installed and the Swift Testing repository cloned, you
9191
are ready to make changes and test them locally.
9292

9393
### Building
@@ -103,7 +103,7 @@ $> swift test
103103
```
104104

105105
<!-- FIXME: Uncomment this once the the `swift test` command support running
106-
specific `swift-testing` tests.
106+
specific Swift Testing tests.
107107
108108
To learn how to run only specific tests or other testing options, run `swift
109109
test --help` to view the usage documentation.
@@ -166,7 +166,7 @@ your contributions are licensed under the
166166

167167
## Continuous integration
168168

169-
`swift-testing` uses the [`swift-ci`](https://ci.swift.org/) infrastructure for
169+
Swift Testing uses the [`swift-ci`](https://ci.swift.org/) infrastructure for
170170
its continuous integration (CI) testing. The bots can be triggered on PRs if you
171171
have commit access. Otherwise, ask one of the code owners to trigger them for
172172
you.

Documentation/CMake.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Building with CMake
22

3-
## Add `swift-testing` to Your Project
3+
## Add Swift Testing to your project
44

5-
Add `swift-testing` with to your project using the standard `FetchContent` or `find_package` mechanism, as appropriate for your project. For example:
5+
Add Swift Testing to your project using the standard `FetchContent` or
6+
`find_package` mechanism, as appropriate for your project. For example:
67

78
```cmake
89
include(FetchContent)
@@ -12,11 +13,12 @@ FetchContent_Declare(SwiftTesting
1213
FetchContent_MakeAvailable(SwiftTesting)
1314
```
1415

15-
## Define Your Test Executable
16+
## Define a test executable
1617

17-
To build a test executable using `swift-testing`, define an executable target
18-
of the form `[YOURPROJECT]PackageTests`, set the executable suffix to be
19-
`.swift-testing`, and link to your project targets with `Testing`.
18+
To build a test executable using Swift Testing, define an executable target of
19+
the form `[YOURPROJECT]PackageTests`, set the executable suffix to be
20+
`.swift-testing`, and link to the `Testing` target as well as any project
21+
targets you wish to test.
2022

2123
The following
2224
example shows what this might look like for a hypothetical project called
@@ -44,13 +46,10 @@ if(BUILD_TESTING)
4446
endif()
4547
```
4648

47-
## Add an Entry Point
49+
## Add an entry point
4850

49-
You must define a custom source file with a `@main` entry point. This should be
50-
a separate source file that is included in your test executable's `SOURCES`
51-
list.
52-
53-
The following example uses the SwiftPM entry point:
51+
You must include a source file in your test executable target with a
52+
`@main` entry point. The following example uses the SwiftPM entry point:
5453

5554
```swift
5655
import Testing
@@ -61,10 +60,10 @@ import Testing
6160
}
6261
}
6362
```
63+
6464
> [!WARNING]
6565
> The entry point is expected to change to an entry point designed for other
66-
> build systems prior to `swift-testing` v1.
67-
66+
> build systems prior to the initial stable release of Swift Testing.
6867
6968
## Integrate with CTest
7069

Documentation/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# swift-testing documentation
1+
# Swift Testing documentation
22

33
<!--
44
This source file is part of the Swift.org open source project
@@ -12,10 +12,10 @@ See https://swift.org/CONTRIBUTORS.txt for Swift project authors
1212

1313
## API and usage guides
1414

15-
The detailed documentation for `swift-testing` can be found on the
15+
The detailed documentation for Swift Testing can be found on the
1616
[Swift Package Index](https://swiftpackageindex.com/apple/swift-testing/main/documentation/testing).
1717
There, you can delve into comprehensive guides, tutorials, and API references to
18-
make the most out of `swift-testing`.
18+
make the most out of this package.
1919

2020
This documentation is generated using [DocC](https://github.com/apple/swift-docc)
2121
and is derived from symbol documentation in this project's source code as well
@@ -25,8 +25,8 @@ directory.
2525

2626
## Vision document
2727

28-
The [Vision document](https://github.com/apple/swift-testing/blob/main/Documentation/Vision.md)
29-
for `swift-testing` offers a comprehensive discussion of the project's design
28+
The [Vision document](https://github.com/apple/swift-evolution/blob/main/visions/swift-testing.md)
29+
for Swift Testing offers a comprehensive discussion of the project's design
3030
principles and goals.
3131

3232
## Development and contribution
@@ -38,11 +38,11 @@ principles and goals.
3838
provides guidance for developing and making project contributions.
3939
- [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md)
4040
describes this project's guidelines for code and documentation style.
41-
- [SPI groups in swift-testing](https://github.com/apple/swift-testing/blob/main/Documentation/SPI.md)
41+
- [SPI groups in Swift Testing](https://github.com/apple/swift-testing/blob/main/Documentation/SPI.md)
4242
describes when and how the testing library uses Swift SPI.
4343

4444
## Project maintenance
4545

4646
- The [Releases](https://github.com/apple/swift-testing/blob/main/Documentation/Releases.md)
4747
document describes the process of creating and publishing a new release of
48-
`swift-testing`a task which may be performed by project administrators.
48+
Swift Testing — a task which may be performed by project administrators.

Documentation/Releases.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# How to create swift-testing releases
1+
# How to create a release of Swift Testing
22

3-
This document describes how to create a new release of swift-testing using git
3+
This document describes how to create a new release of Swift Testing using Git
44
tags.
55

66
> [!IMPORTANT]
@@ -9,13 +9,13 @@ tags.
99
1010
## Version numbering
1111

12-
swift-testing uses [semantic versioning](https://semver.org) numbers for its
13-
open source releases. We use git _tags_ to publish new releases; we do not use
12+
Swift Testing uses [semantic versioning](https://semver.org) numbers for its
13+
open source releases. We use Git _tags_ to publish new releases; we don't use
1414
the GitHub [releases](https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases)
1515
feature.
1616

17-
At this time, all swift-testing releases are experimental, so the major version
18-
is always `0`. We are not using the patch component, so it is usually (if not
17+
At this time, all Swift Testing releases are experimental, so the major version
18+
is always `0`. We aren't using the patch component, so it's usually (if not
1919
always) `0`. The minor component should be incremented by one for each release.
2020

2121
For example, if the current release is version `0.1.0` and you are publishing
@@ -69,9 +69,9 @@ For example, you can initialize a new package in an empty directory with:
6969
swift package init --enable-experimental-swift-testing
7070
```
7171

72-
And then modify the package's `Package.swift` file to point at your local clone
73-
of the swift-testing repository. Ensure that the package's test target builds
74-
and runs successfully with:
72+
Then modify the package's `Package.swift` file to point at your local clone of
73+
the Swift Testing repository. Ensure that the package's test target builds and
74+
runs successfully with:
7575

7676
```sh
7777
swift test
@@ -81,8 +81,8 @@ swift test
8181
> Be sure to test changes on both macOS and Linux using the most recent
8282
> main-branch Swift toolchain.
8383
84-
If changes to swift-testing are necessary for the build to succeed, open
85-
appropriate pull requests on GitHub, then rebase your tag branch after they are
84+
If changes to Swift Testing are necessary for the build to succeed, open
85+
appropriate pull requests on GitHub, then rebase your tag branch after they're
8686
merged.
8787

8888
## Committing changes and pushing the release
@@ -95,7 +95,7 @@ git push -u origin x.y.z
9595
```
9696

9797
The release is now live and publicly visible [here](https://github.com/apple/swift-testing/tags).
98-
Developers using Swift Package Manager and listing swift-testing as a dependency
98+
Developers using Swift Package Manager and listing Swift Testing as a dependency
9999
will automatically update to it.
100100

101101
## Oh no, I made a mistake…

Documentation/SPI.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
# SPI groups in swift-testing
1+
# SPI groups in Swift Testing
22

3-
_Archived from <https://forums.swift.org/t/spi-groups-in-swift-testing/70236>_
3+
<!-- Archived from
4+
<https://forums.swift.org/t/spi-groups-in-swift-testing/70236> -->
45

5-
This post describes the set of SPI groups used in swift-testing. In general, two
6+
This post describes the set of SPI groups used in Swift Testing. In general, two
67
groups of SPI exist in the testing library:
78

8-
1. Interfaces that are not needed by test authors, but which may be needed by
9+
1. Interfaces that aren't needed by test authors, but which may be needed by
910
tools that use the testing library such as Swift Package Manager; and
1011
1. Interfaces that are available for test authors to use, but which are
1112
experimental or under active development and which may be modified or removed
@@ -40,7 +41,7 @@ modified or removed at any time.
4041

4142
## API and ABI stability
4243

43-
Once swift-testing reaches its 1.0 release, API changes will follow the same
44+
When Swift Testing reaches its 1.0 release, API changes will follow the same
4445
general rules as those in the Swift standard library: removal will be a last
4546
resort and will always be preceded by deprecation to allow tool and test authors
4647
time to migrate to newer interfaces.

0 commit comments

Comments
 (0)