Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/101.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何测试,使用XCTest和REPL swift_Ios_Swift_Testing_Read Eval Print Loop - Fatal编程技术网

Ios 如何测试,使用XCTest和REPL swift

Ios 如何测试,使用XCTest和REPL swift,ios,swift,testing,read-eval-print-loop,Ios,Swift,Testing,Read Eval Print Loop,有没有办法用XCTest在Swift中测试我的REPL项目 我创建了一个新的目标OSX单元测试包,将目标依赖项配置到我的项目中,并尝试使用 @testable import test 像这样声明类: func testPath() { let archiever = Archieves() } 我可以声明,但在构建和测试时,我得到以下错误: Undefined symbols for architecture x86_64: "test.Archieves.__allocati

有没有办法用XCTest在Swift中测试我的REPL项目

我创建了一个新的目标OSX单元测试包,将目标依赖项配置到我的项目中,并尝试使用

@testable import test
像这样声明类:

func testPath() {
    let archiever = Archieves()

}
我可以声明,但在构建和测试时,我得到以下错误:

Undefined symbols for architecture x86_64:
  "test.Archieves.__allocating_init (test.Archieves.Type)() -> test.Archieves", referenced from:
      testTests.testTests.testPath (testTests.testTests)() -> () in testTests.o
  "type metadata accessor for test.Archieves", referenced from:
      testTests.testTests.testPath (testTests.testTests)() -> () in testTests.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)