Swift Package Index


Quick + Nimble + SwiftCheck


  • The latest stable release is 3.2.0. Released 23 days ago.
  • The last commit to develop was 23 days ago.

Swift Version Compatibility

  • 3.2.0 and develop
    5.3
    5.2
    5.1
    5.0
    4.2
Full build results

Platform Compatibility

  • 3.2.0 and develop
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
Full build results

QuickSwiftCheck

Quick + Nimble + SwiftCheck = QuickSwiftCheck.

Requirements

QuickSwiftCheck supports macOS 10.10+, iOS 9.0+, tvOS 9.0+ and Linux.

Usage

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(...)
    }
}

Installation

Swift Package Manager

If you're using Swift Package Manager, add the following dependency to your Package.swift:

.package(url: "https://github.com/akashivskyy/QuickSwiftCheck", from: "{version}"),

CocoaPods

If you're using CocoaPods, add the following dependency to your Podfile:

pod 'QuickSwiftCheck', '~> {version}'

Roadmap

Version 3.x

These minor releases will keep QuickSwiftCheck up-to-date with latest versions of Quick, Nimble, SwiftCheck and Swift itself.

About

This project is made and maintained with ♡ by Adrian Kashivskyy.

License

The project is licensed under the MIT License.