-
Notifications
You must be signed in to change notification settings - Fork 114
Update MigratingFromXCTest making it clear you must import Testing. #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,30 @@ Before the testing library can be used, it must be added as a dependency of your | |
Swift package or Xcode project. For more information on how to add it, see the | ||
[Getting Started](doc:TemporaryGettingStarted) guide. | ||
|
||
### Importing the testing library | ||
|
||
XCTest and the testing library are available from different modules. Instead of | ||
importing the XCTest module, import the Testing module: | ||
|
||
@Row { | ||
@Column { | ||
```swift | ||
// Before | ||
import XCTest | ||
``` | ||
} | ||
@Column { | ||
```swift | ||
// After | ||
import Testing | ||
``` | ||
} | ||
} | ||
|
||
A single source file can contain tests written with XCTest as well as other | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could be re-phrased so it's more concise: Using the two frameworks in a single file is supported. To do so, import both XCTest and Testing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. swift-testing is a package though, not a framework. So that may be confusing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace framework with library. Since there are a lot of situations where those terms are used interchangeably in day-to-day work, that casualness slipped into my suggestion. Aside from that one word, I think that sentence is a better explanation. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should I change to:
? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think what we've got here is fine as-is. @SeanROlszewski how strongly do you feel about it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good to me! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great! @Sajjon If you're ready to merge, let me know. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @grynspan good to merge IMO. What do I need to do? Update source branch with head? Rebase or merge main into source? Looks like there are no conflicts so GitHub ought to be able to merge it as is (I m on GitHub iOS app currently so not as "glanceable") There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll merge for you since you can't click the big green button yourself. :) |
||
tests written with the testing library. Import both XCTest and Testing if a | ||
source file contains mixed test content. | ||
|
||
### Converting test classes | ||
|
||
XCTest groups related sets of test methods in test classes: classes that inherit | ||
|
Uh oh!
There was an error while loading. Please reload this page.