mercredi 30 mars 2016

How to Test a Swift Script that's not in a Xcode Project

I started writing a basic swift script file and compiling it as:

swiftc *.swift -o exporter

Script doesn't do anything right now, but will have export, import_files etc. functions. I'm trying to find how I can test this basic script file?

Ideally, I'd have an exporter_test.swift file which I have all my unit tests. Also, it's important to note that I'm fairly new to swift, so not sure if this is doable outside of Xcode.

exporter.swift

func export() -> {
    // will do exporting of data that's been imported in import_files
}

func import_files(files: [String]) -> {
}

Aucun commentaire:

Enregistrer un commentaire