1
import Bow
2
import SwiftCheck
3

4
// MARK: Generator for Property-based Testing
5

6
extension Const: Arbitrary where A: Arbitrary {
7 1
    public static var arbitrary: Gen<Const<A, T>> {
8 1
        return A.arbitrary.map(Const.init)
9
    }
10
}
11

12
// MARK: Instance of `ArbitraryK` for `Const`
13

14
extension ConstPartial: ArbitraryK where A: Arbitrary {
15 1
    public static func generate<T: Arbitrary>() -> Kind<ConstPartial<A>, T> {
16 1
        return Const.arbitrary.generate
17
    }
18
}

Read our documentation on viewing source code .

Loading