TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | Apache 2 |
ReleasedLast Release | Jun 2016 |
SPMSupports SPM | ✓ |
Maintained by Daniel Leping.
XCTest3 library was mainly introduced to fulfill the needs of Swift Express - web application server side framework for Swift. Now it’s a part of Crossroad Labs Foundation.
Still we hope it will be useful for everybody else.
Bother less with #if swift(>=3.0) ;)
Add the following dependency to your Package.swift:
.Package(url: "https://github.com/crossroadlabs/XCTest3.git", majorVersion: 0)
Run swift build
and build your app. Package manager is supported on OS X, but it’s still recommended to be used on Linux only.
OK, XCTest has changed as well since introduction of Swift 3.0. APIs are different and you either have to use #if swift(>=3.0)
excessively or use XCTest3. With XCTest3 you just use Swift 3.0 APIs. You can read more about it in Boilerplate and Foundation3.
Here is an example on how to use XCTest with Swift 3.0 APIs
let expectation = self.expectation(withDescription: "test expectation")
expectation.fulfill()
self.waitForExpectations(withTimeout: 0)
OK, guys. We wrap XCTest APIs as we encounter them. Want more? We are glad to accept contributions. Let’s make Swift 3.0 compatibility layer together.
To get started, sign the Contributor License Agreement.