从Xcode 10.1(也许是10)开始,当我创建单元测试文件时,我没有调用super.tearDown()和super.setUp()。
我没有在发行说明中看到这种变化。
所以我的问题还是应该编写super.tearDown()和super.setUp()吗?
class SomethingTests: XCTestCase {
override func setUp() {
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify …Run Code Online (Sandbox Code Playgroud)