platform :ios, '11.0'
use_frameworks!
target 'MyApp' do
# Pods for MyApp
target 'MyAppUITests' do
inherit! :search_paths
# Pods for testing
end
end
致:
platform :ios, '11.0'
use_frameworks!
# Pods shared between MyApp and MyAppUITests
target 'MyApp' do
# Pods for MyApp only
end
target 'MyAppUITests' do
# Pods for testing
end
在我的例子中,我使用默认的空测试来完全清理项目。
如果我已经添加了任何吊舱,我收到这个错误。
解决方案是 Test 目标中至少有一个文件应导入 Foundation
import XCTest
import Foundation
@testable import CVZebra
class CVZebraTests: 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 your tests produce the correct results.
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure {
// Put the code you want to measure the time of here.
}
}
}