1
import Bow
2
import SwiftCheck
3

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

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

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

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

Read our documentation on viewing source code .

Loading