I have made some extensions for Array & String class in Array.swift and String.swift files; I have also added unit test for them, in ArrayTest.swift and StringTest.swift, respectively. Now I would like to run these unit tests from command line without an Xcode project file.
After reading How can I run XCTest for a swift application from the command line? I have came up with something like this:
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
... which seems to compiling the array extensions into a module. But how can I compile / link the ArrayTest.swift
file against this module?