Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Run XCTest stuff using the Swift command line on macOS
/// Run with:
/// swift -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks xctest-in-repl.swift
import Foundation
import XCTest
class ATest : XCTestCase {
func testIt() {
print("Oh yeah, it's on")
XCTAssertTrue(false, "That needed to be true!")
}
func testThat() {
XCTAssertNil(nil, "Hell yes!")
}
}
XCTestSuite(forTestCaseClass: ATest.self).run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment