Met*_*hox 5 xcode command-line swift
我在Array.swift和String.swift文件中为Array和String类做了一些扩展; 我还分别在ArrayTest.swift和StringTest.swift中为它们添加了单元测试.现在我想在没有Xcode项目文件的情况下从命令行运行这些单元测试.
阅读后如何从命令行运行XCTest以获得快速应用程序?我想出了这样的事情:
xcrun -sdk macosx swiftc -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks \
-Xlinker -rpath \
-Xlinker /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks \
-lswiftCore Array.swift \
-module-name array_extension
Run Code Online (Sandbox Code Playgroud)
...似乎将数组扩展编译成模块.但是如何ArrayTest.swift针对该模块编译/链接文件?
| 归档时间: |
|
| 查看次数: |
731 次 |
| 最近记录: |