Quick + Nimble + SwiftCheck = QuickSwiftCheck.
QuickSwiftCheck supports macOS 10.10+, iOS 9.0+, tvOS 9.0+ and Linux.
QuickSwiftCheck allows you to use Quick and Nimble together with SwiftCheck:
sc_it("integer addition is commutative") {
forAll { (a: Int, b: Int) in
expect(a + b).sc_to(equal(b + a))
}
}
QuickSwiftCheck adds sc_
variants to it
, fit
, xit
, to
and toNot
functions, so that the original functions remain not overloaded (because doing so causes type checking ambiguities). This means you can use it
to create a regular test example and to
to create a regular expectation:
it("this is a regular test example") {
expect(...).to(...)
}
sc_it("this is a property-based test example") {
forAll {
expect(...).sc_to(...)
}
}
If you're using Swift Package Manager, add the following dependency to your Package.swift
:
.package(url: "https://github.com/akashivskyy/QuickSwiftCheck", from: "{version}"),
If you're using CocoaPods, add the following dependency to your Podfile
:
pod 'QuickSwiftCheck', '~> {version}'
These minor releases will keep QuickSwiftCheck up-to-date with latest versions of Quick, Nimble, SwiftCheck and Swift itself.
This project is made and maintained with ♡ by Adrian Kashivskyy.
The project is licensed under the MIT License.