We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a6938e commit 6d4fd83Copy full SHA for 6d4fd83
Sources/Testing/Testing.docc/MigratingFromXCTest.md
@@ -326,7 +326,7 @@ their equivalents in the testing library:
326
| `XCTAssertLessThanOrEqual(x, y)` | `#expect(x <= y)` |
327
| `XCTAssertLessThan(x, y)` | `#expect(x < y)` |
328
| `XCTAssertThrowsError(try f())` | `#expect(throws: (any Error).self) { try f() }` |
329
-| `XCTAssertThrowsError(try f()) { error in … }` | `#expect { try f() } throws: { error in return … }` |
+| `XCTAssertThrowsError(try f()) { error in … }` | `let error = #expect(throws: (any Error).self) { try f() }` |
330
| `XCTAssertNoThrow(try f())` | `#expect(throws: Never.self) { try f() }` |
331
| `try XCTUnwrap(x)` | `try #require(x)` |
332
| `XCTFail("…")` | `Issue.record("…")` |
0 commit comments