Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Run XCTest stuff using the Swift command line on macOS
/// Run with:
/// swift -F/Applications/ 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