我试图从我的 UITest 目标中调用一个快速的单例。我正在导入主模块:@testable import Ary
但是当我尝试构建它时说:
Undefined symbols for architecture armv7:
"Ary.DataModelLayerOperation.getter : Ary.DataModelLayer", referenced from:
AryUITests.AryUITests.setUp (AryUITests.AryUITests)() -> () in AryUITests.o
d: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
虽然语法突出显示有效(单例没有访问修饰符,所以它被标记为内部,这对于从测试目标进行访问应该是非常好的)......
我正在调用的函数是[在 XCTestCase 中]:
override func setUp() {
super.setUp()
if !DataModelLayerOperation.isUserLoggedIn() {
//do something
}
}