Skip to content

Commit 85bfa51

Browse files
authored
Corrects use of XCTAssertEqual macro in parallelization examples. (#963)
Fixes a typo in the "before" example of adopting test serialization. ### Motivation: The example of XCTest tests that need to run in series doesn't compile. ### Modifications: Correct the code in the example. ### Result: A documentation change that means the code snippet in the example is correct. ### 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 16f5846 commit 85bfa51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/Testing/Testing.docc/MigratingFromXCTest.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,13 +709,13 @@ suite serially:
709709
class RefrigeratorTests : XCTestCase {
710710
func testLightComesOn() throws {
711711
try FoodTruck.shared.refrigerator.openDoor()
712-
XCTAssertEqual(FoodTruck.shared.refrigerator.lightState == .on)
712+
XCTAssertEqual(FoodTruck.shared.refrigerator.lightState, .on)
713713
}
714714

715715
func testLightGoesOut() throws {
716716
try FoodTruck.shared.refrigerator.openDoor()
717717
try FoodTruck.shared.refrigerator.closeDoor()
718-
XCTAssertEqual(FoodTruck.shared.refrigerator.lightState == .off)
718+
XCTAssertEqual(FoodTruck.shared.refrigerator.lightState, .off)
719719
}
720720
}
721721
```

0 commit comments

Comments
 (0)