【发布时间】:2015-05-05 12:37:44
【问题描述】:
我无法对我的类进行单元化,因为 Xcode 没有看到我的主类在测试目标下。
我的 swift 模块被定义为 public
public class Geohash {
public static func encodeGeoHash(latitude: Double, longitude: Double, precision: Int = 12) -> String {
但在我的测试目标下我看不到符号,
class GeohashTests: XCTestCase {
func testEncode() {
Geohash // /Users/maximveksler/Developer/GeohashKit/GeohashKitTests/GeohashTests.swift:13:9: Use of unresolved identifier 'Geohash'
}
}
我的测试目标不包括 Geohash.swift
项目位于https://github.com/maximveksler/GeohashKit/blob/master/GeohashKitTests/GeohashTests.swift#L13
【问题讨论】:
标签: swift geohashing