GenComposer

struct GenComposer

The composer class which passes in the context and allows us to generate more complex data with ease

  • Generates a value using the provided Gen<T>

    Declaration

    Swift

    public func generate<T>(_ gen: Gen<T>) -> T

    Parameters

    gen

    A generator capable of producing vlaues of type T

    Return Value

    A value of type T

  • Generates an arbitrary value of type T where T conforms to Arbitrary

    Declaration

    Swift

    public func generate<T>() -> T where T : Arbitrary

    Return Value

    An arbitrary value of type T