Skip to content

Commit 1a96c0c

Browse files
authored
Remove TemporaryGettingStarted.md. (#706)
This PR removes TemporaryGettingStarted.md and references to it, as well as references in documentation to Xcode 16 betas. Now that Swift 6 has shipped, these instructions are no longer needed. The section about testing on WASI has been moved to Documentation/WASI.md. ### 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.
1 parent 838a934 commit 1a96c0c

File tree

9 files changed

+54
-212
lines changed

9 files changed

+54
-212
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,6 @@ 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

12-
> [!IMPORTANT]
13-
> Since this package is currently experimental, a formal process for proposing
14-
> and reviewing significant changes has not yet been established. Until that
15-
> happens, please start a new discussion thread on the
16-
> [Swift forums](https://forums.swift.org) about any such changes prior to
17-
> submitting a PR.
18-
19-
To learn how to write tests using the testing library, rather than how to
20-
contribute to the testing library itself, see
21-
[Getting Started](https://github.com/swiftlang/swift-testing/tree/main/Sources/Testing/Testing.docc/TemporaryGettingStarted.md).
22-
2312
## Reporting issues
2413

2514
Issues are tracked using the testing library's
@@ -41,8 +30,8 @@ and clone the fork which will make opening PRs easier.
4130

4231
### Using Xcode (easiest)
4332

44-
1. Install the latest beta version of
45-
[Xcode](https://developer.apple.com/xcode).
33+
1. Install Xcode 16 or newer from the [Apple Developer](https://developer.apple.com/xcode/)
34+
website.
4635
1. Open the `Package.swift` file from the cloned Swift Testing repository in
4736
Xcode.
4837
1. Select the `swift-testing-Package` scheme (if not already selected) and the

Documentation/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ directory.
2727

2828
The [Vision document](https://github.com/swiftlang/swift-evolution/blob/main/visions/swift-testing.md)
2929
for Swift Testing offers a comprehensive discussion of the project's design
30-
principles and goals.
30+
principles and goals.
3131

3232
## Development and contribution
3333

@@ -41,6 +41,11 @@ principles and goals.
4141
- [SPI groups in Swift Testing](https://github.com/swiftlang/swift-testing/blob/main/Documentation/SPI.md)
4242
describes when and how the testing library uses Swift SPI.
4343

44+
## Experimental platform support
45+
46+
- Instructions are provided for running tests against a
47+
[WASI/WebAssembly target](https://github.com/swiftlang/swift-testing/blob/main/Documentation/WASI.md).
48+
4449
## Project maintenance
4550

4651
- The [Releases](https://github.com/swiftlang/swift-testing/blob/main/Documentation/Releases.md)

Documentation/Releases.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@ be updated so that the release can be used as a package dependency:
5555

5656
1. Delete any unsafe flags from `var packageSettings` as well as elsewhere in
5757
the package manifest files.
58-
1. Open the "Documentation/Testing.docc/TemporaryGettingStarted.md" file and
59-
update the line:
60-
61-
```diff
62-
- .package(url: "https://github.com/swiftlang/swift-testing.git", branch: "main"),
63-
+ .package(url: "https://github.com/swiftlang/swift-testing.git", from: "x.y.z"),
64-
```
6558

6659
The repository's local state is now updated. To commit it to your branch, run
6760
the typical commit command:

Documentation/WASI.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Running tests for WebAssembly
2+
3+
<!--
4+
This source file is part of the Swift.org open source project
5+
6+
Copyright (c) 2023-2024 Apple Inc. and the Swift project authors
7+
Licensed under Apache License v2.0 with Runtime Library Exception
8+
9+
See https://swift.org/LICENSE.txt for license information
10+
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
11+
-->
12+
13+
<!-- NOTE: The voice of this document is directed at the second person ("you")
14+
because it provides instructions the reader must follow directly. -->
15+
16+
To run tests for WebAssembly, install a Swift SDK for WebAssembly by following
17+
[these instructions](https://book.swiftwasm.org/getting-started/setup-snapshot.html).
18+
19+
Because `swift test` doesn't know what WebAssembly environment you'd like to use
20+
to run your tests, building tests and running them are two separate steps. To
21+
build tests for WebAssembly, use the following command:
22+
23+
```sh
24+
swift build --swift-sdk wasm32-unknown-wasi --build-tests
25+
```
26+
27+
After building tests, you can run them using a [WASI](https://wasi.dev/)-compliant
28+
WebAssembly runtime such as [Wasmtime](https://wasmtime.dev/) or
29+
[WasmKit](https://github.com/swiftwasm/WasmKit). For example, to run tests using
30+
Wasmtime, use the following command (replace `{YOURPACKAGE}` with your package's
31+
name):
32+
33+
```sh
34+
wasmtime .build/debug/{YOURPACKAGE}PackageTests.wasm --testing-library swift-testing
35+
```
36+
37+
Most WebAssembly runtimes forward trailing arguments to the WebAssembly program,
38+
so you can pass command-line options of the testing library. For example, to list
39+
all tests and filter them by name, use the following commands:
40+
41+
```sh
42+
wasmtime .build/debug/{YOURPACKAGE}PackageTests.wasm list --testing-library swift-testing
43+
wasmtime .build/debug/{YOURPACKAGE}PackageTests.wasm --testing-library swift-testing --filter "FoodTruckTests.foodTruckExists"
44+
```

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ incrementally, at your own pace.
122122
Detailed documentation for Swift Testing can be found on the
123123
[Swift Package Index](https://swiftpackageindex.com/swiftlang/swift-testing/main/documentation/testing).
124124
There, you can delve into comprehensive guides, tutorials, and API references to
125-
make the most out of this package. To try it yourself, see
126-
[Getting Started](https://swiftpackageindex.com/swiftlang/swift-testing/main/documentation/testing/temporarygettingstarted).
125+
make the most out of this package. Swift Testing is included with the Swift 6
126+
toolchain and Xcode 16.
127127

128128
Other documentation resources for this project can be found in the
129129
[README](https://github.com/swiftlang/swift-testing/blob/main/Documentation/README.md)

Sources/Testing/Testing.docc/DefiningTests.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ Define a test function to validate that code is working correctly.
1616

1717
Defining a test function for a Swift package or project is straightforward.
1818

19-
This article assumes that the package or project being tested has already been
20-
configured with a test target. For help configuring a package to use the testing
21-
library, see <doc:TemporaryGettingStarted>.
22-
2319
### Import the testing library
2420

2521
To import the testing library, add the following to the Swift source file that

Sources/Testing/Testing.docc/Documentation.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ their problems.
4444

4545
### Essentials
4646

47-
- <doc:TemporaryGettingStarted>
4847
- <doc:DefiningTests>
4948
- <doc:OrganizingTests>
5049
- <doc:MigratingFromXCTest>

Sources/Testing/Testing.docc/MigratingFromXCTest.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ The testing library provides much of the same functionality of XCTest, but uses
2121
its own syntax to declare test functions and types. Here, you'll learn how to
2222
convert XCTest-based content to use the testing library instead.
2323

24-
### Add the testing library as a dependency
25-
26-
Before the testing library can be used, it must be added as a dependency of your
27-
Swift package or Xcode project. For more information on how to add it, see the
28-
[Getting Started](doc:TemporaryGettingStarted) guide.
29-
3024
### Import the testing library
3125

3226
XCTest and the testing library are available from different modules. Instead of

Sources/Testing/Testing.docc/TemporaryGettingStarted.md

Lines changed: 0 additions & 178 deletions
This file was deleted.

0 commit comments

Comments
 (0)