I'm generating custom data using FsCheck
's Gen
.
Suppose you have a function returning Gen<'T>
:
let chooseRectangle widthMax heightMax offset =
gen {
let! left = Gen.choose(0, widthMax-offset)
let! top = Gen.choose(0, heightMax-offset)
let! width = Gen.choose(offset, widthMax-left)
let! height = Gen.choose(offset, heightMax-top)
return { Left=left
Top=top
Width=width
Height=height
}
}
which is then used for generating data:
Gen.sample 0 10 (chooseRectangle 400 200 10)
is the size
argument (first one) used in this case and does it influence the value repartition?