I have a situation where I need to override the type of the slice generated when using gen.SliceOf:
I have a base interface A which different structs (X & Y) implement
I have a generator for each of the structs, genX and genY
I'd like to use to gen.SliceOf(gen.OneOf(genX(), genY())) to generate a []A, to do so I have to provide an override for the type to SliceOf. This PR adds this functionality.
I have a situation where I need to override the type of the slice generated when using
gen.SliceOf
:A
which different structs (X
&Y
) implementgenX
andgenY
I'd like to use to
gen.SliceOf(gen.OneOf(genX(), genY()))
to generate a[]A
, to do so I have to provide an override for the type toSliceOf
. This PR adds this functionality.